$old_q_media_height = $q_media_height; $old_settings = $settings; $old_option_text[] = $option_text; if (trim($o_media != '')) { $old_o_media[] = $o_media; } $old_marks = $marks_correct; if (!empty($option_text) or !empty($correct) and in_array($q_type, array('labelling', 'hotspot', 'area', 'true_false')) or in_array($q_type, array('info', 'likert', 'flash', 'enhancedcalc'))) { $options++; } } $result->close(); if (!$properties->get_summative_lock()) { $q_mod_check = array_unique($q_mod_check); if (count($q_mod_check) > 0) { $q_mod_found = QuestionUtils::multi_get_modules($q_mod_check, $mysqli); $paper_modules = Paper_utils::get_modules($paperID, $mysqli); foreach ($q_mod_check as $tmp_q_id) { foreach ($paper_modules as $p_mod_id => $mod) { if (!isset($q_mod_found[$tmp_q_id][$p_mod_id])) { QuestionUtils::add_modules($paper_modules, $tmp_q_id, $mysqli); // Question is not on a module that the paper is assigned to so add. break; } } } } } if ($row_no > 0) { $temp_array[$row_no]['options'] = $options; $temp_array[$row_no]['o_media'] = $old_o_media;