Update of /cvsroot/stack/stack-1-0
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16820
Modified Files:
Tag: frontend_dev
select_quiz.php
Log Message:
Moved select quiz html into separate file
Index: select_quiz.php
===================================================================
RCS file: /cvsroot/stack/stack-1-0/select_quiz.php,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -C2 -d -r1.1.4.3 -r1.1.4.4
*** select_quiz.php 16 Jun 2005 11:44:44 -0000 1.1.4.3
--- select_quiz.php 16 Jun 2005 11:58:30 -0000 1.1.4.4
***************
*** 36,39 ****
--- 36,40 ----
$default_action = '';
include($stack_root.'/frontend_general/process_input.php');
+ include($stack_root.'/frontend_general/front_end_display.php');
//////////////////////////////////////////////////////////////
***************
*** 53,102 ****
if ('welcome' == $action) {
! echo "<h1>Welcome</h1> <p>Welcome to STACK, {$user['firstname']} {$user['lastname']}.</p>";
$action = 'choose_quiz';
}
if ('error' == $action) {
! echo "There was an error with the login or registration";
! echo $error;
}
if ('choose_quiz' == $action) {
- require_once("{$stack_root}/html/quizjava.html");
- echo "<h1>Please choose a quiz to try</h1>";
-
$quiz_store = stack_db_quiz_get();
!
! if (is_array($quiz_store)) {
! echo "<p>\n<form name='quizform' action='quiz.php' method='POST'>
! <input type='hidden' name='quizID' value='-1'>
! <input type='hidden' name='action' value='continue_quiz'>";
!
! echo "\n<table cellpadding='2'>\n";
! echo "\n<tr><th>{$stackQuiz['quizName']['descript']}</th><th>{$stackQuiz['quizDescription']['descript']}</th><th>Last mark (%)</th></tr>";
! foreach ($quiz_store as $qs => $quiz)
! {
! $qname = $quiz['quizName'];
! $qID = $quiz['quizID'];
! $mark = '-';
! if (is_array($user)) {
! if (array_key_exists('id',$user)) {
! $userinfo = stack_db_quiz_quizattempt_getlast($qID,$user['id']);
! if (is_array($userinfo)) {
! if (NULL != $userinfo['mark']) {
! $mark = round(100*$userinfo['mark']/$userinfo['maxmark'],2);
! }
! }
! }
! }
! echo "<tr><td><a href=\"javascript:takeaction('continue_quiz','$qID');\">{$qname}</a></td>\n";
! echo "<td>".$quiz['quizDescription']."</td><td align='center'>$mark</td></tr>\n";
! }
! echo "\n</table>\n</form>\n</p>";
!
! } else {
! echo "<p>You have no quizzes available to try.</p>";
! }
! }
include('html/pagefoot.php');
--- 54,69 ----
if ('welcome' == $action) {
! stack_welcome_screen($user);
$action = 'choose_quiz';
}
if ('error' == $action) {
! stack_login_error_screen($error);
}
if ('choose_quiz' == $action) {
$quiz_store = stack_db_quiz_get();
! stack_select_quiz_screen($quiz_store, $user);
! }
include('html/pagefoot.php');
|