From a9b16aff8ded767da247fa7ac107e8a63c2dd033 Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Fri, 28 Apr 2006 09:36:17 +0000 Subject: [PATCH] Now ignore hidden questions. Bug #4988 --- question/format.php | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/question/format.php b/question/format.php index cc737d6881..90cf4c9b20 100644 --- a/question/format.php +++ b/question/format.php @@ -297,14 +297,21 @@ class qformat_default { // iterate through questions foreach($questions as $question) { - $count++; - $qtype = $question->qtype; - // ignore random questiond - if ($qtype!=RANDOM) { - echo "

$count. ".stripslashes($question->questiontext)."

"; - $expout .= $this->writequestion( $question ) . "\n"; - } - } + // do not export hidden questions + if (!empty($question->hidden)) { + continue; + } + + // do not export random questions + if ($question->qtype==RANDOM) { + continue; + } + + // export the question displaying message + $count++; + echo "

$count. ".stripslashes($question->questiontext)."

"; + $expout .= $this->writequestion( $question ) . "\n"; + } // final pre-process on exported data $expout = $this->presave_process( $expout ); -- 2.39.5