Moodle
  1. Moodle
  2. MDL-6103

Give a warning if, because of random questions, a quiz may require more questions from a category than are there

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 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.7.4, 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.9, 1.9.1
    • Fix Version/s: None
    • Component/s: Questions, Quiz
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • Rank:
      1655

      Description

      At the moment, you only get errors when a student attempts the quiz (or when teachers "preview" the quiz), which is a bad way to organise things.

      Old description below. The above is point 3. The others are non-issues or duplicates.

      -----------------------------------------------

      I want to create a test made up of randomly selected questions from a certain category of questions, e.g. My questions.

      I create the test, go into Editing Quiz mode, and at the bottom of the Questions window, I click on Add (2) random questions. Those 2 questions are added to the list of questions in my quiz.

      If I then click on the Preview tab at the top of my Editing Quiz window, I can preview the test, comprising the 2 randomly selected questions. However, there are a number of problems here.

      1- It would be more logical for the Test preview mode to display 2 different randomly selected questions each time I click on the Preview button. Of course, the questions will really be randomly selected in Student mode, but why not in Teacher mode?

      2- While in Quiz Editing mode, In the Action column, the behavior of the two icons Preview and Edit is not as expected.

      2a- The Preview link displays this error message: The number of random questions required is more than are still available in the category!, which is silly.
      2b- The Edit link displays something totally unconnected with editing the question at hand...

      3- The correct place for the control mechanism, and ensueing error message should reside with the Add random questions at the bottom right of the screen, not with the individual Edit question link in the left part of the screen.

      PS Same bugs in Moodle 1.7

        Issue Links

          Activity

          Hide
          Martin Dougiamas added a comment -

          From Anthony Borrow (aborrow at jesuitcp.org) Thursday, 13 July 2006, 10:56 PM:

          Joseph - As regards point #1, as I understand it, the preview button will randomize and if you want to see a different quiz then you press the Start Again button to see 2 different randomly selected questions. This allows for testing things like saving some answers and coming back to the preview.

          From Anthony Borrow (aborrow at jesuitcp.org) Thursday, 13 July 2006, 10:58 PM:

          As regards #2, I am unable to replicate this or have not seen this behavior and I frequently create and use randomized questions. Could you provide me a gift file of your questions and verify that the quiz questions are from the correct category. A screenshot may be helpful.

          From Anthony Borrow (aborrow at jesuitcp.org) Thursday, 13 July 2006, 11:00 PM:

          As regards #3, I agree that when you click to add 5 random questions from a particular category that it should check for the number of questions at that time. I do support a check on runtime as well as it attempts to explain what is happening.

          From Anthony Borrow (aborrow at jesuitcp.org) Thursday, 13 July 2006, 11:12 PM:

          I agree that #3 should be addressed. It could either be an interface issue or perhaps a feature request. Perhaps a function should be created to return the number of random questions available in a given category. Then that function could be called prior to generating a quiz and report the error that a complete quiz cannot be generated. I am thinking here that the advantage would be to avoid not seeing an incompletely generated quiz when viewed by pages. It would check to ensure that a complete quiz could be generated and then do it. This could also prevent teacher from adding too many random questions. For some reason, I thought that this was checked previously but it did not appear to be when I created a quiz on test.moodle.com

          Show
          Martin Dougiamas added a comment - From Anthony Borrow (aborrow at jesuitcp.org) Thursday, 13 July 2006, 10:56 PM: Joseph - As regards point #1, as I understand it, the preview button will randomize and if you want to see a different quiz then you press the Start Again button to see 2 different randomly selected questions. This allows for testing things like saving some answers and coming back to the preview. From Anthony Borrow (aborrow at jesuitcp.org) Thursday, 13 July 2006, 10:58 PM: As regards #2, I am unable to replicate this or have not seen this behavior and I frequently create and use randomized questions. Could you provide me a gift file of your questions and verify that the quiz questions are from the correct category. A screenshot may be helpful. From Anthony Borrow (aborrow at jesuitcp.org) Thursday, 13 July 2006, 11:00 PM: As regards #3, I agree that when you click to add 5 random questions from a particular category that it should check for the number of questions at that time. I do support a check on runtime as well as it attempts to explain what is happening. From Anthony Borrow (aborrow at jesuitcp.org) Thursday, 13 July 2006, 11:12 PM: I agree that #3 should be addressed. It could either be an interface issue or perhaps a feature request. Perhaps a function should be created to return the number of random questions available in a given category. Then that function could be called prior to generating a quiz and report the error that a complete quiz cannot be generated. I am thinking here that the advantage would be to avoid not seeing an incompletely generated quiz when viewed by pages. It would check to ensure that a complete quiz could be generated and then do it. This could also prevent teacher from adding too many random questions. For some reason, I thought that this was checked previously but it did not appear to be when I created a quiz on test.moodle.com
          Hide
          Tim Hunt added a comment -

          Argh! One issue per bug report please.

          1) As Anthony rightly says, this is not a bug. The quiz preview intentionally keeps the same preview attempt open until you click the 'Start again' button, then it re-randomises.

          2a) The preview link makes no sense, and should be removed. This is a duplicate of MDL-6650.

          2b) The edit screen is useful. It lets you change the two important properties of the random question (which category is picked from, and whether subcategories are included). So not a bug.

          3) This is a genuine issue that is not reported elsewhere, I am editing this bug report so that it covers this single issue.

          Brain-dump of how such a check could be implemented:

          The following test would have to be done every time the list of question in the quiz changed, and every time questions were created, deleted, moved to another category or imported. However, we would have to be sure this did not make everything unbearably slow.

          1. Given a list of question ids. (e.g. all the questions in a particular quiz).

          2. Get a list of all the categories that contain random questions from the list of question ids.

          3. For each of those categories, compare:

          A) The number of questions in that category that are not in the list of questionids, and which are of a type that can be used by the random question type

          and

          B) The number of random questions from the list in this category, or in a parent of this category and which are set to pick from the parent category and its subcategories.

          4. If any of the comparisons give the wrong answer, display a warning message listing the categories that do not have enough questions.

          Show
          Tim Hunt added a comment - Argh! One issue per bug report please. 1) As Anthony rightly says, this is not a bug. The quiz preview intentionally keeps the same preview attempt open until you click the 'Start again' button, then it re-randomises. 2a) The preview link makes no sense, and should be removed. This is a duplicate of MDL-6650 . 2b) The edit screen is useful. It lets you change the two important properties of the random question (which category is picked from, and whether subcategories are included). So not a bug. 3) This is a genuine issue that is not reported elsewhere, I am editing this bug report so that it covers this single issue. Brain-dump of how such a check could be implemented: The following test would have to be done every time the list of question in the quiz changed, and every time questions were created, deleted, moved to another category or imported. However, we would have to be sure this did not make everything unbearably slow. 1. Given a list of question ids. (e.g. all the questions in a particular quiz). 2. Get a list of all the categories that contain random questions from the list of question ids. 3. For each of those categories, compare: A) The number of questions in that category that are not in the list of questionids, and which are of a type that can be used by the random question type and B) The number of random questions from the list in this category, or in a parent of this category and which are set to pick from the parent category and its subcategories. 4. If any of the comparisons give the wrong answer, display a warning message listing the categories that do not have enough questions.
          Hide
          Olli Savolainen added a comment -

          This may be addressed during quiz UI redesign project if time allows.

          Show
          Olli Savolainen added a comment - This may be addressed during quiz UI redesign project if time allows.
          Hide
          Tim Hunt added a comment -

          This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.

          For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

          Show
          Tim Hunt added a comment - This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

            People

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

              Dates

              • Created:
                Updated: