Skip to content
Snippets Groups Projects
Commit 3ef1ab38 authored by John Hoopes's avatar John Hoopes
Browse files

[UWMOODLE-561] fixing bug as apparently $context being passed into the...

[UWMOODLE-561] fixing bug as apparently $context being passed into the extends_settings_navigation function can be null/false
parent 8c778f8c
No related branches found
No related tags found
No related merge requests found
......@@ -16,10 +16,11 @@ $string['rebuildindex'] = 'Rescan archives';
$string['scanbutton'] = 'Scan';
$string['selectarchives'] = 'Select which archives to scan';
$string['default_moodle_import_link_text'] = 'Import (local)';
$string['default_moodle_import_link_text'] = 'Import (current site)';
// Settings string
$string['settings_page_name'] = 'Configure WISC archive plugin';
$string['override_link_setting'] = 'Override default import url';
$string['override_link_setting_desc'] = '<p>This setting will change the default import link in course administration to the WISC archive ' .
'import functionality instead the default.</p><p>For site administrators, both links will be displayed.</p>';
\ No newline at end of file
'import functionality instead the default.</p><p>For site administrators, both links will be displayed.</p>';
......@@ -43,6 +43,10 @@ function local_archive_extends_settings_navigation($settingsnav, $context){
return;
}
if($context->contextlevel == CONTEXT_SYSTEM || empty($context)){
return;
}
$coursecontext = $context->get_course_context();
// If there is no course context return we aren't in a course
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment