Example #1
0
 //adding/editing a rubric
 /*  Rubric Types
  *   1: score breakdown (record score and feedback)
  *   0: score breakdown (record score)
  *   3: score total (record score and feedback)
  *   4: score total (record score only)
  *   2: record feedback only (checkboxes)
  */
 $rubtypeval = array(1, 0, 3, 4, 2);
 $rubtypelabel = array('Score breakdown, record score and feedback', 'Score breakdown, record score only', 'Score total, record score and feedback', 'Score total, record score only', 'Feedback only');
 echo "<form method=\"post\" action=\"addrubric.php?cid={$cid}&amp;id={$_GET['id']}{$fromstr}\">";
 echo '<p>Name:  <input type="text" size="70" name="rubname" value="' . str_replace('"', '\\"', $rubname) . '"/></p>';
 echo '<p>Rubric Type: ';
 writeHtmlSelect('rubtype', $rubtypeval, $rubtypelabel, $rubtype, null, null, 'onchange="imasrubric_chgtype()"');
 echo '</p>';
 echo '<p>Share with Group: <input type="checkbox" name="rubisgroup" ' . getHtmlChecked($rubgrp, -1, 1) . ' /></p>';
 echo '<table><thead><tr><th>Rubric Item<br/>Shows in feedback</th><th>Instructor Note<br/>Not in feedback</th><th><span id="pointsheader" ';
 if ($rubtype == 2) {
     echo 'style="display:none;" ';
 }
 if ($rubtype == 3 || $rubtype == 4) {
     echo '>Percentage of score</span>';
 } else {
     echo '>Percentage of score<br/>Should add to 100</span>';
 }
 echo '</th></tr></thead><tbody>';
 for ($i = 0; $i < 15; $i++) {
     echo '<tr><td><input type="text" size="40" name="rubitem' . $i . '" value="';
     if (isset($rubric[$i]) && isset($rubric[$i][0])) {
         echo str_replace('"', '&quot;', $rubric[$i][0]);
     }
Example #2
0
echo "<form id=\"selform\" method=\"post\" action=\"adddrillassess.php?cid={$cid}&daid={$daid}&record=true\">";
echo '<p><b>Drill type</b></p>';
echo '<p>Scoring type:';
$vals = array('nat', 'nct', 'ncc', 'nst', 'nsc', 't');
$lbls = array('Do N questions then stop.  Record time.', 'Do N questions correct.  Record time.', 'Do N questions correct.  Record total attempts.', 'Do N questions correct in a row.  Record time', 'Do N questions correct in a row.  Record total attempts', 'Do as many correct as possible in N seconds');
writeHtmlSelect('scoretype', $vals, $lbls, $scoretype, null, null, $beentaken ? 'disabled="disabled"' : '');
echo ' where N = <input type="text" size="4" name="n" value="' . $n . '" ' . ($beentaken ? 'disabled="disabled"' : '') . '/></p>';
echo '<p>Feedback on individual questions:';
$vals = array(0, 1, 4, 2, 3);
$lbls = array('Show score, and display answer if wrong', 'Show score, don\'t show answers, give new question if wrong', 'Show score, don\'t show answers, give same question if wrong', 'Don\'t show score', 'Don\'t show score, but provide show answer buttons');
writeHtmlSelect('showtype', $vals, $lbls, $showtype, null, null, $beentaken ? 'disabled="disabled"' : '');
echo '</p>';
echo '<p>Show drill results to student: ';
echo '<input type="checkbox" name="showlast" ' . getHtmlChecked($showtostu & 1, 1) . '/> Show last score. ';
echo '<input type="checkbox" name="showpbest" ' . getHtmlChecked($showtostu & 2, 2) . '/> Show personal best score. ';
echo '<input type="checkbox" name="showcbest" ' . getHtmlChecked($showtostu & 4, 4) . '/> Show class best score.</p>';
if ($beentaken) {
    echo '<p>Reset class bests?  <input type="checkbox" name="clearbests" value="1" /></p>';
}
echo '<table id="usedqtable">';
echo '<tr>';
if (!$beentaken) {
    echo '<th></th>';
}
echo '<th>Description</th><th>Preview</th>';
if (!$beentaken) {
    echo '<th>Delete?</th>';
}
echo '</tr>';
function generateselect($cnt, $i)
{