*** empty log message ***

This commit is contained in:
gustav_delius
2006-02-28 09:36:31 +00:00
parent 4f48fb42af
commit 062f1125cc
6 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -29,7 +29,7 @@
}
if (! $category = get_record("quiz_categories", "id", $categoryid)) {
$category = quiz_get_default_category($courseid);
$category = get_default_question_category($courseid);
}
if (! $categorycourse = get_record("course", "id", $category->course)) {
+1 -1
View File
@@ -63,7 +63,7 @@ class quiz_default_format {
$question->stamp = make_unique_id_code(); // Set the unique code (not to be changed)
$question->version = 1; // Original version of this question
if (!$question->id = insert_record("quiz_questions", $question)) {
if (!$question->id = insert_record("question", $question)) {
error("Could not insert new question!");
}
+5 -5
View File
@@ -121,7 +121,7 @@ class quiz_format_aon extends quiz_default_format {
$questionids = implode(',', $this->questionids);
if (!$shortanswers = get_records_select("quiz_questions",
if (!$shortanswers = get_records_select("question",
"id IN ($questionids) AND qtype = ".SHORTANSWER,
"", "id,qtype")) {
return true;
@@ -155,7 +155,7 @@ class quiz_format_aon extends quiz_default_format {
$count = count($shortanswerids);
$extracts = get_records_sql("SELECT q.questiontext, a.answer
FROM {$CFG->prefix}quiz_questions q,
FROM {$CFG->prefix}question q,
{$CFG->prefix}quiz_shortanswer sa,
{$CFG->prefix}quiz_answers a
WHERE q.id in ($extractids)
@@ -172,7 +172,7 @@ class quiz_format_aon extends quiz_default_format {
$question->version = 1; // Original version of this question
$question->parent = 0;
if (!$question->id = insert_record("quiz_questions", $question)) {
if (!$question->id = insert_record("question", $question)) {
error("Could not insert new question!");
}
@@ -193,7 +193,7 @@ class quiz_format_aon extends quiz_default_format {
/// Delete the old short-answer questions
execute_sql("DELETE FROM {$CFG->prefix}quiz_questions WHERE id IN ($extractids)", false);
execute_sql("DELETE FROM {$CFG->prefix}question WHERE id IN ($extractids)", false);
execute_sql("DELETE FROM {$CFG->prefix}quiz_shortanswer WHERE question IN ($extractids)", false);
execute_sql("DELETE FROM {$CFG->prefix}quiz_answers WHERE question IN ($extractids)", false);
@@ -201,7 +201,7 @@ class quiz_format_aon extends quiz_default_format {
if ($count) { /// Delete the remaining ones
foreach ($shortanswerids as $shortanswerid) {
delete_records("quiz_questions", "id", $shortanswerid);
delete_records("question", "id", $shortanswerid);
delete_records("quiz_shortanswer", "question", $shortanswerid);
delete_records("quiz_answers", "question", $shortanswerid);
}
+1 -1
View File
@@ -243,7 +243,7 @@ class quiz_format_coursetestmanager extends quiz_default_format {
$question->category = $this->category->id;
$question->stamp = make_unique_id_code(); // Set the unique code (not to be changed)
$question->version = 1; // Original version of this question
if (!$question->id = insert_record("quiz_questions", $question)) {
if (!$question->id = insert_record("question", $question)) {
error("Could not insert new question!");
}
$this->questionids[] = $question->id;
+1 -1
View File
@@ -255,7 +255,7 @@ function handle_questions_media(&$questions, $path, $courseid) {
}
// get the questions (from database) in this category
// $questions = get_records("quiz_questions","category",$this->category->id);
// $questions = get_records("question","category",$this->category->id);
$questions = get_questions_category( $this->category );
notify("Exporting ".count($questions)." questions.");
+1 -1
View File
@@ -26,7 +26,7 @@
if (! $category = get_record("quiz_categories", "id", $categoryid)) {
// if no valid category was given, use the default category
if ($courseid) {
$category = quiz_get_default_category($courseid);
$category = get_default_question_category($courseid);
} else {
error("No category specified");
}