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

Switching role to student when viewing a hidden resource produces 'Coding error detected...' error

XMLWordPrintable

    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • wip-MDL-40191-master
    • Hide
      1. Create course with several activities
      2. Make some activities unavailable: completely hidden, with conditional access, with time restrictions, with group restrictions
      3. Keep the page open so you can copy the URLs
      4. Switch role to student and make sure you can access any of the unavailable activities by typing the URL, make sure the activity name appears in the naviagation
      5. Login as a student and make sure you can not access any of the unavailable activities by typing the URL, make sure there is no navigation in both standard and clean theme
      Show
      Create course with several activities Make some activities unavailable: completely hidden, with conditional access, with time restrictions, with group restrictions Keep the page open so you can copy the URLs Switch role to student and make sure you can access any of the unavailable activities by typing the URL, make sure the activity name appears in the naviagation Login as a student and make sure you can not access any of the unavailable activities by typing the URL, make sure there is no navigation in both standard and clean theme

      To reproduce (as Admin, Manager or Teacher)

      1. Create a page resource and put some stuff in it (anything)
      2. Set 'visible' to 'Hide'
      3. Save and display the resource
      4. In the Administration block, select 'Switch role to...' and pick 'Student' (or any role that should not see this resource)

      Result is 'Coding error detected, it must be fixed by programmer' error. With debugging on trace is:

      Debug info: Argument 3 passed to global_navigation::load_activity()
      must be an instance of navigation_node, boolean given, called in
      [dirroot]/lib/navigationlib.php on line 1204 and defined
      Error code: codingerror
      Stack trace:
       
      line 406 of /lib/setuplib.php: coding_exception thrown
      line 2018 of /lib/navigationlib.php: call to default_error_handler()
      line 1204 of /lib/navigationlib.php: call to global_navigation->load_activity()
      line 2936 of /lib/navigationlib.php: call to global_navigation->initialise()
      line 766 of /lib/pagelib.php: call to navbar->has_items()
      line 32 of /theme/wset25/layout/general.php: call to moodle_page->has_navbar()
      line 847 of /lib/outputrenderers.php: call to include()
      line 777 of /lib/outputrenderers.php: call to
      core_renderer->render_page_layout()
      line ? of unknownfile: call to core_renderer->header()
      line 1479 of /lib/setuplib.php: call to call_user_func_array()
      line 79 of /mod/page/view.php: call to bootstrap_renderer->__call()
      line 79 of /mod/page/view.php: call to bootstrap_renderer->header()
      

            marina Marina Glancy
            howardsmiller Howard Miller
            Sam Hemelryk Sam Hemelryk
            Dan Poltawski Dan Poltawski
            Michael de Raadt Michael de Raadt
            Votes:
            2 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.