-
Notifications
You must be signed in to change notification settings - Fork 8
Feature/outreach dashboard integration #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Aditya0545
merged 25 commits into
indictechcom:main
from
Agamya-Samuel:feature/outreach-dashboard-integration
Jan 30, 2026
Merged
Feature/outreach dashboard integration #160
Aditya0545
merged 25 commits into
indictechcom:main
from
Agamya-Samuel:feature/outreach-dashboard-integration
Jan 30, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add migration to add outreach_dashboard_url column to contests table - Column is nullable to support optional Outreach Dashboard integration - Migration includes upgrade and downgrade functions
- Add outreach_dashboard_url field to Contest model - Include field in to_dict() serialization - Update __init__ to accept outreach_dashboard_url parameter
- Create outreach_dashboard service module with URL parsing and validation - Implement parse_outreach_url() to extract school and course_slug from URL - Implement validate_outreach_url() to validate URL format - Implement fetch_course_data() to fetch course data from Outreach Dashboard API - Add error handling for network issues and API errors - Export service functions in services __init__.py
- Add outreach_dashboard_url validation in create_contest endpoint - Add outreach_dashboard_url validation in update_contest endpoint - Create new endpoint GET /contest/<id>/outreach-data to fetch course data - Pass outreach_dashboard_url to Contest constructor - Handle cases where URL is missing or API call fails
- Create outreachDashboard service for API calls - Implement fetchCourseData() to fetch course data from backend - Use existing api axios instance for consistency - Include error handling
…form - Add outreach_dashboard_url input field to contest creation form - Add URL validation for Outreach Dashboard URLs - Include field in form submission payload - Add helper text explaining URL format - Reset field on form reset
- Create new component to display Outreach Dashboard course information - Fetch course data using outreachDashboard service - Display course details: title, description, school, type, dates - Show course statistics: student count, edit count, article count, etc. - Display status indicators: published, ended, closed, wiki_edits_enabled - Include refresh button to reload data - Handle loading and error states gracefully
- Add console logging for debugging contest creation - Improve error message extraction from API responses - Add better error logging for troubleshooting
- Add tab navigation when contest has outreach_dashboard_url - Add Overview and Outreach Dashboard tabs - Conditionally render OutreachDashboardTab component - Add outreach_dashboard_url field to contest edit form - Include field in contest update payload - Fix template structure for proper tab display - Show Overview content directly when no Outreach Dashboard URL
Refactor parse_outreach_url to use path splitting instead of regex pattern matching. This allows the function to automatically ignore additional path segments like /home, /enroll, /course.json, etc. that users might include when copying URLs from the Outreach Dashboard website. - Replace regex pattern matching with path splitting approach - Extract only first 3 path segments (courses, school, course_slug) - Ignore any additional path segments automatically - Update documentation to reflect support for URLs with trailing paths
- Add helper functions _build_api_url() and _make_api_request() for reusable API interaction - Refactor fetch_course_data() to use new helper functions - Add fetch_course_users() function to fetch course users data - Update service exports in __init__.py - Improve error handling and code organization for future API endpoints
- Move specific outreach routes before general /<int:contest_id> route - Add GET /contest/<id>/outreach-users endpoint for fetching course users - Import fetch_course_users from outreach_dashboard service - Fix Flask route matching issue that caused 'Endpoint not found' errors
- Add fetchCourseUsers() function to call backend outreach-users endpoint - Import api service for HTTP requests - Add proper error handling and validation for contestId parameter - Return consistent response format matching other service functions
- Add nested tab navigation for Course and Users sections - Implement users data fetching with loadUsersData() function - Add users table displaying username, role, enrollment date, statistics - Add loading and error states for users data - Add refresh functionality for users data - Update component to accept contestId prop for API calls
- Update OutreachDashboardTab component usage to pass contestId prop - Enable users data fetching functionality in the component
…rd service - Add fetch_course_articles() function to fetch articles data from API - Handle articles.json endpoint with proper URL parsing - Extract articles array from API response structure - Add comprehensive error handling and validation - Export fetch_course_articles in services __init__.py
- Add GET /contest/<id>/outreach-articles endpoint - Import fetch_course_articles from outreach_dashboard service - Place route before general /<int:contest_id> route for proper matching - Return articles data with success/error response format
- Add fetchCourseArticles() function to call backend outreach-articles endpoint - Include proper error handling and validation for contestId parameter - Return consistent response format matching other service functions - Use axios interceptor for automatic response data extraction
- Add third tab button for Articles section with file icon - Implement articles data fetching with loadArticlesData() function - Add articles table displaying title, wiki, namespace, statistics - Show new article indicator, character counts, views, and contributors - Add loading and error states for articles data - Include refresh functionality and external link to articles - Update component to import and use fetchCourseArticles service
…d service - Add fetch_course_uploads() function to fetch uploads data from API - Handle uploads.json endpoint with proper URL parsing - Extract uploads array from API response structure - Add comprehensive error handling and validation - Export fetch_course_uploads in services __init__.py
- Add GET /contest/<id>/outreach-uploads endpoint - Import fetch_course_uploads from outreach_dashboard service - Place route before general /<int:contest_id> route for proper matching - Return uploads data with success/error response format
- Add fetchCourseUploads() function to call backend outreach-uploads endpoint - Include proper error handling and validation for contestId parameter - Return consistent response format matching other service functions - Use axios interceptor for automatic response data extraction
- Add fourth tab button for Uploads section with upload icon - Implement uploads data fetching with loadUploadsData() function - Add uploads table displaying file name, uploader, date, status, usage - Show thumbnail previews with click-to-open functionality - Display usage count badges and status indicators (Active/Deleted) - Add loading and error states for uploads data - Include refresh functionality and external links to Wikimedia Commons - Add openUrl() helper function for secure external link handling - Update component to import and use fetchCourseUploads service
- Changed @click handler from 'loadData' to 'loadCourseData' to match the actual function name - Refresh button now properly reloads course data when clicked
Collaborator
Author
Preview2026-01-30.19-34-14.mp4 |
…scription documentation - Deleted FIXES_APPLIED.md as it was no longer needed - Introduced new documentation files: FEATURES_DOCUMENTATION.md and PROJECT_DESCRIPTION.md - FEATURES_DOCUMENTATION.md provides an extensive overview of all platform features, including user management, contest management, and security protocols - PROJECT_DESCRIPTION.md outlines the project’s purpose, key features, technology stack, and use cases
Aditya0545
approved these changes
Jan 30, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #92
Outreach Dashboard Integration
Overview
Integrates Wikimedia's Outreach Dashboard API into WikiContest, allowing users to link contests with Outreach Dashboard courses and view course data, participants, articles, and uploads directly within the contest view.
Features
/home,/enroll, etc.)Technical Changes
Backend
outreach_dashboard_urlcolumn to contests table (Alembic migration)outreach_dashboard.py) with extensible architectureGET /api/contest/<id>/outreach-dataGET /api/contest/<id>/outreach-usersGET /api/contest/<id>/outreach-articlesGET /api/contest/<id>/outreach-uploadsFrontend
OutreachDashboardTabcomponent with four sub-tabs