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

Quiz overview report typo for slotmarks user preference

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.5.7, 2.6.4, 2.7.1
    • 2.5.4, 2.6.1
    • Quiz
    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • 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.)

      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.

            timhunt Tim Hunt
            jmvedrine Jean-Michel Vedrine
            Gareth J Barnard Gareth J Barnard
            Marina Glancy Marina Glancy
            John Okely John Okely
            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.