Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-34883

Write unit tests for the user report function inject_rowspans()

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.1, 2.4.1, 2.5
    • Fix Version/s: 2.4.2
    • Component/s: Gradebook
    • Labels:
    • Testing Instructions:
      Hide

      Run the unit tests as follows:

      phpunit gradereportuserlib_testcase grade/tests/reportuser_test.php

      Go to the grade book and view the user report. Check no errors are displayed.

      Show
      Run the unit tests as follows: phpunit gradereportuserlib_testcase grade/tests/reportuser_test.php Go to the grade book and view the user report. Check no errors are displayed.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      MDL-34883_unit_tests

      Description

      inject_rowspans() needs to work under a range of scenarios. Its likely to be broken in the future (and possibly now) in some subtle ways. To avoid this, document its workings with some unit tests.

      Scenarios:
      1) 1 or more activities in 1 or more categories.
      2) a hidden activity and/or category. Tested from both the student and teacher view.
      3) a category the student cannot see because of conditional activity access. Tested from both the student and teacher view.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Mar/13