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

Cannot prevent access to Task manager for shared hosting

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Navigate to Site administration -> Server -> Scheduled tasks
        Existing functionality
        • Confirm that you see the Settings cog in the 'Edit' column
        • Confirm that it is a link
      2. Open your config.php and set:

        $CFG->preventscheduledtaskchanges = false;
        

        • Refresh and re-confirm
      3. Change it to:

        $CFG->preventscheduledtaskchanges = 0;
        

        • Refresh and re-confirm
      4. Open the settings page for one of the scheduled tasks
        • Confirm that you can see the settings page
        • Confirm that you can make changes
      Prevention tests
      1. Open four copies of a task's settings page
      2. Open your config.php again and set:

        $CFG->preventscheduledtaskchanges = true;
        

      3. In one of your copies, try making a change and saving
        • Confirm that you were redirected back to the scheduledtasks.php page and no changes were made
      4. In another copy of the page, refresh the page:
        • Confirm that you were redirected back to the scheduledtasks.php page and no changes were made
      5. Looking at the list again:
        • Confirm that the settings cog has been replaced by a lock
        • Confirm that it is no longer a link
        • Confirm it has an alt-text explaining that changes have been prevented
      6. Repeat this set of tests for $CFG->preventscheduledtaskchanges = 1;
      Show
      Navigate to Site administration -> Server -> Scheduled tasks Existing functionality Confirm that you see the Settings cog in the 'Edit' column Confirm that it is a link Open your config.php and set: $CFG->preventscheduledtaskchanges = false; Refresh and re-confirm Change it to: $CFG->preventscheduledtaskchanges = 0; Refresh and re-confirm Open the settings page for one of the scheduled tasks Confirm that you can see the settings page Confirm that you can make changes Prevention tests Open four copies of a task's settings page Open your config.php again and set: $CFG->preventscheduledtaskchanges = true; In one of your copies, try making a change and saving Confirm that you were redirected back to the scheduledtasks.php page and no changes were made In another copy of the page, refresh the page: Confirm that you were redirected back to the scheduledtasks.php page and no changes were made Looking at the list again: Confirm that the settings cog has been replaced by a lock Confirm that it is no longer a link Confirm it has an alt-text explaining that changes have been prevented Repeat this set of tests for $CFG->preventscheduledtaskchanges = 1;
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-45329-master

      Description

      A thought about this with shared hosting (which we do. And very well may I add ).

      There needs to be a way we can prevent access to (some if not all) scheduled tasks. So particular ones cannot be edited, or all cannot be edited?

      I foresee a bit of a headache happening where a client will mess about with it and decide they want automated backups and clean ups to run every minute or so... Which we don't really want to happen...

      We already have similar with upgrade notifications and installing of plugins, which we disable in config.php. Similar would be very useful to shared hosting providers.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/May/14