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

neumanie neumanie@source.lon-capa.org
Fri, 08 May 2009 22:47:02 -0000


This is a MIME encoded message

--neumanie1241822822
Content-Type: text/plain

neumanie		Fri May  8 22:47:02 2009 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  Change the style in table and overview mode to pick_box style.
  
  
--neumanie1241822822
Content-Type: text/plain
Content-Disposition: attachment; filename="neumanie-20090508224702.txt"

Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.444 loncom/interface/lonparmset.pm:1.445
--- loncom/interface/lonparmset.pm:1.444	Wed May  6 16:19:34 2009
+++ loncom/interface/lonparmset.pm	Fri May  8 22:47:01 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.444 2009/05/06 16:19:34 bisitz Exp $
+# $Id: lonparmset.pm,v 1.445 2009/05/08 22:47:01 neumanie Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1321,12 +1321,8 @@
 
 </script>
 ENDSCRIPT
-    $r->print();
-    $r->print('<tr>');
-    $r->print('<td style="width:350px;border:1pt solid;font-weight:bold;color:#000000;background-color:#ccccff;vertical-align:top;">');
-    $r->print('<blockquote>'.&mt('Select Parameters to View').'</blockquote>');
-    $r->print('</td>');                  
-    $r->print('<td style="width:700px; border:1pt solid;padding-left:10px"><blockquote>'); 
+    $r->print();    
+    $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parameters to View')));
     $r->print("\n".'<table id="LC_parm_overview_parm_menu"><tr>');
     my $cnt=0;
     foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) {
@@ -1384,16 +1380,11 @@
              .'</td>'
              .'</tr></table>'
     );
-    $r->print('</blockquote></td></tr>');
 }
 
 sub partmenu {
-    my ($r,$allparts,$psprt)=@_;
-    $r->print('<tr>');
-    $r->print('<td style="width:350px;border:1pt solid;font-weight:bold;color:#000000;background-color:#ccccff;vertical-align:top;">');
-    $r->print('<blockquote>'. &mt('Select Parts to View').'</blockquote>');
-    $r->print('</td>');                  
-    $r->print('<td style="width:700px; border:1pt solid;padding-left:10px"><blockquote>'); 
+    my ($r,$allparts,$psprt)=@_;    
+    
     $r->print('<select multiple="multiple" name="psprt" size="8">');
     $r->print('<option value="all"');
     $r->print(' selected="selected"') unless (@{$psprt});
@@ -1411,8 +1402,7 @@
 	    $r->print('>'.$$allparts{$tempkey}.'</option>');
 	}
     }
-    $r->print('</select>');
-     $r->print('</blockquote></td></tr>');
+    $r->print('</select>');    
 }
 
 sub usermenu {
@@ -1495,50 +1485,36 @@
         $groups.='</select>';
     }
 
-    if (%sectionhash || %grouphash) {   
-        $r->print('<tr>');
-        $r->print('<td style="width:350px;border:1pt solid;font-weight:bold;color:#000000;background-color:#ccccff;vertical-align:top;">');
-        $r->print('<blockquote>'.&mt('Group/Section').'</blockquote>');
-        $r->print('</td>');                  
-        $r->print('<td style="width:700px; border:1pt solid;padding-left:10px"><blockquote>');
-        $r->print($sections.$groups);
-        $r->print('</blockquote></td></tr>'); 
-    }
-    $r->print('<tr>');
-    $r->print('<td style="width:350px;border:1pt solid;font-weight:bold;color:#000000;background-color:#ccccff;vertical-align:top;">');
-    $r->print('<blockquote>'. &mt('User').'</blockquote>');
-    $r->print('</td>');                  
-    $r->print('<td style="width:700px; border:1pt solid;padding-left:10px"><blockquote>');
-             
+    if (%sectionhash || %grouphash) {
+        $r->print(&Apache::lonhtmlcommon::row_title(&mt('Group/Section')));       
+        $r->print($sections.$groups);        
+    }
+    
+    $r->print(&Apache::lonhtmlcommon::row_title(&mt('User')));             
     $r->print(&mt('For User [_1] or Student/Employee ID [_2] at Domain [_3]'
                  ,'<input type="text" value="'.$uname.'" size="12" name="uname" />'
                  ,'<input type="text" value="'.$id.'" size="12" name="id" /> '
-                 ,$chooseopt));        
-   
-   $r->print('</blockquote></td></tr>'); 
+                 ,$chooseopt));  
 }
 
 sub displaymenu {
     my ($r,$allparms,$allparts,$pscat,$psprt,$keyorder)=@_;
     $r->print('<div class="LC_ContentBoxSpecial">');
     $r->print('<h2 class="LC_hcell">Step 2</h2>');
-    $r->print('<blockquote>');
-    $r->print('<table border="0" style="border-style:solid;border-collapse:seperate;text-align:left;margin-left:auto;margin-right:auto;border-spacing:0pt;">');
-
-    #$r->print('<table border="1"><tr><th>'.&mt('Select Parameters to View').'</th><th>'. &mt('Select Parts to View').'</th></tr><tr><td>');  
+    $r->print('<div class="LC_BoxPadding">' );
+    $r->print(&Apache::lonhtmlcommon::start_pick_box());
+    
     &parmmenu($r,$allparms,$pscat,$keyorder);
-   
+   $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View')));
     &partmenu($r,$allparts,$psprt);
-    $r->print('</table></blockquote></div>');
+    $r->print(&Apache::lonhtmlcommon::end_pick_box());
+    $r->print('</div></div>');
 }
 
-sub mapmenu {##
+sub mapmenu {
     my ($r,$allmaps,$pschp,$maptitles)=@_; 
-    $r->print('<tr>');
-    $r->print('<td style="width:350px;border:1pt solid;font-weight:bold;color:#000000;background-color:#ccccff;vertical-align:top;">');
-    $r->print('<blockquote>'.&mt('Select Enclosing Map or Folder').'</blockquote>');
-    $r->print('</td>');                  
-    $r->print('<td style="width:700px; border:1pt solid;padding-left:10px"><blockquote>'); 
+   
+    $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Enclosing Map or Folder')));
     $r->print('<select name="pschp">');
     $r->print('<option value="all">'.&mt('All Maps or Folders').'</option>');
     foreach (sort {$$allmaps{$a} cmp $$allmaps{$b}} keys %{$allmaps}) {
@@ -1547,16 +1523,13 @@
 	$r->print('>'.$$maptitles{$_}.($$allmaps{$_}!~/^uploaded/?' ['.$$allmaps{$_}.']':'').'</option>');
     }
     $r->print("</select>");
-    $r->print('</blockquote></td></tr>');
+   
 }
 
 sub levelmenu {
     my ($r,$alllevs,$parmlev)=@_;    
-    $r->print('<tr>');
-    $r->print('<td style="width:350px;border:1pt solid;font-weight:bold;color:#000000;background-color:#ccccff;vertical-align:top;">');
-    $r->print('<blockquote>'.&mt('Select Parameter Level').&Apache::loncommon::help_open_topic('Course_Parameter_Levels').'</blockquote>');
-    $r->print('</td>');                  
-    $r->print('<td style="width:700px; border:1pt solid;padding-left:10px"><blockquote>'); 
+    
+    $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parameter Level').&Apache::loncommon::help_open_topic('Course_Parameter_Levels')));
     $r->print('<select name="parmlev">');
     foreach (reverse sort keys %{$alllevs}) {
 	$r->print('<option value="'.$$alllevs{$_}.'"');
@@ -1565,8 +1538,7 @@
 	}
 	$r->print('>'.&mt($_).'</option>');
     }
-    $r->print("</select>");
-    $r->print('</blockquote></td></tr>');
+    $r->print("</select>");    
 }
 
 
@@ -1889,21 +1861,22 @@
 		  '" name="recent_'.$_.'" />');
     }
                         
-    if (!$pssymb) {	
+    if (!$pssymb) {
+	
         $r->print('<div class="LC_ContentBoxSpecial">');
         $r->print('<h2 class="LC_hcell">Step 1</h2>');
-        $r->print('<blockquote>');
-        $r->print('<table border="0" style="border-style:solid;border-collapse:seperate;text-align:left;margin-left:auto;margin-right:auto;border-spacing:0pt;">');
+        $r->print('<div class="LC_BoxPadding">' );
+        $r->print(&Apache::lonhtmlcommon::start_pick_box());
+       
         &levelmenu($r,\%alllevs,$parmlev);
        
-	if ($parmlev ne 'general') {
-           
-	    &mapmenu($r,\%allmaps,$pschp,\%maptitles);
-	    
+	if ($parmlev ne 'general') {           
+	    &mapmenu($r,\%allmaps,$pschp,\%maptitles);	    
 	}
-        $r->print('</table>');
-        $r->print('</blockquote>');
-        $r->print('</div>');
+           
+        $r->print(&Apache::lonhtmlcommon::end_pick_box());        
+        $r->print('</div></div>');
+
 	&displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder);
     } else {
         my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb);
@@ -1915,12 +1888,12 @@
     }
     $r->print('<div class="LC_ContentBoxSpecial">');
     $r->print('<h2 class="LC_hcell">Step 3</h2>');
-    $r->print('<blockquote>');
-    $r->print('<table border="0" style="border-style:solid;border-collapse:seperate;text-align:left;margin-left:auto;margin-right:auto;border-spacing:0pt;">');
-    &usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups);    
-    $r->print('</table>');
-    $r->print('</blockquote>');
-    $r->print('</div>');
+    $r->print('<div class="LC_BoxPadding">' );
+    $r->print(&Apache::lonhtmlcommon::start_pick_box());
+    &usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups);
+   
+    $r->print(&Apache::lonhtmlcommon::end_pick_box());
+    $r->print('</div></div>');
 
     $r->print('<p>'.$message.'</p>');
 
@@ -3630,21 +3603,32 @@
     }
 # Menu to select levels, etc
 
-    $r->print('<table id="LC_parm_overview_scope">
-               <tr><td class="LC_parm_overview_level_menu">');
+    #$r->print('<table id="LC_parm_overview_scope">
+    #           <tr><td class="LC_parm_overview_level_menu">');
+    $r->print('<div class="LC_ContentBoxSpecial">');
+    #$r->print('<h2 class="LC_hcell">Step 1</h2>');
+    $r->print('<div class="LC_BoxPadding">' );
+    $r->print(&Apache::lonhtmlcommon::start_pick_box());
     &levelmenu($r,\%alllevs,$parmlev);
     if ($parmlev ne 'general') {
-	$r->print('<td class="LC_parm_overview_map_menu">');
+	#$r->print('<td class="LC_parm_overview_map_menu">');
 	&mapmenu($r,\%allmaps,$pschp,\%maptitles);
-	$r->print('</td>');
+	#$r->print('</td>');
     }
-    $r->print('</td></tr></table>');
-
-    $r->print('<table id="LC_parm_overview_controls">
-               <tr><td class="LC_parm_overview_parm_selectors">');  
+    $r->print(&Apache::lonhtmlcommon::end_pick_box());
+    $r->print('</div></div>');
+    #$r->print('</td></tr></table>');
+    
+    #$r->print('<table id="LC_parm_overview_controls">
+    #           <tr><td class="LC_parm_overview_parm_selectors">');
+    $r->print('<div class="LC_ContentBoxSpecial">');
+    $r->print('<div class="LC_BoxPadding">' );
+    $r->print(&Apache::lonhtmlcommon::start_pick_box());  
     &parmmenu($r,\%allparms,\@pscat,\%keyorder);
-    $r->print('</td><td class="LC_parm_overview_restrictions">
-                <table class="LC_parm_overview_restrictions">'.
+
+    $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View')));    
+    #$r->print('</td><td class="LC_parm_overview_restrictions">'.
+     $r->print('<table>'.
               '<tr><th>'.&mt('Parts').'</th><th>'.&mt('Section(s)').
               '</th><th>'.&mt('Group(s)').'</th></tr><tr><td>');
     &partmenu($r,\%allparts,\@psprt);
@@ -3653,14 +3637,19 @@
     $r->print('</td><td>');
     &groupmenu($r,\@selected_groups);
     $r->print('</td></tr></table>');
-    $r->print('</td></tr></table>');
- 
+    #$r->print('</td></tr></table>');
+    $r->print(&Apache::lonhtmlcommon::end_pick_box());
+    $r->print('</div></div>');
+
+    $r->print('<div class="LC_ContentBoxSpecial">');
+    $r->print('<div class="LC_BoxPadding">' );
     my $sortorder=$env{'form.sortorder'};
     unless ($sortorder) { $sortorder='realmstudent'; }
     &sortmenu($r,$sortorder);
-
+    $r->print('</div></div>');
+   
     $r->print('<p><input type="submit" name="dis" value="'.&mt('Display').'" /></p>');
-
+    
 # Build the list data hash from the specified parms
 
     my $listdata;

--neumanie1241822822--