Fixed problem with courseid not being passed.

This commit is contained in:
thepurpleblob
2005-09-16 10:02:42 +00:00
parent d40177d7a2
commit 1a87ac6a6c
+8 -2
View File
@@ -5,16 +5,22 @@
require_once("locallib.php");
require_variable($category);
$courseid = required_param('course',PARAM_INT);
optional_variable($format);
if (! $category = get_record("quiz_categories", "id", $category)) {
error("This wasn't a valid category!");
}
if (! $course = get_record("course", "id", $category->course)) {
if (! $categorycourse = get_record("course", "id", $category->course)) {
error("This category doesn't belong to a valid course!");
}
if (! $course = get_record("course", "id", $courseid )) {
error("Course does not exist!");
}
require_login($course->id, false);
if (!isteacher($course->id)) {
@@ -100,7 +106,7 @@
print_heading_with_help($strexportquestions, "export", "quiz");
print_simple_box_start("center");
echo "<form enctype=\"multipart/form-data\" method=\"post\" action=\"export.php\">";
echo "<form enctype=\"multipart/form-data\" method=\"post\" action=\"export.php?course=$courseid\">";
echo "<table cellpadding=\"5\">";
echo "<tr><td align=\"right\">";