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

enrol_user not setting modifierid due to code defect

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.4
    • Component/s: Enrolments
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide

      1. Log in as teacher.
      2. Select a course (Navigation -> "My Courses" -> "XYZCOURSE")
      3. Go to enrolled users list (Settings -> users -> "Enrolled users")
      3. Enroll a new student
      4. Check "user_enrollments" table and make sure the last record has modifierid > 0
      (SQL: SELECT modifierid FROM mdl_user_enrolments ORDER BY timemodified DESC LIMIT 1

      NOTE: Change table name if it has prefix other then "mdl_"

      Show
      1. Log in as teacher. 2. Select a course (Navigation -> "My Courses" -> "XYZCOURSE") 3. Go to enrolled users list (Settings -> users -> "Enrolled users") 3. Enroll a new student 4. Check "user_enrollments" table and make sure the last record has modifierid > 0 (SQL: SELECT modifierid FROM mdl_user_enrolments ORDER BY timemodified DESC LIMIT 1 NOTE: Change table name if it has prefix other then "mdl_"
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Pull Master Branch:
      wip-mdl-27603-master

      Description

      I noticed that the modifierid in the user_enrolments table was almost always zero. Found that enrol_user (in lib/enrollib.php) is attempting to set "modifier" rather than "modifierid" in two places. Should be a simple fix.

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  1/Aug/11