From: Chris S. <san...@us...> - 2005-08-16 15:51:53
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18518/scripts Modified Files: Tag: development_xmlrqp stackAuthor.php stackDatabase.php stackQuestion.php stackUtility.php Log Message: Index: stackDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackDatabase.php,v retrieving revision 1.34.2.3 retrieving revision 1.34.2.4 diff -C2 -d -r1.34.2.3 -r1.34.2.4 *** stackDatabase.php 15 Aug 2005 16:09:23 -0000 1.34.2.3 --- stackDatabase.php 16 Aug 2005 15:51:35 -0000 1.34.2.4 *************** *** 1,3389 **** <?php - - /** - * Functions to access the MySQL Database. This should allow other - * databases to be used without too much pain. - [...5064 lines suppressed...] if (!$db) { echo "<b>Could not connet to the MYSQL database '$stackdb' (on host '$host', as user '$user'). The attempt to connect generated the MYSQL Error ".mysql_errno().": ".mysql_error()."</b>"; die(); } $result = mysql_query($query); if(0 == $result) { include('install/stackUpdateDatabase.php'); die(); } } /***** * Check if updates are necessary **/ stack_db_database_update(); ?> Index: stackAuthor.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackAuthor.php,v retrieving revision 1.29.2.7 retrieving revision 1.29.2.8 diff -C2 -d -r1.29.2.7 -r1.29.2.8 *** stackAuthor.php 16 Aug 2005 14:00:59 -0000 1.29.2.7 --- stackAuthor.php 16 Aug 2005 15:51:35 -0000 1.29.2.8 *************** *** 719,725 **** $stimestr = ''; if ('' != $quiz[$key]) { ! $stimestr = strftime('%c',$quiz[$key]); } ! echo "<td><input type=\"text\" name=\"quiz[$key]\" size=\"35\" value=\"$stimestr\" alt=\"$key\" /></td><td>".$err.'</td></tr>'; } else { echo "<td><input type=\"text\" name=\"quiz[$key]\" size=\"35\" value=\"".nsf($quiz,$key)."\" alt=\"$key\" /></td><td>".$err.'</td></tr>'; --- 719,725 ---- $stimestr = ''; if ('' != $quiz[$key]) { ! $stimestr = stack_time_display($quiz[$key]); } ! echo "<td><input type=\"text\" name=\"quiz[quizDueDate_text]\" size=\"35\" value=\"$stimestr\" alt=\"$key\" /></td><td>".$err.'</td></tr>'; } else { echo "<td><input type=\"text\" name=\"quiz[$key]\" size=\"35\" value=\"".nsf($quiz,$key)."\" alt=\"$key\" /></td><td>".$err.'</td></tr>'; *************** *** 912,917 **** // (5) Sort out any time stamp for the due date. ! if ('' != $quiz['quizDueDate']) { ! $quiz['quizDueDate'] = strtotime($quiz['quizDueDate']); } --- 912,923 ---- // (5) Sort out any time stamp for the due date. ! if ('' != $quiz['quizDueDate_text']) { ! $duedate = strtotime($quiz['quizDueDate_text']); ! if ($duedate > -1) { ! $quiz['quizDueDate'] = $duedate; ! } else { ! $errors['quiz']['quizDueDate'] = '<br />Could not decode your quiz due date of '.$quiz['quizDueDate_text']; ! } ! unset($quiz['quizDueDate_text']); } Index: stackUtility.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackUtility.php,v retrieving revision 1.30.2.4 retrieving revision 1.30.2.5 diff -C2 -d -r1.30.2.4 -r1.30.2.5 *** stackUtility.php 16 Aug 2005 11:22:51 -0000 1.30.2.4 --- stackUtility.php 16 Aug 2005 15:51:35 -0000 1.30.2.5 *************** *** 928,931 **** --- 928,941 ---- } + /** + * Generates a string to display a time, form a Unix time stamp. + * + * @return float + */ + function stack_time_display($timestamp) { + //return date("F j, Y, g:i a",$timestamp); + //return date("r",$timestamp); + return date("D, j M Y H:i:s ",$timestamp); + } Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.30.2.10 retrieving revision 1.30.2.11 diff -C2 -d -r1.30.2.10 -r1.30.2.11 *** stackQuestion.php 16 Aug 2005 15:24:16 -0000 1.30.2.10 --- stackQuestion.php 16 Aug 2005 15:51:35 -0000 1.30.2.11 *************** *** 114,120 **** // 'Show solution'; ! $stackOptions['QuizMode']['type']='list'; ! $stackOptions['QuizMode']['values']=array('Practice','Assessment','Strict'); ! $stackOptions['QuizMode']['default']='On request'; //<PDK> sqlToSchemaMapping array maps basic SQL data types used in STAKCK to their respective XML schema data types --- 114,120 ---- // 'Show solution'; ! $stackOptions['QuizMode']['type'] = 'list'; ! $stackOptions['QuizMode']['values'] = array('Practice','Assessment','Strict'); ! $stackOptions['QuizMode']['default'] = 'Practice'; //<PDK> sqlToSchemaMapping array maps basic SQL data types used in STAKCK to their respective XML schema data types |