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

Forcing to role presets: XML preset name, description and archetype values aren't fixed/cleaned

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.2.8, 4.1.11, 4.3.5, 4.4.1
    • Roles / Access
    • MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE
    • MDL-81928-master-role_parse_preset-fix
    • Hide
      1. Create a role preset XML file with attributes "unclean" name and description or with a non-existing archetype
      2. Run a unit test on this method (Other surrounding code at least prevents creating or storing a role with a non-existing archetype to the database)
      Show
      Create a role preset XML file with attributes "unclean" name and description or with a non-existing archetype Run a unit test on this method (Other surrounding code at least prevents creating or storing a role with a non-existing archetype to the database)

      See https://github.com/moodle/moodle/blob/462d5f04a8fea5e2aaa7911cc700f90d54b8a73b/admin/roles/classes/preset.php#L179-L200

      Maybe something caused by refactoring or some such. The variable $value doesn't exist therefore is never "true".

      So the cleaning/fixing is never done. I've tested a nonexisting archetype. That doesn't reach the GUI nor the database because of other code.

      Anyway, it should probably be fixed.

            poggenpohlda Daniel Poggenpohl
            poggenpohlda Daniel Poggenpohl
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 10 minutes
                10m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.