Moodle
  1. Moodle
  2. MDL-4004

Make the manual grading report work with random questions that pick manually graded questions

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.4, 1.7.1
    • Fix Version/s: 1.9.4
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      33824

      Description

      Encountered a problem for grading Essay Questions.

      To reproduce the problem:
      0. Edit the essay question type so that the method is_usable_by_random returns true.
      1. Add a random question to a quiz and select category X for the random question.
      2. In category X only have Essay Question(s)
      3. Take the quiz as a student.
      4. Go to the Manual Grading Tab as a Teacher and you will find that there are no essay questions to grade.

      This is because of how the code checks for essay questions in the quiz. Go to line 256 in grading.php to see how it does this.

      The random question type causes a lot of problems for grading Essay Questions because if the random question is pulling from Essays and non-essays then not every student will answer the question.

      So, the method for how the grading code looks for essay questions in a quiz and the interface for grading essay questions need to be altered. I'm not entirely sure how random questions work so I am stuck on this problem at the present time.

      Another solution is to add ESSAY to the excludedtypes array in random question type.

        Issue Links

          Activity

          Hide
          Martin Dougiamas added a comment -

          From Gustav Delius (gwd2 at york.ac.uk) Thursday, 1 September 2005, 02:54 PM:

          I would support the solution of excluding essay questions from the random questions by adding them to the excluded type array.

          However the problem will probably also go away once the manual grading code gets extended to cover all questions. Then the grading code will no longer need to be able to identify all essay questions, it will simply list all questions in the quiz.

          From Gustav Delius (gwd2 at york.ac.uk) Monday, 6 February 2006, 06:56 AM:

          For now I have simply added essay questions to the list of excluded questions for random questions. This is probably the most sensible thing to do anyway given that essay questions are quite a bit different from the other questions.

          From Anthony Borrow (aborrow at jesuitcp.org) Sunday, 5 March 2006, 04:57 AM:

          While the issue of not being able to grade random essay questions may be fixed by excluding essay questions from the available random list, I would like to make sure that it does not disappear from the radar screen. If it is ok, I would like to reopen this and change it to a feature request. I think the ability to choose from a category of random essay questions is helpful and would be a great feature.

          Show
          Martin Dougiamas added a comment - From Gustav Delius (gwd2 at york.ac.uk) Thursday, 1 September 2005, 02:54 PM: I would support the solution of excluding essay questions from the random questions by adding them to the excluded type array. However the problem will probably also go away once the manual grading code gets extended to cover all questions. Then the grading code will no longer need to be able to identify all essay questions, it will simply list all questions in the quiz. From Gustav Delius (gwd2 at york.ac.uk) Monday, 6 February 2006, 06:56 AM: For now I have simply added essay questions to the list of excluded questions for random questions. This is probably the most sensible thing to do anyway given that essay questions are quite a bit different from the other questions. From Anthony Borrow (aborrow at jesuitcp.org) Sunday, 5 March 2006, 04:57 AM: While the issue of not being able to grade random essay questions may be fixed by excluding essay questions from the available random list, I would like to make sure that it does not disappear from the radar screen. If it is ok, I would like to reopen this and change it to a feature request. I think the ability to choose from a category of random essay questions is helpful and would be a great feature.
          Hide
          Paulo Matos added a comment -

          I found a solution to use essay questions in random, see this discussion:

          http://moodle.org/mod/forum/discuss.php?d=50903

          add some improvemnts, it's not perfect but it works. I'm attaching a patch to solve this.

          Paulo

          Show
          Paulo Matos added a comment - I found a solution to use essay questions in random, see this discussion: http://moodle.org/mod/forum/discuss.php?d=50903 add some improvemnts, it's not perfect but it works. I'm attaching a patch to solve this. Paulo
          Hide
          Paulo Matos added a comment -

          MDL-4004-essay_questions_in_random.patch

          Show
          Paulo Matos added a comment - MDL-4004 -essay_questions_in_random.patch
          Hide
          Paulo Matos added a comment -

          Patch Updated/Verified against moodle v1.6.4+ (2006050540).

          Show
          Paulo Matos added a comment - Patch Updated/Verified against moodle v1.6.4+ (2006050540).
          Hide
          Tim Hunt added a comment -

          Fiddling with the bug's state to clear the bogus Resolution: fixed.

          Show
          Tim Hunt added a comment - Fiddling with the bug's state to clear the bogus Resolution: fixed.
          Hide
          Tim Hunt added a comment -

          Paulo's patch is on the right lines, but unfortunately it is not quite right.

          The problem is that some random questions pick not just from a single category, but from a category and all its children. Therefore, the SQL in view_questions in mod/quiz/report/grading/report.php needs to be made even more complicated.

          Show
          Tim Hunt added a comment - Paulo's patch is on the right lines, but unfortunately it is not quite right. The problem is that some random questions pick not just from a single category, but from a category and all its children. Therefore, the SQL in view_questions in mod/quiz/report/grading/report.php needs to be made even more complicated.
          Hide
          Matt Oquist added a comment -

          We've (vlacs.org) run smack into this one and we need it fixed (in 1.8), so I guess I'll probably be working on it.

          I'll take a look at Paulo's patch, but any other comments or advice will be appreciated.

          --matt

          Show
          Matt Oquist added a comment - We've (vlacs.org) run smack into this one and we need it fixed (in 1.8), so I guess I'll probably be working on it. I'll take a look at Paulo's patch, but any other comments or advice will be appreciated. --matt
          Hide
          Tim Hunt added a comment -

          It would be really great if you could work on this. My comment above on 21st Sept is accurate, but maybe a bit cryptic.

          This diagram may help a bit http://docs.moodle.org/en/Development:Quiz_database_structure

          Looking at Paulo's patch, it basically adds an OR clause to the SQL to find random questions in categories that contain essay questions.

          What it fails to take into account are random questions that pick from a category and all the child categories (this is indicated by questiontext='1' for the random question), and where the essay questions are in the child categories, not the to level category. Bear in mind that the child categories can be nested to arbitrary depth. It should be possible (but hard) to extend the SQL to cover this case.

          Note that the random question type makes use of the question_categorylist function from questionlib to get a list of the relevant categories, but this is recursive, and only works for one question at a time, so cannot be directly used in the query.

          Show
          Tim Hunt added a comment - It would be really great if you could work on this. My comment above on 21st Sept is accurate, but maybe a bit cryptic. This diagram may help a bit http://docs.moodle.org/en/Development:Quiz_database_structure Looking at Paulo's patch, it basically adds an OR clause to the SQL to find random questions in categories that contain essay questions. What it fails to take into account are random questions that pick from a category and all the child categories (this is indicated by questiontext='1' for the random question), and where the essay questions are in the child categories, not the to level category. Bear in mind that the child categories can be nested to arbitrary depth. It should be possible (but hard) to extend the SQL to cover this case. Note that the random question type makes use of the question_categorylist function from questionlib to get a list of the relevant categories, but this is recursive, and only works for one question at a time, so cannot be directly used in the query.
          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
          Ashley Holman added a comment -

          +1, would like to see this fixed.

          I am migrating courses from WebCT into Moodle, and cannot recreate the randomised essay questions !

          Show
          Ashley Holman added a comment - +1, would like to see this fixed. I am migrating courses from WebCT into Moodle, and cannot recreate the randomised essay questions !

            People

            • Votes:
              24 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: