A couple of changes to Pierre's calculated question import/export
export_process and import_process flags now apply to all questions and what looked like a development print_r has been commented out.
This commit is contained in:
@@ -22,9 +22,10 @@ define('DEFAULT_QUESTIONS_PER_PAGE', 20);
|
||||
* @param int $category category number
|
||||
* @param bool $noparent if true only questions with NO parent will be selected
|
||||
* @param bool $recurse include subdirectories
|
||||
* @param bool $export set true if this is called by questionbank export
|
||||
* @author added by Howard Miller June 2004
|
||||
*/
|
||||
function get_questions_category( $category, $noparent=false, $recurse=true ) {
|
||||
function get_questions_category( $category, $noparent=false, $recurse=true, $export=true ) {
|
||||
|
||||
global $QTYPES;
|
||||
|
||||
@@ -51,6 +52,7 @@ function get_questions_category( $category, $noparent=false, $recurse=true ) {
|
||||
// iterate through questions, getting stuff we need
|
||||
foreach($questions as $question) {
|
||||
$questiontype = $QTYPES[$question->qtype];
|
||||
$question->export_process = $export;
|
||||
$questiontype->get_question_options( $question );
|
||||
$qresults[] = $question;
|
||||
}
|
||||
@@ -394,4 +396,4 @@ function question_list($course, $categoryid, $quizid=0,
|
||||
echo "</form>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user