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

Attempting to edit self-enrollment instance limited to a cohort that has been deleted produces generalexceptionmessage error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.4.5, 3.5.3, 3.6
    • Fix Version/s: None
    • Component/s: Cohorts, Enrolments
    • Labels:
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE

      Description

      To reproduce:

      1. Create cohort at category level
      2. In a course within that category, add a Self-Enrollment instance, and set "Only cohort members" to the new cohort created in #1
      3. Delete cohort created in #1 
      4. Attempt to edit Self-Enrollment instance created in #2. This will produce the following error:  Exception - Call to a member function get_record() on null

      Full error reporting (with debugging on):

      {{Debug info: }}
      Error code: generalexceptionmessage
      Stack trace:
        - line 779 of /enrol/self/lib.php: Error thrown
        - line 52 of /enrol/editinstance_form.php: call to enrol_self_plugin->edit_instance_form()
        - line 204 of /lib/formslib.php: call to enrol_instance_edit_form->definition()
        - line 69 of /enrol/editinstance.php: call to moodleform->__construct()
      Output buffer: <br /> <b>Notice</b>: Undefined variable: DB in <b>/var/www/html/enrol/self/lib.php</b> on line <b>779</b><br />

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bnwinsf Brian Warling
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: