[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 3 require_once("../../config.php"); 4 5 $id = optional_param('id', 0, PARAM_INT); // Course Module ID. 6 $a = optional_param('a', 0, PARAM_INT); // Assignment ID. 7 8 require_login(); 9 $PAGE->set_context(context_system::instance()); 10 11 if (!$id && !$a) { 12 print_error('invalidcoursemodule'); 13 } 14 15 $mapping = null; 16 if ($id) { 17 $mapping = $DB->get_record('assignment_upgrade', array('oldcmid' => $id), '*', IGNORE_MISSING); 18 } else { 19 $mapping = $DB->get_record('assignment_upgrade', array('oldinstance' => $a), '*', IGNORE_MISSING); 20 } 21 22 if (!$mapping) { 23 $url = ''; 24 if (has_capability('moodle/site:config', context_system::instance())) { 25 $url = new moodle_url('/admin/tool/assignmentupgrade/listnotupgraded.php'); 26 } 27 print_error('assignmentneedsupgrade', 'assignment', $url); 28 } 29 30 $url = new moodle_url('/mod/assign/view.php', array('id' => $mapping->newcmid)); 31 redirect($url);
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |