mirror of
https://github.com/moodle/moodle.git
synced 2025-04-26 19:03:38 +02:00
MDL-14679 cleaned up mod.php
This commit is contained in:
parent
caa65d9b59
commit
681cf96530
@ -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);
|
||||
|
@ -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>
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user