lms icon indicating copy to clipboard operation
lms copied to clipboard

Quiz Enhancements

Open pateljannat opened this issue 1 year ago • 5 comments

Problem

Quizs in LMS right now are restrictive. From the perspective of an Instructor, the UX is not good. Instructors cannot reuse questions. They cannot assign marks for each question. There is no pass percentage. Quizzes are not time-based.

Enhancements

The questions in the quiz will now be an independent doctype. This will make reusing the questions feasible. There will be a category linked to questions so including questions from a particular category to a quiz should be easier. Each question will now have marks and the overall quiz will have a pass percentage.

Instructors will also be able to decide if they want to randomize the order of quiz questions. The quiz can also be time-bound. Instructors can have a start time and duration. After the duration, the quiz will be automatically submitted.

Checklist

  • [x] Quiz question will be an independent doctype. #553
  • [x] Instructors can assign marks to each quiz question
  • [x] Overall quiz will have a pass percentage
  • [x] If the quiz is part of a lesson, the lesson will be marked as complete only if the pass percentage is met. #531
  • [ ] Randomize the order of questions each time for users. #471

pateljannat avatar Sep 12 '23 13:09 pateljannat

Hi @pateljannat is this feature request in the pipeline? When we can expect this?

Developer-rahul07 avatar Oct 03 '23 05:10 Developer-rahul07

Hi @pateljannat, I hope you're doing well. I recently experimented with Frappe LMS for a proof of concept and came across an issue with the quiz questions.

Yes, they should be an independent document type. Period.

However, I discovered that you had already submitted a request for this improvement along with other significant advancements for quizzes.

I highly recommend checking them out, as they are essential features that would give us more confidence in recommending Frappe LMS to potential clients.

asharamseervi avatar Oct 05 '23 22:10 asharamseervi

Hey @pateljannat,

I wanted to thank you for your great work on this issue so far. However, I noticed that the feature to "Randomize the order of questions each time for users" is still missing. Once this feature is added, LMS has almost all of the basic functionalities that is needed for the Quizzes.

In my opinion, this feature should be implemented in a way that allows the user to choose whether or not they want the questions in their quiz to be randomized. If the user checks the box to enable this feature, the functionality should be implemented every time the student takes the quiz.

asharamseervi avatar Nov 01 '23 14:11 asharamseervi

@asharamseervi randomization will be implemented soon.

pateljannat avatar Nov 03 '23 05:11 pateljannat

@pateljannat,

I made the following changes in the quiz.js file and successfully achieved the random question generation every time, details are as below:

file location: lms/lms/templates/quiz/quiz.js

Insert the below codes between line 8 and line 9 // Shuffle questions once on page load let questions = $(".question"); questions = Array.from(questions); const totalQuestions = questions.length;

for (let i = questions.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [questions[i], questions[j]] = [questions[j], questions[i]]; } changed line 51, 54, 56, 62 with the following (in sequence order): 51 let current_index = self.current_index;

54 if (self.show_answers) {

56 } else if (!self.show_answers && next_index == total_questions) {

62 $(questions[next_index - 1])

I have checked this with 2 separate students logged in from different computers and from start to end both had different orders of questions secondly, I also reloaded the browser to start again also the sequence changed.

mkashif1973 avatar Dec 09 '23 10:12 mkashif1973