Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-49913

Problems with grades and jumps when importing questions in lesson

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.7.8, 2.8.6
    • 2.7.7, 2.8.5
    • Lesson
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • Hide

      Create a new lesson
      Import the questions-Questions-Default for Questions-20150416-0228.xml file attached to MDL-49882 choosing "Moodle XML format" for file format
      You should see no error or warning during import
      This should import 5 questions

      1. Match the activity to the description
      2. Which of the following are standard blocks in Moodle?
      3. 1+1 =?
      4. Anyone who uses Moodle is a ...
      5. Moodle is an acronym for Martin's Object-Oriented Dynamic Learning Environment.

      And display that 4 questions with unsupported question types were not imported (when MDL-49882 will be fixed 2 more questions will be imported)

      Verify that when you edit these questions settings are correct :

      • For the "Match the activity to the description" matching question, verify that correct response text is "That's the correct answer" with jump set to next page and score = 1 and wrong response text is "That's the wrong answer" with jump set to this page and score = 0
      • For the "Blocks" multichoice - multiple-answer question page verify that the 3 correct answers "Upcoming events", "Latest news" and "Recent activity" have jump set to next page and score set to 1 and that the wrong answer "My home" has jump set to this page and score set to 0
      • for the "Simple math" numerical question page verify that the 2:2 answer has its jump set to next page and its score set to 1
      • For the "Moodle user" short answer question page verify that the "Moodler" answer jump is next page and score is 1, same for the "Moodle user" and "Mddler" jump is This page and score is 0
      • For the "Moodle acronym" true/false question page, verify that the "True" answer jump to This page and score is 0 and that the "False" answer jump to Next page and score is 1. Editing the question, verify that the correct and wrong answers are at the right place in the edit question page UI.

      Attempt the questions as a student and verify that for the "Match the activity to the description" matching question, after you answered the question the feedback is displayed on 3 lines and not squashed on a single line with no <br> HTML tags
      Also verify the same thing for the the "Blocks" multichoice - multiple-answer question.
      Note that the way this multichoice with multiple answers allowed question display feedbacks is atrocious: the student answers are displayed first then the corresponding feedbacks, so students don't understand which feedback goes with which answer. I intend to improve that in MDL-43042 so don't fail this issue because of that problem even if IMHO it's a major problem.

      Show
      Create a new lesson Import the questions-Questions-Default for Questions-20150416-0228.xml file attached to MDL-49882 choosing "Moodle XML format" for file format You should see no error or warning during import This should import 5 questions Match the activity to the description Which of the following are standard blocks in Moodle? 1+1 =? Anyone who uses Moodle is a ... Moodle is an acronym for Martin's Object-Oriented Dynamic Learning Environment . And display that 4 questions with unsupported question types were not imported (when MDL-49882 will be fixed 2 more questions will be imported) Verify that when you edit these questions settings are correct : For the "Match the activity to the description" matching question, verify that correct response text is "That's the correct answer" with jump set to next page and score = 1 and wrong response text is "That's the wrong answer" with jump set to this page and score = 0 For the "Blocks" multichoice - multiple-answer question page verify that the 3 correct answers "Upcoming events", "Latest news" and "Recent activity" have jump set to next page and score set to 1 and that the wrong answer "My home" has jump set to this page and score set to 0 for the "Simple math" numerical question page verify that the 2:2 answer has its jump set to next page and its score set to 1 For the "Moodle user" short answer question page verify that the "Moodler" answer jump is next page and score is 1, same for the "Moodle user" and "Mddler" jump is This page and score is 0 For the "Moodle acronym" true/false question page, verify that the "True" answer jump to This page and score is 0 and that the "False" answer jump to Next page and score is 1. Editing the question, verify that the correct and wrong answers are at the right place in the edit question page UI. Attempt the questions as a student and verify that for the "Match the activity to the description" matching question, after you answered the question the feedback is displayed on 3 lines and not squashed on a single line with no <br> HTML tags Also verify the same thing for the the "Blocks" multichoice - multiple-answer question. Note that the way this multichoice with multiple answers allowed question display feedbacks is atrocious: the student answers are displayed first then the corresponding feedbacks, so students don't understand which feedback goes with which answer. I intend to improve that in MDL-43042 so don't fail this issue because of that problem even if IMHO it's a major problem.

      This was discovered while testing MDLQA-7902 and MDLQA-7903.
      When you import questions and some of them have fractional grades, then the import fails because in mod/lesson/format.php in the lesson_save_question_options function there is

      $answer->grade = $question->fraction[$key] * 100;
      

      for shortanswer, numerical, truefalse and multichoice questions
      but the grade field of the lesson_answersis defined as TYPE int
      So we should round this expression during import.

      Some notes:

      • in fact answer->grade is never used in the lesson code for anything and if you create any question type directly in the lesson activity, answer->grade is always 0, I must admit I don't understand why this field is here !!
      • on the contrary several lesson pages types use answer->score to grade the student during attempt
      • but during import for several question types answer->score is not set correctly so you must edit the question after import if you want it to work correctly !

      Summary

      • as always in lesson things are broken and/or not fully implemented
      • this lesson import code that "borrow" some code from the question bank is an awful mess

            jmvedrine Jean-Michel Vedrine
            jmvedrine Jean-Michel Vedrine
            John Okely John Okely
            Dan Poltawski Dan Poltawski
            Adrian Greeve Adrian Greeve
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.