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

bisitz bisitz@source.lon-capa.org
Mon, 08 Dec 2008 18:25:13 -0000


This is a MIME encoded message

--bisitz1228760713
Content-Type: text/plain

bisitz		Mon Dec  8 18:25:13 2008 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
    /loncom/homework	grades.pm 
  Log:
  Optimized/standarized screen output for first grading screen ("Manual Grading/View Submissions"):
  - Replaced special styles with standard fieldsets
  - Removed now unused styles from loncommon.pm
  - Excluded section preselection from output
  These changes also restore the screen layout for the radiobuttons which have moved right to the selection boxes due to new styles.
  
  
--bisitz1228760713
Content-Type: text/plain
Content-Disposition: attachment; filename="bisitz-20081208182513.txt"

Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.709 loncom/interface/loncommon.pm:1.710
--- loncom/interface/loncommon.pm:1.709	Sat Dec  6 17:29:34 2008
+++ loncom/interface/loncommon.pm	Mon Dec  8 18:25:07 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.709 2008/12/06 17:29:34 bisitz Exp $
+# $Id: loncommon.pm,v 1.710 2008/12/08 18:25:07 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5308,24 +5308,6 @@
 }
 
 
-div.LC_grade_select_mode {
-  font-family: $sans;
-}
-div.LC_grade_select_mode div div {
-  margin: 5px;
-}
-div.LC_grade_select_mode_selector {
-  margin: 5px;
-  float: left;
-}
-div.LC_grade_select_mode_selector_header {
-  font-weight: bold;
-  font-size: medium;
-}
-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.532 loncom/homework/grades.pm:1.533
--- loncom/homework/grades.pm:1.532	Fri Dec  5 10:23:50 2008
+++ loncom/homework/grades.pm	Mon Dec  8 18:25:13 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.532 2008/12/05 10:23:50 bisitz Exp $
+# $Id: grades.pm,v 1.533 2008/12/08 18:25:13 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -8150,6 +8150,15 @@
     my $saveSub = ($$savedState{'saveSub'} eq '' ? 'all' : $$savedState{'saveSub'});
     my $saveStatus = ($$savedState{'saveStatus'} eq '' ? 'Active' : $$savedState{'saveStatus'});
 
+    # Preselect sections
+    my $selsec="";
+    if (ref($sections)) {
+        foreach my $section (sort(@$sections)) {
+            $selsec.='<option value="'.$section.'" '.
+                ($saveSec eq $section ? 'selected="selected"':'').'>'.$section.'</option>'."\n";
+        }
+    }
+
     $result.='<form action="/adm/grades" method="post" name="gradingMenu">'."\n".
 	'<input type="hidden" name="symb"        value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n".
 	'<input type="hidden" name="handgrade"   value="'.$hdgrade.'" />'."\n".
@@ -8160,102 +8169,97 @@
 	'<input type="hidden" name="showgrading" value="yes" />'."\n";
 
     $result.='
-    <div class="LC_grade_select_mode">
-      <div class="LC_grade_select_mode_current">
-        <h2>
-          '.&mt('Grade Current Resource').'
-        </h2>
-        <div class="LC_grade_select_mode_body">
-          <div class="LC_grades_resource_info">
-           '.$table.'
-          </div>
-          <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 my $section (sort(@$sections)) {
-	    $result.='<option value="'.$section.'" '.
-		($saveSec eq $section ? 'selected="selected"':'').'>'.$section.'</option>'."\n";
-	}
-    }
+<h2>
+  '.&mt('Grade Current Resource').'
+</h2>
+<div>
+  '.$table.'
+</div>
+
+<div class="columnSection">
+  <div>
+    <fieldset>
+      <legend>
+       '.&mt('Sections').'
+      </legend>
+      <select name="section" multiple="multiple" size="5">'."\n";
+    $result.= $selsec;
     $result.= '<option value="all" '.($saveSec eq 'all' ? 'selected="selected"' : ''). '>all</option></select> &nbsp; ';
     $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">
+    </fieldset>
+  </div>
+
+  <div>
+    <fieldset>
+      <legend>
+        '.&mt('Groups').'
+      </legend>
+      '.&Apache::lonstatistics::GroupSelect('group','multiple',5).'
+    </fieldset>
+  </div>
+
+  <div>
+    <fieldset>
+      <legend>
+        '.&mt('Access Status').'
+      </legend>
+      '.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,5,undef,'mult').'
+    </fieldset>
+  </div>
+
+  <div>
+    <fieldset>
+      <legend>
+        '.&mt('Submission Status').'
+      </legend>
+      <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">
+      </select>
+    </fieldset>
+  </div>
+</div>
+
+<br />
+          <div>
+            <div>
               <label>
                 <input type="radio" name="radioChoice" value="submission" '.
                   ($saveCmd eq 'submission' ? 'checked="checked"' : '').' /> '.
              &mt('Select individual students to grade and view submissions.').'
 	      </label> 
             </div>
-            <div class="LC_grade_select_mode_type">
+            <div>
 	      <label>
                 <input type="radio" name="radioChoice" value="viewgrades" '.
                   ($saveCmd eq 'viewgrades' ? 'checked="checked"' : '').' /> '.
                     &mt('Grade all selected students in a grading table.').'
               </label>
             </div>
-            <div class="LC_grade_select_mode_type">
+            <div>
 	      <input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next-&gt;').'" />
             </div>
           </div>
-        </div>
-      </div>
-      <div class="LC_grade_select_mode_page">
+
+
         <h2>
          '.&mt('Grade Complete Folder for One Student').'
         </h2>
-        <div class="LC_grades_select_mode_body">
-          <div class="LC_grade_select_mode_type_body">
-            <div class="LC_grade_select_mode_type">
+        <div>
+            <div>
               <label>
                 <input type="radio" name="radioChoice" value="pickStudentPage" '.
 	  ($saveCmd eq 'pickStudentPage' ? 'checked="checked"' : '').' /> '.
   &mt('The <b>complete</b> page/sequence/folder: For one student').'
               </label>
             </div>
-            <div class="LC_grade_select_mode_type">
+            <div>
 	      <input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next-&gt;').'" />
             </div>
-          </div>
         </div>
-      </div>
-    </div>
   </form>';
     $result .= &show_grading_menu_form($symb);
     return $result;

--bisitz1228760713--