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

Error in unit tests when custom submission/feedback plugins are installed

    XMLWordPrintable

    Details

      Description

      If one or more custom (ie. not bundled with the assignment module) feedback or submission plugins are activated while running through the unit tests multiple errors like the one below will emerge.

      5) courselib_testcase::test_module_visibility
      Undefined property: stdClass::$assignsubmission_pdf_enabled

      /var/www/moodle24/mod/assign/locallib.php:645
      /var/www/moodle24/mod/assign/locallib.php:475
      /var/www/moodle24/mod/assign/lib.php:39
      /var/www/moodle24/mod/assign/tests/generator/lib.php:124
      /var/www/moodle24/lib/phpunit/classes/data_generator.php:430
      /var/www/moodle24/course/tests/courselib_test.php:325
      /var/www/moodle24/lib/phpunit/classes/advanced_testcase.php:76

      This is caused by the assignment generator which is responsible for creating assignments for testing purposes. The assignment generator does only set the $assignsubmission_PLUGINNAME_enabled/$assignfeedback_PLUGINNAME_enabled for the standard set of submission/feedback-plugins which causes undefined properaty-errors for other plugins.

      Replication steps:
      1. Install a custom submission or feedback plugin for the assign module.
      2. Run throgh the unit tests.

        Attachments

          Activity

            People

            Assignee:
            damyon Damyon Wiese
            Reporter:
            eriklundberg Erik Lundberg
            Peer reviewer:
            Damyon Wiese
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Rossiani Wijaya
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

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