From: Chris S. <san...@us...> - 2005-06-21 16:36:51
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27319/scripts Modified Files: stackDatabase.php Log Message: Index: stackDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackDatabase.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** stackDatabase.php 21 Jun 2005 15:43:17 -0000 1.20 --- stackDatabase.php 21 Jun 2005 16:36:43 -0000 1.21 *************** *** 301,324 **** echo "<thead>\n"; ! // Print the interactions for ordering the output of the queary. ! echo "<tr><th></th><th colspan='2'>Order output by:</th> </tr>\n"; ! ! $fields1 = array('questionName', 'questionKeywords', 'questionID','questionDescription','questionDateLastEdited','NONE'); ! $fields2 = array('order1','order2','order3'); ! $fields3 = array('1st','2nd','3rd'); ! foreach ($fields2 as $no => $fn){ ! echo "<tr><th>{$fields3[$no]} </th>\n"; ! echo '<th colspan="2"><select name="bank_filter['.$fn.']">'; ! foreach ($fields1 as $key) { ! if ($key == $filter[$fn]) { ! echo "\n <option value='$key' selected>".get_string('stackQuestion_'.$key,'stack')."</option>"; ! } else { ! echo "\n <option value='$key'>".get_string('stackQuestion_'.$key,'stack')."</option>"; ! } ! } ! echo "\n</select></th>\n</tr>\n"; ! } if ('edit'==$action) { echo '<th></th><th>ID</th><th>Name</th> <th>Key words</th> <th></th><th>Last edit</th>'; --- 301,328 ---- echo "<thead>\n"; ! if ('edit' == $action or 'edit_metadata' == $action or 'add_quiz'==$action) { ! // Only allow the 'edit' to filter questions. ! // Print the interactions for ordering the output of the queary. ! echo "<tr><th></th><th colspan='2'>Order output by:</th> </tr>\n"; ! ! $fields1 = array('questionName', 'questionKeywords', 'questionID','questionDescription','questionDateLastEdited','NONE'); ! $fields2 = array('order1','order2','order3'); ! $fields3 = array('1st','2nd','3rd'); + foreach ($fields2 as $no => $fn){ + echo "<tr><th>{$fields3[$no]} </th>\n"; + echo '<th colspan="2"><select name="bank_filter['.$fn.']">'; + foreach ($fields1 as $key) { + if ($key == $filter[$fn]) { + echo "\n <option value='$key' selected>".get_string('stackQuestion_'.$key,'stack')."</option>"; + } else { + echo "\n <option value='$key'>".get_string('stackQuestion_'.$key,'stack')."</option>"; + } + } + echo "\n</select></th>\n</tr>\n"; + } + + echo "<tr>\n"; if ('edit'==$action) { echo '<th></th><th>ID</th><th>Name</th> <th>Key words</th> <th></th><th>Last edit</th>'; *************** *** 326,332 **** echo '<th></th><th>ID</th><th>Name</th> <th>Key words</th> <th></th><th></th><th></th>'; } ! if ('edit' == $action or 'edit_metadata' == $action or 'add_quiz'==$action) { ! // Only allow the 'edit' to filter questions. ! echo "</tr>\n<th>"; if ('edit_metadata' == $action) { echo "<a href=\"javascript:SelectQs('edit_metadata');\">Filter</a>"; --- 330,336 ---- echo '<th></th><th>ID</th><th>Name</th> <th>Key words</th> <th></th><th></th><th></th>'; } ! echo "</tr>\n"; ! ! echo "\n<tr>\n<th>"; if ('edit_metadata' == $action) { echo "<a href=\"javascript:SelectQs('edit_metadata');\">Filter</a>"; *************** *** 344,350 **** echo "<th colspan='2'>Case sensitive <input type='checkbox' name='bank_filter[case_sense]' value='TRUE' /></th>"; } ! echo "</tr></thead>\n"; } ! } --- 348,354 ---- echo "<th colspan='2'>Case sensitive <input type='checkbox' name='bank_filter[case_sense]' value='TRUE' /></th>"; } ! echo "</tr>\n"; } ! echo "</thead>\n"; } |