if (has_capability('local/courseregistration:view', $context)) { $heading = get_string('myacademics', 'local_courseregistration'); $PAGE->navbar->add(get_string('myacademics', 'local_courseregistration')); } else { $heading = get_string('mycurrentplan', 'local_courseregistration'); $PAGE->navbar->add(get_string('mycurrentplan', 'local_courseregistration')); } echo $OUTPUT->header(); echo $OUTPUT->heading($heading); //--------error handling $hier = new hierarchy(); // to check logged in user is student or not $student=$hier->is_student($USER->id); if(empty($student)) $hier->get_school_items(); $exams = new schedule_exam(); /* ---Moodle 2.2 and onwards--- */ $currenttab = 'mycurrentplan'; /* ---adding tabs--- */ if (has_capability('local/courseregistration:view', $context)) $exams->studentside_tabs($currenttab); if (isset($CFG->allowframembedding) and ! $CFG->allowframembedding) { echo $OUTPUT->box(get_string('myclasstabdes', 'local_courseregistration')); } $today = date('Y-m-d');