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

Delete symbol missing in "Permissions in Course" - after ajax adding

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Go to a course and then go to [Course administration  ► Users  ► Permissions].
      2. Click the '+' symbol in the roles with permission column.
      3. Make sure that an 'X' symbol is next to the role that you selected (see screen shots).
      4. Click the delete icon and ensure that the role has now been deleted form that column.
      5. Do the same check for the prohibited column.
      Show
      Go to a course and then go to [Course administration  ► Users  ► Permissions] . Click the '+' symbol in the roles with permission column. Make sure that an 'X' symbol is next to the role that you selected (see screen shots). Click the delete icon and ensure that the role has now been deleted form that column. Do the same check for the prohibited column.
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-59898-master-test

      Description

      As Admin when you go to "Home -> Courses -> MyCourse -> Users -> Permissions"
      and (wait for popupmenu) add an allowance for a role, no delete icon for this new role is shown next to it.
      For it to appear a refresh of the page is necessary.

      The issue seems to be a missing icon variable for the mustache template permissionmanager_role.
      At least the issue was resolved when i added following lines to lib/amd/scr/permissionmanager.js (js dev mode)

       

      //begins with line 106
      case 'allow':
      templatedata.spanclass = 'allowed';
      templatedata.linkclass = 'preventlink';
      templatedata.action = 'prevent';
      templatedata.icon = 't/delete'; // <-- Line added
      break;
      case 'prohibit':
      templatedata.spanclass = 'forbidden';
      templatedata.linkclass = 'unprohibitlink';
      templatedata.action = 'unprohibit';
      templatedata.icon = 't/delete'; // <-- Line added
      break;

      git: https://github.com/TobiGa/moodle/commit/81fd3d522b47d36cf93f00297aac219a56663cef

       

       

        Attachments

        1. Permissions in Course.png
          162 kB
          Tobias Garske
        2. Permissions in Course 2.png
          158 kB
          Tobias Garske

          Activity

            People

            Assignee:
            toga Tobias Garske
            Reporter:
            toga Tobias Garske
            Peer reviewer:
            Adrian Greeve
            Integrator:
            David Monllaó
            Tester:
            Mark Nelson
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/Sep/17