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

Quiz overview report typo for slotmarks user preference

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.4, 2.6.1
    • Fix Version/s: 2.5.7, 2.6.4, 2.7.1
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide

      To test this, you need two different Moodle quizzes, with some student attempts.

      1. Go to Admin -> Results in one quiz.
      2. Change the 'Marks for each question' setting in that quiz to No.
      3. Go back to the course page.
      4. Go to the other quiz.
      5. Go to Admin -> Results for that quiz.
      6. Verify that in that other quiz, 'Marks for each question' setting in that quiz also set to No.

      (So, we are testing that the state of that setting is correctly stored as a user-preference.)

      Show
      To test this, you need two different Moodle quizzes, with some student attempts. Go to Admin -> Results in one quiz. Change the 'Marks for each question' setting in that quiz to No. Go back to the course page. Go to the other quiz. Go to Admin -> Results for that quiz. Verify that in that other quiz, 'Marks for each question' setting in that quiz also set to No. (So, we are testing that the state of that setting is correctly stored as a user-preference.)
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      In the quiz overview report

      public function setup_from_user_preferences() {
              parent::setup_from_user_preferences();
       
              $this->slotmarks = get_user_preferences('quiz_report_overview_detailedmarks', $this->slotmarks);
          }
       
          public function update_user_preferences() {
              parent::update_user_preferences();
       
              if (quiz_has_grades($this->quiz)) {
                  set_user_preference('quiz_overview_slotmarks', $this->slotmarks);
              }
          }
      

      You see, the name used to store and load user preference are not the same.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Jul/14