diff --git a/classes/load_template_form.php b/classes/load_template_form.php index 961cc0d..bdf26f9 100644 --- a/classes/load_template_form.php +++ b/classes/load_template_form.php @@ -41,7 +41,7 @@ class load_template_form extends \moodleform { $mform->addElement('header', 'loadtemplateheader', get_string('loadtemplate', 'customcert')); $templates = $DB->get_records_menu('customcert_templates', - array('contextid' => \CONTEXT_SYSTEM::instance()->id), 'name ASC', 'id, name'); + array('contextid' => \context_system::instance()->id), 'name ASC', 'id, name'); $group = array(); $group[] = $mform->createElement('select', 'ltid', '', $templates); diff --git a/index.php b/index.php index ac28912..52d895d 100644 --- a/index.php +++ b/index.php @@ -33,7 +33,7 @@ require_login($course); // Set up the page variables. $pageurl = new moodle_url('/mod/customcert/index.php', array('id' => $course->id)); -\mod_customcert\page_helper::page_setup($pageurl, CONTEXT_COURSE::instance($id), +\mod_customcert\page_helper::page_setup($pageurl, context_course::instance($id), get_string('modulenameplural', 'customcert')); // Additional page setup needed. diff --git a/manage_templates.php b/manage_templates.php index b9b47aa..170b3c6 100644 --- a/manage_templates.php +++ b/manage_templates.php @@ -24,7 +24,7 @@ require_once('../../config.php'); -$contextid = optional_param('contextid', CONTEXT_SYSTEM::instance()->id, PARAM_INT); +$contextid = optional_param('contextid', context_system::instance()->id, PARAM_INT); $action = optional_param('action', '', PARAM_ALPHA); $confirm = optional_param('confirm', 0, PARAM_INT);