Moodle
  1. Moodle
  2. MDL-28298

undefined constant in submission and assessment phases

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.0.4, 2.1.1
    • Component/s: Workshop
    • Labels:
    • Testing Instructions:
      Hide

      1. Login as admin or teacher
      2. Set up a workshop in a course with at least one student enrolled
      3. Switch the workshop to the submission phase
      4. Login as a student
      5. TEST: visit the workshop page and make sure the undefined constant notice is not displayed
      6. Login as the admin or the teacher again and switch the workshop to the assessment phase
      7. Login as a student again
      8. TEST: visit the workshop page and make sure the undefined constant notice is not displayed

      Show
      1. Login as admin or teacher 2. Set up a workshop in a course with at least one student enrolled 3. Switch the workshop to the submission phase 4. Login as a student 5. TEST: visit the workshop page and make sure the undefined constant notice is not displayed 6. Login as the admin or the teacher again and switch the workshop to the assessment phase 7. Login as a student again 8. TEST: visit the workshop page and make sure the undefined constant notice is not displayed
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-28298-workshop-constant
    • Rank:
      18054

      Description

      Receive the following error for student when workshop is on submission and assessment phases.

      Notice: Use of undefined constant EDITOR_UNLIMITED_FILES - assumed 'EDITOR_UNLIMITED_FILES' in /moodle/mod/workshop/locallib.php on line 222

        Activity

        Hide
        David Mudrak added a comment -

        Thanks for the report Rossiani. It was a big surprise for me to see this report and to be able to reproduce it. This definitely did not happen during the 2.1 QA testing. The reason for this is that the constant in defined in lib/formslib.php which used to be included apparently all the time. For example, if there is an assignment instance in the course, the formslib gets included by mod/assignment/lib.php (which is wrong by the way). Admins do not see this error because for them, the navigation load repository/lib.php which in turn loads formslib. Finally I concluded this must be a regression of the recent improvements in the navigation performance as the repository/lib.php is not loaded for students any more while it was in 2.0.

        In any case, using the constant from a library that was not explicitly loaded is a bug and will be fixed.

        Show
        David Mudrak added a comment - Thanks for the report Rossiani. It was a big surprise for me to see this report and to be able to reproduce it. This definitely did not happen during the 2.1 QA testing. The reason for this is that the constant in defined in lib/formslib.php which used to be included apparently all the time. For example, if there is an assignment instance in the course, the formslib gets included by mod/assignment/lib.php (which is wrong by the way). Admins do not see this error because for them, the navigation load repository/lib.php which in turn loads formslib. Finally I concluded this must be a regression of the recent improvements in the navigation performance as the repository/lib.php is not loaded for students any more while it was in 2.0. In any case, using the constant from a library that was not explicitly loaded is a bug and will be fixed.
        Hide
        David Mudrak added a comment -

        Submitting patches for 2.0, 2.1 and 2.2dev.

        Show
        David Mudrak added a comment - Submitting patches for 2.0, 2.1 and 2.2dev.
        Hide
        Sam Hemelryk added a comment -

        Thanks David this has been integrated now.

        Show
        Sam Hemelryk added a comment - Thanks David this has been integrated now.
        Hide
        Petr Škoda added a comment -

        Tested, no notice displayed.

        Show
        Petr Škoda added a comment - Tested, no notice displayed.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: