123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <?php
- defined('MOODLE_INTERNAL') || die();
- require_once($CFG->libdir . '/filelib.php');
- require_once($CFG->libdir . '/completionlib.php');
- if (($marker >= 0) && has_capability('moodle/course:setcurrentsection', $context) && confirm_sesskey()) {
- $course->marker = $marker;
- course_set_marker($course->id, $marker);
- }
- $context = context_course::instance($course->id);
- $courseformat = course_get_format($course);
- $course = $courseformat->get_course();
- if (($marker >= 0) && has_capability('moodle/course:setcurrentsection', $context) && confirm_sesskey()) {
- $course->marker = $marker;
- course_set_marker($course->id, $marker);
- }
- $renderer = $PAGE->get_renderer('format_competencegraph');
- $devicetype = core_useragent::get_device_type();
- if ($devicetype == "mobile") {
- $portable = 1;
- } else if ($devicetype == "tablet") {
- $portable = 2;
- } else {
- $portable = 0;
- }
- $renderer->set_portable($portable);
- if (!empty($displaysection)) {
- $renderer->print_single_section_page($course, null, null, null, null, $displaysection);
- } else {
- $tcsettings = $courseformat->get_settings();
-
-
-
-
- if (has_capability('moodle/course:update', $context)) {
-
- }
- $course->coursedisplay = null;
- if (optional_param('format', NULL, PARAM_TEXT)) {
- if (optional_param('format', NULL, PARAM_TEXT) == 'list') {
- $renderer->print_multiple_section_page($course, null, null, null, null);
- $SESSION->format = 'list';
- } elseif (optional_param('format', NULL, PARAM_TEXT) == 'graph') {
- $renderer->print_graph_teacher_view($course, null, null, null, null);
- $SESSION->format = 'graph';
- }
- } elseif (isset($SESSION->format)) {
- if ($SESSION->format == 'list') {
- $renderer->print_multiple_section_page($course, null, null, null, null);
- } elseif ($SESSION->format == 'graph') {
- $renderer->print_graph_teacher_view($course, null, null, null, null);
- }
- } else {
- $renderer->print_graph_teacher_view($course, null, null, null, null);
- }
- }
- $PAGE->requires->js('/course/format/competencegraph/format.js');
|