MDL-14679 cleaned up mod.php

This commit is contained in:
skodak 2008-06-01 20:15:50 +00:00
parent caa65d9b59
commit 681cf96530
3 changed files with 1 additions and 16 deletions

View File

@ -20,7 +20,6 @@
$delete = optional_param('delete', 0, PARAM_INT);
$course = optional_param('course', 0, PARAM_INT);
$groupmode = optional_param('groupmode', -1, PARAM_INT);
$duplicate = optional_param('duplicate', 0, PARAM_INT);
$cancel = optional_param('cancel', 0, PARAM_BOOL);
$cancelcopy = optional_param('cancelcopy', 0, PARAM_BOOL);
$confirm = optional_param('confirm', 0, PARAM_BOOL);

View File

@ -1,14 +0,0 @@
<form id="form" method="post" action="<?php echo "$CFG->wwwroot/course/mod.php" ?>">
<input type="hidden" name="mode" value="delete" />
<input type="hidden" name="section" value="<?php p($form->section) ?>" />
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
<input type="hidden" name="sesskey" value="<?php p($form->sesskey) ?>" />
<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
<input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
<input type="submit" value=" <?php print_string("yes")?> " />
<input type="button" value=" <?php print_string("no")?> " onclick="javascript:history.go(-1);" />
</form>

View File

@ -186,7 +186,7 @@
if ($return && !empty($cm->id)){
redirect("$CFG->wwwroot/mod/$module->name/view.php?id=$cm->id");
} else {
redirect("view.php?id=$course->id#section-".$cw->section);
redirect("$CFG->wwwroot/course/view.php?id=$course->id#section-".$cw->section);
}
} else if ($fromform = $mform->get_data()) {
if (empty($fromform->coursemodule)) { //add