コード例 #1
0
//set the page title
$pagetitle = empty($report_id) ? get_string('createreport', 'block_ilp') : get_string('editreport', 'block_ilp');
if (!empty($report_id)) {
    $reportrecord = $dbc->get_report_by_id($report_id);
    $mform->set_data($reportrecord);
}
// setup the navigation breadcrumbs
//siteadmin or modules
//we need to determine which moodle we are in and give the correct area name
$sectionname = stripos($CFG->release, "2.") !== false ? get_string('administrationsite') : get_string('administration');
$PAGE->navbar->add($sectionname, null, 'title');
//plugins or modules
//we need to determine which moodle we are in and give the correct area name
$sectionname = stripos($CFG->release, "2.") !== false ? get_string('plugins', 'admin') : get_string('managemodules');
$PAGE->navbar->add($sectionname, null, 'title');
$PAGE->navbar->add(get_string('blocks'), null, 'title');
//block name
$url = $CFG->wwwroot . "/admin/settings.php?section=blocksettingilp";
$PAGE->navbar->add(get_string('blockname', 'block_ilp'), $url, 'title');
//section name
$PAGE->navbar->add(get_string('reportconfiguration', 'block_ilp'), $CFG->wwwroot . "/blocks/ilp/actions/edit_report_configuration.php", 'title');
//get string for create report
$PAGE->navbar->add($pagetitle, null, 'title');
// setup the page title and heading
$SITE = $dbc->get_course_by_id(SITEID);
$PAGE->set_title($SITE->fullname . " : " . get_string('blockname', 'block_ilp'));
$PAGE->set_heading($SITE->fullname);
$PAGE->set_pagetype('ilp-configuration');
$PAGE->set_pagelayout('ilp');
$PAGE->set_url('/blocks/ilp/actions/edit_report.php', $PARSER->get_params());
require_once $CFG->dirroot . '/blocks/ilp/views/edit_report.html';
コード例 #2
0
if (empty($access_viewotherilp) && !empty($course_id)) {
    //the user doesnt have the capability to create this type of report entry
    print_error('userdoesnothavecapability', 'block_ilp');
}
//check if any tutess exist
// setup the navigation breadcrumbs
if (!empty($course_id)) {
    $listurl = "{$CFG->wwwroot}/blocks/ilp/actions/view_studentlist.php?tutor=0&course_id={$course_id}";
} else {
    $listurl = "{$CFG->wwwroot}/blocks/ilp/actions/view_studentlist.php?tutor=1&course_id=0";
}
//add the page title
$PAGE->navbar->add(get_string('ilps', 'block_ilp'), $listurl, 'title');
//title
if (!empty($course_id)) {
    $course = $dbc->get_course_by_id($course_id);
    $title = $course->shortname;
} else {
    $title = get_string('mytutees', 'block_ilp');
}
//block name
$PAGE->navbar->add($title, null, 'title');
// setup the page title and heading
$SITE = $dbc->get_course_by_id(SITEID);
$PAGE->set_title($SITE->fullname . " : " . get_string('blockname', 'block_ilp'));
$PAGE->set_heading($SITE->fullname);
$PAGE->set_pagetype('ilp-reportlist');
$PAGE->set_pagelayout('ilp');
$PAGE->set_url($CFG->wwwroot . "/blocks/ilp/actions/view_studentlist.php", $PARSER->get_params());
//we need to list all of the students in the course with the given id
if (!empty($course_id)) {