<?php require_once '/var/www/config.php'; sro('/Includes/mysql.php'); sro('/Includes/session.php'); sro('/Includes/functions.php'); sro('/PHP5/lib/PHPLang/make_example.php'); sro('/PHP5/lib/PHPLang/display.php'); sro('/PHP5/quiz/common.php'); sro('/PHP5/quiz/quiz_types.php'); global $quiz_types; const QUIZ_MAX_RECURSE = 10; $cquiz = CURRENTQUIZ(); if (!$cquiz) { exit("session expired"); } $type = safe_get($cquiz->type(), $quiz_types); if (is_array($type)) { $type = new MultiCompatQuizType($type); } if (!$type instanceof QuizType) { exit("bad quiz type"); } if ($s = $cquiz->selections()) { $type->merge_selections($cquiz->selections()); } $idx = NULL; $i = 0; $quiz = NULL; while ($idx === NULL || ($quiz = $type->get_option($idx)) === NULL) { if (!$cquiz->options_n() or $cquiz->options_n() === true) {
<?php require_once '/var/www/config.php'; sro('/Includes/mysql.php'); sro('/Includes/session.php'); sro('/Includes/functions.php'); sro('/PHP5/lib/PHPLang/display.php'); sro('/PHP5/quiz/common.php'); $c = CURRENTQUIZ(); if (!$c) { die("Session expired"); } if ($c->finish()) { print "success"; } else { print "Could not complete quiz"; }