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

Write unit tests for the user report function inject_rowspans()

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.4.2
    • 2.3.1, 2.4.1, 2.5
    • Gradebook
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_24_STABLE
    • MDL-34883_unit_tests
    • 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.

      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.

        1. code.txt
          5 kB
          Ankit Agarwal

            andyjdavis Andrew Davis
            andyjdavis Andrew Davis
            Ankit Agarwal Ankit Agarwal
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.