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

Add unofficial support for custom context levels

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • 2.6
    • 1.9, 2.0, 2.5.1
    • Roles / Access
    • MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_25_STABLE
    • MOODLE_26_STABLE
    • w36_MDL-20045_m26_customlevels
    • Difficult
    • Hide

      1/ install attached local_testcontext plugin
      2/ add to your config.php:

      $CFG->custom_context_classes = array(12 => 'local_testcontext_bogus_context');


      3/ open role edit page and verify the new context level appeared there
      4/ reinstall your site because your context table is now invalid (or manually remove the bogus context level 12)

      Show
      1/ install attached local_testcontext plugin 2/ add to your config.php: $CFG->custom_context_classes = array(12 => 'local_testcontext_bogus_context'); 3/ open role edit page and verify the new context level appeared there 4/ reinstall your site because your context table is now invalid (or manually remove the bogus context level 12)
    • 40
    • BACKEND Sprint 4

      This issue is in reference to http://moodle.org/mod/forum/discuss.php?d=111362.
      In brief, one of our Moodle extensions would benefit greatly from being able to use Moodle's roles and contexts system, and we would need to define our own context levels. However, we would like to be able to do this without having to differ from core in unmaintainable ways.
      We believe that this would be helpful to many other Moodle partners and plugin developers, and some of our proposed changes may help to improve the maintainability and readability of core Moodle code.

        1. remove_switch_statements.diff
          65 kB
        2. remove_switch_statements.diff
          67 kB
        3. remove_switch_statements.diff
          56 kB
        4. remove_switch_statements.diff
          59 kB
        5. testaccesslib2.php
          14 kB
        6. testcontext.zip
          4 kB

            skodak Petr Skoda
            hchathi Hubert Chathi
            Frédéric Massart Frédéric Massart
            Damyon Wiese Damyon Wiese
            Ankit Agarwal Ankit Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

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