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

changes to api of question_response_analyser

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      Use the tool I created : https://github.com/jamiepratt/moodle-quiz_simulate

      See the README for installation instructions. And there is a example quiz back-up and stepdata.csv file in the mod/quiz/report/simulate/examples/singleattemptonetryperstudent/ directory to get you started.

      You could restore the backup and then upload the stepdata.csv to simulate attempts by students using the 'Simulate' quiz report.

      Check that you can click through from the statistics report to the response analysis for a few questions (click on the question name) be sure to check the response analysis for the two sub questions of the random question in slot 1.

      In mod/quiz/report/simulate/examples/singleattemptonetryperstudent/completestats.html you can find the expected stats and responses as calculated before the changes. Check that you can download a similar report - go to the top of the statistics report and you will see "Download full report as ", choose 'Unpaged XHTML Document' and press Download. Please visually check for any regressions.

      Show
      Use the tool I created : https://github.com/jamiepratt/moodle-quiz_simulate See the README for installation instructions. And there is a example quiz back-up and stepdata.csv file in the mod/quiz/report/simulate/examples/singleattemptonetryperstudent/ directory to get you started. You could restore the backup and then upload the stepdata.csv to simulate attempts by students using the 'Simulate' quiz report. Check that you can click through from the statistics report to the response analysis for a few questions (click on the question name) be sure to check the response analysis for the two sub questions of the random question in slot 1. In mod/quiz/report/simulate/examples/singleattemptonetryperstudent/completestats.html you can find the expected stats and responses as calculated before the changes. Check that you can download a similar report - go to the top of the statistics report and you will see "Download full report as ", choose 'Unpaged XHTML Document' and press Download. Please visually check for any regressions.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-41751-master

      Description

      Change api so the class is used like this :

      $analyser = new question_response_analyser($questionid);
       
      $lastcalculated = $analyser->get_last_calculated_time($qubaids);
      if (!$lastcalculated) {
          $analysis = $analyser->get_cached($qubaids);
      } else {
          $analysis = $analyser->calculate($qubaids);
      }
      

      We will make it possible to calculate the question response stats separately to other stats. We need to use $qubaids->hashcode() instead of quizstatisticsid to identify cached stats.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/13