From: Simon H. <sim...@us...> - 2010-09-30 16:56:53
|
Update of /cvsroot/stack/stack-dev In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv28438 Modified Files: Readme.txt styles.css index.php Log Message: Merging 2.2 branch (with some additional fixes to ensure seamless updating for version lines) Index: styles.css =================================================================== RCS file: /cvsroot/stack/stack-dev/styles.css,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** styles.css 27 Jan 2010 18:04:31 -0000 1.41 --- styles.css 30 Sep 2010 16:56:15 -0000 1.42 *************** *** 32,35 **** --- 32,48 ---- /** Generic classes -------------------------------- */ + body, table, td, th, li { + font-family:Arial,Verdana,Helvetica,sans-serif; + padding: 5px; + } + + a { + text-decoration: none; + } + + a:hover { + text-decoration: underline; + } + img{ border:0; *************** *** 222,226 **** padding: 0.4em; margin-bottom: 0.5em; ! margin-left: 140px; } h3.section{ --- 235,239 ---- padding: 0.4em; margin-bottom: 0.5em; ! margin-left: 180px; } h3.section{ *************** *** 258,273 **** } div.PRTTrue{ border: 1px solid #DDFFBA; padding: 0.25em; - margin-top: 1em; background-color: #efe; } div.PRTFalse{ border: 1px dotted #FFA19E; - padding: 0.25em; - margin-top: 1em; background-color: #fee; } --- 271,291 ---- } + div.PRTTrue, div.PRTFalse { + width: 48%; + padding: 0.25em; + margin-top: 1em; + } + div.PRTTrue{ border: 1px solid #DDFFBA; padding: 0.25em; background-color: #efe; + float:left; } div.PRTFalse{ border: 1px dotted #FFA19E; background-color: #fee; + float:right; } *************** *** 277,281 **** text-align: left; width: 95%; ! background-color: #fff; } --- 295,310 ---- text-align: left; width: 95%; ! border: 0; ! } ! ! .interactionElementsTable td, .interactionElementsTable th { ! border-color: #000000; ! border-width: 0 0 0 1px; ! padding: 3px; ! } ! ! .IElabel { ! border:0 none; ! text-align: right; } *************** *** 320,323 **** --- 349,367 ---- } + div.authorMath { + background-color:#FFFFFF; + border:1px dashed; + clear:left; + float:none; + padding:0.2em; + width:505px; + display: none; + } + + div#authoringVersionID { + float:right; + font-size:small; + } + div#authoringControls { background-color:#EEEEEE; *************** *** 325,337 **** padding:5px; position:fixed; ! width:120px; ! left:20px; } div#authoringControls input { ! width: 110px; margin: 1px 5px; } /* Tables --------------------------------------------------------------*/ --- 369,384 ---- padding:5px; position:fixed; ! width:160px; } div#authoringControls input { ! width: 100px; margin: 1px 5px; } + div#authoringControls ul { + + } + /* Tables --------------------------------------------------------------*/ *************** *** 350,353 **** --- 397,409 ---- } + #questionListTable { + border-collapse: collapse; + border-spacing: 0; + } + + #questionListTable th { + background-image: url('pix/gradient.jpg') + } + .reportTable{ text-align: left; *************** *** 376,379 **** --- 432,439 ---- } + td { + vertical-align: top; + } + /* Lists ------------------------------------------------------------------*/ Index: Readme.txt =================================================================== RCS file: /cvsroot/stack/stack-dev/Readme.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Readme.txt 3 Nov 2008 16:34:45 -0000 1.4 --- Readme.txt 30 Sep 2010 16:56:15 -0000 1.5 *************** *** 77,79 **** ------------- ! 2.0: 3rd October 2007, initial Alpha release. --- 77,79 ---- ------------- ! 2.0: 3rd October 2007, initial Alpha release. \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/stack/stack-dev/index.php,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** index.php 5 Feb 2010 15:52:03 -0000 1.42 --- index.php 30 Sep 2010 16:56:15 -0000 1.43 *************** *** 21,24 **** --- 21,36 ---- session_start(); + /*echo "<pre>"; + print_r($_SESSION); + echo "-------------------"; + print_r($_POST); + echo "-------------------"; + print_r($_GET); + echo "</pre>"; + + unset($_SESSION['S_item']); + unset($_SESSION['authorItem']); + */ + $configFile = 'config.php'; if(!file_exists($configFile)) *************** *** 81,85 **** foreach($selected as $name) { ! $db->removeItem($name); } $msg = '<p>'.get_string('FE_qDeleted','stack').'</p>'; --- 93,97 ---- foreach($selected as $name) { ! $db->removeLineContainingItem($name); } $msg = '<p>'.get_string('FE_qDeleted','stack').'</p>'; *************** *** 181,199 **** <body> ! <div class="section80"> ! <h3 class="section">Administrate STACK</h3> ! <ul class="horizontal"> ! <li><a href="lib/ui/authorTest.php"><?php echo get_string('FE_index_New','stack','') ?></a></li> ! <li><a href="lib/ui/questionImporter.php"><?php echo get_string('FE_index_Import','stack','') ?></a></li> ! <li><a href="chat.php"><?php echo get_string('FE_index_Chat','stack','') ?></a></li> ! <li><a href="lib/ui/search.php"><?php echo get_string('FE_index_search','stack','') ?></a></li> ! <li><a href="lib/ui/report.php"><?php echo get_string('FE_index_Reports','stack','') ?></a></li> ! <li><a href="lib/ui/OptionsEdit.php"><?php echo get_string('FE_index_Options','stack','') ?></a></li> ! <li><a href="http://stack.bham.ac.uk/wiki/"><?php echo get_string('FE_index_Docs','stack','') ?></a></li> ! <li><a href="testsuite.php"><?php echo get_string('FE_index_Test','stack','') ?></a></li> ! <li><a href="<?php echo $hintroot;?>"><?php echo get_string('FE_index_Hints','stack','') ?></a></li> ! <li><a href="index.php?action=logout"><?php echo get_string('FE_index_Logout','stack','') ?></a></li> ! </ul> ! </div> <?php --- 193,206 ---- <body> ! <a href="lib/ui/authorTest.php"><?php echo get_string('FE_index_New','stack','') ?></a> | ! <a href="lib/ui/questionImporter.php"><?php echo get_string('FE_index_Import','stack','') ?></a> | ! <a href="chat.php"><?php echo get_string('FE_index_Chat','stack','') ?></a> | ! <a href="lib/ui/search.php"><?php echo get_string('FE_index_search','stack','') ?></a> | ! <a href="lib/ui/report.php"><?php echo get_string('FE_index_Reports','stack','') ?></a> | ! <a href="lib/ui/OptionsEdit.php"><?php echo get_string('FE_index_Options','stack','') ?></a> | ! <a href="http://stack.bham.ac.uk/wiki/"><?php echo get_string('FE_index_Docs','stack','') ?></a> | ! <a href="testsuite.php"><?php echo get_string('FE_index_Test','stack','') ?></a> | ! <a href="<?php echo $hintroot;?>"><?php echo get_string('FE_index_Hints','stack','') ?></a> | ! <a href="index.php?action=logout"><?php echo get_string('FE_index_Logout','stack','') ?></a> <?php *************** *** 243,296 **** <?php echo '<h3>'.get_string('stackQuestion_filterQuestions','stack','').'</h3>'; ! echo '<p>'.get_string('stackQuestion_filterSearch','stack','').'</p>'; $db = new StackDBItem(); $db->connect(); ! // link all keywords ! $kwdb = new StackDBKeywords(); ! $kwdb->connect(); ! echo '<p>'; ! $keywords = $kwdb->getAllKeywords(true); ! //print_r($keywords); ! // need to sort alphnumerically whilst still respecting case (for now) ! ! if(!empty($keywords)) { ! foreach($keywords as $keyword) { ! $tags[$keyword] = strtolower($keyword); ! } ! ! // sort tags (lowercase keywords) ! asort($tags); ! echo "<b>".get_string('stackQuestion_questionKeywords', 'stack')."</b>: <a href='index.php'>*</a>, "; ! ! $firstTag = true; ! ! foreach($tags as $keyword => $tag) { ! if(!$firstTag) { ! echo ', '; ! } else $firstTag = false; ! echo "<a href='?tagged=$tag'>$keyword</a>"; ! } ! echo '.</p>'; ! } - if(isset($_GET['tagged'])) { - $questions = $db->getQuestionsTagged($_GET['tagged']); - } - else { $filter=array('order1'=>'','order2'=>'','order2'=>''); if (array_key_exists('bank_filter',$_POST)) { ! $filter['order1']=$_POST['bank_filter']['order1']; ! $filter['order2']=$_POST['bank_filter']['order2']; ! $filter['order3']=$_POST['bank_filter']['order3']; } $questions = $db->getListOfQuestions(NULL,true,$filter); ! } ! $no_question = 0; if(!empty($questions)) { ! echo "\n<form name='questionsform' action='index.php' method='POST'>\n"; /************************************************************************************/ --- 250,278 ---- <?php echo '<h3>'.get_string('stackQuestion_filterQuestions','stack','').'</h3>'; ! //echo '<p>'.get_string('stackQuestion_filterSearch','stack','').'</p>'; $db = new StackDBItem(); $db->connect(); ! // get question list $filter=array('order1'=>'','order2'=>'','order2'=>''); if (array_key_exists('bank_filter',$_POST)) { ! $filter['order1']=$_POST['bank_filter']['order1']; ! $filter['order2']=$_POST['bank_filter']['order2']; ! $filter['order3']=$_POST['bank_filter']['order3']; } + $questions = $db->getListOfQuestions(NULL,true,$filter); ! ! // link all keywords ! $kwdb = new StackDBKeywords(); ! $kwdb->connect(); ! // need to sort alphnumerically whilst still respecting case (for now) ! $all_keywords = $kwdb->getAllKeywords(true); if(!empty($questions)) { ! /************************************************************************************/ *************** *** 302,363 **** /************************************************************************************/ ! echo '<table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="0">'; stack_questionBank_filter_tablehead($question_bank_filter); ! echo '<tr><td></td>'; ! $fields = array('ID','Name','Description','Valid', 'Status', 'Published','DateLastEdited','NoDeployed'); foreach($fields as $key) { $val = get_string('stackQuestion_question'.$key,'stack',''); echo "<th scope='column'>$val</th>"; } ! echo '<td> </td><td> </td><td> </td></tr>'; for($i=0; $i < count($questions); $i++) { ! if (stack_questionBank_filter_display_question($question_bank_filter,$questions[$i])) { ! echo '<tr> ! <td><input type="checkbox" name="'.$questions[$i]['id'].'" value="selected" /></td> ! <td>'.$questions[$i]['id'].'</td> ! <td>'.$questions[$i]['questionName'].'</td> ! <td>'.$questions[$i]['questionDescription'].'</td> ! <td>'.$questions[$i]['valid'].'</td> ! <td>'.$questions[$i]['status'].'</td> ! <td>'.get_string('stackMetaData_published'.$questions[$i]['published'], 'stack').'</td> ! <td>'.$questions[$i]['questionDateLastEdited'].'</td> <td>'.$questions[$i]['nodeployed'].'</td>'; if($questions[$i]['valid'] == 1) { ! echo '<td><a href="lib/ui/questionTest.php?id='.$questions[$i]['id'].'">'.get_string('stackQuestion_filterLinkTry','stack').'</a></td>'; } else { ! echo '<td>'.get_string('stackQuestion_filterLinkTry', 'stack').'</td>'; } - echo '<td><a href="lib/ui/authorTest.php?id='.$questions[$i]['id'].'">'.get_string('stackQuestion_filterLinkEdit','stack').'</a></td>'; if($questions[$i]['valid'] == 1) { ! echo '<td><a href="lib/ui/questionDeploy.php?id='.$questions[$i]['id'].'">'.get_string('stackQuestion_filterLinkDeploy','stack').'</a></td>'; } else { ! echo '<td>'.get_string('stackQuestion_filterLinkDeploy','stack').'</td>'; } ! echo '<td><a href="lib/ui/questionExporter.php?id='.$questions[$i]['id'].'">'.get_string('stackQuestion_filterLinkXML','stack').'</a></td>'; ! ! echo '</tr>'; ! $no_questions +=1; } } echo "\n</table>\n\n"; ! echo '(# = '.$no_questions.') <input type="radio" name="selectall" onclick="selectAll(this.form,0);" />'.get_string('stackSelectAll','stack').'<input type="radio" name="selectall" onclick="selectAll(this.form,1);" />'.get_string('stackInvertSelection','stack'); echo '<h4>'.get_string('stackQuestion_filterWithSelected','stack','').'</h4>'; $trans_sub = get_string('stackQuestion_filterExportToXML','stack'); --- 284,384 ---- /************************************************************************************/ ! echo "\n<form name='questionsform' action='index.php' method='POST'>\n"; + echo '<table>'; stack_questionBank_filter_tablehead($question_bank_filter); + echo '</table>'; ! echo '<table id="questionListTable">'; ! echo '<tr><th></th>'; ! $fields = array('Header','Valid', 'Status', 'Published','DateLastEdited','NoDeployed'); foreach($fields as $key) { $val = get_string('stackQuestion_question'.$key,'stack',''); echo "<th scope='column'>$val</th>"; } + echo '<th nowrap>'.get_string('stackQuestion_questionActions','stack','').'</th>'; + echo '<td></td></tr>'; ! $kwdb = new StackDBKeywords(); ! $kwdb->connect(); + $no_displayed=0; for($i=0; $i < count($questions); $i++) { ! $keywords = $kwdb->getQuestionsKeywords($questions[$i]['id']); ! if (stack_questionBank_filter_display_question($question_bank_filter,$questions[$i],$keywords)) { ! $no_displayed++; ! ! if($i % 2 == 0) echo '<tr class="even">'; ! else echo '<tr class="odd">'; ! echo '<td><input type="checkbox" name="'.$questions[$i]['id'].'" value="selected" /></td> ! <td><b>'.$questions[$i]['questionName'].'</b> (v.'.$questions[$i]['id'].'): </b>'.$questions[$i]['questionDescription']; ! ! if(!empty($keywords)) { ! echo '<br /><small>'; ! asort($keywords); ! $firstKeyword = true; ! foreach($keywords as $keyword) { ! if(!$firstKeyword) { ! echo ', '; ! } else $firstKeyword = false; ! $kwLink = "<a href='?tagged=$keyword'>".$keyword."</a>"; ! echo $kwLink; ! } ! echo '</small>'; ! } ! echo '</td><td style="text-align: center">'; ! if($questions[$i]['valid'] == 1) ! { ! echo '<img alt="1" src="pix/correct.png" />'; ! } ! else ! { ! echo '<img alt="0" src="pix/incorrect.png" />'; ! } ! echo '</td><td>'.$questions[$i]['status'].'</td>'; ! ! $val = $questions[$i]['published']; ! $aval = get_string('stackMetaData_published'.$questions[$i]['published'], 'stack'); ! echo '<td><img src="'.$config->get('webroot').'/pix/'.$val.'.png" alt="'.$aval.'" /></td>'; ! ! echo '<td>'.$questions[$i]['questionDateLastEdited'].'</td> <td>'.$questions[$i]['nodeployed'].'</td>'; + echo '<td nowrap>'; + echo '<a href="lib/ui/authorTest.php?id='.$questions[$i]['id'].'"><img src="'.$config->get('webroot').'/pix/pencil.png" title="'.get_string('stackIcon_edit','stack').'" alt="'.get_string('stackIcon_edit','stack').'" />'; if($questions[$i]['valid'] == 1) { ! echo '<a href="lib/ui/questionTest.php?id='.$questions[$i]['id'].'"><img src="'.$config->get('webroot').'/pix/eye.png" title="'.get_string('stackIcon_try','stack').'" alt="'.get_string('stackIcon_try','stack').'" /></a> '; } else { ! echo '<a href="lib/ui/questionTest.php?id='.$questions[$i]['id'].'"><img src="'.$config->get('webroot').'/pix/eye.png" title="'.get_string('stackIcon_try','stack').'" alt="'.get_string('stackIcon_try','stack').'" /></a> '; ! //echo get_string('stackQuestion_filterLinkTry', 'stack'); } if($questions[$i]['valid'] == 1) { ! echo ' <a href="lib/ui/questionDeploy.php?id='.$questions[$i]['id'].'"><img src="'.$config->get('webroot').'/pix/arrow_out.png" title="'.get_string('stackIcon_deploy','stack').'" alt="'.get_string('stackIcon_deploy','stack').'" /></a>'; } else { ! echo ' <img src="'.$config->get('webroot').'/pix/transparent16x16.gif" />'; ! //echo get_string('stackQuestion_filterLinkDeploy','stack'); } ! echo ' <a href="lib/ui/questionExporter.php?id='.$questions[$i]['id'].'"><img src="'.$config->get('webroot').'/pix/disk.png" title="'.get_string('stackIcon_xml','stack').'" alt="'.get_string('stackIcon_xml','stack').'" /></a>'; ! echo '</td></tr>'; } } echo "\n</table>\n\n"; ! ! echo '<br />'.$no_displayed.' ('.count($questions).') '.get_string('FE_index_question(s)', 'stack').'. '; ! ! echo ' <input type="radio" name="selectall" onclick="selectAll(this.form,0);" />'.get_string('stackSelectAll','stack').'<input type="radio" name="selectall" onclick="selectAll(this.form,1);" />'.get_string('stackInvertSelection','stack'); echo '<h4>'.get_string('stackQuestion_filterWithSelected','stack','').'</h4>'; $trans_sub = get_string('stackQuestion_filterExportToXML','stack'); *************** *** 374,377 **** --- 395,406 ---- echo '<input type="submit" name="Submit" value="'.get_string('stackQuestionList_Deploy','stack').'" class="stackbutton" /></span>'; echo "\n</form>\n"; + + echo '<table>'; + echo '<tr><th></th><th>'.get_string('stackQuestion_questionActions','stack','').'</th><th width="20"></th><th></th><th>'.get_string('stackQuestion_questionPublished','stack','').'</th></tr>'; + echo '<tr><td><img src="'.$config->get('webroot').'/pix/pencil.png" alt="'.get_string('stackQuestion_filterLinkEdit','stack').'" /></td> <td>'.get_string('stackQuestion_filterLinkEdit', 'stack').'</td><td></td><td><img src="'.$config->get('webroot').'/pix/Unpublished.png" alt="'.get_string('stackMetaData_publishedUnpublished', 'stack').'" /></td> <td>'.get_string('stackMetaData_publishedUnpublished', 'stack').'</td></tr>'; + echo '<tr><td><img src="'.$config->get('webroot').'/pix/eye.png" alt="'.get_string('stackIcon_try','stack').'" /></td> <td>'.get_string('stackQuestion_filterLinkTry', 'stack').'</td><td></td><td><img src="'.$config->get('webroot').'/pix/Published.png" alt="'.get_string('stackMetaData_publishedPublished', 'stack').'" /></td> <td>'.get_string('stackMetaData_publishedPublished', 'stack').'</td></tr>'; + echo '<tr><td><img src="'.$config->get('webroot').'/pix/arrow_out.png" alt="'.get_string('stackQuestion_filterLinkDeploy','stack').'" /></td> <td>'.get_string('stackQuestion_filterLinkDeploy', 'stack').'</td><td></td><td><img src="'.$config->get('webroot').'/pix/Private.png" alt="'.get_string('stackMetaData_publishedPrivate', 'stack').'" /></td> <td>'.get_string('stackMetaData_publishedPrivate', 'stack').'</td></tr>'; + echo '<tr><td><img src="'.$config->get('webroot').'/pix/disk.png" alt="'.get_string('stackQuestion_filterLinkXML','stack').'" /></td> <td>'.get_string('stackQuestion_filterLinkXML', 'stack').'</td></tr>'; + echo '</table>'; } else |