mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-9615: Correct incorrect use of term breadcrumbs
- $crumbs -> $navlinks Author: Matt Clarkson <mattc@catalyst.net.nz>
This commit is contained in:
parent
7994464178
commit
3b27b0fe21
99 changed files with 471 additions and 547 deletions
|
@ -11,7 +11,7 @@ $temp->add(new admin_setting_configcheckbox('allowcoursethemes', get_string('all
|
||||||
$temp->add(new admin_setting_configcheckbox('allowcategorythemes', get_string('allowcategorythemes', 'admin'), get_string('configallowcategorythemes', 'admin'), 0));
|
$temp->add(new admin_setting_configcheckbox('allowcategorythemes', get_string('allowcategorythemes', 'admin'), get_string('configallowcategorythemes', 'admin'), 0));
|
||||||
$temp->add(new admin_setting_configcheckbox('allowuserblockhiding', get_string('allowuserblockhiding', 'admin'), get_string('configallowuserblockhiding', 'admin'), 1));
|
$temp->add(new admin_setting_configcheckbox('allowuserblockhiding', get_string('allowuserblockhiding', 'admin'), get_string('configallowuserblockhiding', 'admin'), 1));
|
||||||
$temp->add(new admin_setting_configcheckbox('showblocksonmodpages', get_string('showblocksonmodpages', 'admin'), get_string('configshowblocksonmodpages', 'admin'), 0));
|
$temp->add(new admin_setting_configcheckbox('showblocksonmodpages', get_string('showblocksonmodpages', 'admin'), get_string('configshowblocksonmodpages', 'admin'), 0));
|
||||||
$temp->add(new admin_setting_configselect('hideactivitytypecrumb', get_string('hideactivitytypecrumb', 'admin'), get_string('confighideactivitytypecrumb', 'admin'), 0,
|
$temp->add(new admin_setting_configselect('hideactivitytypenavlink', get_string('hideactivitytypenavlink', 'admin'), get_string('confighideactivitytypenavlink', 'admin'), 0,
|
||||||
array(
|
array(
|
||||||
0 => get_string('hidefromnone', 'admin'),
|
0 => get_string('hidefromnone', 'admin'),
|
||||||
1 => get_string('hidefromstudents', 'admin'),
|
1 => get_string('hidefromstudents', 'admin'),
|
||||||
|
|
|
@ -672,9 +672,9 @@
|
||||||
$focuscursor = "form.name";
|
$focuscursor = "form.name";
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strmodulenameplural, 'link' => "$CFG->wwwroot/mod/$module->name/index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strmodulenameplural, 'link' => "$CFG->wwwroot/mod/$module->name/index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => $streditinga, 'link' => '', 'type' => 'action');
|
$navlinks[] = array('name' => $streditinga, 'link' => '', 'type' => 'action');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($streditinga, '', $navigation, $focuscursor, "", false);
|
print_header_simple($streditinga, '', $navigation, $focuscursor, "", false);
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
$pageheading = get_string("updatinga", "moodle", $fullmodulename);
|
$pageheading = get_string("updatinga", "moodle", $fullmodulename);
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbsinstancename = array('name' => format_string($form->name,true), 'link' => "$CFG->wwwroot/mod/$module->name/view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinksinstancename = array('name' => format_string($form->name,true), 'link' => "$CFG->wwwroot/mod/$module->name/view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
|
|
||||||
$CFG->pagepath = 'mod/'.$module->name;
|
$CFG->pagepath = 'mod/'.$module->name;
|
||||||
if (!empty($type)) {
|
if (!empty($type)) {
|
||||||
|
@ -299,13 +299,13 @@
|
||||||
$streditinga = get_string("editinga", "moodle", $fullmodulename);
|
$streditinga = get_string("editinga", "moodle", $fullmodulename);
|
||||||
$strmodulenameplural = get_string("modulenameplural", $module->name);
|
$strmodulenameplural = get_string("modulenameplural", $module->name);
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strmodulenameplural, 'link' => "$CFG->wwwroot/mod/$module->name/index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strmodulenameplural, 'link' => "$CFG->wwwroot/mod/$module->name/index.php?id=$course->id", 'type' => 'activity');
|
||||||
if (isset($crumbsinstancename)) {
|
if (isset($navlinksinstancename)) {
|
||||||
$crumbs[] = $crumbsinstancename;
|
$navlinks[] = $navlinksinstancename;
|
||||||
}
|
}
|
||||||
$crumbs[] = array('name' => $streditinga, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $streditinga, 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($streditinga, '', $navigation, $mform->focus(), "", false);
|
print_header_simple($streditinga, '', $navigation, $mform->focus(), "", false);
|
||||||
|
|
||||||
|
|
|
@ -82,10 +82,10 @@
|
||||||
|
|
||||||
$strgrades = get_string('grades');
|
$strgrades = get_string('grades');
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strgrades, 'link' => $CFG->wwwroot . '/grade/index.php?id='.$courseid, 'type' => 'misc');
|
$navlinks[] = array('name' => $strgrades, 'link' => $CFG->wwwroot . '/grade/index.php?id='.$courseid, 'type' => 'misc');
|
||||||
$crumbs[] = array('name' => $reportnames[$report], 'link' => '', 'type' => 'misc');
|
$navlinks[] = array('name' => $reportnames[$report], 'link' => '', 'type' => 'misc');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
// build buttons here
|
// build buttons here
|
||||||
/// setting up editting mode
|
/// setting up editting mode
|
||||||
|
|
|
@ -59,12 +59,12 @@ $strgrades = get_string('grades');
|
||||||
$strgraderreport = get_string('graderreport', 'grades');
|
$strgraderreport = get_string('graderreport', 'grades');
|
||||||
$strgradepreferences = get_string('gradepreferences', 'grades');
|
$strgradepreferences = get_string('gradepreferences', 'grades');
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strgrades, 'link' => $CFG->wwwroot . '/grade/index.php?id='.$courseid, 'type' => 'misc');
|
$navlinks[] = array('name' => $strgrades, 'link' => $CFG->wwwroot . '/grade/index.php?id='.$courseid, 'type' => 'misc');
|
||||||
$crumbs[] = array('name' => $strgraderreport,
|
$navlinks[] = array('name' => $strgraderreport,
|
||||||
'link' => $CFG->wwwroot . '/grade/report.php?id=' . $courseid . '&report=grader', 'type' => 'misc');
|
'link' => $CFG->wwwroot . '/grade/report.php?id=' . $courseid . '&report=grader', 'type' => 'misc');
|
||||||
$crumbs[] = array('name' => $strgradepreferences, 'link' => '', 'type' => 'misc');
|
$navlinks[] = array('name' => $strgradepreferences, 'link' => '', 'type' => 'misc');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($strgrades.': '.$strgraderreport . ': ' . $strgradepreferences,': '.$strgradepreferences, $navigation,
|
print_header_simple($strgrades.': '.$strgraderreport . ': ' . $strgradepreferences,': '.$strgradepreferences, $navigation,
|
||||||
'', '', true, '', navmenu($course));
|
'', '', true, '', navmenu($course));
|
||||||
|
|
|
@ -111,7 +111,7 @@ $string['configgradebookroles'] = 'This setting allows you to control who appear
|
||||||
$string['configgradeexport'] = 'Choose which gradebook export formats are your primary methods for exporting grades. Chosen plugins will then set and use a \"last exported\" field for every grade. For example, this might result in exported records being identified as being \"new\" or \"updated\". If you are not sure about this then leave everything unchecked.';
|
$string['configgradeexport'] = 'Choose which gradebook export formats are your primary methods for exporting grades. Chosen plugins will then set and use a \"last exported\" field for every grade. For example, this might result in exported records being identified as being \"new\" or \"updated\". If you are not sure about this then leave everything unchecked.';
|
||||||
$string['configguestroleid'] = 'This role is automatically assigned to the guest user. It is also temporarily assigned to not enrolled users when they enter course that allows guests without password. Please verify that the role has moodle/legacy:guest and moodle/course:view capability.';
|
$string['configguestroleid'] = 'This role is automatically assigned to the guest user. It is also temporarily assigned to not enrolled users when they enter course that allows guests without password. Please verify that the role has moodle/legacy:guest and moodle/course:view capability.';
|
||||||
$string['confighiddenuserfields'] = 'Select which user infomation fields you wish to hide from other users other than course teachers/admins. This will increase student privacy. Hold CTRL key to select multiple fields.';
|
$string['confighiddenuserfields'] = 'Select which user infomation fields you wish to hide from other users other than course teachers/admins. This will increase student privacy. Hold CTRL key to select multiple fields.';
|
||||||
$string['confighideactivitytypecrumb'] = 'Select from whom to hide the activity type (e.g. Quizzes) crumb in the breadcrumb trail displayed for activity modules.';
|
$string['confighideactivitytypenavlink'] = 'Select from whom to hide the activity type (e.g. Quizzes) link in the navigation displayed for activity modules.';
|
||||||
$string['confightmleditor'] = 'Choose whether or not to allow use of the embedded HTML text editor. Even if you choose allow, this editor will only appear when the user is using a compatible web browser. Users can also choose not to use it.';
|
$string['confightmleditor'] = 'Choose whether or not to allow use of the embedded HTML text editor. Even if you choose allow, this editor will only appear when the user is using a compatible web browser. Users can also choose not to use it.';
|
||||||
$string['configidnumber'] = 'This option specifies whether (a) Users are not be asked for an ID number at all, (b) Users are asked for an ID number but can leave it blank or (c) Users are asked for an ID Number and cannot leave it blank. If given the User\'s ID number is displayed in their Profile.';
|
$string['configidnumber'] = 'This option specifies whether (a) Users are not be asked for an ID number at all, (b) Users are asked for an ID number but can leave it blank or (c) Users are asked for an ID Number and cannot leave it blank. If given the User\'s ID number is displayed in their Profile.';
|
||||||
$string['configintcachemax'] = 'For internal cache only. Maximum number of records to keep in the cache. Recommended value: 50. Use lower values to reduce memory usage.';
|
$string['configintcachemax'] = 'For internal cache only. Maximum number of records to keep in the cache. Recommended value: 50. Use lower values to reduce memory usage.';
|
||||||
|
@ -142,7 +142,7 @@ $string['configminpasswordlength'] = 'Passwords must be at least these many char
|
||||||
$string['configminpasswordlower'] = 'Passwords must have at least these many lower case letters.';
|
$string['configminpasswordlower'] = 'Passwords must have at least these many lower case letters.';
|
||||||
$string['configminpasswordnonalphanum'] = 'Passwords must have at least these many non-alphanumeric characters.';
|
$string['configminpasswordnonalphanum'] = 'Passwords must have at least these many non-alphanumeric characters.';
|
||||||
$string['configminpasswordupper'] = 'Passwords must have at least these many upper case letters.';
|
$string['configminpasswordupper'] = 'Passwords must have at least these many upper case letters.';
|
||||||
$string['configmymoodleredirect'] = 'This setting forces redirects to /my on login for non-admins and replaces the top level site breadcrumb with /my';
|
$string['configmymoodleredirect'] = 'This setting forces redirects to /my on login for non-admins and replaces the top level site navigation with /my';
|
||||||
$string['confignodefaultuserrolelists'] = 'This setting prevents all users from being returned from the database from deprecated calls of get_course_user, etc., for the site course if the default role provides that access. Check this, if you suffer a performance hit.';
|
$string['confignodefaultuserrolelists'] = 'This setting prevents all users from being returned from the database from deprecated calls of get_course_user, etc., for the site course if the default role provides that access. Check this, if you suffer a performance hit.';
|
||||||
$string['confignonmetacoursesyncroleids'] = 'By default all enrolments from child courses are synchronised to metacourses. Roles that are selected here will not be included in the synchronisation process.';
|
$string['confignonmetacoursesyncroleids'] = 'By default all enrolments from child courses are synchronised to metacourses. Roles that are selected here will not be included in the synchronisation process.';
|
||||||
$string['confignoreplyaddress'] = 'Emails are sometimes sent out on behalf of a user (eg forum posts). The email address you specify here will be used as the \"From\" address in those cases when the recipients should not be able to reply directly to the user (eg when a user chooses to keep their address private).';
|
$string['confignoreplyaddress'] = 'Emails are sometimes sent out on behalf of a user (eg forum posts). The email address you specify here will be used as the \"From\" address in those cases when the recipients should not be able to reply directly to the user (eg when a user chooses to keep their address private).';
|
||||||
|
@ -330,7 +330,7 @@ $string['helpupcominglookahead'] = 'How many days in the future does the calenda
|
||||||
$string['helpupcomingmaxevents'] = 'How many (maximum) upcoming events are shown to users by default?';
|
$string['helpupcomingmaxevents'] = 'How many (maximum) upcoming events are shown to users by default?';
|
||||||
$string['helpweekenddays'] = 'Which days of the week are treated as \"weekend\" and shown with a different colour?';
|
$string['helpweekenddays'] = 'Which days of the week are treated as \"weekend\" and shown with a different colour?';
|
||||||
$string['hiddenuserfields'] = 'Hide user fields';
|
$string['hiddenuserfields'] = 'Hide user fields';
|
||||||
$string['hideactivitytypecrumb'] = 'Hide activity type crumb';
|
$string['hideactivitytypenavlink'] = 'Hide activity type navigation';
|
||||||
$string['hidefromall'] = 'Hide from all users';
|
$string['hidefromall'] = 'Hide from all users';
|
||||||
$string['hidefromnone'] = 'Hide from nobody';
|
$string['hidefromnone'] = 'Hide from nobody';
|
||||||
$string['hidefromstudents'] = 'Hide from students';
|
$string['hidefromstudents'] = 'Hide from students';
|
||||||
|
|
|
@ -7019,51 +7019,51 @@ function setup_lang_from_browser() {
|
||||||
* and others
|
* and others
|
||||||
* @uses $CFG
|
* @uses $CFG
|
||||||
* @uses $THEME
|
* @uses $THEME
|
||||||
* @param $extrabreadcrumbs - array of associative arrays, keys: name, link, type
|
* @param $extranavlinks - array of associative arrays, keys: name, link, type
|
||||||
* @return $navigation as an object so it can be differentiated from old style
|
* @return $navigation as an object so it can be differentiated from old style
|
||||||
* navigation strings.
|
* navigation strings.
|
||||||
*/
|
*/
|
||||||
function build_navigation($extrabreadcrumbs) {
|
function build_navigation($extranavlinks) {
|
||||||
global $CFG, $COURSE;
|
global $CFG, $COURSE;
|
||||||
|
|
||||||
$navigation = '';
|
$navigation = '';
|
||||||
|
|
||||||
//Site name
|
//Site name
|
||||||
if ($site = get_site()) {
|
if ($site = get_site()) {
|
||||||
$breadcrumbs[] = array('name' => format_string($site->shortname), 'link' => "$CFG->wwwroot/", 'type' => 'home');
|
$navlinks[] = array('name' => format_string($site->shortname), 'link' => "$CFG->wwwroot/", 'type' => 'home');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($COURSE) {
|
if ($COURSE) {
|
||||||
if ($COURSE->id != SITEID) {
|
if ($COURSE->id != SITEID) {
|
||||||
//Course
|
//Course
|
||||||
$breadcrumbs[] = array('name' => format_string($COURSE->shortname), 'link' => "$CFG->wwwroot/course/view.php?id=$COURSE->id",'type' => 'course');
|
$navlinks[] = array('name' => format_string($COURSE->shortname), 'link' => "$CFG->wwwroot/course/view.php?id=$COURSE->id",'type' => 'course');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Merge in extra bread crumbs
|
//Merge in extra navigation links
|
||||||
$breadcrumbs = array_merge($breadcrumbs, $extrabreadcrumbs);
|
$navlinks = array_merge($navlinks, $extranavlinks);
|
||||||
|
|
||||||
//Construct an unordered list from $breadcrumbs
|
//Construct an unordered list from $navlinks
|
||||||
//Accessibility: heading hidden from visual browsers by default.
|
//Accessibility: heading hidden from visual browsers by default.
|
||||||
$navigation = '<h2 class="accesshide">'.get_string('youarehere','access')."</h2> <ul>\n";
|
$navigation = '<h2 class="accesshide">'.get_string('youarehere','access')."</h2> <ul>\n";
|
||||||
$countcrumb = count($breadcrumbs);
|
$countlinks = count($navlinks);
|
||||||
|
|
||||||
for($i=0;$i<$countcrumb;$i++) {
|
for($i=0;$i<$countlinks;$i++) {
|
||||||
|
|
||||||
// Check the link type to see if this link should appear in the trail
|
// Check the link type to see if this link should appear in the trail
|
||||||
if ($breadcrumbs[$i]['type'] == 'activity' && $i+1 < $countcrumb && ($CFG->hideactivitytypecrumb == 2 || ($CFG->hideactivitytypecrumb == 1 && !has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $course->id))))) {
|
if ($navlinks[$i]['type'] == 'activity' && $i+1 < $countlinks && ($CFG->hideactivitytypenavlink == 2 || ($CFG->hideactivitytypenavlink == 1 && !has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $course->id))))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$navigation .= '<li class="first">';
|
$navigation .= '<li class="first">';
|
||||||
if ($i > 0) {
|
if ($i > 0) {
|
||||||
$navigation .= get_separator();
|
$navigation .= get_separator();
|
||||||
}
|
}
|
||||||
if ($breadcrumbs[$i]['link'] && $i+1 < $countcrumb) {
|
if ($navlinks[$i]['link'] && $i+1 < $countlinks) {
|
||||||
$navigation .= "<a onclick=\"this.target='$CFG->framename'\" href=\"{$breadcrumbs[$i]['link']}\">";
|
$navigation .= "<a onclick=\"this.target='$CFG->framename'\" href=\"{$navlinks[$i]['link']}\">";
|
||||||
}
|
}
|
||||||
$navigation .= "{$breadcrumbs[$i]['name']}";
|
$navigation .= "{$navlinks[$i]['name']}";
|
||||||
if ($breadcrumbs[$i]['link'] && $i+1 < $countcrumb) {
|
if ($navlinks[$i]['link'] && $i+1 < $countlinks) {
|
||||||
$navigation .= "</a>";
|
$navigation .= "</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7072,7 +7072,7 @@ function build_navigation($extrabreadcrumbs) {
|
||||||
|
|
||||||
$navigation .= "</ul>";
|
$navigation .= "</ul>";
|
||||||
|
|
||||||
return(array('newnav' => true, 'breadcrumbs' => $navigation));
|
return(array('newnav' => true, 'navlinks' => $navigation));
|
||||||
}
|
}
|
||||||
|
|
||||||
function is_newnav($navigation) {
|
function is_newnav($navigation) {
|
||||||
|
|
|
@ -181,7 +181,7 @@ class page_base {
|
||||||
// HTML OUTPUT SECTION
|
// HTML OUTPUT SECTION
|
||||||
|
|
||||||
// We have absolutely no idea what derived pages are all about
|
// We have absolutely no idea what derived pages are all about
|
||||||
function print_header($title, $morebreadcrumbs) {
|
function print_header($title, $morenavlinks) {
|
||||||
trigger_error('Page class does not implement method <strong>print_header()</strong>', E_USER_WARNING);
|
trigger_error('Page class does not implement method <strong>print_header()</strong>', E_USER_WARNING);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -386,7 +386,7 @@ class page_course extends page_base {
|
||||||
|
|
||||||
// This function prints out the common part of the page's header.
|
// This function prints out the common part of the page's header.
|
||||||
// You should NEVER print the header "by hand" in other code.
|
// You should NEVER print the header "by hand" in other code.
|
||||||
function print_header($title, $morebreadcrumbs=NULL, $meta='', $bodytags='') {
|
function print_header($title, $morenavlinks=NULL, $meta='', $bodytags='') {
|
||||||
global $USER, $CFG;
|
global $USER, $CFG;
|
||||||
|
|
||||||
$this->init_full();
|
$this->init_full();
|
||||||
|
@ -397,18 +397,18 @@ class page_course extends page_base {
|
||||||
$title = str_replace($search, $replace, $title);
|
$title = str_replace($search, $replace, $title);
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs = array();
|
$navlinks = array();
|
||||||
|
|
||||||
if(!empty($morebreadcrumbs)) {
|
if(!empty($morenavlinks)) {
|
||||||
$crumbs = array_merge($crumbs, $morebreadcrumbs);
|
$navlinks = array_merge($navlinks, $morenavlinks);
|
||||||
}
|
}
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
// The "Editing On" button will be appearing only in the "main" course screen
|
// The "Editing On" button will be appearing only in the "main" course screen
|
||||||
// (i.e., no breadcrumbs other than the default one added inside this function)
|
// (i.e., no breadcrumbs other than the default one added inside this function)
|
||||||
$buttons = switchroles_form($this->courserecord->id) . update_course_icon($this->courserecord->id );
|
$buttons = switchroles_form($this->courserecord->id) . update_course_icon($this->courserecord->id );
|
||||||
$buttons = empty($morebreadcrumbs) ? $buttons : ' ';
|
$buttons = empty($morenavlinks) ? $buttons : ' ';
|
||||||
|
|
||||||
print_header($title, $this->courserecord->fullname, $navigation,
|
print_header($title, $this->courserecord->fullname, $navigation,
|
||||||
'', $meta, true, $buttons, user_login_string($this->courserecord, $USER), false, $bodytags);
|
'', $meta, true, $buttons, user_login_string($this->courserecord, $USER), false, $bodytags);
|
||||||
|
@ -611,7 +611,7 @@ class page_generic_activity extends page_base {
|
||||||
return BLOCK_POS_LEFT;
|
return BLOCK_POS_LEFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_header($title, $morebreadcrumbs = NULL, $bodytags = '', $meta = '') {
|
function print_header($title, $morenavlinks = NULL, $bodytags = '', $meta = '') {
|
||||||
global $USER, $CFG;
|
global $USER, $CFG;
|
||||||
|
|
||||||
$this->init_full();
|
$this->init_full();
|
||||||
|
@ -623,14 +623,14 @@ class page_generic_activity extends page_base {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$crumbs[] = array('name' => get_string('modulenameplural', $this->activityname), 'link' => $CFG->wwwroot."/mod/{$this->activityname}/index.php?id={$this->courserecord->id}", 'type' => 'activity');
|
$navlinks[] = array('name' => get_string('modulenameplural', $this->activityname), 'link' => $CFG->wwwroot."/mod/{$this->activityname}/index.php?id={$this->courserecord->id}", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($this->activityrecord->name), 'link' => $CFG->wwwroot."/mod/{$this->activityname}/view.php?id={$this->modulerecord->id}", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($this->activityrecord->name), 'link' => $CFG->wwwroot."/mod/{$this->activityname}/view.php?id={$this->modulerecord->id}", 'type' => 'activityinstance');
|
||||||
|
|
||||||
if (!empty($morebreadcrumbs)) {
|
if (!empty($morenavlinks)) {
|
||||||
$breadcrumbs = array_merge($crumbs, $morebreadcrumbs);
|
$navlinks = array_merge($navlinks, $morenavlinks);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($morebreadcrumbs) && $this->user_allowed_editing()) {
|
if (empty($morenavlinks) && $this->user_allowed_editing()) {
|
||||||
$buttons = '<table><tr><td>'.update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', $this->activityname)).'</td>';
|
$buttons = '<table><tr><td>'.update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', $this->activityname)).'</td>';
|
||||||
if (!empty($CFG->showblocksonmodpages)) {
|
if (!empty($CFG->showblocksonmodpages)) {
|
||||||
$buttons .= '<td><form target="'.$CFG->framename.'" method="get" action="view.php">'.
|
$buttons .= '<td><form target="'.$CFG->framename.'" method="get" action="view.php">'.
|
||||||
|
@ -643,7 +643,7 @@ class page_generic_activity extends page_base {
|
||||||
$buttons = ' ';
|
$buttons = ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header($title, $this->courserecord->fullname, $navigation, '', $meta, true, $buttons, navmenu($this->courserecord, $this->modulerecord), false, $bodytags);
|
print_header($title, $this->courserecord->fullname, $navigation, '', $meta, true, $buttons, navmenu($this->courserecord, $this->modulerecord), false, $bodytags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3242,9 +3242,9 @@ function print_navigation ($navigation, $separator=0, $return=false) {
|
||||||
|
|
||||||
if (is_newnav($navigation)) {
|
if (is_newnav($navigation)) {
|
||||||
if ($return) {
|
if ($return) {
|
||||||
return($navigation['breadcrumbs']);
|
return($navigation['navlinks']);
|
||||||
} else {
|
} else {
|
||||||
echo $navigation['breadcrumbs'];
|
echo $navigation['navlinks'];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
$strsubmitted = get_string("submitted", "assignment");
|
$strsubmitted = get_string("submitted", "assignment");
|
||||||
$strgrade = get_string("grade");
|
$strgrade = get_string("grade");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strassignments, 'link' => '', 'type' => 'activity');
|
$navlinks[] = array('name' => $strassignments, 'link' => '', 'type' => 'activity');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($strassignments, "", $navigation, "", "", true, "", navmenu($course));
|
print_header_simple($strassignments, "", $navigation, "", "", true, "", navmenu($course));
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
$table->align = array ("left", "left", "left", "right");
|
$table->align = array ("left", "left", "left", "right");
|
||||||
}
|
}
|
||||||
|
|
||||||
$currentgroup = get_current_group($course->id);
|
$currentgroup = get_and_set_current_group($course, groupmode($course));
|
||||||
if ($currentgroup and has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_COURSE, $id))) {
|
if ($currentgroup and has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_COURSE, $id))) {
|
||||||
$group = groups_get_group($currentgroup, false);
|
$group = groups_get_group($currentgroup, false);
|
||||||
$groupname = " ($group->name)";
|
$groupname = " ($group->name)";
|
||||||
|
|
|
@ -959,10 +959,10 @@ class assignment_base {
|
||||||
|
|
||||||
add_to_log($course->id, 'assignment', 'view submission', 'submissions.php?id='.$this->assignment->id, $this->assignment->id, $this->cm->id);
|
add_to_log($course->id, 'assignment', 'view submission', 'submissions.php?id='.$this->assignment->id, $this->assignment->id, $this->cm->id);
|
||||||
|
|
||||||
$crumbs[] = array('name' => $this->strassignments, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $this->strassignments, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($this->assignment->name,true), 'link' => "view.php?a={$this->assignment->id}", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($this->assignment->name,true), 'link' => "view.php?a={$this->assignment->id}", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $this->strsubmissions, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $this->strsubmissions, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($this->assignment->name,true), "", $navigation, '', '', true, update_module_button($cm->id, $course->id, $this->strassignment), navmenu($course, $cm));
|
print_header_simple(format_string($this->assignment->name,true), "", $navigation, '', '', true, update_module_button($cm->id, $course->id, $this->strassignment), navmenu($course, $cm));
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
|
|
||||||
/// Print the header
|
/// Print the header
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strchats, 'link' => '', 'type' => 'activity');
|
$navlinks[] = array('name' => $strchats, 'link' => '', 'type' => 'activity');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($strchats, '', $navigation, '', '', true, '', navmenu($course));
|
print_header_simple($strchats, '', $navigation, '', '', true, '', navmenu($course));
|
||||||
|
|
||||||
|
|
|
@ -39,23 +39,20 @@
|
||||||
|
|
||||||
if ($start and $end and !$confirmdelete) { // Show a full transcript
|
if ($start and $end and !$confirmdelete) { // Show a full transcript
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strchats, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strchats, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($chat->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($chat->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strchatreport, 'link' => "report.php?id=$cm->id", 'type' => 'title');
|
$navlinks[] = array('name' => $strchatreport, 'link' => "report.php?id=$cm->id", 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($chat->name).": $strchatreport", '', $navigation,
|
print_header_simple(format_string($chat->name).": $strchatreport", '', $navigation,
|
||||||
'', '', true, '', navmenu($course, $cm));
|
'', '', true, '', navmenu($course, $cm));
|
||||||
|
|
||||||
/// Check to see if groups are being used here
|
/// Check to see if groups are being used here
|
||||||
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
|
$groupmode = groupmode($course, $cm);
|
||||||
$currentgroup = setup_and_print_groups($course, $groupmode, "report.php?id=$cm->id");
|
$currentgroup = setup_and_print_groups($course, $groupmode, "report.php?id=$cm->id");
|
||||||
} else {
|
|
||||||
$currentgroup = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($currentgroup)) {
|
if ($currentgroup) {
|
||||||
$groupselect = " AND groupid = '$currentgroup'";
|
$groupselect = " AND groupid = '$currentgroup'";
|
||||||
} else {
|
} else {
|
||||||
$groupselect = "";
|
$groupselect = "";
|
||||||
|
@ -95,11 +92,11 @@
|
||||||
|
|
||||||
|
|
||||||
/// Print the Sessions display
|
/// Print the Sessions display
|
||||||
$crumbs[] = array('name' => $strchats, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strchats, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($chat->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($chat->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strchatreport, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strchatreport, 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($chat->name).": $strchatreport", '', $navigation,
|
print_header_simple(format_string($chat->name).": $strchatreport", '', $navigation,
|
||||||
'', '', true, '', navmenu($course, $cm));
|
'', '', true, '', navmenu($course, $cm));
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
|
|
||||||
$strchoice = get_string("modulename", "choice");
|
$strchoice = get_string("modulename", "choice");
|
||||||
$strchoices = get_string("modulenameplural", "choice");
|
$strchoices = get_string("modulenameplural", "choice");
|
||||||
$crumbs[] = array('name' => $strchoices, 'link' => '', 'type' => 'activity');
|
$navlinks[] = array('name' => $strchoices, 'link' => '', 'type' => 'activity');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple("$strchoices", "", $navigation, "", "", true, "", navmenu($course));
|
print_header_simple("$strchoices", "", $navigation, "", "", true, "", navmenu($course));
|
||||||
|
|
||||||
|
|
|
@ -38,16 +38,22 @@
|
||||||
redirect("report.php?id=$cm->id");
|
redirect("report.php?id=$cm->id");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($download <> "xls" and $download <> "txt" and $download <> "ods") {
|
if (!$download) {
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strchoices, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strchoices, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($choice->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($choice->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strresponses, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strresponses, 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($choice->name).": $strresponses", "", $navigation, "", '', true,
|
print_header_simple(format_string($choice->name).": $strresponses", "", $navigation, "", '', true,
|
||||||
update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
|
update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
|
||||||
|
/// Check to see if groups are being used in this choice
|
||||||
|
$groupmode = groupmode($course, $cm);
|
||||||
|
setup_and_print_groups($course, $groupmode, 'report.php?id='.$id);
|
||||||
|
} else {
|
||||||
|
$groupmode = groupmode($course, $cm);
|
||||||
|
get_and_set_current_group($course, $groupmode);
|
||||||
}
|
}
|
||||||
|
|
||||||
$users = get_users_by_capability($context, 'mod/choice:choose', 'u.id, u.picture, u.firstname, u.lastname, u.idnumber', 'u.firstname ASC');
|
$users = get_users_by_capability($context, 'mod/choice:choose', 'u.id, u.picture, u.firstname, u.lastname, u.idnumber', 'u.firstname ASC');
|
||||||
|
|
|
@ -58,22 +58,26 @@ if ($action == 'delchoice') {
|
||||||
|
|
||||||
|
|
||||||
/// Display the choice and possibly results
|
/// Display the choice and possibly results
|
||||||
$crumbs[] = array('name' => $strchoices, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strchoices, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($choice->name), 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($choice->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($choice->name), "", $navigation, "", "", true,
|
print_header_simple(format_string($choice->name), "", $navigation, "", "", true,
|
||||||
update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
|
update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
|
||||||
|
|
||||||
add_to_log($course->id, "choice", "view", "view.php?id=$cm->id", $choice->id, $cm->id);
|
add_to_log($course->id, "choice", "view", "view.php?id=$cm->id", $choice->id, $cm->id);
|
||||||
|
|
||||||
|
/// Check to see if groups are being used in this choice
|
||||||
|
$groupmode = groupmode($course, $cm);
|
||||||
|
setup_and_print_groups($course, $groupmode, 'view.php?id='.$id);
|
||||||
|
|
||||||
if (has_capability('mod/choice:readresponses', $context)) {
|
if (has_capability('mod/choice:readresponses', $context)) {
|
||||||
choice_show_reportlink($choice, $course->id, $cm->id);
|
choice_show_reportlink($choice, $course->id, $cm->id, $groupmode);
|
||||||
} else if (!$cm->visible) {
|
|
||||||
notice(get_string("activityiscurrentlyhidden"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo '<div class="clearer"></div>';
|
||||||
|
|
||||||
if ($choice->text) {
|
if ($choice->text) {
|
||||||
print_box(format_text($choice->text, $choice->format), 'generalbox', 'intro');
|
print_box(format_text($choice->text, $choice->format), 'generalbox', 'intro');
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,9 +69,9 @@
|
||||||
$strdatabases = get_string("modulenameplural", "data");
|
$strdatabases = get_string("modulenameplural", "data");
|
||||||
$navigation = "<a href=\"index.php?id=$course->id\">$strdatabases</a> ->";
|
$navigation = "<a href=\"index.php?id=$course->id\">$strdatabases</a> ->";
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strdatabases, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strdatabases, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($data->name), "", $navigation, "", "", true, '', navmenu($course, $cm));
|
print_header_simple(format_string($data->name), "", $navigation, "", "", true, '', navmenu($course, $cm));
|
||||||
notice(get_string("activityiscurrentlyhidden"));
|
notice(get_string("activityiscurrentlyhidden"));
|
||||||
|
@ -113,23 +113,19 @@
|
||||||
/// Print the page header
|
/// Print the page header
|
||||||
$strdata = get_string('modulenameplural','data');
|
$strdata = get_string('modulenameplural','data');
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($data->name, '', $navigation,
|
print_header_simple($data->name, '', $navigation,
|
||||||
'', $meta, true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')),
|
'', $meta, true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')),
|
||||||
navmenu($course, $cm), '', '');
|
navmenu($course, $cm), '', '');
|
||||||
|
|
||||||
print_heading(format_string($data->name));
|
|
||||||
|
|
||||||
/// Check to see if groups are being used here
|
/// Check to see if groups are being used here
|
||||||
|
$groupmode = groupmode($course, $cm);
|
||||||
|
$currentgroup = setup_and_print_groups($course, $groupmode, 'edit.php?d='.$data->id);
|
||||||
|
|
||||||
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
|
print_heading(format_string($data->name));
|
||||||
$currentgroup = setup_and_print_groups($course, $groupmode, 'edit.php?d='.$data->id.'&sesskey='.sesskey().'&');
|
|
||||||
} else {
|
|
||||||
$currentgroup = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($currentgroup) {
|
if ($currentgroup) {
|
||||||
$groupselect = " AND groupid = '$currentgroup'";
|
$groupselect = " AND groupid = '$currentgroup'";
|
||||||
|
|
|
@ -57,9 +57,9 @@ require_course_login($course, true, $cm);
|
||||||
|
|
||||||
/// If it's hidden then it's don't show anything. :)
|
/// If it's hidden then it's don't show anything. :)
|
||||||
if (empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities',get_context_instance(CONTEXT_MODULE, $cm->id))) {
|
if (empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities',get_context_instance(CONTEXT_MODULE, $cm->id))) {
|
||||||
$crumbs[] = array('name' => $strdatabases, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strdatabases, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($data->name), "", $navigation,
|
print_header_simple(format_string($data->name), "", $navigation,
|
||||||
"", "", true, '', navmenu($course, $cm));
|
"", "", true, '', navmenu($course, $cm));
|
||||||
|
|
|
@ -76,19 +76,16 @@
|
||||||
/// Print the page header
|
/// Print the page header
|
||||||
$strdata = get_string('modulenameplural','data');
|
$strdata = get_string('modulenameplural','data');
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($data->name, "", $navigation, "", "", true, "", navmenu($course));
|
print_header_simple($data->name, "", $navigation, "", "", true, "", navmenu($course));
|
||||||
print_heading(format_string($data->name));
|
print_heading(format_string($data->name));
|
||||||
|
|
||||||
/// Groups needed for Add entry tab
|
/// Groups needed for Add entry tab
|
||||||
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
|
$groupmode = groupmode($course, $cm);
|
||||||
$currentgroup = get_and_set_current_group($course, $groupmode);
|
$currentgroup = get_and_set_current_group($course, $groupmode);
|
||||||
} else {
|
|
||||||
$currentgroup = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Print the tabs
|
/// Print the tabs
|
||||||
$currenttab = 'add';
|
$currenttab = 'add';
|
||||||
|
|
|
@ -42,8 +42,8 @@
|
||||||
$strname = get_string('name');
|
$strname = get_string('name');
|
||||||
$strdata = get_string('modulename','data');
|
$strdata = get_string('modulename','data');
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($strdata, '', $navigation, '', '', true, "", navmenu($course));
|
print_header_simple($strdata, '', $navigation, '', '', true, "", navmenu($course));
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
array_push($table->align, 'center');
|
array_push($table->align, 'center');
|
||||||
}
|
}
|
||||||
|
|
||||||
$currentgroup = get_current_group($course->id);
|
$currentgroup = get_and_set_current_group($course, groupmode($course));
|
||||||
if ($currentgroup and has_capability('mod/data:manageentries', $context)) {
|
if ($currentgroup and has_capability('mod/data:manageentries', $context)) {
|
||||||
$group = groups_get_group($currentgroup, false);
|
$group = groups_get_group($currentgroup, false);
|
||||||
$groupname = " ($group->name)";
|
$groupname = " ($group->name)";
|
||||||
|
|
|
@ -1687,10 +1687,10 @@ function data_print_header($course, $cm, $data, $currenttab='') {
|
||||||
global $CFG, $displaynoticegood, $displaynoticebad;
|
global $CFG, $displaynoticegood, $displaynoticebad;
|
||||||
|
|
||||||
$strdata = get_string('modulenameplural','data');
|
$strdata = get_string('modulenameplural','data');
|
||||||
$crumbs[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => $data->name, 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => $data->name, 'link' => '', 'type' => 'activityinstance');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($data->name, '', $navigation,
|
print_header_simple($data->name, '', $navigation,
|
||||||
'', '', true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')),
|
'', '', true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')),
|
||||||
|
|
|
@ -28,8 +28,8 @@ class page_data extends page_generic_activity {
|
||||||
parent::init_quick($data);
|
parent::init_quick($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_header($title, $morebreadcrumbs = NULL, $meta) {
|
function print_header($title, $morenavlinks = NULL, $meta) {
|
||||||
parent::print_header($title, $morebreadcrumbs, '', $meta);
|
parent::print_header($title, $morenavlinks, '', $meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_type() {
|
function get_type() {
|
||||||
|
|
|
@ -96,9 +96,9 @@
|
||||||
$meta .= '//]]>'."\n";
|
$meta .= '//]]>'."\n";
|
||||||
$meta .= '</script>'."\n";
|
$meta .= '</script>'."\n";
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strdata, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($data->name, '', $navigation,
|
print_header_simple($data->name, '', $navigation,
|
||||||
'', $meta, true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')),
|
'', $meta, true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')),
|
||||||
|
@ -108,11 +108,8 @@
|
||||||
|
|
||||||
|
|
||||||
/// Groups needed for Add entry tab
|
/// Groups needed for Add entry tab
|
||||||
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
|
$groupmode = groupmode($course, $cm);
|
||||||
$currentgroup = get_and_set_current_group($course, $groupmode);
|
$currentgroup = get_and_set_current_group($course, $groupmode);
|
||||||
} else {
|
|
||||||
$currentgroup = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Print the tabs.
|
/// Print the tabs.
|
||||||
$currenttab = 'templates';
|
$currenttab = 'templates';
|
||||||
|
|
|
@ -94,9 +94,9 @@
|
||||||
if (empty($cm->visible) and !has_capability('mod/data:managetemplates', $context)) {
|
if (empty($cm->visible) and !has_capability('mod/data:managetemplates', $context)) {
|
||||||
$strdatabases = get_string("modulenameplural", "data");
|
$strdatabases = get_string("modulenameplural", "data");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strdatabases, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strdatabases, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($data->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($data->name), "",
|
print_header_simple(format_string($data->name), "",
|
||||||
$navigation, "", "", true, '', navmenu($course, $cm));
|
$navigation, "", "", true, '', navmenu($course, $cm));
|
||||||
|
@ -258,6 +258,12 @@
|
||||||
if (!empty($THEME->customcorners)) print_custom_corners_start();
|
if (!empty($THEME->customcorners)) print_custom_corners_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Check to see if groups are being used here
|
||||||
|
$groupmode = groupmode($course, $cm);
|
||||||
|
$currentgroup = setup_and_print_groups($course, $groupmode,
|
||||||
|
'view.php?d='.$data->id.'&search='.s($search).'&sort='.s($sort).
|
||||||
|
'&order='.s($order).'&');
|
||||||
|
|
||||||
print_heading(format_string($data->name));
|
print_heading(format_string($data->name));
|
||||||
|
|
||||||
// Do we need to show a link to the RSS feed for the records?
|
// Do we need to show a link to the RSS feed for the records?
|
||||||
|
@ -272,15 +278,6 @@
|
||||||
print_box(format_text($data->intro), 'generalbox', 'intro');
|
print_box(format_text($data->intro), 'generalbox', 'intro');
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check to see if groups are being used here
|
|
||||||
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
|
|
||||||
$currentgroup = setup_and_print_groups($course, $groupmode,
|
|
||||||
'view.php?d='.$data->id.'&search='.s($search).'&sort='.s($sort).
|
|
||||||
'&order='.s($order).'&');
|
|
||||||
} else {
|
|
||||||
$currentgroup = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Delete any requested records
|
/// Delete any requested records
|
||||||
|
|
||||||
if ($delete && confirm_sesskey() && (has_capability('mod/data:manageentries', $context) or data_isowner($delete))) {
|
if ($delete && confirm_sesskey() && (has_capability('mod/data:manageentries', $context) or data_isowner($delete))) {
|
||||||
|
|
|
@ -62,11 +62,11 @@
|
||||||
$strassessments = get_string("assessments", "exercise");
|
$strassessments = get_string("assessments", "exercise");
|
||||||
|
|
||||||
// ... print the header and...
|
// ... print the header and...
|
||||||
$crumbs[] = array('name' => $strexercises, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strexercises, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($exercise->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($exercise->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strassessments, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strassessments, 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($exercise->name), "", $navigation,
|
print_header_simple(format_string($exercise->name), "", $navigation,
|
||||||
"", "", true);
|
"", "", true);
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
$strdeadline = get_string("deadline", "exercise");
|
$strdeadline = get_string("deadline", "exercise");
|
||||||
$strsubmitted = get_string("submitted", "assignment");
|
$strsubmitted = get_string("submitted", "assignment");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strexercises, 'link' => '', 'type' => 'activity');
|
$navlinks[] = array('name' => $strexercises, 'link' => '', 'type' => 'activity');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple("$strexercises", "", $navigation, "", "", true, "", navmenu($course));
|
print_header_simple("$strexercises", "", $navigation, "", "", true, "", navmenu($course));
|
||||||
|
|
||||||
|
|
|
@ -50,11 +50,11 @@
|
||||||
$strsubmissions = get_string("submissions", "exercise");
|
$strsubmissions = get_string("submissions", "exercise");
|
||||||
|
|
||||||
// ... print the header and...
|
// ... print the header and...
|
||||||
$crumbs[] = array('name' => $strexercises, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strexercises, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($exercise->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($exercise->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strsubmissions, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strsubmissions, 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
print_header_simple(format_string($exercise->name), "", $navigation,
|
print_header_simple(format_string($exercise->name), "", $navigation,
|
||||||
"", "", true);
|
"", "", true);
|
||||||
|
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
$strexercise = get_string("modulename", "exercise");
|
$strexercise = get_string("modulename", "exercise");
|
||||||
$strupload = get_string("upload");
|
$strupload = get_string("upload");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strexercises, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strexercises, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($exercise->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($exercise->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strupload, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strupload, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($exercise->name)." : $strupload", "", $navigation,
|
print_header_simple(format_string($exercise->name)." : $strupload", "", $navigation,
|
||||||
"", "", true);
|
"", "", true);
|
||||||
|
|
|
@ -47,9 +47,9 @@
|
||||||
$strexercise = get_string("modulename", "exercise");
|
$strexercise = get_string("modulename", "exercise");
|
||||||
|
|
||||||
// ...display header...
|
// ...display header...
|
||||||
$crumbs[] = array('name' => $strexercises, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strexercises, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($exercise->name), 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($exercise->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($exercise->name), "", $navigation,
|
print_header_simple(format_string($exercise->name), "", $navigation,
|
||||||
"", "", true, update_module_button($cm->id, $course->id, $strexercise), navmenu($course, $cm));
|
"", "", true, update_module_button($cm->id, $course->id, $strexercise), navmenu($course, $cm));
|
||||||
|
@ -340,14 +340,7 @@
|
||||||
/// Check to see if groups are being used in this exercise
|
/// Check to see if groups are being used in this exercise
|
||||||
/// and if so, set $currentgroup to reflect the current group
|
/// and if so, set $currentgroup to reflect the current group
|
||||||
$groupmode = groupmode($course, $cm); // Groups are being used?
|
$groupmode = groupmode($course, $cm); // Groups are being used?
|
||||||
$currentgroup = get_and_set_current_group($course, $groupmode, $changegroup);
|
$currentgroup = setup_and_print_groups($course, $groupmode, "view.php?id=$cm->id");
|
||||||
|
|
||||||
/// Allow the teacher to change groups (for this session)
|
|
||||||
if ($groupmode) {
|
|
||||||
if ($groups = groups_get_groups_names($course->id)) { //TODO:
|
|
||||||
print_group_menu($groups, $groupmode, $currentgroup, "view.php?id=$cm->id");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print_heading_with_help(get_string("managingassignment", "exercise"), "managing", "exercise");
|
print_heading_with_help(get_string("managingassignment", "exercise"), "managing", "exercise");
|
||||||
|
|
||||||
|
|
|
@ -97,9 +97,9 @@
|
||||||
|
|
||||||
unset($SESSION->fromdiscussion);
|
unset($SESSION->fromdiscussion);
|
||||||
|
|
||||||
$crumbs[] = array('name' => get_string("forums", "forum"), 'link' => "../forum/index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => get_string("forums", "forum"), 'link' => "../forum/index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($forum->name,true), 'link' => "../forum/view.php?f=$forum->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($forum->name,true), 'link' => "../forum/view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => format_string($discussion->name,true), 'link' => "discuss.php?d=$discussion->id", 'type' => 'title');
|
$navlinks[] = array('name' => format_string($discussion->name,true), 'link' => "discuss.php?d=$discussion->id", 'type' => 'title');
|
||||||
|
|
||||||
|
|
||||||
if ($mode) {
|
if ($mode) {
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
|
|
||||||
$searchform = forum_search_form($course);
|
$searchform = forum_search_form($course);
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
print_header("$course->shortname: ".format_string($discussion->name), $course->fullname,
|
print_header("$course->shortname: ".format_string($discussion->name), $course->fullname,
|
||||||
$navigation, "", "", true, $searchform, navmenu($course, $cm));
|
$navigation, "", "", true, $searchform, navmenu($course, $cm));
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
require_course_login($course);
|
require_course_login($course);
|
||||||
$currentgroup = get_current_group($course->id);
|
$currentgroup = get_and_set_current_group($course, groupmode($course));
|
||||||
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
|
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||||
|
|
||||||
|
|
||||||
|
@ -451,10 +451,10 @@
|
||||||
|
|
||||||
|
|
||||||
/// Output the page
|
/// Output the page
|
||||||
$crumbs[] = array('name' => $strforums, 'link' => '', 'type' => 'activity');
|
$navlinks[] = array('name' => $strforums, 'link' => '', 'type' => 'activity');
|
||||||
|
|
||||||
print_header("$course->shortname: $strforums", $course->fullname,
|
print_header("$course->shortname: $strforums", $course->fullname,
|
||||||
build_navigation($crumbs),
|
build_navigation($navlinks),
|
||||||
"", "", true, $searchform, navmenu($course));
|
"", "", true, $searchform, navmenu($course));
|
||||||
|
|
||||||
if (!isguest()) {
|
if (!isguest()) {
|
||||||
|
|
|
@ -33,10 +33,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$strforums = get_string('modulenameplural', 'forum');
|
$strforums = get_string('modulenameplural', 'forum');
|
||||||
$crumbs[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header($course->shortname, $course->fullname, $navigation, '', '', true, "", navmenu($course, $cm));
|
print_header($course->shortname, $course->fullname, $navigation, '', '', true, "", navmenu($course, $cm));
|
||||||
notice_yesno(get_string('noguesttracking', 'forum').'<br /><br />'.get_string('liketologin'),
|
notice_yesno(get_string('noguesttracking', 'forum').'<br /><br />'.get_string('liketologin'),
|
||||||
|
|
|
@ -58,10 +58,10 @@
|
||||||
require_login();
|
require_login();
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs[] = array('name' => get_string("forums", "forum"), 'link' => "../forum/view.php?f=$forum->id", 'type' => 'activity');
|
$navlinks[] = array('name' => get_string("forums", "forum"), 'link' => "../forum/view.php?f=$forum->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($forum->name,true), 'link' => '../forum/index.php?id=$course->id', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($forum->name,true), 'link' => '../forum/index.php?id=$course->id', 'type' => 'activityinstance');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
|
|
||||||
print_header($course->shortname, $course->fullname, $navigation, '' , '', true, "", navmenu($course, $cm));
|
print_header($course->shortname, $course->fullname, $navigation, '' , '', true, "", navmenu($course, $cm));
|
||||||
|
@ -98,7 +98,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($_SERVER["HTTP_REFERER"])) {
|
||||||
$SESSION->fromurl = $_SERVER["HTTP_REFERER"];
|
$SESSION->fromurl = $_SERVER["HTTP_REFERER"];
|
||||||
|
} else {
|
||||||
|
$SESSION->fromurl = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Load up the $post variable.
|
// Load up the $post variable.
|
||||||
|
@ -112,11 +116,14 @@
|
||||||
$post->userid = $USER->id;
|
$post->userid = $USER->id;
|
||||||
$post->message = '';
|
$post->message = '';
|
||||||
|
|
||||||
$post->groupid = get_current_group($course->id);
|
if ($groupmode = groupmode($course, $cm)) {
|
||||||
|
$post->groupid = get_and_set_current_group($course, $groupmode);
|
||||||
if ($post->groupid == 0) {
|
if ($post->groupid == 0) {
|
||||||
$post->groupid = -1;
|
$post->groupid = -1; //TODO: why -1??
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$post->groupid = -1; //TODO: why -1??
|
||||||
}
|
}
|
||||||
|
|
||||||
forum_set_return();
|
forum_set_return();
|
||||||
|
|
||||||
} else if (!empty($reply)) { // User is writing a new reply
|
} else if (!empty($reply)) { // User is writing a new reply
|
||||||
|
@ -403,12 +410,12 @@
|
||||||
$course = get_record('course', 'id', $forum->course);
|
$course = get_record('course', 'id', $forum->course);
|
||||||
$strforums = get_string("modulenameplural", "forum");
|
$strforums = get_string("modulenameplural", "forum");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strforums, 'link' => "../forum/index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strforums, 'link' => "../forum/index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => $forum->name, 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => $forum->name, 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => format_string($post->subject, true), 'link' => "discuss.php?d=$discussion->id", 'type' => 'title');
|
$navlinks[] = array('name' => format_string($post->subject, true), 'link' => "discuss.php?d=$discussion->id", 'type' => 'title');
|
||||||
$crumbs[] = array('name' => get_string("prune", "forum"), 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => get_string("prune", "forum"), 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($discussion->name).": ".format_string($post->subject), "", $navigation, '', "", true, "", navmenu($course, $cm));
|
print_header_simple(format_string($discussion->name).": ".format_string($post->subject), "", $navigation, '', "", true, "", navmenu($course, $cm));
|
||||||
|
|
||||||
|
@ -628,15 +635,15 @@
|
||||||
$strforums = get_string("modulenameplural", "forum");
|
$strforums = get_string("modulenameplural", "forum");
|
||||||
|
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strforums, 'link' => "../forum/index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strforums, 'link' => "../forum/index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => $forum->name, 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => $forum->name, 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||||
|
|
||||||
|
|
||||||
if ($post->parent) {
|
if ($post->parent) {
|
||||||
$crumbs[] = array('name' => format_string($toppost->subject, true), 'link' => "discuss.php?d=$discussion->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($toppost->subject, true), 'link' => "discuss.php?d=$discussion->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => get_string('editing', 'forum'), 'link' => '', 'type' => 'action');
|
$navlinks[] = array('name' => get_string('editing', 'forum'), 'link' => '', 'type' => 'action');
|
||||||
} else {
|
} else {
|
||||||
$crumbs[] = array('name' => format_string($toppost->subject), 'link' => '', 'type' => 'action');
|
$navlinks[] = array('name' => format_string($toppost->subject), 'link' => '', 'type' => 'action');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($post->edit)) {
|
if (empty($post->edit)) {
|
||||||
|
@ -664,7 +671,7 @@
|
||||||
$forcefocus = empty($reply) ? NULL : 'message';
|
$forcefocus = empty($reply) ? NULL : 'message';
|
||||||
|
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header("$course->shortname: $strdiscussionname ".
|
print_header("$course->shortname: $strdiscussionname ".
|
||||||
format_string($toppost->subject), $course->fullname,
|
format_string($toppost->subject), $course->fullname,
|
||||||
|
|
|
@ -97,12 +97,12 @@
|
||||||
$strsearchresults = get_string("searchresults", "forum");
|
$strsearchresults = get_string("searchresults", "forum");
|
||||||
$strpage = get_string("page");
|
$strpage = get_string("page");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
|
|
||||||
if (!$search || $showform) {
|
if (!$search || $showform) {
|
||||||
|
|
||||||
$crumns[] = array('name' => $strsearch, 'link' => '', 'type' => 'title');
|
$crumns[] = array('name' => $strsearch, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple("$strsearch", "", $navigation, 'search.words',
|
print_header_simple("$strsearch", "", $navigation, 'search.words',
|
||||||
"", "", " ", navmenu($course));
|
"", "", " ", navmenu($course));
|
||||||
|
@ -119,9 +119,9 @@
|
||||||
|
|
||||||
$searchform = forum_search_form($course, $search);
|
$searchform = forum_search_form($course, $search);
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strsearch, 'link' => "search.php?id=$course->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => $strsearch, 'link' => "search.php?id=$course->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => s($search, true), 'link' => '', 'type' => 'link');
|
$navlinks[] = array('name' => s($search, true), 'link' => '', 'type' => 'link');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
|
|
||||||
if (!$posts = forum_search_posts($searchterms, $course->id, $page*$perpage, $perpage, $totalcount)) {
|
if (!$posts = forum_search_posts($searchterms, $course->id, $page*$perpage, $perpage, $totalcount)) {
|
||||||
|
@ -407,7 +407,7 @@ function forum_clean_search_terms($words, $prefix='') {
|
||||||
function forum_menu_list($course) {
|
function forum_menu_list($course) {
|
||||||
|
|
||||||
$menu = array();
|
$menu = array();
|
||||||
$currentgroup = get_current_group($course->id);
|
$currentgroup = get_and_set_current_group($course, groupmode($course));
|
||||||
|
|
||||||
if ($forums = get_all_instances_in_course("forum", $course)) {
|
if ($forums = get_all_instances_in_course("forum", $course)) {
|
||||||
if ($course->format == 'weeks') {
|
if ($course->format == 'weeks') {
|
||||||
|
|
|
@ -31,10 +31,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$strforums = get_string('modulenameplural', 'forum');
|
$strforums = get_string('modulenameplural', 'forum');
|
||||||
$crumbs[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header($course->shortname, $course->fullname, $navigation, '', '', true, "", navmenu($course, $cm));
|
print_header($course->shortname, $course->fullname, $navigation, '', '', true, "", navmenu($course, $cm));
|
||||||
notice_yesno(get_string('noguesttracking', 'forum').'<br /><br />'.get_string('liketologin'),
|
notice_yesno(get_string('noguesttracking', 'forum').'<br /><br />'.get_string('liketologin'),
|
||||||
|
|
|
@ -52,10 +52,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$strforums = get_string('modulenameplural', 'forum');
|
$strforums = get_string('modulenameplural', 'forum');
|
||||||
$crumbs[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header($course->shortname, $course->fullname, $navigation, '', '', true, "", navmenu($course, $cm));
|
print_header($course->shortname, $course->fullname, $navigation, '', '', true, "", navmenu($course, $cm));
|
||||||
|
|
||||||
|
|
|
@ -36,11 +36,11 @@
|
||||||
$strsubscribers = get_string("subscribers", "forum");
|
$strsubscribers = get_string("subscribers", "forum");
|
||||||
$strforums = get_string("forums", "forum");
|
$strforums = get_string("forums", "forum");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strsubscribers, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strsubscribers, 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
if (has_capability('mod/forum:managesubscriptions', $context)) {
|
if (has_capability('mod/forum:managesubscriptions', $context)) {
|
||||||
print_header_simple("$strsubscribers", "", $navigation,
|
print_header_simple("$strsubscribers", "", $navigation,
|
||||||
|
@ -54,11 +54,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check to see if groups are being used in this forum
|
/// Check to see if groups are being used in this forum
|
||||||
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
|
$groupmode = groupmode($course, $cm);
|
||||||
$currentgroup = setup_and_print_groups($course, $groupmode, "subscribers.php?id=$forum->id");
|
$currentgroup = setup_and_print_groups($course, $groupmode, "subscribers.php?id=$forum->id");
|
||||||
} else {
|
|
||||||
$currentgroup = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($USER->subscriptionsediting)) { /// Display an overview of subscribers
|
if (empty($USER->subscriptionsediting)) { /// Display an overview of subscribers
|
||||||
|
|
||||||
|
|
|
@ -40,12 +40,12 @@
|
||||||
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $syscontext));
|
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $syscontext));
|
||||||
|
|
||||||
// TODO: add new cookie tail here!
|
// TODO: add new cookie tail here!
|
||||||
$crumbs[] = array('name' => $strparticipants, 'link' => "$CFG->wwwroot/user/index.php?id=$course->id", 'type' => 'core');
|
$navlinks[] = array('name' => $strparticipants, 'link' => "$CFG->wwwroot/user/index.php?id=$course->id", 'type' => 'core');
|
||||||
$crumbs[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id", 'type' => 'title');
|
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id", 'type' => 'title');
|
||||||
$crumbs[] = array('name' => $strforumposts, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strforumposts, 'link' => '', 'type' => 'title');
|
||||||
$crumbs[] = array('name' => $strmode, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strmode, 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header("$course->shortname: $fullname: $strmode", $course->fullname,$navigation);
|
print_header("$course->shortname: $fullname: $strmode", $course->fullname,$navigation);
|
||||||
|
|
||||||
|
|
|
@ -64,10 +64,10 @@
|
||||||
|
|
||||||
|
|
||||||
/// Print header.
|
/// Print header.
|
||||||
$crumbs[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strforums, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($forum->name), 'link' => "view.php?f=$forum->id", 'type' => 'activityinstance');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($forum->name), "",
|
print_header_simple(format_string($forum->name), "",
|
||||||
$navigation, "", "", true, $buttontext, navmenu($course, $cm));
|
$navigation, "", "", true, $buttontext, navmenu($course, $cm));
|
||||||
|
@ -82,15 +82,9 @@
|
||||||
notice(get_string('noviewdiscussionspermission', 'forum'));
|
notice(get_string('noviewdiscussionspermission', 'forum'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// find out current groups mode
|
||||||
$groupmode = groupmode($course, $cm);
|
$groupmode = groupmode($course, $cm);
|
||||||
$currentgroup = get_and_set_current_group($course, $groupmode, $changegroup);
|
$currentgroup = setup_and_print_groups($course, $groupmode, 'view.php?id=' . $cm->id);
|
||||||
|
|
||||||
if ($groupmode == SEPARATEGROUPS && ($currentgroup === false) &&
|
|
||||||
!has_capability('moodle/site:accessallgroups', $context)) {
|
|
||||||
notice(get_string('notingroup', 'forum'));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// Okay, we can show the discussions. Log the forum view.
|
/// Okay, we can show the discussions. Log the forum view.
|
||||||
if ($cm->id) {
|
if ($cm->id) {
|
||||||
|
@ -123,40 +117,6 @@
|
||||||
|
|
||||||
print_box_start('forumcontrol');
|
print_box_start('forumcontrol');
|
||||||
|
|
||||||
/// 2 ways to do this, 1. we can changed the setup_and_print_groups functions
|
|
||||||
/// in moodlelib, taking in 1 more parameter, and tell the function when to
|
|
||||||
/// allow student menus, 2, we can just use this code to explicitly print this
|
|
||||||
/// menu for students in forums.
|
|
||||||
|
|
||||||
/// Now we need a menu for separategroups as well!
|
|
||||||
if ($groupmode == VISIBLEGROUPS || ($groupmode
|
|
||||||
&& has_capability('moodle/site:accessallgroups', $context))) {
|
|
||||||
|
|
||||||
//the following query really needs to change
|
|
||||||
if ($groups = groups_get_groups_names($course->id)) { //TODO:
|
|
||||||
print_box_start('groupmenu');
|
|
||||||
print_group_menu($groups, $groupmode, $currentgroup, "$CFG->wwwroot/mod/forum/view.php?id=$cm->id");
|
|
||||||
print_box_end(); // groupmenu
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Only print menus the student is in any course
|
|
||||||
else if ($groupmode == SEPARATEGROUPS){
|
|
||||||
$validgroups = array();
|
|
||||||
// Get all the groups this guy is in in this course
|
|
||||||
|
|
||||||
if ($p = user_group($course->id,$USER->id)){
|
|
||||||
/// Extract the name and id for the group
|
|
||||||
foreach ($p as $index => $object){
|
|
||||||
$validgroups[$object->id] = $object->name;
|
|
||||||
}
|
|
||||||
/// Print them in the menu
|
|
||||||
print_box_start('groupmenu');
|
|
||||||
print_group_menu($validgroups, $groupmode, $currentgroup, "view.php?id=$cm->id",0);
|
|
||||||
print_box_end(); // groupmenu
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print_box_start('subscription');
|
print_box_start('subscription');
|
||||||
|
|
||||||
if (!empty($USER->id) && !has_capability('moodle/legacy:guest', $context, NULL, false)) {
|
if (!empty($USER->id) && !has_capability('moodle/legacy:guest', $context, NULL, false)) {
|
||||||
|
|
|
@ -223,12 +223,12 @@ function glossary_comment_print_header($course, $cm, $glossary, $entry, $action)
|
||||||
$strglossary = get_string('modulename', 'glossary');
|
$strglossary = get_string('modulename', 'glossary');
|
||||||
$strcomments = get_string('comments', 'glossary');
|
$strcomments = get_string('comments', 'glossary');
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($glossary->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($glossary->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strcomments, 'link' => "comments.php?id=$cm->id&eid=$entry->id", 'type' => 'title');
|
$navlinks[] = array('name' => $strcomments, 'link' => "comments.php?id=$cm->id&eid=$entry->id", 'type' => 'title');
|
||||||
$crumbs[] = array('name' => $straction, 'link' => '', 'type' => 'action');
|
$navlinks[] = array('name' => $straction, 'link' => '', 'type' => 'action');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($glossary->name), '', $navigation,
|
print_header_simple(format_string($glossary->name), '', $navigation,
|
||||||
'', '', true, update_module_button($cm->id, $course->id, $strglossary),
|
'', '', true, update_module_button($cm->id, $course->id, $strglossary),
|
||||||
|
|
|
@ -42,10 +42,10 @@
|
||||||
$strcomments = get_string("comments", "glossary");
|
$strcomments = get_string("comments", "glossary");
|
||||||
$straddcomment = get_string("addcomment", "glossary");
|
$straddcomment = get_string("addcomment", "glossary");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($glossary->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($glossary->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strcomments, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strcomments, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(strip_tags("$strcomments: $entry->concept"), "", $navigation,
|
print_header_simple(strip_tags("$strcomments: $entry->concept"), "", $navigation,
|
||||||
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
|
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
|
||||||
|
|
|
@ -39,10 +39,10 @@
|
||||||
|
|
||||||
$strareyousuredelete = get_string("areyousuredelete","glossary");
|
$strareyousuredelete = get_string("areyousuredelete","glossary");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($glossary->name), "", $navigation,
|
print_header_simple(format_string($glossary->name), "", $navigation,
|
||||||
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
|
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
|
||||||
|
|
|
@ -192,11 +192,11 @@ $strglossary = get_string("modulename", "glossary");
|
||||||
$strglossaries = get_string("modulenameplural", "glossary");
|
$strglossaries = get_string("modulenameplural", "glossary");
|
||||||
$stredit = empty($e) ? get_string('addentry', 'glossary') : get_string("edit");
|
$stredit = empty($e) ? get_string('addentry', 'glossary') : get_string("edit");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $stredit, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $stredit, 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($glossary->name), "", $navigation, "",
|
print_header_simple(format_string($glossary->name), "", $navigation, "",
|
||||||
"", true, "", navmenu($course, $cm));
|
"", true, "", navmenu($course, $cm));
|
||||||
|
|
|
@ -47,11 +47,11 @@
|
||||||
$strglossaries = get_string("modulenameplural", "glossary");
|
$strglossaries = get_string("modulenameplural", "glossary");
|
||||||
$strglossary = get_string("modulename", "glossary");
|
$strglossary = get_string("modulename", "glossary");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id&tab=GLOSSARY_CATEGORY_VIEW", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id&tab=GLOSSARY_CATEGORY_VIEW", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => get_string("categories","glossary"), 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => get_string("categories","glossary"), 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($glossary->name), "", $navigation,
|
print_header_simple(format_string($glossary->name), "", $navigation,
|
||||||
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
|
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
|
||||||
|
|
|
@ -37,10 +37,10 @@
|
||||||
$strexportfile = get_string("exportfile", "glossary");
|
$strexportfile = get_string("exportfile", "glossary");
|
||||||
$strexportentries = get_string('exportentries', 'glossary');
|
$strexportentries = get_string('exportentries', 'glossary');
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($glossary->name), "",$navigation,
|
print_header_simple(format_string($glossary->name), "",$navigation,
|
||||||
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
|
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
|
||||||
|
|
|
@ -38,10 +38,10 @@
|
||||||
$entryalreadyexist = get_string('entryalreadyexist','glossary');
|
$entryalreadyexist = get_string('entryalreadyexist','glossary');
|
||||||
$entryexported = get_string('entryexported','glossary');
|
$entryexported = get_string('entryexported','glossary');
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($glossary->name), '', $navigation, '', '', true, '', navmenu($course, $cm));
|
print_header_simple(format_string($glossary->name), '', $navigation, '', '', true, '', navmenu($course, $cm));
|
||||||
|
|
||||||
|
|
|
@ -51,13 +51,13 @@
|
||||||
$strmodulename = get_string("modulename", "glossary");
|
$strmodulename = get_string("modulename", "glossary");
|
||||||
$strdisplayformats = get_string("displayformats","glossary");
|
$strdisplayformats = get_string("displayformats","glossary");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $stradmin, 'link' => "../../$CFG->admin/index.php", 'type' => 'core');
|
$navlinks[] = array('name' => $stradmin, 'link' => "../../$CFG->admin/index.php", 'type' => 'core');
|
||||||
$crumbs[] = array('name' => $strconfiguration, 'link' => "../../$CFG->admin/configure.php", 'type' => 'core');
|
$navlinks[] = array('name' => $strconfiguration, 'link' => "../../$CFG->admin/configure.php", 'type' => 'core');
|
||||||
$crumbs[] = array('name' => $strmanagemodules, 'link' => "../../$CFG->admin/modules.php", 'type' => 'core');
|
$navlinks[] = array('name' => $strmanagemodules, 'link' => "../../$CFG->admin/modules.php", 'type' => 'core');
|
||||||
$crumbs[] = array('name' => $strmodulename, 'link' => "../../$CFG->admin/module.php?module=glossary&sesskey=$USER->sesskey", 'type' => 'core');
|
$navlinks[] = array('name' => $strmodulename, 'link' => "../../$CFG->admin/module.php?module=glossary&sesskey=$USER->sesskey", 'type' => 'core');
|
||||||
$crumbs[] = array('name' => $strdisplayformats, 'link' => '', 'type' => 'core');
|
$navlinks[] = array('name' => $strdisplayformats, 'link' => '', 'type' => 'core');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header("$strmodulename: $strconfiguration", $site->fullname, $navigation);
|
print_header("$strmodulename: $strconfiguration", $site->fullname, $navigation);
|
||||||
|
|
||||||
|
|
|
@ -45,11 +45,11 @@
|
||||||
$strsearch = get_string("search");
|
$strsearch = get_string("search");
|
||||||
$strimportentries = get_string('importentriesfromxml', 'glossary');
|
$strimportentries = get_string('importentriesfromxml', 'glossary');
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strimportentries, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strimportentries, 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($glossary->name), "", $navigation,
|
print_header_simple(format_string($glossary->name), "", $navigation,
|
||||||
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
|
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
|
|
||||||
|
|
||||||
/// Print the header
|
/// Print the header
|
||||||
$crumbs[] = array('name' => $strglossarys, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strglossarys, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple("$strglossarys", "", $navigation, "", "", true, "", navmenu($course));
|
print_header_simple("$strglossarys", "", $navigation, "", "", true, "", navmenu($course));
|
||||||
|
|
||||||
|
|
|
@ -49,10 +49,10 @@
|
||||||
|
|
||||||
$CFG->framename = "newwindow";
|
$CFG->framename = "newwindow";
|
||||||
if ($course->id != SITEID) {
|
if ($course->id != SITEID) {
|
||||||
$crumbs[] = array('name' => $strglossaries, 'link' => '', 'type' => 'activity');
|
$navlinks[] = array('name' => $strglossaries, 'link' => '', 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => $strsearch, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strsearch, 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header(strip_tags("$course->shortname: $strglossaries $strsearch"), $course->fullname, $navigation, "", "", true, " ", " ");
|
print_header(strip_tags("$course->shortname: $strglossaries $strsearch"), $course->fullname, $navigation, "", "", true, " ", " ");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -224,22 +224,22 @@
|
||||||
$strsearch = get_string("search");
|
$strsearch = get_string("search");
|
||||||
$strwaitingapproval = get_string('waitingapproval', 'glossary');
|
$strwaitingapproval = get_string('waitingapproval', 'glossary');
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$id", 'type' => 'activityinstance');
|
||||||
|
|
||||||
/// If we are in approval mode, prit special header
|
/// If we are in approval mode, prit special header
|
||||||
if ($tab == GLOSSARY_APPROVAL_VIEW) {
|
if ($tab == GLOSSARY_APPROVAL_VIEW) {
|
||||||
require_capability('mod/glossary:approve', $context);
|
require_capability('mod/glossary:approve', $context);
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strwaitingapproval, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strwaitingapproval, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($glossary->name), "", $navigation, "", "", true,
|
print_header_simple(format_string($glossary->name), "", $navigation, "", "", true,
|
||||||
update_module_button($cm->id, $course->id, $strglossary), navmenu($course, $cm));
|
update_module_button($cm->id, $course->id, $strglossary), navmenu($course, $cm));
|
||||||
|
|
||||||
print_heading($strwaitingapproval);
|
print_heading($strwaitingapproval);
|
||||||
} else { /// Print standard header
|
} else { /// Print standard header
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
print_header_simple(format_string($glossary->name), "", $navigation, "", "", true,
|
print_header_simple(format_string($glossary->name), "", $navigation, "", "", true,
|
||||||
update_module_button($cm->id, $course->id, $strglossary), navmenu($course, $cm));
|
update_module_button($cm->id, $course->id, $strglossary), navmenu($course, $cm));
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,8 @@
|
||||||
$title = format_string($course->shortname) . ": $strmodulenameplural";
|
$title = format_string($course->shortname) . ": $strmodulenameplural";
|
||||||
$heading = $course->fullname;
|
$heading = $course->fullname;
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strmodulenameplural, 'link' => '', 'type' => 'activity');
|
$navlinks[] = array('name' => $strmodulenameplural, 'link' => '', 'type' => 'activity');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header($title, $heading, $navigation, "", "", true, "", navmenu($course));
|
print_header($title, $heading, $navigation, "", "", true, "", navmenu($course));
|
||||||
|
|
||||||
|
|
|
@ -402,8 +402,8 @@ function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
|
||||||
$title = format_string($course->shortname) . ": $hotpot->name";
|
$title = format_string($course->shortname) . ": $hotpot->name";
|
||||||
$heading = $course->fullname;
|
$heading = $course->fullname;
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strmodulenameplural, 'link' => 'index.php?id='.$course->id, 'type' => 'activity');
|
$navlinks[] = array('name' => $strmodulenameplural, 'link' => 'index.php?id='.$course->id, 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => $hotpot->name, 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => $hotpot->name, 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
|
|
||||||
|
|
||||||
$modulecontext = get_context_instance(CONTEXT_MODULE, $cm->id);
|
$modulecontext = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||||
|
@ -414,16 +414,16 @@ function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
|
||||||
$module = "hotpot";
|
$module = "hotpot";
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs[] = array('name' => get_string("report$mode", $module), 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => get_string("report$mode", $module), 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$crumbs[] = array('name' => get_string("report", "quiz"), 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => get_string("report", "quiz"), 'link' => '', 'type' => 'title');
|
||||||
}
|
}
|
||||||
|
|
||||||
$button = update_module_button($cm->id, $course->id, $strmodulename);
|
$button = update_module_button($cm->id, $course->id, $strmodulename);
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
print_header($title, $heading, $navigation, "", "", true, $button, navmenu($course, $cm));
|
print_header($title, $heading, $navigation, "", "", true, $button, navmenu($course, $cm));
|
||||||
|
|
||||||
print_heading($hotpot->name);
|
print_heading($hotpot->name);
|
||||||
|
@ -600,10 +600,8 @@ function hotpot_get_report_users($course, $formdata) {
|
||||||
$users = array();
|
$users = array();
|
||||||
|
|
||||||
/// Check to see if groups are being used in this module
|
/// Check to see if groups are being used in this module
|
||||||
$currentgroup = false;
|
$groupmode = groupmode($course, $cm); //TODO: there is no $cm defined!
|
||||||
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
|
|
||||||
$currentgroup = setup_and_print_groups($course, $groupmode, "report.php?id=$cm->id&mode=simple");
|
$currentgroup = setup_and_print_groups($course, $groupmode, "report.php?id=$cm->id&mode=simple");
|
||||||
}
|
|
||||||
|
|
||||||
$sort = "u.lastname ASC";
|
$sort = "u.lastname ASC";
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,9 @@
|
||||||
$title = format_string($course->shortname) . ": $hotpot->name";
|
$title = format_string($course->shortname) . ": $hotpot->name";
|
||||||
$heading = $course->fullname;
|
$heading = $course->fullname;
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strmodulenameplural, 'link' => 'index.php?id='.$course->id, 'type' => 'activity');
|
$navlinks[] = array('name' => $strmodulenameplural, 'link' => 'index.php?id='.$course->id, 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => get_string("review", "quiz"), 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => get_string("review", "quiz"), 'link' => '', 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
|
|
||||||
$button = update_module_button($cm->id, $course->id, $strmodulename);
|
$button = update_module_button($cm->id, $course->id, $strmodulename);
|
||||||
|
|
|
@ -42,10 +42,10 @@
|
||||||
// header strings
|
// header strings
|
||||||
$title = format_string($course->shortname.': '.$hotpot->name, true);
|
$title = format_string($course->shortname.': '.$hotpot->name, true);
|
||||||
$heading = $course->fullname;
|
$heading = $course->fullname;
|
||||||
$crumbs[] = array('name' => get_string("modulenameplural", "hotpot"), 'link' => $CFG->wwwroot.'/mod/hotpot/index.php?id='.$course->id, 'type' => 'activity');
|
$navlinks[] = array('name' => get_string("modulenameplural", "hotpot"), 'link' => $CFG->wwwroot.'/mod/hotpot/index.php?id='.$course->id, 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => $hotpot->name, 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => $hotpot->name, 'link' => '', 'type' => 'activityinstance');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
$button = update_module_button($cm->id, $course->id, get_string("modulename", "hotpot"));
|
$button = update_module_button($cm->id, $course->id, get_string("modulename", "hotpot"));
|
||||||
$button = '<div style="font-size:0.75em;">'.$button.'</div>';
|
$button = '<div style="font-size:0.75em;">'.$button.'</div>';
|
||||||
|
|
|
@ -75,10 +75,10 @@
|
||||||
$entry->format = $defaultformat;
|
$entry->format = $defaultformat;
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strjournals, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strjournals, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($journal->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($journal->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $stredit, 'link' => '', 'type' => 'action');
|
$navlinks[] = array('name' => $stredit, 'link' => '', 'type' => 'action');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($journal->name), "", $navigation, "",
|
print_header_simple(format_string($journal->name), "", $navigation, "",
|
||||||
"", true, "", navmenu($course, $cm));
|
"", true, "", navmenu($course, $cm));
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
$strweek = get_string("week");
|
$strweek = get_string("week");
|
||||||
$strtopic = get_string("topic");
|
$strtopic = get_string("topic");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strjournals, 'link' => '', 'type' => 'activity');
|
$navlinks[] = array('name' => $strjournals, 'link' => '', 'type' => 'activity');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple("$strjournals", "", $navigation,
|
print_header_simple("$strjournals", "", $navigation,
|
||||||
"", "", true, "", navmenu($course));
|
"", "", true, "", navmenu($course));
|
||||||
|
|
|
@ -38,20 +38,17 @@
|
||||||
$strentries = get_string("entries", "journal");
|
$strentries = get_string("entries", "journal");
|
||||||
$strjournals = get_string("modulenameplural", "journal");
|
$strjournals = get_string("modulenameplural", "journal");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strjournals, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strjournals, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($journal->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($journal->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strentries, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strentries, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple("$strjournals", "", $navigation, "", "", true);
|
print_header_simple("$strjournals", "", $navigation, "", "", true);
|
||||||
|
|
||||||
|
|
||||||
/// Check to see if groups are being used in this journal
|
/// Check to see if groups are being used in this journal
|
||||||
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
|
$groupmode = groupmode($course, $cm);
|
||||||
$currentgroup = setup_and_print_groups($course, $groupmode, "report.php?id=$cm->id");
|
$currentgroup = setup_and_print_groups($course, $groupmode, "report.php?id=$cm->id");
|
||||||
} else {
|
|
||||||
$currentgroup = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Process incoming data if there is any
|
/// Process incoming data if there is any
|
||||||
if ($data = data_submitted()) {
|
if ($data = data_submitted()) {
|
||||||
|
|
|
@ -28,9 +28,9 @@
|
||||||
$strjournal = get_string("modulename", "journal");
|
$strjournal = get_string("modulename", "journal");
|
||||||
$strjournals = get_string("modulenameplural", "journal");
|
$strjournals = get_string("modulenameplural", "journal");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strjournals, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strjournals, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($journal->name), 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($journal->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($journal->name), '', $navigation, '', '', true,
|
print_header_simple(format_string($journal->name), '', $navigation, '', '', true,
|
||||||
update_module_button($cm->id, $course->id, $strjournal), navmenu($course, $cm));
|
update_module_button($cm->id, $course->id, $strjournal), navmenu($course, $cm));
|
||||||
|
|
|
@ -35,11 +35,11 @@
|
||||||
$strimportquestions = get_string("importquestions", "lesson");
|
$strimportquestions = get_string("importquestions", "lesson");
|
||||||
$strlessons = get_string("modulenameplural", "lesson");
|
$strlessons = get_string("modulenameplural", "lesson");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strlesson, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strlesson, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($lesson->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($lesson->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strimportquestions, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strimportquestions, 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple("$strimportquestions", " $strimportquestions", $navigation);
|
print_header_simple("$strimportquestions", " $strimportquestions", $navigation);
|
||||||
|
|
||||||
|
|
|
@ -44,11 +44,11 @@
|
||||||
$strimportppt = get_string("importppt", "lesson");
|
$strimportppt = get_string("importppt", "lesson");
|
||||||
$strlessons = get_string("modulenameplural", "lesson");
|
$strlessons = get_string("modulenameplural", "lesson");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strlessons, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strlessons, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($mod->name,true), 'link' => "$CFG->wwwroot/mod/$modname/view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($mod->name,true), 'link' => "$CFG->wwwroot/mod/$modname/view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strimportppt, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strimportppt, 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple("$strimportppt", " $strimportppt", $navigation);
|
print_header_simple("$strimportppt", " $strimportppt", $navigation);
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,9 @@
|
||||||
|
|
||||||
/// Print the header
|
/// Print the header
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strlessons, 'link' => '', 'type' => 'activity');
|
$navlinks[] = array('name' => $strlessons, 'link' => '', 'type' => 'activity');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header("$course->shortname: $strlessons", $course->fullname, $navigation, "", "", true, "", navmenu($course));
|
print_header("$course->shortname: $strlessons", $course->fullname, $navigation, "", "", true, "", navmenu($course));
|
||||||
|
|
||||||
|
|
|
@ -240,10 +240,10 @@ function lesson_print_header($cm, $course, $lesson, $currenttab = '') {
|
||||||
|
|
||||||
/// Header setup
|
/// Header setup
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strlessons, 'link' => "$CFG->wwwroot/mod/lesson/index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strlessons, 'link' => "$CFG->wwwroot/mod/lesson/index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => $strname, 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => $strname, 'link' => '', 'type' => 'activityinstance');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
/// Print header, heading, tabs and messages
|
/// Print header, heading, tabs and messages
|
||||||
print_header("$course->shortname: $strname", $course->fullname, $navigation,
|
print_header("$course->shortname: $strname", $course->fullname, $navigation,
|
||||||
|
|
|
@ -60,7 +60,7 @@ class page_lesson extends page_generic_activity {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
**/
|
**/
|
||||||
function print_header($title = '', $morebreadcrumbs = array()) {
|
function print_header($title = '', $morenavlinks = array()) {
|
||||||
global $CFG;
|
global $CFG;
|
||||||
|
|
||||||
$this->init_full();
|
$this->init_full();
|
||||||
|
@ -76,11 +76,11 @@ class page_lesson extends page_generic_activity {
|
||||||
$title = "{$this->courserecord->shortname}: $activityname";
|
$title = "{$this->courserecord->shortname}: $activityname";
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs[] = array('name' => get_string('modulenameplural', $this->activityname), 'link' => $CFG->wwwroot."/mod/{$this->activityname}/index.php?id={$this->courserecord->id}", 'type' => 'activity');
|
$navlinks[] = array('name' => get_string('modulenameplural', $this->activityname), 'link' => $CFG->wwwroot."/mod/{$this->activityname}/index.php?id={$this->courserecord->id}", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($this->activityrecord->name), 'link' => $CFG->wwwroot."/mod/{$this->activityname}/view.php?id={$this->modulerecord->id}", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($this->activityrecord->name), 'link' => $CFG->wwwroot."/mod/{$this->activityname}/view.php?id={$this->modulerecord->id}", 'type' => 'activityinstance');
|
||||||
|
|
||||||
if (!empty($morebreadcrumbs)) {
|
if (!empty($morenavlinks)) {
|
||||||
$breadcrumbs = array_merge($crumbs, $morebreadcrumbs);
|
$navlinks = array_merge($navlinks, $morenavlinks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ class page_lesson extends page_generic_activity {
|
||||||
$meta = '';
|
$meta = '';
|
||||||
// }
|
// }
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header($title, $this->courserecord->fullname, $navigation, '', $meta, true, $buttons, navmenu($this->courserecord, $this->modulerecord));
|
print_header($title, $this->courserecord->fullname, $navigation, '', $meta, true, $buttons, navmenu($this->courserecord, $this->modulerecord));
|
||||||
|
|
||||||
|
|
|
@ -396,11 +396,11 @@
|
||||||
$strupdatemodule = has_capability('moodle/course:manageactivities', $coursecontext)
|
$strupdatemodule = has_capability('moodle/course:manageactivities', $coursecontext)
|
||||||
? update_module_button($cm->id, $course->id, get_string('modulename', 'quiz'))
|
? update_module_button($cm->id, $course->id, get_string('modulename', 'quiz'))
|
||||||
: "";
|
: "";
|
||||||
$crumbs[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($quiz->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($quiz->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strattemptnum, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strattemptnum, 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($quiz->name), "", $navigation, "", $headtags, true, $strupdatemodule);
|
print_header_simple(format_string($quiz->name), "", $navigation, "", $headtags, true, $strupdatemodule);
|
||||||
}
|
}
|
||||||
|
|
|
@ -310,10 +310,10 @@
|
||||||
$strupdatemodule = has_capability('moodle/course:manageactivities', $coursecontext)
|
$strupdatemodule = has_capability('moodle/course:manageactivities', $coursecontext)
|
||||||
? update_module_button($cm->id, $course->id, get_string('modulename', 'quiz'))
|
? update_module_button($cm->id, $course->id, get_string('modulename', 'quiz'))
|
||||||
: "";
|
: "";
|
||||||
$crumbs[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($quiz->name), 'link' => "view.php?q=$quiz->instance", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($quiz->name), 'link' => "view.php?q=$quiz->instance", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $streditingquiz, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $streditingquiz, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($streditingquiz, '', $navigation, "", "",
|
print_header_simple($streditingquiz, '', $navigation, "", "",
|
||||||
true, $strupdatemodule);
|
true, $strupdatemodule);
|
||||||
|
@ -350,10 +350,10 @@
|
||||||
? update_module_button($cm->id, $course->id, get_string('modulename', 'quiz'))
|
? update_module_button($cm->id, $course->id, get_string('modulename', 'quiz'))
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($quiz->name), 'link' => "view.php?q=$quiz->instance", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($quiz->name), 'link' => "view.php?q=$quiz->instance", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $streditingquiz, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $streditingquiz, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($streditingquiz, '', $navigation, "", "", true, $strupdatemodule);
|
print_header_simple($streditingquiz, '', $navigation, "", "", true, $strupdatemodule);
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
</form>";
|
</form>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strquizzes, 'link' => '', 'type' => 'activity');
|
$navlinks[] = array('name' => $strquizzes, 'link' => '', 'type' => 'activity');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($strquizzes, '', $navigation,
|
print_header_simple($strquizzes, '', $navigation,
|
||||||
'', '', true, $streditquestions, navmenu($course));
|
'', '', true, $streditquestions, navmenu($course));
|
||||||
|
|
|
@ -27,9 +27,9 @@ class quiz_default_report {
|
||||||
$strquizzes = get_string("modulenameplural", "quiz");
|
$strquizzes = get_string("modulenameplural", "quiz");
|
||||||
$strquiz = get_string("modulename", "quiz");
|
$strquiz = get_string("modulename", "quiz");
|
||||||
/// Print the page header
|
/// Print the page header
|
||||||
$crumbs[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($quiz->name), 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($quiz->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($quiz->name), "", $navigation,
|
print_header_simple(format_string($quiz->name), "", $navigation,
|
||||||
'', $meta, true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));
|
'', $meta, true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));
|
||||||
|
|
|
@ -125,11 +125,11 @@
|
||||||
? update_module_button($cm->id, $course->id, get_string('modulename', 'quiz'))
|
? update_module_button($cm->id, $course->id, get_string('modulename', 'quiz'))
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($quiz->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($quiz->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strreview, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strreview, 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($quiz->name), "", $navigation, "", $headtags, true, $strupdatemodule);
|
print_header_simple(format_string($quiz->name), "", $navigation, "", $headtags, true, $strupdatemodule);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
$strlastmodified = get_string("lastmodified");
|
$strlastmodified = get_string("lastmodified");
|
||||||
|
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strresources, 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => $strresources, 'link' => '', 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header("$course->shortname: $strresources", $course->fullname, $navigation,
|
print_header("$course->shortname: $strresources", $course->fullname, $navigation,
|
||||||
"", "", true, "", navmenu($course));
|
"", "", true, "", navmenu($course));
|
||||||
|
|
|
@ -112,12 +112,12 @@ function resource_base($cmid=0) {
|
||||||
$this->strresource = get_string("modulename", "resource");
|
$this->strresource = get_string("modulename", "resource");
|
||||||
$this->strresources = get_string("modulenameplural", "resource");
|
$this->strresources = get_string("modulenameplural", "resource");
|
||||||
|
|
||||||
$this->crumbs[] = array('name' => $this->strresources, 'link' => "index.php?id={$this->course->id}", 'type' => 'activity');
|
$this->navlinks[] = array('name' => $this->strresources, 'link' => "index.php?id={$this->course->id}", 'type' => 'activity');
|
||||||
|
|
||||||
if (!$this->cm->visible and !has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_MODULE, $this->cm->id))) {
|
if (!$this->cm->visible and !has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_MODULE, $this->cm->id))) {
|
||||||
$pagetitle = strip_tags($this->course->shortname.': '.$this->strresource);
|
$pagetitle = strip_tags($this->course->shortname.': '.$this->strresource);
|
||||||
$this->crumbs[] = array('name' => $this->strresource, 'link' => '', 'type' => 'activityinstance');
|
$this->navlinks[] = array('name' => $this->strresource, 'link' => '', 'type' => 'activityinstance');
|
||||||
$this->navigation = build_navigation($this->crumbs);
|
$this->navigation = build_navigation($this->navlinks);
|
||||||
|
|
||||||
print_header($pagetitle, $this->course->fullname, $this->navigation, "", "", true, '', navmenu($this->course, $this->cm));
|
print_header($pagetitle, $this->course->fullname, $this->navigation, "", "", true, '', navmenu($this->course, $this->cm));
|
||||||
notice(get_string("activityiscurrentlyhidden"), "$CFG->wwwroot/course/view.php?id={$this->course->id}");
|
notice(get_string("activityiscurrentlyhidden"), "$CFG->wwwroot/course/view.php?id={$this->course->id}");
|
||||||
|
@ -163,10 +163,10 @@ function display_course_blocks_start() {
|
||||||
$USER->editing = $edit;
|
$USER->editing = $edit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$morebreadcrumbs = array($this->strresources => 'index.php?id='.$this->course->id,
|
$morenavlinks = array($this->strresources => 'index.php?id='.$this->course->id,
|
||||||
$this->resource->name => '');
|
$this->resource->name => '');
|
||||||
|
|
||||||
$PAGE->print_header($this->course->shortname.': %fullname%', $morebreadcrumbs);
|
$PAGE->print_header($this->course->shortname.': %fullname%', $morenavlinks);
|
||||||
|
|
||||||
echo '<table id="layout-table"><tr>';
|
echo '<table id="layout-table"><tr>';
|
||||||
|
|
||||||
|
|
|
@ -63,20 +63,20 @@ function display() {
|
||||||
$count = 0;
|
$count = 0;
|
||||||
$subnav = "<a href=\"view.php?id={$cm->id}\">".format_string($resource->name,true)."</a>";
|
$subnav = "<a href=\"view.php?id={$cm->id}\">".format_string($resource->name,true)."</a>";
|
||||||
$backsub = '';
|
$backsub = '';
|
||||||
$this->crumbs[] = array('name' => format_string($resource->name,true), 'link' => "view.php?id={$cm->id}", 'type' => 'activity');
|
$this->navlinks[] = array('name' => format_string($resource->name,true), 'link' => "view.php?id={$cm->id}", 'type' => 'activity');
|
||||||
|
|
||||||
foreach ($subs as $sub) {
|
foreach ($subs as $sub) {
|
||||||
$count++;
|
$count++;
|
||||||
if ($count < $countsubs) {
|
if ($count < $countsubs) {
|
||||||
$backsub .= "/$sub";
|
$backsub .= "/$sub";
|
||||||
|
|
||||||
$this->crumbs[] = array('name' => $sub, 'link' => "view.php?id={$cm->id}", 'type' => 'title');
|
$this->navlinks[] = array('name' => $sub, 'link' => "view.php?id={$cm->id}", 'type' => 'title');
|
||||||
} else {
|
} else {
|
||||||
$this->crumbs[] = array('name' => $sub, 'link' => '', 'type' => 'title');
|
$this->navlinks[] = array('name' => $sub, 'link' => '', 'type' => 'title');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activity');
|
$this->navlinks[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activity');
|
||||||
}
|
}
|
||||||
|
|
||||||
$pagetitle = strip_tags($course->shortname.': '.format_string($resource->name));
|
$pagetitle = strip_tags($course->shortname.': '.format_string($resource->name));
|
||||||
|
@ -87,7 +87,7 @@ function display() {
|
||||||
$editfiles = print_single_button("$CFG->wwwroot/files/index.php", $options, get_string("editfiles"), 'get', '', true);
|
$editfiles = print_single_button("$CFG->wwwroot/files/index.php", $options, get_string("editfiles"), 'get', '', true);
|
||||||
$update = $editfiles.$update;
|
$update = $editfiles.$update;
|
||||||
}
|
}
|
||||||
$this->navigation = build_navigation($this->crumbs);
|
$this->navigation = build_navigation($this->navlinks);
|
||||||
print_header($pagetitle, $course->fullname, $this->navigation,
|
print_header($pagetitle, $course->fullname, $this->navigation,
|
||||||
"", "", true, $update,
|
"", "", true, $update,
|
||||||
navmenu($course, $cm));
|
navmenu($course, $cm));
|
||||||
|
|
|
@ -84,8 +84,8 @@ function display() {
|
||||||
print_footer($course);
|
print_footer($course);
|
||||||
} else { /// Make a page and a pop-up window
|
} else { /// Make a page and a pop-up window
|
||||||
|
|
||||||
$this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
|
$this->navlinks[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$this->navigation = build_navigation($this->crumbs);
|
$this->navigation = build_navigation($this->navlinks);
|
||||||
|
|
||||||
print_header($pagetitle, $course->fullname, $this->navigation,
|
print_header($pagetitle, $course->fullname, $this->navigation,
|
||||||
"", "", true, update_module_button($cm->id, $course->id, $this->strresource),
|
"", "", true, update_module_button($cm->id, $course->id, $this->strresource),
|
||||||
|
@ -113,8 +113,8 @@ function display() {
|
||||||
}
|
}
|
||||||
} else { /// not a popup at all
|
} else { /// not a popup at all
|
||||||
|
|
||||||
$this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
|
$this->navlinks[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$this->navigation = build_navigation($this->crumbs);
|
$this->navigation = build_navigation($this->navlinks);
|
||||||
|
|
||||||
print_header($pagetitle, $course->fullname, $this->navigation,
|
print_header($pagetitle, $course->fullname, $this->navigation,
|
||||||
"", "", true, update_module_button($cm->id, $course->id, $this->strresource),
|
"", "", true, update_module_button($cm->id, $course->id, $this->strresource),
|
||||||
|
|
|
@ -64,9 +64,9 @@
|
||||||
print_header($pagetitle, $course->fullname);
|
print_header($pagetitle, $course->fullname);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$resource_obj->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
|
$resource_obj->navlinks[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$resource_obj->crumbs[] = array('name' => $strdeploy, 'link' => '', 'type' => 'action');
|
$resource_obj->navlinks[] = array('name' => $strdeploy, 'link' => '', 'type' => 'action');
|
||||||
$navigation = build_navigation($resource_obj->crumbs);
|
$navigation = build_navigation($resource_obj->navlinks);
|
||||||
print_header($pagetitle, $course->fullname, $navigation,
|
print_header($pagetitle, $course->fullname, $navigation,
|
||||||
'', '', true,
|
'', '', true,
|
||||||
update_module_button($cm->id, $course->id, $resource_obj->strresource));
|
update_module_button($cm->id, $course->id, $resource_obj->strresource));
|
||||||
|
|
|
@ -373,8 +373,8 @@ class resource_ims extends resource_base {
|
||||||
print_header($pagetitle, $course->fullname.' : '.$resource->name);
|
print_header($pagetitle, $course->fullname.' : '.$resource->name);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
|
$this->navlinks[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$this->navigation = build_navigation($this->crumbs);
|
$this->navigation = build_navigation($this->navlinks);
|
||||||
|
|
||||||
print_header($pagetitle, $course->fullname, $this->navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));
|
print_header($pagetitle, $course->fullname, $this->navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));
|
||||||
}
|
}
|
||||||
|
@ -474,8 +474,8 @@ class resource_ims extends resource_base {
|
||||||
//print_header($pagetitle, $course->fullname.' : '.$resource->name);
|
//print_header($pagetitle, $course->fullname.' : '.$resource->name);
|
||||||
print_header();
|
print_header();
|
||||||
} else {
|
} else {
|
||||||
$this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
|
$this->navlinks[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$this->navigation = build_navigation($this->crumbs);
|
$this->navigation = build_navigation($this->navlinks);
|
||||||
print_header($pagetitle, $course->fullname, $this->navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "parent"));
|
print_header($pagetitle, $course->fullname, $this->navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "parent"));
|
||||||
}
|
}
|
||||||
/// content - this produces everything else
|
/// content - this produces everything else
|
||||||
|
|
|
@ -110,8 +110,8 @@ function display() {
|
||||||
} else { /// not a popup at all
|
} else { /// not a popup at all
|
||||||
|
|
||||||
add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
|
add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
|
||||||
$this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'title');
|
$this->navlinks[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'title');
|
||||||
$this->navigation = build_navigation($this->crumbs);
|
$this->navigation = build_navigation($this->navlinks);
|
||||||
|
|
||||||
print_header($pagetitle, $course->fullname, $this->navigation,
|
print_header($pagetitle, $course->fullname, $this->navigation,
|
||||||
"", "", true, update_module_button($cm->id, $course->id, $this->strresource),
|
"", "", true, update_module_button($cm->id, $course->id, $this->strresource),
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
$strreport = get_string("report",'scorm');
|
$strreport = get_string("report",'scorm');
|
||||||
$strlastmodified = get_string("lastmodified");
|
$strlastmodified = get_string("lastmodified");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strscorms, 'link' => '', 'type' => 'activity');
|
$navlinks[] = array('name' => $strscorms, 'link' => '', 'type' => 'activity');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple("$strscorms", "", $navigation,
|
print_header_simple("$strscorms", "", $navigation,
|
||||||
"", "", true, "", navmenu($course));
|
"", "", true, "", navmenu($course));
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
// The module SCORM/AICC activity with the first id is the course
|
// The module SCORM/AICC activity with the first id is the course
|
||||||
$firstscorm = current($scorms);
|
$firstscorm = current($scorms);
|
||||||
if (!(($course->format == 'scorm') && ($firstscorm->id == $scorm->id))) {
|
if (!(($course->format == 'scorm') && ($firstscorm->id == $scorm->id))) {
|
||||||
$crumbs[] = array('name' => $strscorms, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strscorms, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,8 +59,8 @@
|
||||||
$pagetitle = strip_tags("$course->shortname: ".format_string($scorm->name));
|
$pagetitle = strip_tags("$course->shortname: ".format_string($scorm->name));
|
||||||
|
|
||||||
if (!$cm->visible and !has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_COURSE,$course->id))) {
|
if (!$cm->visible and !has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_COURSE,$course->id))) {
|
||||||
$crumbs[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header($pagetitle, $course->fullname, $navigation,
|
print_header($pagetitle, $course->fullname, $navigation,
|
||||||
'', '', true, update_module_button($cm->id, $course->id, $strscorm), '', false);
|
'', '', true, update_module_button($cm->id, $course->id, $strscorm), '', false);
|
||||||
|
@ -125,8 +125,8 @@
|
||||||
$bodyscript = 'onunload="main.close();"';
|
$bodyscript = 'onunload="main.close();"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
$exitlink = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$scorm->course.'" title="'.$strexit.'">'.$strexit.'</a> ';
|
$exitlink = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$scorm->course.'" title="'.$strexit.'">'.$strexit.'</a> ';
|
||||||
|
|
||||||
print_header($pagetitle, $course->fullname,
|
print_header($pagetitle, $course->fullname,
|
||||||
|
|
|
@ -64,29 +64,29 @@
|
||||||
$strattempt = get_string('attempt', 'scorm');
|
$strattempt = get_string('attempt', 'scorm');
|
||||||
$strname = get_string('name');
|
$strname = get_string('name');
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strscorms, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strscorms, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
|
|
||||||
if (empty($b)) {
|
if (empty($b)) {
|
||||||
if (empty($a)) {
|
if (empty($a)) {
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
print_header("$course->shortname: ".format_string($scorm->name), $course->fullname,$navigation,
|
print_header("$course->shortname: ".format_string($scorm->name), $course->fullname,$navigation,
|
||||||
'', '', true);
|
'', '', true);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strreport, 'link' => "report.php?id=$cm->id", 'type' => 'title');
|
$navlinks[] = array('name' => $strreport, 'link' => "report.php?id=$cm->id", 'type' => 'title');
|
||||||
$crumbs[] = array('name' => "$strattempt $attempt - ".fullname($userdata), 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => "$strattempt $attempt - ".fullname($userdata), 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header("$course->shortname: ".format_string($scorm->name), $course->fullname,
|
print_header("$course->shortname: ".format_string($scorm->name), $course->fullname,
|
||||||
$navigation, '', '', true);
|
$navigation, '', '', true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strreport, 'link' => "report.php?id=$cm->id", 'type' => 'title');
|
$navlinks[] = array('name' => $strreport, 'link' => "report.php?id=$cm->id", 'type' => 'title');
|
||||||
$crumbs[] = array('name' => "$strattempt $attempt - ".fullname($userdata), 'link' => "report.php?a=$a&user=$user&attempt=$attempt", 'type' => 'title');
|
$navlinks[] = array('name' => "$strattempt $attempt - ".fullname($userdata), 'link' => "report.php?a=$a&user=$user&attempt=$attempt", 'type' => 'title');
|
||||||
$crumbs[] = array('name' => $sco->title, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $sco->title, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header("$course->shortname: ".format_string($scorm->name), $course->fullname, $navigation,
|
print_header("$course->shortname: ".format_string($scorm->name), $course->fullname, $navigation,
|
||||||
'', '', true);
|
'', '', true);
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
// The module SCORM activity with the least id is the course
|
// The module SCORM activity with the least id is the course
|
||||||
$firstscorm = current($scorms);
|
$firstscorm = current($scorms);
|
||||||
if (!(($course->format == 'scorm') && ($firstscorm->id == $scorm->id))) {
|
if (!(($course->format == 'scorm') && ($firstscorm->id == $scorm->id))) {
|
||||||
$crumbs[] = array('name' => $strscorms, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strscorms, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,8 +63,8 @@
|
||||||
//
|
//
|
||||||
// Print the page header
|
// Print the page header
|
||||||
//
|
//
|
||||||
$crumbs[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header($pagetitle, $course->fullname, $navigation,
|
print_header($pagetitle, $course->fullname, $navigation,
|
||||||
'', '', true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm));
|
'', '', true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm));
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
$strdone = get_string("done", "survey");
|
$strdone = get_string("done", "survey");
|
||||||
$strnotdone = get_string("notdone", "survey");
|
$strnotdone = get_string("notdone", "survey");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strsurveys, 'link' => '', 'type' => 'activity');
|
$navlinks[] = array('name' => $strsurveys, 'link' => '', 'type' => 'activity');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple("$strsurveys", "", $navigation,
|
print_header_simple("$strsurveys", "", $navigation,
|
||||||
"", "", true, "", navmenu($course));
|
"", "", true, "", navmenu($course));
|
||||||
|
|
|
@ -65,10 +65,10 @@
|
||||||
<a href=\"view.php?id=$cm->id\">".format_string($survey->name,true)."</a> -> ";
|
<a href=\"view.php?id=$cm->id\">".format_string($survey->name,true)."</a> -> ";
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($survey->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($survey->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strreport, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strreport, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header("$course->shortname: ".format_string($survey->name), $course->fullname, $navigation,
|
print_header("$course->shortname: ".format_string($survey->name), $course->fullname, $navigation,
|
||||||
"", "", true,
|
"", "", true,
|
||||||
|
|
|
@ -33,10 +33,10 @@
|
||||||
|
|
||||||
$strsurveys = get_string("modulenameplural", "survey");
|
$strsurveys = get_string("modulenameplural", "survey");
|
||||||
$strsurveysaved = get_string("surveysaved", "survey");
|
$strsurveysaved = get_string("surveysaved", "survey");
|
||||||
$crumbs[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($survey->name), 'link' => '', 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($survey->name), 'link' => '', 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strsurveysaved, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strsurveysaved, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple("$strsurveysaved", "", $navigation, "");
|
print_header_simple("$strsurveysaved", "", $navigation, "");
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,9 @@
|
||||||
$strsurveys = get_string("modulenameplural", "survey");
|
$strsurveys = get_string("modulenameplural", "survey");
|
||||||
$strsurvey = get_string("modulename", "survey");
|
$strsurvey = get_string("modulename", "survey");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity');;
|
$navlinks[] = array('name' => $strsurveys, 'link' => "index.php?id=$course->id", 'type' => 'activity');;
|
||||||
$crumbs[] = array('name' => format_string($survey->name), 'link' => '', 'type' => 'activityinistance');
|
$navlinks[] = array('name' => format_string($survey->name), 'link' => '', 'type' => 'activityinistance');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($survey->name), "", $navigation, "", "", true,
|
print_header_simple(format_string($survey->name), "", $navigation, "", "", true,
|
||||||
update_module_button($cm->id, $course->id, $strsurvey), navmenu($course, $cm));
|
update_module_button($cm->id, $course->id, $strsurvey), navmenu($course, $cm));
|
||||||
|
|
|
@ -114,11 +114,11 @@
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$crumbs[] = array('name' => $strwikis, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strwikis, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($wiki->name,true), 'link' => "view.php?id=$moodleID", 'type' => 'activityinstace');
|
$navlinks[] = array('name' => format_string($wiki->name,true), 'link' => "view.php?id=$moodleID", 'type' => 'activityinstace');
|
||||||
$crumbs[] = array('name' => get_string("administration","wiki"), 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => get_string("administration","wiki"), 'link' => '', 'type' => 'title');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple("$wiki_entry->pagename", "", $navigation,
|
print_header_simple("$wiki_entry->pagename", "", $navigation,
|
||||||
$focus, "", true, update_module_button($cm->id, $course->id, $strwiki),
|
$focus, "", true, update_module_button($cm->id, $course->id, $strwiki),
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
|
|
||||||
|
|
||||||
/// Print the header
|
/// Print the header
|
||||||
$crumbs[] = array('name' => $strwikis, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strwikis, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple("$strwikis", "", $navigation, "", "", true, "", navmenu($course));
|
print_header_simple("$strwikis", "", $navigation, "", "", true, "", navmenu($course));
|
||||||
|
|
||||||
|
|
|
@ -281,10 +281,10 @@
|
||||||
$strwikis = get_string("modulenameplural", "wiki");
|
$strwikis = get_string("modulenameplural", "wiki");
|
||||||
$strwiki = get_string("modulename", "wiki");
|
$strwiki = get_string("modulename", "wiki");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strwikis, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strwikis, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($wiki->name,true), 'link' => "view.php?id=$moodleID", 'type' => 'activityinstace');
|
$navlinks[] = array('name' => format_string($wiki->name,true), 'link' => "view.php?id=$moodleID", 'type' => 'activityinstace');
|
||||||
|
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($ewiki_title?$ewiki_title:format_string($wiki->name), "", $navigation,
|
print_header_simple($ewiki_title?$ewiki_title:format_string($wiki->name), "", $navigation,
|
||||||
"", "", $cacheme, update_module_button($cm->id, $course->id, $strwiki),
|
"", "", $cacheme, update_module_button($cm->id, $course->id, $strwiki),
|
||||||
|
|
|
@ -61,10 +61,10 @@
|
||||||
if ($frameset == "top") {
|
if ($frameset == "top") {
|
||||||
// removed <base target="_parent" />
|
// removed <base target="_parent" />
|
||||||
// because it does not validate MDL-7861
|
// because it does not validate MDL-7861
|
||||||
$crumbs[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strassess, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strassess, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($workshop->name), "",$navigation,
|
print_header_simple(format_string($workshop->name), "",$navigation,
|
||||||
"", '', true);
|
"", '', true);
|
||||||
|
|
|
@ -71,10 +71,10 @@
|
||||||
|
|
||||||
// ... print the header and...
|
// ... print the header and...
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strassessments, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strassessments, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($workshop->name), "", $navigation,
|
print_header_simple(format_string($workshop->name), "", $navigation,
|
||||||
"", "", true);
|
"", "", true);
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
$strdeadline = get_string("deadline", "workshop");
|
$strdeadline = get_string("deadline", "workshop");
|
||||||
$strsubmitted = get_string("submitted", "assignment");
|
$strsubmitted = get_string("submitted", "assignment");
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strworkshops, 'link' => '', 'type' => 'activity');
|
$navlinks[] = array('name' => $strworkshops, 'link' => '', 'type' => 'activity');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple("$strworkshops", "", $navigation, "", "", true, "", navmenu($course));
|
print_header_simple("$strworkshops", "", $navigation, "", "", true, "", navmenu($course));
|
||||||
|
|
||||||
|
|
|
@ -51,10 +51,10 @@
|
||||||
$strsubmissions = get_string("submissions", "workshop");
|
$strsubmissions = get_string("submissions", "workshop");
|
||||||
|
|
||||||
// ... print the header and...
|
// ... print the header and...
|
||||||
$crumbs[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strsubmissions, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strsubmissions, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($workshop->name), "", $navigation,
|
print_header_simple(format_string($workshop->name), "", $navigation,
|
||||||
"", "", true);
|
"", "", true);
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
$strworkshop = get_string('modulename', 'workshop');
|
$strworkshop = get_string('modulename', 'workshop');
|
||||||
$strsubmission = get_string('submission', 'workshop');
|
$strsubmission = get_string('submission', 'workshop');
|
||||||
|
|
||||||
$crumbs[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strsubmission, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strsubmission, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($workshop->name)." : $strsubmission", "", $navigation,
|
print_header_simple(format_string($workshop->name)." : $strsubmission", "", $navigation,
|
||||||
"", "", true);
|
"", "", true);
|
||||||
|
|
|
@ -69,12 +69,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// ...display header...
|
// ...display header...
|
||||||
$crumbs[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
if ($straction) {
|
if ($straction) {
|
||||||
$crumbs[] = array('name' => $straction, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $straction, 'link' => '', 'type' => 'title');
|
||||||
}
|
}
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple(format_string($workshop->name), "", $navigation,
|
print_header_simple(format_string($workshop->name), "", $navigation,
|
||||||
"", "", true, update_module_button($cm->id, $course->id, $strworkshop), navmenu($course, $cm));
|
"", "", true, update_module_button($cm->id, $course->id, $strworkshop), navmenu($course, $cm));
|
||||||
|
@ -305,33 +305,11 @@
|
||||||
workshop_grade_assessments($workshop);
|
workshop_grade_assessments($workshop);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check to see if groups are being used in this workshop
|
|
||||||
/*
|
|
||||||
setup_and_print_groups($course, groupmode($course, $cm), "view.php?id=$cm->id");
|
|
||||||
$currentgroup = get_current_group($course->id);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/// copied code from assignment module, if this is not the way to do this please change it
|
|
||||||
/// the above code does not work
|
|
||||||
/// set_and_print_groups() is not fully implemented as function groups_instance_print_grouping_selector()
|
|
||||||
/// and function groups_instance_print_group_selector() are missing.
|
|
||||||
|
|
||||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||||
$changegroup = optional_param('group', -1, PARAM_INT); // choose the current group
|
|
||||||
|
/// find out current groups mode
|
||||||
$groupmode = groupmode($course, $cm);
|
$groupmode = groupmode($course, $cm);
|
||||||
$currentgroup = get_and_set_current_group($course, $groupmode, $changegroup);
|
$currentgroup = setup_and_print_groups($course, $groupmode, "view.php?id=$cm->id");
|
||||||
|
|
||||||
/// Now we need a menu for separategroups as well!
|
|
||||||
if ($groupmode == VISIBLEGROUPS || ($groupmode
|
|
||||||
&& has_capability('moodle/site:accessallgroups', $context))) {
|
|
||||||
|
|
||||||
//the following query really needs to change
|
|
||||||
if ($groups = groups_get_groups_names($course->id)) { //TODO:
|
|
||||||
print_box_start('groupmenu');
|
|
||||||
print_group_menu($groups, $groupmode, $currentgroup, "view.php?id=$cm->id");
|
|
||||||
print_box_end(); // groupmenu
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Print admin links
|
/// Print admin links
|
||||||
echo "<table width=\"100%\"><tr><td>";
|
echo "<table width=\"100%\"><tr><td>";
|
||||||
|
|
|
@ -58,10 +58,10 @@
|
||||||
/// top frame with the navigation bar and the assessment form
|
/// top frame with the navigation bar and the assessment form
|
||||||
|
|
||||||
if ($frameset == "top") {
|
if ($frameset == "top") {
|
||||||
$crumbs[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => $strworkshops, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
$navlinks[] = array('name' => format_string($workshop->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
|
||||||
$crumbs[] = array('name' => $strassess, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $strassess, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
// removed <base target="_parent" /> as it does not validate
|
// removed <base target="_parent" /> as it does not validate
|
||||||
print_header_simple(format_string($workshop->name), "", $navigation,
|
print_header_simple(format_string($workshop->name), "", $navigation,
|
||||||
|
|
|
@ -54,15 +54,15 @@
|
||||||
$strupdatemodule = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $course->id))
|
$strupdatemodule = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $course->id))
|
||||||
? update_module_button($cm->id, $course->id, get_string('modulename', $cm->modname))
|
? update_module_button($cm->id, $course->id, get_string('modulename', $cm->modname))
|
||||||
: "";
|
: "";
|
||||||
$crumbs = array();
|
$navlinks = array();
|
||||||
$crumbs[] = array('name' => get_string('modulenameplural', $cm->modname),
|
$navlinks[] = array('name' => get_string('modulenameplural', $cm->modname),
|
||||||
'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$course->id",
|
'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$course->id",
|
||||||
'type' => 'activity');
|
'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($module->name),
|
$navlinks[] = array('name' => format_string($module->name),
|
||||||
'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}",
|
'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}",
|
||||||
'type' => 'title');
|
'type' => 'title');
|
||||||
$crumbs[] = array('name' => $streditingcategories, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $streditingcategories, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
print_header_simple($streditingcategories, '', $navigation, "", "", true, $strupdatemodule);
|
print_header_simple($streditingcategories, '', $navigation, "", "", true, $strupdatemodule);
|
||||||
|
|
||||||
|
|
||||||
|
@ -72,9 +72,9 @@
|
||||||
include($CFG->dirroot."/mod/{$cm->modname}/tabs.php");
|
include($CFG->dirroot."/mod/{$cm->modname}/tabs.php");
|
||||||
} else {
|
} else {
|
||||||
// Print basic page layout.
|
// Print basic page layout.
|
||||||
$crumbs = array();
|
$navlinks = array();
|
||||||
$crumbs[] = array('name' => $streditingcategories, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $streditingcategories, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($streditingcategories, '', $navigation);
|
print_header_simple($streditingcategories, '', $navigation);
|
||||||
|
|
||||||
|
|
|
@ -27,11 +27,11 @@
|
||||||
$strupdatemodule = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $course->id))
|
$strupdatemodule = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $course->id))
|
||||||
? update_module_button($cm->id, $course->id, get_string('modulename', $cm->modname))
|
? update_module_button($cm->id, $course->id, get_string('modulename', $cm->modname))
|
||||||
: "";
|
: "";
|
||||||
$crumbs = array();
|
$navlinks = array();
|
||||||
$crumbs[] = array('name' => get_string('modulenameplural', $cm->modname), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => get_string('modulenameplural', $cm->modname), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}", 'type' => 'title');
|
$navlinks[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}", 'type' => 'title');
|
||||||
$crumbs[] = array('name' => $streditingquestions, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $streditingquestions, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
print_header_simple($streditingquestions, '', $navigation, "", "", true, $strupdatemodule);
|
print_header_simple($streditingquestions, '', $navigation, "", "", true, $strupdatemodule);
|
||||||
|
|
||||||
$currenttab = 'edit';
|
$currenttab = 'edit';
|
||||||
|
@ -40,9 +40,9 @@
|
||||||
include($CFG->dirroot."/mod/$cm->modname/tabs.php");
|
include($CFG->dirroot."/mod/$cm->modname/tabs.php");
|
||||||
} else {
|
} else {
|
||||||
// Print basic page layout.
|
// Print basic page layout.
|
||||||
$crumbs = array();
|
$navlinks = array();
|
||||||
$crumbs[] = array('name' => $streditingquestions, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $streditingquestions, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($streditingquestions, '', $navigation);
|
print_header_simple($streditingquestions, '', $navigation);
|
||||||
|
|
||||||
|
|
|
@ -69,11 +69,11 @@
|
||||||
$strupdatemodule = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $course->id))
|
$strupdatemodule = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $course->id))
|
||||||
? update_module_button($cm->id, $course->id, get_string('modulename', $cm->modname))
|
? update_module_button($cm->id, $course->id, get_string('modulename', $cm->modname))
|
||||||
: "";
|
: "";
|
||||||
$crumbs = array();
|
$navlinks = array();
|
||||||
$crumbs[] = array('name' => get_string('modulenameplural', $cm->modname), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => get_string('modulenameplural', $cm->modname), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}", 'type' => 'title');
|
$navlinks[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}", 'type' => 'title');
|
||||||
$crumbs[] = array('name' => $txt->exportquestions, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $txt->exportquestions, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
print_header_simple($txt->exportquestions, '', $navigation, "", "", true, $strupdatemodule);
|
print_header_simple($txt->exportquestions, '', $navigation, "", "", true, $strupdatemodule);
|
||||||
|
|
||||||
$currenttab = 'edit';
|
$currenttab = 'edit';
|
||||||
|
@ -82,9 +82,9 @@
|
||||||
include($CFG->dirroot."/mod/$cm->modname/tabs.php");
|
include($CFG->dirroot."/mod/$cm->modname/tabs.php");
|
||||||
} else {
|
} else {
|
||||||
// Print basic page layout.
|
// Print basic page layout.
|
||||||
$crumbs = array();
|
$navlinks = array();
|
||||||
$crumbs[] = array('name' => $txt->exportquestions, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $txt->exportquestions, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($txt->exportquestions, '', $navigation);
|
print_header_simple($txt->exportquestions, '', $navigation);
|
||||||
// print tabs
|
// print tabs
|
||||||
|
|
|
@ -87,11 +87,11 @@
|
||||||
$strupdatemodule = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $course->id))
|
$strupdatemodule = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $course->id))
|
||||||
? update_module_button($cm->id, $course->id, get_string('modulename', $cm->modname))
|
? update_module_button($cm->id, $course->id, get_string('modulename', $cm->modname))
|
||||||
: "";
|
: "";
|
||||||
$crumbs = array();
|
$navlinks = array();
|
||||||
$crumbs[] = array('name' => get_string('modulenameplural', $cm->modname), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$course->id", 'type' => 'activity');
|
$navlinks[] = array('name' => get_string('modulenameplural', $cm->modname), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$course->id", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}", 'type' => 'title');
|
$navlinks[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}", 'type' => 'title');
|
||||||
$crumbs[] = array('name' => $txt->importquestions, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $txt->importquestions, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
print_header_simple($txt->importquestions, '', $navigation, "", "", true, $strupdatemodule);
|
print_header_simple($txt->importquestions, '', $navigation, "", "", true, $strupdatemodule);
|
||||||
|
|
||||||
$currenttab = 'edit';
|
$currenttab = 'edit';
|
||||||
|
@ -100,9 +100,9 @@
|
||||||
include($CFG->dirroot."/mod/$cm->modname/tabs.php");
|
include($CFG->dirroot."/mod/$cm->modname/tabs.php");
|
||||||
} else {
|
} else {
|
||||||
// Print basic page layout.
|
// Print basic page layout.
|
||||||
$crumbs = array();
|
$navlinks = array();
|
||||||
$crumbs[] = array('name' => $txt->importquestions, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $txt->importquestions, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
print_header_simple($txt->importquestions, '', $navigation);
|
print_header_simple($txt->importquestions, '', $navigation);
|
||||||
// print tabs
|
// print tabs
|
||||||
|
|
|
@ -121,21 +121,21 @@ if ($mform->is_cancelled()){
|
||||||
$strupdatemodule = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $category->course))
|
$strupdatemodule = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $category->course))
|
||||||
? update_module_button($cm->id, $category->course, get_string('modulename', $cm->modname))
|
? update_module_button($cm->id, $category->course, get_string('modulename', $cm->modname))
|
||||||
: "";
|
: "";
|
||||||
$crumbs = array();
|
$navlinks = array();
|
||||||
$crumbs[] = array('name' => get_string('modulenameplural', $cm->modname), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$category->course", 'type' => 'activity');
|
$navlinks[] = array('name' => get_string('modulenameplural', $cm->modname), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/index.php?id=$category->course", 'type' => 'activity');
|
||||||
$crumbs[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}", 'type' => 'title');
|
$navlinks[] = array('name' => format_string($module->name), 'link' => "$CFG->wwwroot/mod/{$cm->modname}/view.php?cmid={$cm->id}", 'type' => 'title');
|
||||||
$crumbs[] = array('name' => get_string('editingquiz', 'quiz'), 'link' => $returnurl, 'type' => 'title');
|
$navlinks[] = array('name' => get_string('editingquiz', 'quiz'), 'link' => $returnurl, 'type' => 'title');
|
||||||
$crumbs[] = array('name' => $streditingquestion, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $streditingquestion, 'link' => '', 'type' => 'title');
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
print_header_simple($streditingquestion, '', $navigation, "", "", true, $strupdatemodule);
|
print_header_simple($streditingquestion, '', $navigation, "", "", true, $strupdatemodule);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$crumbs = array();
|
$navlinks = array();
|
||||||
$crumbs[] = array('name' => get_string('editquestions', "quiz"), 'link' => $returnurl, 'type' => 'title');
|
$navlinks[] = array('name' => get_string('editquestions', "quiz"), 'link' => $returnurl, 'type' => 'title');
|
||||||
$crumbs[] = array('name' => $streditingquestion, 'link' => '', 'type' => 'title');
|
$navlinks[] = array('name' => $streditingquestion, 'link' => '', 'type' => 'title');
|
||||||
$strediting = '<a href="edit.php?courseid='.$category->course.'">'.
|
$strediting = '<a href="edit.php?courseid='.$category->course.'">'.
|
||||||
get_string("editquestions", "quiz").'</a> -> '.$streditingquestion;
|
get_string("editquestions", "quiz").'</a> -> '.$streditingquestion;
|
||||||
$navigation = build_navigation($crumbs);
|
$navigation = build_navigation($navlinks);
|
||||||
print_header_simple($streditingquestion, '', $navigation);
|
print_header_simple($streditingquestion, '', $navigation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue