Moodle
  1. Moodle
  2. MDL-8648

Allow essay questions to be selected by random questions

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.9.4, 2.0
    • Component/s: Questions, Quiz
    • Labels:
      None
    • Environment:
      Linux Ubuntu, Moodle 1.7.1, PHP 5, MySQL
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Rank:
      34372

      Description

      When you try to add Essay questions to a quiz using the Add Random questions feature, they are added to the quiz but if you try to preview them or take an exam the following message appears:

      The number of random questions required is more than this category contains!

      The essay questions in the category are not the problem because there are more questions than the ones selected.

      It will be great if this feature can be fixed, because many more traditional teachers that like to score the exams by them selves are not using the quiz moodle because they cannot have random exams.

        Issue Links

          Activity

          Hide
          Pierre Pichet added a comment -

          I reproduce the problem on the UQAM Moodle 1.6.3 , it is specific to essay questions

          Show
          Pierre Pichet added a comment - I reproduce the problem on the UQAM Moodle 1.6.3 , it is specific to essay questions
          Hide
          Pierre Pichet added a comment -

          The bug is an old problem 1.6, 1.7 and NOT solved for 1.8.( I have just check)
          As it persists for such a long time it is not a blocker but more a minor bug.
          I will take a look at it.

          Show
          Pierre Pichet added a comment - The bug is an old problem 1.6, 1.7 and NOT solved for 1.8.( I have just check) As it persists for such a long time it is not a blocker but more a minor bug. I will take a look at it.
          Hide
          Pierre Pichet added a comment -

          By definition the Essay questions are not usable as random questions .
          So should not be used as is.
          There should be either
          a warning put somewhere when somebody select random on a category where there is an essay question
          or
          the random function be deactivated.when there is an essay question in it.

          will discuss with Tim

          Show
          Pierre Pichet added a comment - By definition the Essay questions are not usable as random questions . So should not be used as is. There should be either a warning put somewhere when somebody select random on a category where there is an essay question or the random function be deactivated.when there is an essay question in it. will discuss with Tim
          Hide
          Pierre Pichet added a comment -

          Actually the code excludes as non randomizable the following question types
          'description',
          'essay',
          probably mostly by the fact that are manually graded.
          This should stay as it is.
          Perhaps the docs ( and the help ) should be more explicit.
          This is why I think that this is fixed but not closed as long as the additional comments have not been put in the help.

          And I had Tim advice on this..

          Show
          Pierre Pichet added a comment - Actually the code excludes as non randomizable the following question types 'description', 'essay', probably mostly by the fact that are manually graded. This should stay as it is. Perhaps the docs ( and the help ) should be more explicit. This is why I think that this is fixed but not closed as long as the additional comments have not been put in the help. And I had Tim advice on this..
          Hide
          Manuel de la Torre added a comment -

          Pierre, I understand that by definition on Moodle Essay questions are not usable as random questions. But it will not be possible to change the definition and make them usable as random questions? I understand that this will require heavy coding because of this types of questions are manually graded.

          Show
          Manuel de la Torre added a comment - Pierre, I understand that by definition on Moodle Essay questions are not usable as random questions. But it will not be possible to change the definition and make them usable as random questions? I understand that this will require heavy coding because of this types of questions are manually graded.
          Hide
          Pierre Pichet added a comment -

          I am not sure that this should such a problem because you can use the same essay question as a regular question in the quiz.
          I will look at the code and come back later.
          As this policy of not allowing Essay in random, seems the official one, I will keep the bug in the same state.

          Show
          Pierre Pichet added a comment - I am not sure that this should such a problem because you can use the same essay question as a regular question in the quiz. I will look at the code and come back later. As this policy of not allowing Essay in random, seems the official one, I will keep the bug in the same state.
          Hide
          Tim Hunt added a comment -

          The real issue is that random questions don't interact well with manual grading. This is the only reason that Essay questions are excluded from random. We really need to fix this, but it is quite a lot of work, so don't hold your breath.

          See this thread for more information: http://moodle.org/mod/forum/discuss.php?d=50903

          Show
          Tim Hunt added a comment - The real issue is that random questions don't interact well with manual grading. This is the only reason that Essay questions are excluded from random. We really need to fix this, but it is quite a lot of work, so don't hold your breath. See this thread for more information: http://moodle.org/mod/forum/discuss.php?d=50903
          Hide
          Matt Gibson added a comment -

          I've just run into this problem and for me, it's significant. I'd like to have a quiz composed entirely of random essay questions which are 3 or 6 mark questions so that I can give students a written exam which is different for each student. This is important to prevent cheating when I cannot schedule a computer room to run the exam.

          Is there a time frame for fixing it?

          Show
          Matt Gibson added a comment - I've just run into this problem and for me, it's significant. I'd like to have a quiz composed entirely of random essay questions which are 3 or 6 mark questions so that I can give students a written exam which is different for each student. This is important to prevent cheating when I cannot schedule a computer room to run the exam. Is there a time frame for fixing it?
          Hide
          Ray Lawrence added a comment -

          I've not needed to use random essay questions and as a result of this wasn't aware of this issue. I agree with Matt that this is a significant issue. I'm surprised that it is only flagged as of "Minor" importance.

          I noticed recently that the manual grading area doesn't reflect groups either.

          Show
          Ray Lawrence added a comment - I've not needed to use random essay questions and as a result of this wasn't aware of this issue. I agree with Matt that this is a significant issue. I'm surprised that it is only flagged as of "Minor" importance. I noticed recently that the manual grading area doesn't reflect groups either.
          Hide
          Tim Hunt added a comment -

          There are a number of issues with the manual grading code that means we cannot turn on the setting that lets random questions pick essay questions. I am turning this bug into a tracking bug for these issues.

          Show
          Tim Hunt added a comment - There are a number of issues with the manual grading code that means we cannot turn on the setting that lets random questions pick essay questions. I am turning this bug into a tracking bug for these issues.
          Hide
          Tim Hunt added a comment -

          I created MDL-11376 for the manual grading ignoring groups bug.

          Show
          Tim Hunt added a comment - I created MDL-11376 for the manual grading ignoring groups bug.
          Hide
          Samuli Karevaara added a comment -

          +1 for fixing this.

          So far we have worked around this by adding the question texts as Cloze type questions with 0 points and an empty drop-down or similar as the aswer text. This way the question texts can be randomized. Then the answer can be taken in with a non-randomized essay question (that has no question text at all). But obviously having this bug fixed would make things easier.

          IIRC the Description type questions can't be randomized either, so the Cloze-hack mentioned above is used.

          Show
          Samuli Karevaara added a comment - +1 for fixing this. So far we have worked around this by adding the question texts as Cloze type questions with 0 points and an empty drop-down or similar as the aswer text. This way the question texts can be randomized. Then the answer can be taken in with a non-randomized essay question (that has no question text at all). But obviously having this bug fixed would make things easier. IIRC the Description type questions can't be randomized either, so the Cloze-hack mentioned above is used.
          Hide
          Caroline Tam added a comment -

          Another +1 for fixing this.

          In our Moodle install, we have an instructor who wants to create a quiz composed entirely of essay questions and have it be randomly pulled. It is extremely fustrating for the instructor to see the error message that states that there are no questions available in the category. To have an error message that says essay questions cannot be randomized is a lot better that telling them that there are no questions avaiable, especially when the instructor knows it is there.

          Show
          Caroline Tam added a comment - Another +1 for fixing this. In our Moodle install, we have an instructor who wants to create a quiz composed entirely of essay questions and have it be randomly pulled. It is extremely fustrating for the instructor to see the error message that states that there are no questions available in the category. To have an error message that says essay questions cannot be randomized is a lot better that telling them that there are no questions avaiable, especially when the instructor knows it is there.
          Hide
          Caroline Tam added a comment -

          It doesn't sound like there was any action here, so I am adding another comment to bump this issue up! Thanks!!

          Show
          Caroline Tam added a comment - It doesn't sound like there was any action here, so I am adding another comment to bump this issue up! Thanks!!
          Hide
          Matt Gibson added a comment -

          Caroline - this issue is blocked by MDL-4004, which has seen action recently as Matt Oquist says he is working on it. Add yourself as a watcher there to stay informed

          Show
          Matt Gibson added a comment - Caroline - this issue is blocked by MDL-4004 , which has seen action recently as Matt Oquist says he is working on it. Add yourself as a watcher there to stay informed
          Hide
          A. T. Wyatt added a comment -
          Show
          A. T. Wyatt added a comment - Additional discussion here: http://moodle.org/mod/forum/discuss.php?d=94831
          Hide
          Constantin Sclifos added a comment -

          The same is on Moodle version 1.9 + (Build: 20080402), it will be a good thing to fix it ...

          Show
          Constantin Sclifos added a comment - The same is on Moodle version 1.9 + (Build: 20080402), it will be a good thing to fix it ...
          Hide
          Martin Dougiamas added a comment -

          Let's get a quick fix in for this (even if it's not efficient etc) since it has so many votes.

          Show
          Martin Dougiamas added a comment - Let's get a quick fix in for this (even if it's not efficient etc) since it has so many votes.
          Hide
          Tim Hill added a comment -

          Volunteered to try moodle this semester as an alternative for our faculty using WebCT/BB and have been quite pleased until discovering this very significant shortcoming. Will have to report that lacking random essay questions makes moodle a non-starter for us. Meanwhile I must scramble to work around for my exam on Monday - argh! For now I'm back to WebCT/BB which is otherwise inferior but handles this particular issue quite easily and effectively. Please fix asap!

          Show
          Tim Hill added a comment - Volunteered to try moodle this semester as an alternative for our faculty using WebCT/BB and have been quite pleased until discovering this very significant shortcoming. Will have to report that lacking random essay questions makes moodle a non-starter for us. Meanwhile I must scramble to work around for my exam on Monday - argh! For now I'm back to WebCT/BB which is otherwise inferior but handles this particular issue quite easily and effectively. Please fix asap!
          Hide
          Genner Cerna added a comment -

          please include a fix on the next release. thanks

          Show
          Genner Cerna added a comment - please include a fix on the next release. thanks
          Hide
          Tim Hunt added a comment -

          The attached patch (random_essay_questions.patch.txt), which applies to the 1.9 stable branch, allows essay questions to be selected by random questions. It appears to work following some quick testing, but it now needs more thorough testing.

          To use:

          1. Apply the patch to a recent 1.9.3+ test installation.
          2. Go to Admin -> Miscellaneous -> Experimental and turn on the option 'Random questions can use manually graded questions'.

          How it is supposed to work:

          They key point here (in addition to the admin setting) is ensuring that the random questions show up in the manual grading report, but only if they actually need manual grading. And then that manually grading them actually works. (Manually grading random questions from the attempt review page has worked for some time.)

          What needs to be tested: (If possible, test with Admin -> Server -> Debugging settings turned on to full, and report any errors/warnings/notices seen.)

          A. That it works when you have a category of
          i) all essay questions.
          ii) some essay and some non-essay questions
          iii) all non-essay questions.

          B. That it works both when selecting both
          i) questions just one category
          ii) questions from a category and all its categories.

          C. Nasty situations like this: Create a category with one essay question and five short-answer questions. Explicitly add the essay question to the quiz as a non-random question, then add two random questions from the same category (which will then pick from the remaining 5 questions). Ensure that the essay question still shows up in the report, but the random questions don't.

          D. People who can test on a COPY of their production site with a huge question bank would be greatly appreciated.

          Just to be clear in cases A i) and A ii) the random question should appear in the manual grading report. In case A iii) it should not.

          In case A ii) when you go in to grade a particular question, all student's attempts at the random question, both the ones where that student got an essay, and the ones where they got something else, should be shown in the manual grading report. I know that is not ideal, but that is what is possible.

          Show
          Tim Hunt added a comment - The attached patch (random_essay_questions.patch.txt), which applies to the 1.9 stable branch, allows essay questions to be selected by random questions. It appears to work following some quick testing, but it now needs more thorough testing. To use: 1. Apply the patch to a recent 1.9.3+ test installation. 2. Go to Admin -> Miscellaneous -> Experimental and turn on the option 'Random questions can use manually graded questions'. How it is supposed to work: They key point here (in addition to the admin setting) is ensuring that the random questions show up in the manual grading report, but only if they actually need manual grading. And then that manually grading them actually works. (Manually grading random questions from the attempt review page has worked for some time.) What needs to be tested: (If possible, test with Admin -> Server -> Debugging settings turned on to full, and report any errors/warnings/notices seen.) A. That it works when you have a category of i) all essay questions. ii) some essay and some non-essay questions iii) all non-essay questions. B. That it works both when selecting both i) questions just one category ii) questions from a category and all its categories. C. Nasty situations like this: Create a category with one essay question and five short-answer questions. Explicitly add the essay question to the quiz as a non-random question, then add two random questions from the same category (which will then pick from the remaining 5 questions). Ensure that the essay question still shows up in the report, but the random questions don't. D. People who can test on a COPY of their production site with a huge question bank would be greatly appreciated. Just to be clear in cases A i) and A ii) the random question should appear in the manual grading report. In case A iii) it should not. In case A ii) when you go in to grade a particular question, all student's attempts at the random question, both the ones where that student got an essay, and the ones where they got something else, should be shown in the manual grading report. I know that is not ideal, but that is what is possible.
          Hide
          Tim Hunt added a comment -

          Just uploaded a revised patch. It works in fundamentally the same way, the code is just organised a bit better.

          Show
          Tim Hunt added a comment - Just uploaded a revised patch. It works in fundamentally the same way, the code is just organised a bit better.
          Hide
          Tim Hunt added a comment -

          Now checked in.

          Note that in Moodle 2.0 there is no option. Essay questions are treated just like any other question type by random questions.

          The main performance impact of this is that it increases the work required to display the manual grading report - one extra DB query per random question in the quiz. Worse if the random question selects from subcategories too - but that is no longer the default in Moodle 2.0. I think that is acceptable.

          Show
          Tim Hunt added a comment - Now checked in. Note that in Moodle 2.0 there is no option. Essay questions are treated just like any other question type by random questions. The main performance impact of this is that it increases the work required to display the manual grading report - one extra DB query per random question in the quiz. Worse if the random question selects from subcategories too - but that is no longer the default in Moodle 2.0. I think that is acceptable.
          Hide
          Ryan Wick added a comment -

          I recently tried to patch using this into our Moodle system. I get a "Reversed <or previously applied> patch detected". Is this patch working for 1.9.5?

          Show
          Ryan Wick added a comment - I recently tried to patch using this into our Moodle system. I get a "Reversed <or previously applied> patch detected". Is this patch working for 1.9.5?
          Hide
          Michael Spall added a comment -

          Ryan,

          This fix was checked in to MOODLE_19_STABLE on 28/Nov/08 by Tim Hunt so it is in Moodle 1.9.5. One way to see the commits that have been associated with a particular tracker issue is to click the version control tab above. Also, this bug has been marked resolved with resolution fixed. In 1.9 with the fix, there is an admin option to turn it on.

          Show
          Michael Spall added a comment - Ryan, This fix was checked in to MOODLE_19_STABLE on 28/Nov/08 by Tim Hunt so it is in Moodle 1.9.5. One way to see the commits that have been associated with a particular tracker issue is to click the version control tab above. Also, this bug has been marked resolved with resolution fixed. In 1.9 with the fix, there is an admin option to turn it on.
          Hide
          Tim Hunt added a comment -

          Yes. If you have Moodle 1.9.5, you just need to go and enable this in the admin settings - under experimental, I think.

          Show
          Tim Hunt added a comment - Yes. If you have Moodle 1.9.5, you just need to go and enable this in the admin settings - under experimental, I think.
          Hide
          Maurício added a comment - - edited

          Hi people,

          I solved the problem with manual grading. In the "moodle/mod/quiz/report/reportlib.php" is necessary replace the sql on the function "quiz_get_newgraded_states".
          where I have "qns.newgraded = qs.id" I replaces for "qns.newest = qs.id".

          Sorry to my english

          Maurício

          Show
          Maurício added a comment - - edited Hi people, I solved the problem with manual grading. In the "moodle/mod/quiz/report/reportlib.php" is necessary replace the sql on the function "quiz_get_newgraded_states". where I have "qns.newgraded = qs.id" I replaces for "qns.newest = qs.id" . Sorry to my english Maurício

            People

            • Votes:
              57 Vote for this issue
              Watchers:
              30 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: