Skip to content

Commit

Permalink
Setting new variable $CFG->pagepath to give hints later on to the
Browse files Browse the repository at this point in the history
function page_id_and_class and also page_doc_link so that they can set
things more correctly for each different module being used.
  • Loading branch information
moodler committed Mar 1, 2006
1 parent 03c8c27 commit 1933c40
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions course/mod.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,15 +445,16 @@
$form->instancename = $instance->name;
$form->sesskey = !empty($USER->id) ? $USER->sesskey : '';

$strdeletecheck = get_string("deletecheck", "", "$form->fullmodulename");
$strdeletecheckfull = get_string("deletecheckfull", "", "$form->fullmodulename '$form->instancename'");
$strdeletecheck = get_string('deletecheck', '', $form->fullmodulename);
$strdeletecheckfull = get_string('deletecheckfull', '', "$form->fullmodulename '$form->instancename'");

print_header_simple("$strdeletecheck", "",
"$strdeletecheck");
$CFG->pagepath = 'mod/'.$module->name.'/delete';

print_simple_box_start("center", "60%", "#FFAAAA", 20, "noticebox");
print_header_simple($strdeletecheck, '', $strdeletecheck);

print_simple_box_start('center', '60%', '#FFAAAA', 20, 'noticebox');
print_heading($strdeletecheckfull);
include_once("mod_delete.html");
include_once('mod_delete.html');
print_simple_box_end();
print_footer($course);

Expand Down Expand Up @@ -510,9 +511,11 @@
$pageheading = get_string("updatinga", "moodle", $fullmodulename);
}
$strnav = "<a href=\"$CFG->wwwroot/mod/$module->name/view.php?id=$cm->id\">".format_string($form->name,true)."</a> ->";
$CFG->pagepath = 'mod/'.$module->name.'/mod';

} else if (isset_param('duplicate') and confirm_sesskey()) { // value = course module


if (! $cm = get_record("course_modules", "id", $duplicate)) {
error("This course module doesn't exist");
}
Expand Down Expand Up @@ -564,6 +567,8 @@
}
$strnav = "<a href=\"$CFG->wwwroot/mod/$module->name/view.php?id=$cm->id\">$form->name</a> ->";

$CFG->pagepath = 'mod/'.$module->name.'/mod';


} else if (isset_param('add') and confirm_sesskey()) {

Expand Down Expand Up @@ -611,6 +616,8 @@
}
$strnav = '';

$CFG->pagepath = 'mod/'.$module->name.'/mod';

} else {
error("No action was specfied");
}
Expand Down

0 comments on commit 1933c40

Please sign in to comment.