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

Failed unit tests for mod/assign/lib.php

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3.4, 2.4.1, 2.5
    • Fix Version/s: 2.3.5, 2.4.2
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide

      (For 2.5)

      1. Run the unit tests (Once MDL-37547 is integrated):
        ./vendor/bin/phpunit assign_lib_testcase mod/assign/tests/lib_test.php

      (For 2.4 and older)

      1. In a course create 3 assignments with file submissions enabled.
      2. Make sure the assignments are open for student submissions (not past the due date).
      3. Login as a student and upload a file submission to each assignment
      4. View the "My home" page for the student (has the course_overview block by default).
      5. Verify there are no reported errors
      6. Login as a teacher for the same course
      7. View the "My home" page for the teacher.
      8. Verify there are no reported errors
      Show
      (For 2.5) Run the unit tests (Once MDL-37547 is integrated): ./vendor/bin/phpunit assign_lib_testcase mod/assign/tests/lib_test.php (For 2.4 and older) In a course create 3 assignments with file submissions enabled. Make sure the assignments are open for student submissions (not past the due date). Login as a student and upload a file submission to each assignment View the "My home" page for the student (has the course_overview block by default). Verify there are no reported errors Login as a teacher for the same course View the "My home" page for the teacher. Verify there are no reported errors
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-37619-master

      Description

      A recent patch caused the unit tests for mod/assign/lib.php to start failing. It wasn't picked up right away because the unit tests are only just being integrated now.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment - - edited

            Ping, we need 23 & 24 branches here, a quick look seems to indicate the same may be happening in those branches. So also "manual" testing instructions should be added for them (coz they are not phpunit-covered).

            TIA!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - - edited Ping, we need 23 & 24 branches here, a quick look seems to indicate the same may be happening in those branches. So also "manual" testing instructions should be added for them (coz they are not phpunit-covered). TIA!
            Hide
            damyon Damyon Wiese added a comment -

            Fix is ready for 23 and 24 - but I'm just trying to confirm that the testing instructions reproduce the bug.

            Show
            damyon Damyon Wiese added a comment - Fix is ready for 23 and 24 - but I'm just trying to confirm that the testing instructions reproduce the bug.
            Hide
            damyon Damyon Wiese added a comment -

            Yes - reproduced it and the fix works as expected.

            Show
            damyon Damyon Wiese added a comment - Yes - reproduced it and the fix works as expected.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated (23, 24 & master), thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated (23, 24 & master), thanks!
            Hide
            salvetore Michael de Raadt added a comment -

            Test result: Success!

            Tested in 2.3 and 2.4 as prescribed.

            Tested in Master using specific unit tests.

            Show
            salvetore Michael de Raadt added a comment - Test result: Success! Tested in 2.3 and 2.4 as prescribed. Tested in Master using specific unit tests.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Surely you will be happy to know that your code is now part of Moodle upstream. Thanks, thanks!

            Closing as fixed, ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Surely you will be happy to know that your code is now part of Moodle upstream. Thanks, thanks! Closing as fixed, ciao

              People

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

                Dates

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