[LON-CAPA-cvs] cvs: loncom /homework grades.pm /interface loncommon.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Tue, 30 Oct 2007 01:04:32 -0000


This is a MIME encoded message

--albertel1193706272
Content-Type: text/plain

albertel		Mon Oct 29 21:04:32 2007 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
    /loncom/homework	grades.pm 
  Log:
  - switch 'pick a grading mode' screen to use divs/css
  
  
--albertel1193706272
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20071029210432.txt"

Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.600 loncom/interface/loncommon.pm:1.601
--- loncom/interface/loncommon.pm:1.600	Mon Oct 29 20:09:09 2007
+++ loncom/interface/loncommon.pm	Mon Oct 29 21:04:21 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.600 2007/10/30 00:09:09 albertel Exp $
+# $Id: loncommon.pm,v 1.601 2007/10/30 01:04:21 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5015,6 +5015,30 @@
 }
 
 
+div.LC_grade_select_mode {
+  border: 1px solid black;
+  float: left;
+}
+div.LC_grade_select_mode div div {
+  margin: 5px;
+}
+
+div.LC_grade_select_mode_header {
+  font: bold larger $sans;
+  background: $tabbg;
+}
+
+div.LC_grade_select_mode_selector {
+  margin: 5px;
+  float: left;
+}
+div.LC_grade_select_mode_selector_header {
+  font: bold medium $sans;
+}
+div.LC_grade_select_mode_type {
+  clear: left;
+}
+
 div.LC_grade_show_user {
   margin-top: 20px;
   border: 1px solid black;
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.471 loncom/homework/grades.pm:1.472
--- loncom/homework/grades.pm:1.471	Mon Oct 29 20:27:23 2007
+++ loncom/homework/grades.pm	Mon Oct 29 21:04:31 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.471 2007/10/30 00:27:23 albertel Exp $
+# $Id: grades.pm,v 1.472 2007/10/30 01:04:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7409,102 +7409,89 @@
 	'<input type="hidden" name="gradingMenu" value="1" />'."\n".
 	'<input type="hidden" name="showgrading" value="yes" />'."\n";
 
-    $result.='<table border="0"><tr><td bgcolor=#777777>'."\n".
-	'<table width="100%" border="0"><tr bgcolor="#e6ffff"><td>'."\n".
-	'&nbsp;<b>Select a Grading/Viewing Option</b></td></tr>'."\n".
-	'<tr bgcolor="#ffffe6" valign="top"><td>'."\n";
-
-    $result.='<table width="100%" border="0">';
-    $result.='<tr bgcolor="#ffffe6" valign="top">'."\n";
-    $result.='<td><b>'.&mt('Sections').'</b></td>';
-    $result.='<td><b>'.&mt('Groups').'</b></td>';
-    $result.='<td><b>'.&mt('Access Status').'</td>'."\n";
-    $result.='<td><b>'.&mt('Submission Status').'</td>'."\n";
-    $result.='</tr>';
-    $result.='<tr bgcolor="#ffffe6" valign="top"><td>'."\n".
-	'&nbsp;<select name="section" multiple="multiple" size="3">'."\n";
+    $result.='
+    <div class="LC_grade_select_mode">
+      <div class="LC_grade_select_mode_header">
+        '.&mt('Select a Grading/Viewing Option').'
+      </div>
+      <div class="LC_grade_select_mode_body">
+        <div class="LC_grade_select_mode_selector">
+           <div class="LC_grade_select_mode_selector_header">
+              '.&mt('Sections').'
+           </div>
+           <div class="LC_grade_select_mode_selector_body">
+	    <select name="section" multiple="multiple" size="5">'."\n";
     if (ref($sections)) {
-	foreach (sort (@$sections)) {
-	    $result.='<option value="'.$_.'" '.
-		($saveSec eq $_ ? 'selected="selected"':'').'>'.$_.'</option>'."\n";
+	foreach my $section (sort (@$sections)) {
+	    $result.='<option value="'.$section.'" '.
+		($saveSec eq $section ? 'selected="selected"':'').'>'.$section.'</option>'."\n";
 	}
     }
     $result.= '<option value="all" '.($saveSec eq 'all' ? 'selected="selected"' : ''). '>all</option></select> &nbsp; ';
-    $result.= '</td><td>'."\n";
-    $result.= &Apache::lonstatistics::GroupSelect('group','multiple',3);
-    $result.='</td><td>'."\n";
-    $result.=&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,3,undef,'mult');
-
-    $result.='</td>';
-    $result.='<td><select name="submitonly" size="3">'.
-	'<option value="yes" '.
-	($saveSub eq 'yes' ? 'selected="selected"' : '').'>'.&mt('with submissions').'</option>'.
-	'<option value="queued" '.
-	($saveSub eq 'queued' ? 'selected="selected"' : '').'>'.&mt('in grading queue').'</option>'.
-	'<option value="graded" '.
-	($saveSub eq 'graded' ? 'selected="selected"' : '').'>'.&mt('with ungraded submissions').'</option>'.
-	'<option value="incorrect" '.
-	($saveSub eq 'incorrect' ? 'selected="selected"' : '').'>'.&mt('with incorrect submissions').'</option>'.
-	'<option value="all" '.
-	($saveSub eq 'all' ? 'selected="selected"' : '').'>'.&mt('with any status').'</option></select></td></tr>';
-
-    $result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="3"><label>'.
-	'<input type="radio" name="radioChoice" value="submission" '.
-	($saveCmd eq 'submission' ? 'checked="checked"' : '').' /> '.'<b>'.&mt('Current Resource').':</b> '.&mt('For one or more students').
-	'</label> </td></tr>'."\n";
-
-    $result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="3">'.
-	'<label><input type="radio" name="radioChoice" value="viewgrades" '.
+    $result.='
+           </div>
+        </div>
+        <div class="LC_grade_select_mode_selector">
+           <div class="LC_grade_select_mode_selector_header">
+              '.&mt('Groups').'
+           </div>
+           <div class="LC_grade_select_mode_selector_body">
+              '.&Apache::lonstatistics::GroupSelect('group','multiple',5).'
+           </div>
+        </div>
+        <div class="LC_grade_select_mode_selector">
+           <div class="LC_grade_select_mode_selector_header">
+              '.&mt('Access Status').'
+           </div>
+           <div class="LC_grade_select_mode_selector_body">
+              '.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,5,undef,'mult').'
+           </div>
+        </div>
+        <div class="LC_grade_select_mode_selector">
+           <div class="LC_grade_select_mode_selector_header">
+              '.&mt('Submission Status').'
+           </div>
+           <div class="LC_grade_select_mode_selector_body">
+             <select name="submitonly" size="5">
+	       <option value="yes" '.      ($saveSub eq 'yes'       ? 'selected="selected"' : '').'>'.&mt('with submissions').'</option>
+	       <option value="queued" '.   ($saveSub eq 'queued'    ? 'selected="selected"' : '').'>'.&mt('in grading queue').'</option>
+	       <option value="graded" '.   ($saveSub eq 'graded'    ? 'selected="selected"' : '').'>'.&mt('with ungraded submissions').'</option>
+	       <option value="incorrect" '.($saveSub eq 'incorrect' ? 'selected="selected"' : '').'>'.&mt('with incorrect submissions').'</option>
+	       <option value="all" '.      ($saveSub eq 'all'       ? 'selected="selected"' : '').'>'.&mt('with any status').'</option>
+             </select>
+           </div>
+        </div>
+        <div class="LC_grade_select_mode_type_body">
+          <div class="LC_grade_select_mode_type">
+            <label>
+              <input type="radio" name="radioChoice" value="submission" '.
+	  ($saveCmd eq 'submission' ? 'checked="checked"' : '').' /> '.&mt('<b>Current Resource:</b> For one or more students').'
+	    </label> 
+          </div>
+          <div class="LC_grade_select_mode_type">
+	    <label>
+              <input type="radio" name="radioChoice" value="viewgrades" '.
 	($saveCmd eq 'viewgrades' ? 'checked="checked"' : '').' /> '.
-	'<b>Current Resource:</b> For all students in selected section or course</label></td></tr>'."\n";
-
-    $result.='<tr bgcolor="#ffffe6"><td colspan="3"><br />'.
-	'<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="Next->" />'.
-	'</td></tr>'."\n";
-
-
-    $result.='<tr bgcolor="#ffffe6" valign="top"><td colspan="3">'.
-	'<br /><label><input type="radio" name="radioChoice" value="pickStudentPage" '.
+	&mt('<b>Current Resource:</b> For all students in selected section or course').'
+            </label>
+          </div>
+          <div class="LC_grade_select_mode_type">
+	    <input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next-&gt;').'" />
+          </div>
+          <div class="LC_grade_select_mode_type">
+            <label>
+              <input type="radio" name="radioChoice" value="pickStudentPage" '.
 	($saveCmd eq 'pickStudentPage' ? 'checked="checked"' : '').' /> '.
-	'The <b>complete</b> set/page/sequence/folder: For one student</label></td></tr>'."\n";
-
-    $result.='<tr bgcolor="#ffffe6"><td colspan="3"><br />'.
-	'<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="Next->" />'.
-	'</td></tr></table>'."\n";
-
-    $result.='</td>'; #<td valign="top">';
-
-#    $result.='<table width="100%" border="0">';
-#    $result.='<tr bgcolor="#ffffe6"><td>'.
-#	'<input type="button" onClick="javascript:checkChoice(this.form,\'3\',\'csvform\');" value="'.&mt('Upload').'" />'.
-#	' '.&mt('scores from file').' </td></tr>'."\n";
-#
-#    $result.='<tr bgcolor="#ffffe6"><td>'.
-#        '<input type="button" onClick="javascript:checkChoice(this.form,\'6\',\'processclicker\');" value="'.&mt('Process').'" />'.
-#        ' '.&mt('clicker file').' </td></tr>'."\n";
-#
-#    $result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="2">'.
-#	'<input type="button" onClick="javascript:checkChoice(this.form,\'4\',\'scantron_selectphase\');'.
-#	'" value="'.&mt('Grade').'" /> scantron forms</td></tr>'."\n";
-#
-#    if ((&Apache::lonnet::allowed('mgr',$env{'request.course.id'})) && ($symb)) {
-#	$result.='<tr bgcolor="#ffffe6"valign="top"><td>'.
-#	    '<input type="button" onClick="javascript:checkChoice(this.form,\'5\',\'verify\');" value="'.&mt('Verify').'" />'.
-#	    ' '.&mt('receipt').': '.
-#	    &Apache::lonnet::recprefix($env{'request.course.id'}).
-#	    '-<input type="text" name="receipt" size="4" onChange="javascript:checkReceiptNo(this.form,\'OK\')" />'.
-#	    '</td></tr>'."\n";
-#    } 
-#    $result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="2">'.
-#	'<input type="button" onClick="javascript:this.form.action=\'/adm/helper/resettimes.helper\';this.form.submit();'.
-#	'" value="'.&mt('Manage').'" /> access times.</td></tr>'."\n";
-#    $result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="2">'.
-#	'<input type="button" onClick="javascript:this.form.command.value=\'codelist\';this.form.action=\'/adm/pickcode\';this.form.submit();'.
-#	'" value="'.&mt('View').'" /> saved CODEs.</td></tr>'."\n";
-#
-#    $result.='</table>'."\n".'</td>';
-    $result.= '</tr></table>'."\n".
-	'</td></tr></table></form>'."\n";
+	&mt('The <b>complete</b> set/page/sequence/folder: For one student').'
+            </label>
+          </div>
+          <div class="LC_grade_select_mode_type">
+	    <input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next-&gt;').'" />
+          </div>
+        </div>
+      </div>
+    </div>
+  </form>';
     return $result;
 }
 

--albertel1193706272--