Ejemplo n.º 1
0
            $data[] = $line;
            if ($flag == 1) {
                if ($semid_getclass)
                    $msg = new html_table_cell(retrieve_listofclclasses_ofcourse($ccourse->courseid, $semid_getclass));
                else
                    $msg = new html_table_cell('NO Active Semester is Available, To enroll the class ,or Add and drop , Registration period is closed');
                $msg->colspan = 4;
                $row = new html_table_row(array($msg));
                $row->id = "innerdiv$index";
                $row->attributes['class'] = "customrow";
                $data[] = $row;
                $index++;
            }
        }
    }
    // print_object($data); 

    $table->data = $data;
    $table->id = "cur_customplan";
    echo '<div style="border:0px solid red" id="hierarchy-index">';
    $desc = student_currculum_progress($list->id, $list->schoolid);
    echo $out;
    if ($data) {

        echo html_writer::table($table);
    }
    echo '</div>';
    echo '<br/>';
//}
echo $OUTPUT->footer();
Ejemplo n.º 2
0
$PAGE->set_heading($SITE->fullname);
$PAGE->navbar->add(get_string('mycurriculum', 'local_curriculum'));
$users = users::getInstance();
echo $OUTPUT->header();
/* ---Heading of the page--- */
echo $OUTPUT->heading(get_string('mycurriculum', 'local_curriculum'));
require_login();
/* ---Moodle 2.2 and onwards--- */
$currenttab = 'myplan';
/* ---adding tabs--- */
$exams->studentside_tabs($currenttab);
if (isset($CFG->allowframembedding) and ! $CFG->allowframembedding) {
    echo $OUTPUT->box(get_string('mycurriculumdec', 'local_curriculum'));
}
$schoolid = $DB->get_field('local_userdata', 'schoolid', array('userid' => $USER->id));
$desc = student_currculum_progress($cid, $schoolid);
$hier = new hierarchy();
// considering current open academiccalendar event
$semesterid = $hier->get_allmyactivesemester($USER->id);
foreach ($semesterid as $key => $value)
    $semid_getclass = $key;

// without considering events
$semid_withoutevents = get_activesemester_withoutevents($USER->id, $schoolid);
$curriculumpaths = $DB->get_records('local_curriculum_plan', array('curriculumid' => $cid));
if (empty($curriculumpaths)) {
    echo "Currently No Plans assigned to this curriculum";
} else {
    echo '<ul id="programs">';
    foreach ($curriculumpaths as $curriculumpath) {
        echo '<li><a style="cursor:pointer;