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

bisitz bisitz@source.lon-capa.org
Mon, 16 Aug 2010 16:02:09 -0000


bisitz		Mon Aug 16 16:02:09 2010 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonparmset.pm 
  Log:
  Optimized screen layout of Table Mode:
  - New horizontal layout for selected parameters (short term solution).
    Even though special styles are used, the advantages are...
      - less irritating screen movements - parameter selection area used to always move up and down after parameter (de)selection
      - less empty, unused screen space
  - Added "type" (Question Type) and "problemstatus" (Show Problem Status) to "Select Common Only" because both turned out to be used commonly.
  - Consistent checkbox/text order for "Show all parts"
  - Filename style for filename in "Specific Resource"
  - Unique and consistent wording: "Student/Employee ID"
  
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.976 loncom/interface/loncommon.pm:1.977
--- loncom/interface/loncommon.pm:1.976	Sat Aug 14 04:28:21 2010
+++ loncom/interface/loncommon.pm	Mon Aug 16 16:02:08 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.976 2010/08/14 04:28:21 raeburn Exp $
+# $Id: loncommon.pm,v 1.977 2010/08/16 16:02:08 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5433,6 +5433,14 @@
   color: #AAAAAA;
 }
 
+ul.LC_parm_parmlist li {
+  display: inline-block;
+  padding: 0.3em 0.8em;
+  vertical-align: top;
+  width: 150px;
+  border-top:1px solid $lg_border_color;
+}
+
 td.LC_parm_overview_level_menu,
 td.LC_parm_overview_map_menu,
 td.LC_parm_overview_parm_selectors,
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.500 loncom/interface/lonparmset.pm:1.501
--- loncom/interface/lonparmset.pm:1.500	Thu Jul 29 21:16:44 2010
+++ loncom/interface/lonparmset.pm	Mon Aug 16 16:02:09 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.500 2010/07/29 21:16:44 raeburn Exp $
+# $Id: lonparmset.pm,v 1.501 2010/08/16 16:02:09 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1214,8 +1214,9 @@
 }
 
 #
-# This function prints a list of parameters, which were selected. It also display a link from which you can
-# hide or show the complete parameter list, from which you can choose your parameters. 
+# parmmenu displays a list of the selected parameters.
+# It also offers a link to show/hide the complete parameter list
+# from which you can select all desired parameters.
 #
 sub parmmenu {
     my ($r,$allparms,$pscat,$keyorder)=@_;
@@ -1290,6 +1291,8 @@
     checkdates();
     checkthis('weight','pscat');
     checkthis('maxtries','pscat');
+    checkthis('type','pscat');
+    checkthis('problemstatus','pscat');
     }
 
     function hideParms() {
@@ -1319,7 +1322,7 @@
     $r->print(&mt('Selected Parameters:').'<br />');
 
     #print out all possible parms and hide them by default
-    $r->print('<ul>');
+    $r->print('<ul class="LC_parm_parmlist">');
     foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) {
         $r->print('<li id="'.$tempkey.'_li" value="'.$tempkey.'_li" name="pscat_li"');
         if (!($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat})) {
@@ -2085,7 +2088,7 @@
                 $message="\n<p>\n".&mt("Full Name").": ".
                 $name{'firstname'}.' '.$name{'middlename'}.' '
                 .$name{'lastname'}.' '.$name{'generation'}.
-                "<br />\n".&mt('ID').": ".$name{'id'}.'<p>';
+                "<br />\n".&mt('Student/Employee ID').": ".$name{'id'}.'<p>';
             }
             @usersgroups = &Apache::lonnet::get_users_groups(
                                        $udom,$uname,$env{'request.course.id'});
@@ -2164,7 +2167,7 @@
     }
 #----------------------------------------------- if all selected, fill in array
     if ($pscat[0] eq "all") {@pscat = (keys %allparms);}
-    if (!@pscat) { @pscat=('duedate','opendate','answerdate','weight','maxtries') };
+    if (!@pscat) { @pscat=('duedate','opendate','answerdate','weight','maxtries','type','problemstatus') };
     if ($psprt[0] eq "all" || !@psprt) {@psprt = (keys %allparts);}
 # ------------------------------------------------------------------ Start page
 
@@ -2263,14 +2266,18 @@
         # parameter screen for a single resource. 
         my ($map,$iid,$resource)=&Apache::lonnet::decode_symb($pssymb);
         my $title = &Apache::lonnet::gettitle($pssymb);
-        $r->print(&mt('Specific Resource: [_1] ([_2])',$title,$resource).
+        $r->print(&mt('Specific Resource: [_1] ([_2])',
+                         $title,'<span class="LC_filename">'.$resource.'</span>').
                 '<input type="hidden" value="'.$pssymb.'" name="symb" />'.
                   '<br />');
         $r->print(&Apache::lonhtmlcommon::topic_bar('',&mt('Additional Display Specification (optional)')));
         $r->print(&Apache::lonhtmlcommon::start_pick_box());
         $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View')).
-                  '<label>'.&mt('Show all parts').': <input type="checkbox" name="psprt" value="all"'.
-                  ($env{'form.psprt'}?' checked="checked"':'').' /></label></td></tr>');
+                  '<label>'.
+                  '<input type="checkbox" name="psprt" value="all"'.
+                  ($env{'form.psprt'}?' checked="checked"':'').' />'.
+                  &mt('Show all parts').
+                  '</label></td></tr>');
         &usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups);
         $r->print(&Apache::lonhtmlcommon::row_closure(1));
         $r->print(&Apache::lonhtmlcommon::end_pick_box());
@@ -2321,7 +2328,6 @@
                my %lt=&Apache::lonlocal::texthash(
                 'pie'    => "Parameter in Effect",
                 'csv'    => "Current Session Value",
-                'at'     => 'at',
                 'rl'     => "Resource Level",
                 'ic'     => 'in Course',
                 'aut'    => "Assessment URL and Title",
@@ -2337,7 +2343,7 @@
             );
                $r->print(<<ENDTABLETWO);
 <th rowspan="3">$lt{'pie'}</th>
-<th rowspan="3">$lt{'csv'}<br />($csuname $lt{'at'} $csudom)</th>
+<th rowspan="3">$lt{'csv'}<br />($csuname:$csudom)</th>
 </tr><tr><td colspan="5"></td><th colspan="2">$lt{'ic'}</th><th colspan="2">$lt{'rl'}</th>
 <th colspan="1">$lt{'ic'}</th>