12345678910111213141516171819202122232425262728 |
- <?php
- //adds gradeimporter to add new activity page
- function tool_devcourse_extend_navigation_course($navigation, $course, $coursecontext) {
- $url = new moodle_url('/admin/tool/devcourse/index.php');
- $devcoursenode = navigation_node::create('Development course', $url, navigation_node::TYPE_CUSTOM, 'Dev course', 'devcourse');
- $navigation->add_node($devcoursenode);
- }
- function gradeimporter_add_instance ($data, $mform) {
- global $DB;
-
- $cmid = $data->coursemodule;
-
- $gradeimporterid = $DB->insert_record("gradeimporter", $data);
- $data->id = $gradeimporterid;
-
- $context = context_module::instance($cmid);
- $gradeimporter = $DB->get_record('gradeimporter', array('id' => $gradeimporterid), '*', MUST_EXIST);
-
- // iassign_grade_item($gradeimporter);
-
- // log event -----------------------------------------------------
- iassign_log::add_log('add_gradeimporter', 'name: ' . $data->name, $cmid);
- // log event -----------------------------------------------------
-
- return $iassign->id;
- }
|