echo html_writer::start_tag('form', array('action' => '.', 'method' => 'get')); echo html_writer::start_tag('div'); echo html_writer::empty_tag('input', array('type' => 'hidden', 'id' => 'completion_dynamic_change', 'name' => 'completion_dynamic_change', 'value' => '0')); echo html_writer::end_tag('div'); echo html_writer::end_tag('form'); } /* Payment status */ $ds = new Dashboard(); $status = $ds->get_user_status(); if ($status == 0) { $message = $ds->get_user_warning_message(); echo $message; die; } /* Payments history */ $roleid = $ds->get_user_role($USER->id); if ($roleid == 5 && $USER->username != 'manager' && $USER->username != 'admin') { $payments_history = $ds->get_payments_history_block($COURSE->id, $USER->id); echo $payments_history; } // Course wrapper start. echo html_writer::start_tag('div', array('class' => 'course-content')); // make sure that section 0 exists (this function will create one if it is missing) course_create_sections_if_missing($course, 0); // get information about course modules and existing module types // format.php in course formats may rely on presence of these variables $modinfo = get_fast_modinfo($course); $modnames = get_module_types_names(); $modnamesplural = get_module_types_names(true); $modnamesused = $modinfo->get_used_module_names(); $mods = $modinfo->get_cms();
public function get_user_specific_navbar_items() { global $DB, $COURSE, $USER; $ds = new Dashboard(); $role_id = $ds->get_user_role($USER->id); $items = $ds->get_navbar_items($role_id); return $items; }