Moodle
  1. Moodle
  2. MDL-32300

Quiz reports class naming does not follow the coding guidelines

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.3
    • Component/s: Quiz
    • Labels:
      None
    • Testing Instructions:
      Hide

      1. Create (or find) a quiz with several attempts by students.
      2. Click through all the quiz reports, and make sure there are no fatal errors.

      Now to test the change in the grader report.
      3. You need a course with two groups: Full group and Empty group. In Full group, enrol Teacher and Student. In Empty group enrol Student.
      4. Create a quiz with one essay question, and set the quiz to separate of visible groups mode.
      5. Attempt the quiz as student.
      6. As teacher, go to Quiz -> Results -> Grading. Make sure there are no errors, irrespective of what you set the group selector to.

      Show
      1. Create (or find) a quiz with several attempts by students. 2. Click through all the quiz reports, and make sure there are no fatal errors. Now to test the change in the grader report. 3. You need a course with two groups: Full group and Empty group. In Full group, enrol Teacher and Student. In Empty group enrol Student. 4. Create a quiz with one essay question, and set the quiz to separate of visible groups mode. 5. Attempt the quiz as student. 6. As teacher, go to Quiz -> Results -> Grading. Make sure there are no errors, irrespective of what you set the group selector to.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      39097

      Description

      The quiz reports use class names that do not match the coding guidelines. They class names should start with the frankenstyle name of the plugin.

        Activity

        Hide
        Tim Hunt added a comment -

        I am cheating a bit, and doing one other cleanup commit on the same branch. I hope that is OK.

        Show
        Tim Hunt added a comment - I am cheating a bit, and doing one other cleanup commit on the same branch. I hope that is OK.
        Hide
        Aparup Banerjee added a comment -

        The main moodle.git repository has just been updated (yesterday) with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

        TIA and ciao

        Show
        Aparup Banerjee added a comment - The main moodle.git repository has just been updated (yesterday) with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
        Hide
        Dan Poltawski added a comment -

        Grr. Wrong button, sorry

        Show
        Dan Poltawski added a comment - Grr. Wrong button, sorry
        Hide
        Dan Poltawski added a comment -

        Hi Tim,

        Happy with d42b8ac2 but I think that your change in 7e3ac96c is crossing the boundary of 'cleanup' since it is changing SQL returned there. Plus with it being conditional on 3 levels I think there is a higher chance of regressions. At the least I think this change should have some testing instructions relating to that change.

        So, I am going to integrate d42b8ac2 only and keep this issue as that the naming change only and ask that you file a new issue for the other cleanup so we can ensure that is tested properly.

        Show
        Dan Poltawski added a comment - Hi Tim, Happy with d42b8ac2 but I think that your change in 7e3ac96c is crossing the boundary of 'cleanup' since it is changing SQL returned there. Plus with it being conditional on 3 levels I think there is a higher chance of regressions. At the least I think this change should have some testing instructions relating to that change. So, I am going to integrate d42b8ac2 only and keep this issue as that the naming change only and ask that you file a new issue for the other cleanup so we can ensure that is tested properly.
        Hide
        Dan Poltawski added a comment -

        Ok as I suggested i've integrated d42b8ac2 only. Sorry to be a stickler for that, this seems to be the safest option to proceed.

        Show
        Dan Poltawski added a comment - Ok as I suggested i've integrated d42b8ac2 only. Sorry to be a stickler for that, this seems to be the safest option to proceed.
        Hide
        Dan Poltawski added a comment -

        Thanks Tim for updating the teting instructions to include the other cleanup. I have integrated 7e3ac96c now we are testing it too

        Show
        Dan Poltawski added a comment - Thanks Tim for updating the teting instructions to include the other cleanup. I have integrated 7e3ac96c now we are testing it too
        Hide
        Tim Hunt added a comment -

        Thanks Dan.

        Show
        Tim Hunt added a comment - Thanks Dan.
        Hide
        Andrew Davis added a comment -

        Ran into a few "strict standards" messages that Im guessing are not hugely significant. I did however get one fatal error. This is in master.

        As a teacher when I went to Results > Statistics (/mod/quiz/report.php?id=6&mode=statistics) I get the following. It appears below the "recalculate now" button.

        Fatal error: Call to undefined function html_writer() in /home/andrew/Desktop/code/moodle/int/master/mod/quiz/report/statistics/report.php on line 977

        I also get this right at the top of the page.
        Strict Standards: Declaration of quiz_statistics_table::setup() should be compatible with that of flexible_table::setup() in /home/andrew/Desktop/code/moodle/int/master/mod/quiz/report/statistics/statistics_table.php on line 39 Strict Standards: Declaration of quiz_statistics_question_table::setup() should be compatible with that of flexible_table::setup() in /home/andrew/Desktop/code/moodle/int/master/mod/quiz/report/statistics/statistics_question_table.php on line 147

        And there are no blocks on that page.

        Show
        Andrew Davis added a comment - Ran into a few "strict standards" messages that Im guessing are not hugely significant. I did however get one fatal error. This is in master. As a teacher when I went to Results > Statistics (/mod/quiz/report.php?id=6&mode=statistics) I get the following. It appears below the "recalculate now" button. Fatal error: Call to undefined function html_writer() in /home/andrew/Desktop/code/moodle/int/master/mod/quiz/report/statistics/report.php on line 977 I also get this right at the top of the page. Strict Standards: Declaration of quiz_statistics_table::setup() should be compatible with that of flexible_table::setup() in /home/andrew/Desktop/code/moodle/int/master/mod/quiz/report/statistics/statistics_table.php on line 39 Strict Standards: Declaration of quiz_statistics_question_table::setup() should be compatible with that of flexible_table::setup() in /home/andrew/Desktop/code/moodle/int/master/mod/quiz/report/statistics/statistics_question_table.php on line 147 And there are no blocks on that page.
        Hide
        Andrew Davis added a comment -

        For the sake of completeness the other strict standards messages I got are...

        student after completing quiz, before review.
        Strict Standards: Creating default object from empty value in /home/andrew/Desktop/code/moodle/int/master/mod/quiz/locallib.php on line 538

        teacher when accessing the quiz mod/quiz/view.php?id=6
        Strict Standards: Only variables should be passed by reference in /home/andrew/Desktop/code/moodle/int/master/mod/quiz/report/reportlib.php on line 374

        Show
        Andrew Davis added a comment - For the sake of completeness the other strict standards messages I got are... student after completing quiz, before review. Strict Standards: Creating default object from empty value in /home/andrew/Desktop/code/moodle/int/master/mod/quiz/locallib.php on line 538 teacher when accessing the quiz mod/quiz/view.php?id=6 Strict Standards: Only variables should be passed by reference in /home/andrew/Desktop/code/moodle/int/master/mod/quiz/report/reportlib.php on line 374
        Hide
        Dan Poltawski added a comment -

        Thanks Andrew, but I think the fatal error is another regression from: MDL-30843, so I am resetting this for testing again.

        Show
        Dan Poltawski added a comment - Thanks Andrew, but I think the fatal error is another regression from: MDL-30843 , so I am resetting this for testing again.
        Hide
        Andrew Davis added a comment -

        All seems to be working as described in master, 2.2 and 2.1

        Show
        Andrew Davis added a comment - All seems to be working as described in master, 2.2 and 2.1
        Hide
        Dan Poltawski added a comment -

        Jolly good show!

        Your changes have made it into the Moodle release - its time to celebrate! I suggest a hot cup of English tea (with milk, no sugar) or a hoppy English ale.

        Tally-ho!

        Show
        Dan Poltawski added a comment - Jolly good show! Your changes have made it into the Moodle release - its time to celebrate! I suggest a hot cup of English tea (with milk, no sugar) or a hoppy English ale. Tally-ho!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: