Page MenuHomePhabricator

Proposal: [Programs & Events Dashboard] Improve system for copying courses from one Dashboard to another
Open, Needs TriagePublic

Description

Profile Information

Name: Pranjal Rajput
Year: 3rd
Degree: Bachelor of Technology
University: Indian Institute of Technology (IIT BHU) Varanasi
Timezone: Indian Standard Time (UTC +5:30)
Github: pr4nj41
Slack Handle: pr4nj41
LinkedIn: pranjal-rajput
Working hours: 10:00 AM to 08:00 PM (IST)


Introduction To The Project

[Programs & Events Dashboard] Improve system for copying courses from one Dashboard to another

This project aims to enhance the course copying feature present for copying courses across the servers, specifically addressing the issue of incomplete content transfer between the Programs & Events Dashboard and the Wiki Education Dashboard instances.

Currently, when courses are copied between these platforms, crucial elements such as Timeline content are not included, posing challenges in reusing assignment plans. The proposed improvements will streamline the transfer process, enabling seamless migration of Timelines and other essential content across servers. This involves both frontend and backend components, requiring expertise in Ruby, JavaScript, and React.

Project Goals And Benefits:
  • Enhance course copying functionality between the Programs & Events Dashboard and the Wiki Education Dashboard instances to include complete content transfer, particularly Timelines.
  • Improve user experience by streamlining the course copying process, reducing manual intervention, and minimising data loss during migration.
Estimated Size: 350 hours
Possible mentor(s)

@Ragesoss

Have you contacted your mentors already?

Yes


Current Implementation of Course Copying Across Servers

  1. The copy_course_controller is defined, which handles the copying of courses across servers. It requires admin permissions and responds to HTML requests.
  2. The copy method within the controller is responsible for initiating the course copying process. It instantiates a copy course service object with the URL of the course to be copied.
  3. The CopyCourse class is initialised with the URL of the course to be copied. Several Helper methods like get_request are used to fetch course data, category data, and user data from the source server via HTTP requests.
  4. The make_copy method retrieves main course data, extracts relevant attributes to be copied, creates a new course on the destination server, and sets a random passcode for authentication.
  5. Within the copy_main_course_data, if the course contains update logs, a method fix_update_logs_parsing is called to ensure proper parsing by converting keys to integers.
  6. The add_tracked_wikis method adds tracked wikis associated with the course to the destination server, excluding the home wiki which is automatically added.
  7. The copy_tracked_categories_data method copies tracked categories associated with the course, creating them on the destination server.
  8. The copy_users_data method copies user data associated with the course, creating corresponding user entries and assigning roles within the course on the destination server.
DRAWBACKS:
  • Only admins are allowed to use the current implementation of copying courses between Programs & Events Dashboard and the Wiki Education Dashboard servers.
  • Incomplete transfer of data is taking place during copying, the timeline and including content doesn't get copied.
  • Normal users only have the functionality of cloning courses from the current server. They can’t copy courses between Programs & Events Dashboard and Wiki Education Dashboard servers.

PROPOSED IMPLEMENTATION

  1. The Timeline data of any course is available at url = <Course_Url>/timeline.json. We will use this to get the timeline data while copying the course.

Course Timeline:

Pic 1.png (1×2 px, 457 KB)

Snapshot of corresponding timeline data at <course_url>/timeline.json:

Pic 2.png (1×2 px, 425 KB)

  1. The timeline data can be retrieved from this timeline.json by defining a method retrieve_timeline_data in course_copy.rb file.
  2. Define a copy_timeline_data method for adding the timeline data to the new course (copied from another server).
  3. Add code to copy_timeline_data method for copying data of blocks to the timeline of the new course. Similarly, other attributes can be copied as needed.
  4. Update the copy_main_course_data method present in copy_course.rb to enable copying of more attributes from the original course.
  5. Call the above defined methods inside the predefined make_copy method in course_copy.rb
  6. Make a separate controller for non-admin users which would run only when the user is on Programs & Events Dashboard allowing copying of courses from Wiki Education Dashboard to Programs & Events Dashboard.
  7. Error handling is implemented throughout the process to catch exceptions such as failed HTTP requests or invalid data, providing appropriate error messages to the user interface.
  8. Add code for the frontend part. The users will get options to either copy the course from Wiki Education Dashboard by using course url or make a clone of a course from the current Dashboard by selecting the course name, only when they are present on Program and Events Dashboard.
  9. Integrate frontend code with backend.
  10. Add tests for frontend and backend code.
  11. Write documentation.
Advantages of Proposed Implementation:
  • Normal users will now have both the options of cloning courses from the current server and courses from Wiki Education Dashboard to Programs & Events Dashboard (across server).
  • Course copying functionality will have the feature of copying the timeline including its content for both admin and normal users.
  • No intervention or clashes with any of the current implementations.
  • Reuse of predefined methods and attributes instead of defining new ones.
The proposed solution mentioned above is adaptable. I am flexible and open to suggestions in making necessary changes based on requirements and discussions with my mentor.

Additional Task

Problem

The current Dashboard mobile view presents challenges such as overflowing pages, non-responsiveness and design flaws, significantly limiting its functionality on small screens. This restricts user engagement and hampers the overall user experience.

Proposed Solution
  1. Make required CSS changes to solve overflowing and responsiveness issues.
  2. Introduce Controllers/Pagination mechanisms to manage large tables with numerous columns on smaller screens.
  3. Create responsive designs for mobile view

My Contributions

I have been an active member of the WikiEduDashboard for the last four months and have been actively engaged in discussions and reviews for all the proposed changes and Functionalities.
I have 29+ merged PRs in the WikiEduDashboard project. I have also created over 7 issues.
Following are the pull requests I’ve opened in WikiEduDashboard projects along with their status:

Pull Requests created by me

S. No.PRsDescriptionStatus
1.#5716Implemented Role-Based No-Assignment Message in 'Assignment & Exercise'Merged
2.#5715Fixed Edit button overlapping in Timeline wizard summaryMerged
3.#5712Improved the layout of "subject specific guides" block in TimelineMerged
4.#5704Added Starting Day Feature for making calendar weeks dynamicOpen
5.#5688Implemented Native confirm component instead of JavaScript confirm instanceMerged
6.#5686Fixed Broken Layout of Article Viewer User LegendMerged
7.#5680Fixed overflow in Article ViewerMerged
8.#5679Fixed Feedback Form UI on Home tab of a courseMerged
9.#5664Improved Difference ViewerMerged
10.#5656Fixed overlapping of campaign_navbar at the desktop view on Language PickerMerged
11.#5651Fixing warnings when starting GuardMerged
12.#5641Fixed UI of Training module path overlapping with Table of contentsMerged
13.#5640Fixed overlap of Training module navbar with breadcrumbsMerged
14.#5637​​Fixed State Persistence of Quality ChecklistMerged
15.#5631Refactored Block.jsx from Class component to Functional component.Open
16.#5630Refactored TrainingModulesViewMode.jsx from Class component to Functional componentMerged
17.#5626Eliminating Redundant Clicks on Submit Button in Article FinderMerged
18.#5625Refactored training_module_handler.jsx from Class component to Functional componentMerged
19.#5624Refactored slide_menu.jsx from Class component to Functional componentMerged
20.#5623Refactored 'assignment.jsx' from Class component to Functional componentMerged
21.#5622Improved UI of Feedback FormMerged
22.#5620Refactored 'default_campaign_form.jsx' from Class component to Functional componentMerged
23.#5619Refactored 'campaign_ores_plot.jsx' from Class component to Functional componentMerged
24.#5618Refactored 'modal.jsx' from Class component to Functional ComponentMerged
25.#5617Refactored 'wp10_graph.jsx' from Class component to Functional ComponentMerged
26.#5616Refactored 'edit_size_graph.jsx' from Class component to Functional ComponentMerged
27.#5612Refactored 'course.jsx' to functional componentOpen
28.#5611Fixed Alignment issue on Article Finder PageMerged
29.#5605Added cancel button on the "Create New or Clone Program" component on P&E dashboardMerged
30.#5603Added an option to close Program Creation Component on P&E dashboard explicitlyMerged
31.#5597Added Informative Text to 'See More' Button on Hover in P&E Dashboard 'Articles' Tab of a ProgramMerged

Issues created by me

S. No.IssueDescriptionStatus
1.#5701Calendar not rendering correctly in date-picker in Course CreatorOpen
2.#5663Improvement in the UI of Difference ViewerClosed
3.#5636Bug: Checkbox state not being preserved in Quality ChecklistClosed
4.#5608Error while trying to add article as an available article in "Article Finder"Closed
5.#5604"Create New or Clone Program" Component has no way to close it explicitlyClosed
6.#5602No way to close the Program Creation Component on P&E dashboard explicitlyClosed
7.#5558Responsive UI for the 'Training' Page in Mobile ViewClosed

TIMELINE

Community Bonding Period

May 1 - May 26

  • Discuss and get pending pull requests merged
  • Discuss with the mentors on what communication medium would they prefer for updates regarding the project
Coding period begins

May 27 - June 9

  • Discuss what other parameters need to be copied along with the timeline from the original course to copied course.
  • Add methods to copy timeline and other parameters in the current implementation.

June 10 - June 16

  • Discuss the design of the Frontend part for course copying feature for normal users.
  • Start designing the Figma mockup of the design.

June 17 - June 23

  • Develop the Frontend part for course copying features for normal users.
  • Make a separate controller for course copying features for normal users.

June 24 - June 31

  • Integrate the Frontend code with the backend code.
  • Test the code and its working.

July 1 - July 7

  • Discussion around testing of the written code.
  • Write tests in the test suite for added frontend code.
  • Write tests in the test suite for added backend code.
Phase-1 Evaluation (July 8 -July 12 )

July 12 - July 17

  • Resolve bugs
  • Document the features implemented.

July 17 - July 21

  • Discuss with the mentor the required design/Frontend code changes for mobile view.
  • If required, start designing the Figma mockup of the design.

July 22 - August 11

  • Make changes to frontend code to improve mobile view.

August 12 - August 18

  • Buffer Week for implementing pending tasks.
  • Write a blog about my Summer of Code journey.
Final Evaluation (August 19 - August 26)
This timeline is designed for a standard 12-week program. If additional time is required to incorporate more features and use cases, the timeline will be extended by a few weeks accordingly.

POST GSOC

I am eager to continue my involvement with the WikiEdu & Wikimedia community beyond the scope of GSoC. Post the GSoC period, I would love to continue contributing to this project and implement more features that may not have been covered in GSoC in the short time interval.
I will also try to provide consistent patches and bug fixes to the project. I would be available to update, debug, and maintain the code of the app as required, ensuring that it remains robust and reliable.


About Me

I’m Pranjal Rajput, a 3rd year Engineering undergraduate at IIT (BHU), Varanasi. You may know me better as PR4NJ41 on GitHub!
I am an avid developer and love contributing to open source. I started out with development on December '21 with the basics. Later, over the months, I explored various technologies. Via a course I undertook, I practised the MERN stack and by being a part of the website teams of various college bodies and hackathons, I worked on other technologies, like Javascript, ReactJS, Ruby, SQL, NodeJS, Git, Firebase, Django etc.
I am the Tech Executive of various clubs like Club of Sustainability and Innovation, and college fests like FMC weekend. I am also a part of the Club of Programmers, IIT (BHU), the programming society of my university - IIT (BHU) Varanasi.
I started contributing to several open source projects in March’22 and have successfully participated in Hacktoberfest’22 and '23. I also have experience in ML and have been selected in Amazon ML School ‘23.

MY CODING SKILLS

I have been interested in programming since my first semester itself. I started out with competitive programming wherein I used to code in C++ and eventually, I ended up developing an interest in Software Development.
Starting off with basics (HTML, CSS, and JavScript), I later moved to frameworks and technologies built around ReactJS, Ruby, Node.js and SQL. Following are the frameworks, technologies, and languages I’ve used:

  • Javascript
  • ReactJS
  • Ruby
  • SQL
  • MongoDB
  • Express.js
  • Node.js
  • Django
  • Angular
  • Flutter

Here you can find all the projects I've been working on and contributing to: https://github.com/PR4NJ41
I am a quick learner and very keen on expanding my horizons to newer technologies. If the project requires a skill I need to learn, I will give my 100% in practising it.

Internships

Web Developer Intern at DhanDolat (Dec ‘22 - Feb ‘22)

  • DhanDolat is a Financial Learning Platform.
  • Developed the Frontend part of the website using ReactJS.
  • Built the Backend and database using SQL.
  • Implemented google authentication.