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

www www@source.lon-capa.org
Sun, 22 Nov 2009 21:07:41 -0000


www		Sun Nov 22 21:07:41 2009 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  Restore functionality to select student by student ID
  Incorporate "Show all parts" into display options (instead of separate box)
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.485 loncom/interface/lonparmset.pm:1.486
--- loncom/interface/lonparmset.pm:1.485	Sun Nov 15 20:50:03 2009
+++ loncom/interface/lonparmset.pm	Sun Nov 22 21:07:41 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.485 2009/11/15 20:50:03 amueller Exp $
+# $Id: lonparmset.pm,v 1.486 2009/11/22 21:07:41 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2187,16 +2187,16 @@
 // ]]>
 </script>
 ENDPARMSELSCRIPT
-    my $parmselhiddenstyle=' style="display:none"';
-    if($env{'form.hideparmsel'} eq 'hidden') {
-        $r->print('<div id="parmsel"'.$parmselhiddenstyle.'>');
-    } else  {
-        $r->print('<div id="parmsel">');
-    }
-
     
     # Display Unit 1 "General Parameters"
     if (!$pssymb) {
+        my $parmselhiddenstyle=' style="display:none"';
+        if($env{'form.hideparmsel'} eq 'hidden') {
+           $r->print('<div id="parmsel"'.$parmselhiddenstyle.'>');
+        } else  {
+           $r->print('<div id="parmsel">');
+        }
+
         $r->print(&Apache::lonhtmlcommon::topic_bar(1,&mt('Resource Specification')));
         $r->print(<<COURSECONTENTSCRIPT);
 <script type="text/javascript">
@@ -2229,44 +2229,49 @@
         $r->print(&Apache::lonhtmlcommon::topic_bar(2,&mt('Parameter Specification')));
         &displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder);
         $r->print(&Apache::lonhtmlcommon::topic_bar(3,&mt('User Specification (optional)')));
+        $r->print(&Apache::lonhtmlcommon::start_pick_box());
+        &usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups);
+        $r->print(&Apache::lonhtmlcommon::row_closure(1));
+        $r->print(&Apache::lonhtmlcommon::end_pick_box());
+        $r->print('<p>'
+             .'<input type="submit" name="dis"'
+             .' value="'.&mt('Update Parameter Display').'" />'
+             .'<input type="hidden" name="hideparmsel" value="hidden" />'
+             .'</p>');
+        $r->print('</div>');
+        # Offer link to display parameter selection again
+        $r->print('<p id="parmsellink"');
+        if ($env{'form.hideparmsel'} ne 'hidden') {
+           $r->print($parmselhiddenstyle);
+        }
+        $r->print('>'
+             .'<a href="javascript:parmsel_show()">'
+             .&mt('Change Parameter Selection')
+             .'</a>'
+             .'</p>');
     } else {
         # parameter screen for a single resource. 
-        my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb);
+        my ($map,$iid,$resource)=&Apache::lonnet::decode_symb($pssymb);
         my $title = &Apache::lonnet::gettitle($pssymb);
         $r->print(&mt('Specific Resource: [_1] ([_2])',$title,$resource).
                 '<input type="hidden" value="'.$pssymb.'" name="symb" />'.
-                  '<br /><label><b>'.&mt('Show all parts').': <input type="checkbox" name="psprt" value="all"'.
-                  ($env{'form.psprt'}?' checked="checked"':'').' /></b></label><br />');
-        $r->print(&Apache::lonhtmlcommon::topic_bar('',&mt('User Specification (optional)')));
-    }
-    $r->print(&Apache::lonhtmlcommon::start_pick_box());
-    &usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups);
-    $r->print(&Apache::lonhtmlcommon::row_closure(1));
-    $r->print(&Apache::lonhtmlcommon::end_pick_box());
-    
-    # parm selection is shown: display parm update button
-    $r->print('<p>'
+                  '<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>');
+        &usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups);
+        $r->print(&Apache::lonhtmlcommon::row_closure(1));
+        $r->print(&Apache::lonhtmlcommon::end_pick_box());
+        $r->print('<p>'
              .'<input type="submit" name="dis"'
              .' value="'.&mt('Update Parameter Display').'" />'
              .'<input type="hidden" name="hideparmsel" value="hidden" />'
-             .'</p>'
-    );
-
-    $r->print('</div>');
-    # ----- End Parameter Selection
-
-    # Offer link to display parameter selection again
-    $r->print('<p id="parmsellink"');
-    if($env{'form.hideparmsel'} ne 'hidden') {
-        $r->print($parmselhiddenstyle);
+             .'</p>');
     }
-    $r->print('>'
-             .'<a href="javascript:parmsel_show()">'
-             .&mt('Change Parameter Selection')
-             .'</a>'
-             .'</p>'
-    );
     
+    # ----- End Parameter Selection
 
     # Display Messages
     $r->print('<div>'.$message.'</div>');