Another bunch of missing courseid parameters.

Deleting questions was not working.
This commit is contained in:
thepurpleblob 2006-03-03 15:20:48 +00:00
parent 7cbc59192f
commit dcd51df25e
2 changed files with 6 additions and 4 deletions

View File

@ -57,7 +57,8 @@ function question_category_form($course, $current, $recurse=1, $showhidden=false
notify("Could not find any question categories!");
return false; // Something is really wrong
}
$categories = add_indented_names($categories);
$categories = add_indented_names( $categories );
foreach ($categories as $key => $category) {
if ($catcourse = get_record("course", "id", $category->course)) {
if ($category->publish && $category->course != $course->id) {
@ -222,6 +223,7 @@ function question_list($course, $categoryid, $quizid,
echo '<form method="post" action="edit.php">';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo "<input type=\"hidden\" name=\"courseid\" value=\"$course->id\" />";
print_simple_box_start('center', '100%', '#ffffff', 0);
echo '<table id="categoryquestions" cellspacing="0"><tr>';
$actionwidth = $canedit ? 95 : 70;

View File

@ -72,7 +72,7 @@
}
}
}
redirect("edit.php");
redirect("edit.php?courseid=$course->id");
} else {
error("Confirmation string was incorrect");
}
@ -97,7 +97,7 @@
}
}
if (!$questionlist) { // no questions were selected
redirect('edit.php');
redirect("edit.php?courseid=$course->id");
}
$questionlist = rtrim($questionlist, ',');
@ -108,7 +108,7 @@
print_header_simple($streditingquestions, '',
"$streditingquestions");
notice_yesno(get_string("deletequestionscheck", "quiz", $questionnames),
"edit.php?sesskey=$USER->sesskey&amp;deleteselected=$questionlist&amp;confirm=".md5($questionlist), "edit.php");
"edit.php?courseid=$course->id&amp;sesskey=$USER->sesskey&amp;deleteselected=$questionlist&amp;confirm=".md5($questionlist), "edit.php");
print_footer($course);
exit;
}