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

log doesn't store newly created log id

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      1. Log in as admin
      2. Create a new role and save it (no matter what setup)
      3. Check Reports/Logs
      You will get - The user with id '2' updated the capabilities for the role with the exact id.

      Show
      1. Log in as admin 2. Create a new role and save it (no matter what setup) 3. Check Reports/Logs You will get - The user with id '2' updated the capabilities for the role with the exact id.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Pull Master Branch:

      Description

      1. log in as admin
      2. create a new role and save it (no matter what setup)
      3. check reports/logs: The user with id '2' updated the capabilities for the role with id '0'.
        this is obviously wrong. I didn't change any role, however created a new one.
        This should say at least the exact role id, or change the text as well.

      One possible solution:
      In admin/roles/define.php, line 204:
      'objectid' => $roleid
      where $roleid is 0 because its an optional_parameter.
      changing to $tableroleid seems to solve the problem, now the event gets the newly created role's id in the objectid.

        Attachments

          Activity

            People

            Assignee:
            rushi963 Rushikesh Nalla
            Reporter:
            kiswap kiswap
            Peer reviewer:
            Simey Lameze
            Integrator:
            David Monllaó
            Tester:
            Mark Nelson
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              14/Mar/16