-
Notifications
You must be signed in to change notification settings - Fork 20
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
Platform Training and Quiz 1 #1887
Conversation
8508cb6
to
2cdecfb
Compare
This pull request needs a bit more explanation of what you're doing and why. Uploading images is a complicated subject, and the way you're trying to implement it here is not going to work for a lot of reasons. Uploading images seems like quite a separate issue from everything else you're trying to do here. Please try to first get the on-platform training feature working by itself, without any special support for images. After that feature is implemented, then we can think about ways to (make it easier to) embed images in the training content. |
2cdecfb
to
ec80e43
Compare
2c5cac6
to
5310de7
Compare
WorkflowHere is the workflow of how to use the feature Users
ModelsThe idea here is that we will use existing To track the content, quiz for a Training, we have model For example, If there is an update to the training on the frontend, we will use the How is the take training implemented?For training, when a user loads the training page, we will load all the content, quiz and sort them serially. We will then show the first content or quiz to the user. When the user clicks next, we will show the next content or quiz. If the user clicks back, we will show the previous content or quiz. If the user clicks submit, we will check if the user has completed all the content and quiz, if yes, then we will mark the training as completed and send an email to the user. Questions
and track the question and section the user has completed here. We can use this to show the progress to the user as well(like 10% course completed or 3/10 modules , 2/5 quiz completed completed)
TODOS
Notes from Harry
|
@alistairewj @bemoody @tompollard Ready for feedback/suggestions. Please check the note above |
Quick note on what i am working on currently
|
Added a serializer to allow admins to create a new training or update the existing training. To track the updates to training, we are using semantic versioning. If the updated training has a major update eg from 1.9 to 2.0, then all the users who did completed the previous versions will be sent an email asking them to complete the new version of training with x days.
Allows users to take the test from settings. The quiz.html file loads all the content and questions based on the order. All the data is hidden from user and gradually displayed as users go through the training We have two level of verifications of answers. the first one is done on quiz.html where users go through the content and they will see the related questions and answer the questions. users can go to next section or skip the question only if they have answered the question correctly. We also have another verification done on view. here if the users had correctly answered the questions a json string is generated and sent via POST, we will then check the database to verify that the data in json string(question,answer) matched with the database. This should help us stop someone from just sending a post request to complete the training. Quick note: 1. Users are not able to resume the test if they refresh the browser 2. Users can take the same test multiple times 3. Only multiple choice questions is supported yet.
Currently the training lacks proper organization. We have a OnPlatform Training which holds bunch of content and quizzes under it directly. On all online learning platforms or physical books, the training/courses are organized under chapter(in books) and modules/lessons and sections. With the idea of having modules under training instructors will be able to organize the training content under appropriate modules. Also, i didnot squash this commit just in case we want to revert the changes later.
Serializer was updating the existing onplatform training on update, which is not the desired behaviour. On update the desired behaviour is that we should create a new onplatform training with the details provided in json and link it to the TrainingType of the OnPlatform Training being updated.
Here i added an about section, a simple table to show module details and progress
Here i created basic links that lets users access the modules, take the training, and submit the modules after completion. The idea/expectation is that users need to complete the modules sequentially(enforced in code). So when the user submits the last module, we will provide them a certificate. To complete this, we need to track the progress of the users(which is something we already want). So in the coming few commits, i will add the resume feature and complete TODO's of this commit(Since this commit depends on few unwritten features, i left notes)
Since the training is divided into modules, it makes sense to have a view to update the status. The idea here is that when a user hits the next button and the content/quiz has not be already completed, a post request will be sent to the view, and the view will mark the content or quiz as completed
This commit implements the resume feature on the part where we will use previously saved progress data and show the content to the user to that place in the module. So this change will kick in when the user loads a module, and following things will happen 1. We will check the the user has completed previous models, if not send them to training page 2. Resume the module to where they left
This will let users skip completed quizs for the given module.
Since the users might revise/review a module, it should be helpful if we can show them the right answer that they had selected earlier when they took the training.
This commit implements 2nd part of resume feature. Here we will mark the progress of users as they go through the content and quizzes, so that next time they reload the module, they will be redirected to the last section they left When a user clicks next button, then we will temporarily disable the next button and send a post request to backend to update the progress. if the server responds with success we will display next slide. If the server responds with error, we will show an error message and ask them to try again. And finally enable the next button.
Since all the code from here has been successfully refactored into take_module, it should be safe to clean this view.
1.Actually save module and training progress Earlier, the status of module or training progress was not being updated. 2.If the user has completed a module, then we should be sending them to the first content or quiz, but because of a small bug, we were redirecting them to end of module
Here we updated the training home page to display the progress of modules, and dates to user. This should be helpful as users will be able to see which modules have been completed and when.
5310de7
to
3a29de8
Compare
This is for the on platform training.
It was a vey big PR and creating this as a way to break it into bits.
This Part 1:
The Part 2 will be having this as a Parent and will contain the logic:
To take OP Trainings
To create OP Trainings