}); }); </script> <link rel="stylesheet" type="text/css" href="../css/body.css" /> <link rel="stylesheet" href="../css/start.css" type="text/css" /> <link rel="stylesheet" href="../css/mapping_form.css" type="text/css" /> <style> .objheading {font-size:150%; font-weight:bold; color:#316AC5; padding-top:10px; border-top:1px solid #C0C0C0} </style> </head> <body> <div id="maincontent"> <?php if (isset($_POST['submit'])) { // Write out curriculum mapping. save_objective_mappings($mysqli, $_POST['objective_modules'], $_POST['paperID'], $_POST['questionID']); ?> <script> window.opener.location = window.opener.location; window.close(); </script> <?php } else { display_q($configObject, $_GET['q_id'], $mysqli); echo "<div id=\"obj_form\">\n"; echo "<form method=\"post\">"; echo render_objectives_mapping_form($mysqli, $paperID, $string); echo "<br />"; echo "<input type=\"hidden\" name=\"paperID\" value=\"{$paperID}\" />\n"; echo "<input type=\"hidden\" name=\"questionID\" value=\"{$_GET['q_id']}\" />\n"; echo "<div style=\"text-align:center; width:100%\"><input type=\"submit\" name=\"submit\" value=\"" . $string['save'] . "\" class=\"ok\" /><input class=\"cancel\" id=\"cancel\" type=\"button\" value=\"" . $string['cancel'] . "\" /></div>";
$correct_option = $i; break; } $i++; } $question = $question->convert_to_mcq($correct_option); } // Insert into Papers if (isset($_POST['addpaper'])) { insert_into_papers($paper_id, $question->id, $mysqli); $logger->track_change('Paper', $paper_id, $userObject->get_user_ID(), '', $question->id, 'Add Question'); } save_keywords($question, $userObject->get_user_ID(), true, $mysqli, $string); if (isset($_POST['objective_modules'])) { // Write out curriculum mapping. save_objective_mappings($mysqli, $_POST['objective_modules'], $paper_id, $question->id); } // Stuff not to do on correction/limited save if (!isset($_POST['submit']) or $_POST['submit'] != $string['correct']) { // Save review comments and responses if (isset($_POST['comment_ids']) and isset($_POST['actions']) and isset($_POST['responses'])) { save_external_responses($mysqli, $question, $_POST['comment_ids'], $_POST['actions'], $_POST['responses'], $paper_id); } // For likert, save the scale to a state to ease creation of multiple questions with same scale if ($mode == 'Add' and $question->get_type() == 'likert') { $scale_type = $question->get_scale_type(); $stateutil->setState($userObject->get_user_ID(), 'likert_format', $scale_type, '/question/edit/index.php', $mysqli); if ($scale_type == 'custom') { $stateutil->setState($userObject->get_user_ID(), 'likert_format', implode('|', $question->get_all_custom_scales()), '/question/edit/index.php', $mysqli); } }