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

Adding multianswer question type in the report item analysis

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.7, 1.7.1, 1.7.2, 1.7.3, 1.8, 1.8.1, 1.8.2, 1.8.3, 1.9
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
      None
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_15_STABLE, MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      Actually the multianswer (cloze) question type is not displayed in the item analysis report as there is no $question->options->answers in the main question.
      report.php
      $q = get_question_responses($quizquestions[$i], $states[$i]);
      155 if (empty($q))

      { 156 continue; 157 }

      questionlib.php

      function get_question_responses($question, $state)

      { 1474 global $QTYPES; 1475 $r = $QTYPES[$question->qtype]->get_all_responses($question, $state); 1476 return $r; 1477 }

      question/questiontype.php
      function get_all_responses(&$question, &$state) {
      469 if (isset($question->options->answers) && is_array($question->options->answers)) {
      470 $answers = array();
      471

      They are in the subquestions that are not listed in the report.
      I am developping a multianswer calculated question type extending (and compatible) with the actual calculated question type.
      I will fix the problem first for the new multianswer calculated question type in a way that can be compatible with the actual multianswer (cloze) question type

        Attachments

        1. clozeAnalysis.patch
          1 kB
        2. questiontype.php
          45 kB
        3. questiontype.php
          76 kB
        4. questiontype.php
          38 kB
        5. report.php
          32 kB
        6. report.php
          32 kB
        7. report.php
          32 kB
        8. report.php
          38 kB
        9. screenshot-1.jpg
          screenshot-1.jpg
          198 kB

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              ppichet Pierre Pichet
              Participants:
              Component watchers:
              Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              8 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: