From fea0a07c2bc952364a7fbc6d88fc3f427ab3e507 Mon Sep 17 00:00:00 2001 From: Eric Marguin Date: Mon, 18 Jun 2007 22:46:16 +0200 Subject: [PATCH] [svn r12645] fix some bugs when copying quiz from a course to another --- main/coursecopy/classes/Course.class.php | 4 +-- .../classes/CourseSelectForm.class.php | 28 ++++++++++++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/main/coursecopy/classes/Course.class.php b/main/coursecopy/classes/Course.class.php index 0a66ea927d..9dc0eeeb39 100644 --- a/main/coursecopy/classes/Course.class.php +++ b/main/coursecopy/classes/Course.class.php @@ -1,4 +1,4 @@ -has_item($resource_to_check)) { diff --git a/main/coursecopy/classes/CourseSelectForm.class.php b/main/coursecopy/classes/CourseSelectForm.class.php index d15a7fdcfe..249138e5a9 100644 --- a/main/coursecopy/classes/CourseSelectForm.class.php +++ b/main/coursecopy/classes/CourseSelectForm.class.php @@ -1,5 +1,5 @@ '; + + CourseSelectForm :: display_hidden_quiz_questions($course); echo ''; echo '
'; } + + + function display_hidden_quiz_questions($course) + { + + foreach ($course->resources as $type => $resources) + { + if (count($resources) > 0) + { + switch ($type) + { + case RESOURCE_QUIZQUESTION: + foreach ($resources as $id => $resource) + { + echo ''; + } + break; + + } + } + } + } + + /** * Get the posted course * @return course The course-object with all resources selected by the user