echo "<table border=\"0\" style=\"padding-bottom:5px; width:100%; color:#1E3287\"><tr><td><nobr> " . strtoupper(substr($moduleid, 0, 1)) . "</nobr></td><td style=\"width:98%\"><hr noshade=\"noshade\" style=\"border:0px; height:1px; color:#E5E5E5; background-color:#E5E5E5; width:100%\" /></td></tr></table>\n"; } if (isset($student_mod[$idMod]) and $student_mod[$idMod]['attempt'] == $id) { echo "<div class=\"r2\" id=\"divmod" . $id . "_" . $loop . "\"><input type=\"checkbox\" onclick=\"toggle('divmod" . $id . "_" . $loop . "')\" name=\"mod" . $id . "_" . $loop . "\" id=\"mod" . $id . "_" . $loop . "\" value=\"" . $idMod . "\" checked /> <label for=\"mod" . $id . "_" . $loop . "\">{$moduleid}: {$fullname}</label></div>\n"; } else { echo "<div class=\"r1\" id=\"divmod" . $id . "_" . $loop . "\"><input type=\"checkbox\" onclick=\"toggle('divmod" . $id . "_" . $loop . "')\" name=\"mod" . $id . "_" . $loop . "\" id=\"mod" . $id . "_" . $loop . "\" value=\"" . $idMod . "\" /> <label for=\"mod" . $id . "_" . $loop . "\">{$moduleid}: {$fullname}</label></div>\n"; } $loop++; $old_letter = strtoupper(substr($moduleid, 0, 1)); } echo "</div>\n</div>\n"; } if (isset($_POST['submit'])) { for ($attempt = 1; $attempt <= 3; $attempt++) { // Clear the student of all modules. UserUtils::clear_student_modules_by_userID($_POST['userID'], $_POST['session'], $attempt, $mysqli); // Insert a record for each module. for ($i = 0; $i <= $_POST['mod_count']; $i++) { if (isset($_POST['mod' . $attempt . '_' . $i]) and $_POST['mod' . $attempt . '_' . $i] != '') { UserUtils::add_student_to_module($_POST['userID'], $_POST['mod' . $attempt . '_' . $i], $attempt, $_POST['session'], $mysqli, 0); } } } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="content-type" content="text/html;charset=<?php echo $configObject->get('cfg_page_charset'); ?>