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
create training basics --> implement take training feature and resume training feature for user #1951
base: dev
Are you sure you want to change the base?
Conversation
3a7bb55
to
4bf486d
Compare
7a3246d
to
662d905
Compare
Quick Note: There is a weird bug i just noticed Currently OnPlatform training is treated unique based on version_number and training_type. So if a user had taken a training with version 1.1, and then next month there is a minor update with version 1.2, their previous training would still be valid. But if they go and they try to review the training again, they will be retaking the new version 1.2 of training.(because by default we always provide them with the latest version of training). Which brings to the weird bug which is that if the user hadn't finished the training 1.1 and the version 1.2 was lunched, then when they try to resume the training, it will be like taking the training from scratch for them |
1. Course The idea is that a Training Course will be defined with user.TrainingType. This is the ultimate(top) model for a training course. The Course content for TrainingType model is implemented by training app. On Training app, `Course` model can be created for each TrainingType. For different versions of the same training course, we can create as many `Course` models as we want as long as the version is different. A Course is divided into modules. Each module has a description and a list of contents and quizzes. Modules are like chapters in a book. Each module has a list of contents and quizzes. Contents are like paragraphs in a chapter. Quizzes are like questions in a chapter. for ordering the modules, contents and quizzes, we have used `order` field. This field is used to order the modules, contents and quizzes The ordering is unique for each instance of the parent model. It is expected that the order will start from 1 and will be incremented by 1 with no gaps. 2. Tracking User Progress during training When a user starts a training, a `CourseProgress` model should be created for that user and the version of course. This model tracks the progress of the user during the course. Similarly, when a user starts a module, a ModuleProgress model should be created for each module in the training. For quiz, content progress, we should create a instance of CompletedContent or CompletedQuiz model when the user completes a content or quiz. I dont think we need to track when someone started a content or quiz as they are expected to complete in few minutes.
Added a serializer which will be used to allow admins to create a new training or update the existing training. To track the updates to training(manage versions), we are using semantic versioning. If the updated course has a major update eg: from 1.9 to 2.0, then all the users who did complete the previous versions will be sent an email asking them to complete the new version of Course within x days.
9e86701
to
d4e396f
Compare
1. Added example json files to create and update a Course training. 2. updated the fixtures to create permissions to create the Course training and an demo Course training.
allows admins to manage(create, update or download an existing course) courses from the admin console We also added a Course Guidelines under `Guidelines` in the admin console which explains the steps to create a course
9c4f330
to
905f170
Compare
I merged this PR on top of #1950 to do some testing. There were a few issues I came across while testing:
Minor thing, but it is currently possible to upload duplicate training courses at:
Reloading the page after following the points above triggers the following error. Returning to http://localhost:8000/settings/platform-training/3/ and clicking "Continue" triggers the same error.
After completing a course, returning to http://localhost:8000/settings/platform-training/3/ and clicking "Review" triggers the same |
…asics__create_training_admin
Here users should be able to see their progress and basic training details, modules, etc
Thanks for running through this today @Rutvikrj26. As discussed, please could you remove all javascript elements as far as possible? If dynamic features are needed, consider HTMX. |
…here are active courses on the platform
…training and courses
This adds test coverage for most of the URLs in the `project` app. See the previous pull requests #1695, #1922, #2108 for background. With this change, the bulk of site functionality should now be included in the TestURLs framework. A few small apps are left to add: - `oauth` (should be easy) - `sso` (should be easy but I'm not sure this is enabled in test configs) - `training` (awaiting pull #1951) And a number of URLs across the site are skipped due to a lack of fixture data: - `console` - `edit_submission` - `copyedit_submission` - `awaiting_authors` - `publish_submission` - `event_agreement_detail` - `event_agreement_delete` - `event_agreement_new_version` - `project` - `serve_document` - `published_project_request_access` - `search` - `redirect_challenge_project`
@bemoody I've updated the URL for the heading and the PR is ready for further review / merge. |
What?
Here i have added a feature that will allow users to take the training from settings. User can choose from a list of available
trainings and take the onplatform training. Users can also see the progress of the training and can resume the training from where they left off.
Why?
This is a follow up PR for #1950
How?
Here we create 3 new views to handle the training.
1.
training.views.take_training
This view will take care of training homepage. It will show progress of the training if the user has already started the training, show them details of the training and allow them to start/resume and review the training.
2.
training.views.take_module_training
This view will take care of letting users take individual modules of the training. It will allow users to take the module from where they left off.
Users will need to finish module1 before they can start module2 and so on.
Here we have used a considerable amount of javascript to make the training interactive. How it works is when the user loads the module page,
we initially load all the content, quizzes and order them based on the
order
field, and initially we hide all the content and quizzes.Then we show either the first content,quiz or the next one after a content, quiz that they had completed last time. and we keep doing this until the user has completed the module.
3.
training.views.update_module_progress
Testing? [WIP]
Following tests will be added
Screenshots (optional)
Anything Else?
How to take a training as a user?
Settings