Skip to content
Browse files

Now ignores random questions when exporting.

  • Loading branch information...
1 parent 9c69351 commit 87345478a5d9ccb00f6d0745eb3bb13c5e23eda0 thepurpleblob committed Mar 3, 2005
Showing with 7 additions and 3 deletions.
  1. +7 −3 mod/quiz/format.php
View
10 mod/quiz/format.php
@@ -191,7 +191,7 @@ function exportprocess($filename) {
// $questions = get_records("quiz_questions","category",$this->category->id);
$questions = get_questions_category( $this->category );
- notify("Exporting ".count($questions)." questions.");
+ notify("Exporting questions.");
if (!count($questions)) {
return true;
}
@@ -204,8 +204,12 @@ function exportprocess($filename) {
// iterate through questions
foreach($questions as $question) {
$count++;
- echo "<hr /><p><b>$count</b>. ".stripslashes($question->questiontext)."</p>";
- $expout .= $this->writequestion( $question ) . "\n";
+ $qtype = $question->qtype;
+ // ignore random questiond
+ if ($qtype!=RANDOM) {
+ echo "<hr /><p><b>$count</b>. ".stripslashes($question->questiontext)."</p>";
+ $expout .= $this->writequestion( $question ) . "\n";
+ }
}
// final pre-process on exported data

0 comments on commit 8734547

Please sign in to comment.
Something went wrong with that request. Please try again.