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

banghart lon-capa-cvs@mail.lon-capa.org
Wed, 15 Nov 2006 20:13:47 -0000


banghart		Wed Nov 15 15:13:47 2006 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  	Modest improvement in appearance of restrict metadata.
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.344 loncom/interface/lonparmset.pm:1.345
--- loncom/interface/lonparmset.pm:1.344	Mon Oct 16 06:45:24 2006
+++ loncom/interface/lonparmset.pm	Wed Nov 15 15:13:43 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.344 2006/10/16 10:45:24 foxr Exp $
+# $Id: lonparmset.pm,v 1.345 2006/11/15 20:13:43 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3190,6 +3190,7 @@
 sub output_row {
     my ($r, $field_name, $field_text, $added_flag) = @_;
     my $output;
+    $output = "<tr>";
     my $options=$env{'course.'.$env{'request.course.id'}.'.metadata.'.$field_name.'.options'};
     my $values=$env{'course.'.$env{'request.course.id'}.'.metadata.'.$field_name.'.values'};
     if (!defined($options)) {
@@ -3197,9 +3198,10 @@
         $values = '';
     }
     if (!($options =~ /deleted/)) {
-        $output.='<strong>'.$field_text.':</strong>';
-        $output.='<input name="'.$field_name.'_values" type="text" value="'.$values.'" size="80" /><br />';
-
+        $output = "<tr>";
+        $output .= '<td><span class="LC_metadata"><strong>'.$field_text.':</strong></td>';
+        $output .= '<td><input name="'.$field_name.'_values" type="text" value="'.$values.'" size="80" /></span></td>';
+        $output .= "</tr>\n";
         my @options= ( ['active', 'Show to student'],
 		   ['onlyone','Student may select only one choice'],
 		   ['stuadd', 'Student may type choices']);
@@ -3208,10 +3210,11 @@
         }
         foreach my $opt (@options) {
 	    my $checked = ($options =~ m/$opt->[0]/) ? ' checked="checked" ' : '' ;
-	    $output.=('&nbsp;'x5).'<label><input type="checkbox" name="'.
+	    $output .= '<tr><td colspan="2">'.('&nbsp;' x 5).'<span class="LC_metadata"><label><input type="checkbox" name="'.
 	        $field_name.'_'.$opt->[0].'" value="yes"'.$checked.' />'.
-	        &mt($opt->[1]).'</label> <br />';
+	        &mt($opt->[1]).'</label></span> </td></tr>'."\n";
 	}
+	
     }
     return ($output);
 }
@@ -3221,7 +3224,11 @@
     my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};
     my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};
     $r->print(&Apache::loncommon::start_page('Order Metadata Fields'));
-    $r->print(&Apache::lonhtmlcommon::breadcrumbs('Order Metadata Fields'));
+    &Apache::lonhtmlcommon::add_breadcrumb
+            ({href=>"/adm/parmset?action=setrestrictmeta",
+              text=>"Restrict Metadata"},
+             {text=>"Order Metadata"});
+    $r->print(&Apache::lonhtmlcommon::breadcrumbs('Order Metadata'));
     if ($env{'form.storeorder'}) {
         my $newpos = $env{'form.newpos'} - 1;
         my $currentpos = $env{'form.currentpos'} - 1;
@@ -3388,6 +3395,7 @@
     my %metadata_fields = &Apache::lonmeta::fieldnames('portfolio');
     # Now get possible added metadata fields
     my $added_metadata_fields = &get_added_meta_fieldnames(\%metadata_fields);
+    $output .= "<table>";
     foreach my $field (sort(keys(%metadata_fields))) {
         if ($field ne 'courserestricted') {
 	    $output.= &output_row($r, $field, $metadata_fields{$field});
@@ -3397,6 +3405,7 @@
     foreach my $field (sort(keys(%$added_metadata_fields))) {
         $output.= &output_row($r, $field, $$added_metadata_fields{$field},$added_flag);
     }
+    $output .= "</table>";
     $r->print(<<ENDenv);       
         <form method="post" action="/adm/parmset?action=setrestrictmeta" name="form">
         <p>