Moodle
  1. Moodle
  2. MDL-26567

Moodle 2.0 quiz does not have grade category option in common module settings

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.1, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Quiz
    • Labels:
    • Environment:
      Moodle 2.0 QA
    • Testing Instructions:
      Hide

      1. Make sure your course has several grade categories set up.
      2. Create a quiz, make sure you are given a choice of grade categories on the form.
      3. When you have saved the form, verify the quiz grade is in the right category in the gradebook.
      4. Now edit the quiz again, make sure the category is shown correctly on the form.
      5. Change the category and save again, make sure the category in the gradebook changes properly.

      Show
      1. Make sure your course has several grade categories set up. 2. Create a quiz, make sure you are given a choice of grade categories on the form. 3. When you have saved the form, verify the quiz grade is in the right category in the gradebook. 4. Now edit the quiz again, make sure the category is shown correctly on the form. 5. Change the category and save again, make sure the category in the gradebook changes properly.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      16190

      Description

      As mentioned in this forum post http://moodle.org/mod/forum/discuss.php?d=169470#p743391
      whereas 1.9 had the option for the user to choose a grade category, this appears to have been missed out in 2.0

        Activity

        Hide
        Rick Jerz added a comment -

        This problem also exists in version 2.1.

        Show
        Rick Jerz added a comment - This problem also exists in version 2.1.
        Hide
        Ronak Singhavi added a comment -

        Hi,

        Can we get an expected time when this issue can be resolved. I was using this feature with 1.9 version but due to up-gradation now I can not use it.
        I am looking for this option in all the activities. It is also missing from SCORM Activity.

        Show
        Ronak Singhavi added a comment - Hi, Can we get an expected time when this issue can be resolved. I was using this feature with 1.9 version but due to up-gradation now I can not use it. I am looking for this option in all the activities. It is also missing from SCORM Activity.
        Hide
        Robert Northcutt added a comment -

        I am adding to list of voters to get this item resolved. Many teachers at our school use online quizzes in every class (3 classes per day). Going to the Simple View in Grades to assign a category to a quiz gets very annoying very quickly. Getting an ETA for resolution would be helpful.

        Show
        Robert Northcutt added a comment - I am adding to list of voters to get this item resolved. Many teachers at our school use online quizzes in every class (3 classes per day). Going to the Simple View in Grades to assign a category to a quiz gets very annoying very quickly. Getting an ETA for resolution would be helpful.
        Hide
        Tim Hunt added a comment -

        David, did you work on this area of code? I don't really understand it, but could you take a look at what I have done.

        People who care about this: are you able to try the patch (it will work on Moodle 2.1 or master. I have not made a 2.0 version yet.)

        I added the grade category setting at the top of the form, not in the common module settings. That might be more convenient, or might be wrong.

        Show
        Tim Hunt added a comment - David, did you work on this area of code? I don't really understand it, but could you take a look at what I have done. People who care about this: are you able to try the patch (it will work on Moodle 2.1 or master. I have not made a 2.0 version yet.) I added the grade category setting at the top of the form, not in the common module settings. That might be more convenient, or might be wrong.
        Hide
        Richard Newton added a comment - - edited

        I concur about the simple gradebook view being annoying. Since I moved quizzes to a new category in bulk the item are all displayed shifted to the right!

        At least the calculations in the gradebook seem to be working correctly.

        Show
        Richard Newton added a comment - - edited I concur about the simple gradebook view being annoying. Since I moved quizzes to a new category in bulk the item are all displayed shifted to the right! At least the calculations in the gradebook seem to be working correctly.
        Hide
        David Mudrak added a comment -

        After discussing this in the chat, let me suggest:

        • let us have the string $string['gradecategoryingradebook'] = 'Category in the gradebook'; defined in grades.php (plus a help string explaining its role in mod_form)
        • let us modify standard_grading_coursemodule_elements() to use that string (and the help) instead of the current short $string['gradecategory'] = 'Grade category';
        Show
        David Mudrak added a comment - After discussing this in the chat, let me suggest: let us have the string $string ['gradecategoryingradebook'] = 'Category in the gradebook'; defined in grades.php (plus a help string explaining its role in mod_form) let us modify standard_grading_coursemodule_elements() to use that string (and the help) instead of the current short $string ['gradecategory'] = 'Grade category';
        Hide
        Tim Hunt added a comment -

        David, revised patch for you to review (same URL as above).

        Helen, (or anyone else who wants to) please review the new help string I added. I don't think it is very good. I don't think it adds anything. Can you suggest a better wording, or should we just remove it again?

        Show
        Tim Hunt added a comment - David, revised patch for you to review (same URL as above). Helen, (or anyone else who wants to) please review the new help string I added. I don't think it is very good. I don't think it adds anything. Can you suggest a better wording, or should we just remove it again?
        Hide
        Tim Hunt added a comment -

        Thanks to Help from Helen and David in developer chat, we finally got to the help string:

        "This setting controls the category in which this activity's grades are placed in the gradebook."

        David, please could you give these changes a final code-review, so I can submit this for integration. Thanks.

        Show
        Tim Hunt added a comment - Thanks to Help from Helen and David in developer chat, we finally got to the help string: "This setting controls the category in which this activity's grades are placed in the gradebook." David, please could you give these changes a final code-review, so I can submit this for integration. Thanks.
        Hide
        Tim Hunt added a comment -

        Here is a screenshot of what that bit of the quiz settings form now looks like. Any objections?

        Show
        Tim Hunt added a comment - Here is a screenshot of what that bit of the quiz settings form now looks like. Any objections?
        Hide
        Helen Foster added a comment -

        +1 for consistency with other modules and having the grade category setting in a Grade section. Just wondering whether the Grading method could also be included in the Grade section?

        Show
        Helen Foster added a comment - +1 for consistency with other modules and having the grade category setting in a Grade section. Just wondering whether the Grading method could also be included in the Grade section?
        Hide
        Tim Hunt added a comment -

        I don't think so, because that is not a setting in common with other modules.

        Show
        Tim Hunt added a comment - I don't think so, because that is not a setting in common with other modules.
        Hide
        David Mudrak added a comment -

        Looking good to me. Thanks Tim.

        Show
        David Mudrak added a comment - Looking good to me. Thanks Tim.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Q from HQ:

        I understand that you're using the standard_grading_coursemodule_elements() to get the grade-category and also that you are deleting the 'grade' element because you want your own (hidden).

        The question is why that information has to be part of the form, when it seems to be one $quizconfig->maximumgrade surely available later when you add/update the instance.

        I know we trust teachers (so that form is trusted, no sec problem at all). Just curiosity about adding hidden elements containing available ($quizconfig) information.

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Q from HQ: I understand that you're using the standard_grading_coursemodule_elements() to get the grade-category and also that you are deleting the 'grade' element because you want your own (hidden). The question is why that information has to be part of the form, when it seems to be one $quizconfig->maximumgrade surely available later when you add/update the instance. I know we trust teachers (so that form is trusted, no sec problem at all). Just curiosity about adding hidden elements containing available ($quizconfig) information. Ciao
        Hide
        Tim Hunt added a comment -

        The answer is: "It has always worked that way" and "If it ain't broke, don't fix it."

        Not the best answer, but sufficient for now, I think.

        Show
        Tim Hunt added a comment - The answer is: "It has always worked that way" and "If it ain't broke, don't fix it." Not the best answer, but sufficient for now, I think.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated, thanks!
        (and reply annotated for reuse)

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated, thanks! (and reply annotated for reuse)
        Hide
        Rossiani Wijaya added a comment -

        This is working fine.
        Thanks everyone.

        Test passed.

        Show
        Rossiani Wijaya added a comment - This is working fine. Thanks everyone. Test passed.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        And this code has been spread to all Moodle git and cvs repositories. Many thanks! Closing.

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - And this code has been spread to all Moodle git and cvs repositories. Many thanks! Closing. Ciao

          People

          • Votes:
            10 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: