[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /interface courseprefs.pm

raeburn raeburn@source.lon-capa.org
Sat, 14 Aug 2010 13:46:13 -0000


This is a MIME encoded message

--raeburn1281793573
Content-Type: text/plain

raeburn		Sat Aug 14 13:46:13 2010 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/interface	courseprefs.pm 
  Log:
  - Reverse 1.16, 1.18, 1.19, 1.20 (part).
   - jQuery accordion not in 2.10.
  
  
--raeburn1281793573
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20100814134613.txt"

Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.28 loncom/interface/courseprefs.pm:1.28.2.1
--- loncom/interface/courseprefs.pm:1.28	Sat May 22 16:39:13 2010
+++ loncom/interface/courseprefs.pm	Sat Aug 14 13:46:13 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set configuration settings for a course
 #
-# $Id: courseprefs.pm,v 1.28 2010/05/22 16:39:13 raeburn Exp $
+# $Id: courseprefs.pm,v 1.28.2.1 2010/08/14 13:46:13 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -344,9 +344,11 @@
         'courseinfo' =>
                    { text => $lt{'gens'},
                      help => 'Course_Environment',
+                     header => [{col1 => 'Setting',
+                                 col2 => 'Value'}],
                      ordered => ['owner','co-owners','description','courseid',
                                  'categories','hidefromcat','externalsyllabus',
-                                 'cloners','url','rolenames'],
+                                 'url','rolenames','cloners'],
                      itemtext => {
                                    'owner'            => $lt{'ownr'},
                                    'co-owners'        => $lt{'cown'},
@@ -363,6 +365,8 @@
         'localization' =>
                     { text => 'Language and Time Localization',
                       help => 'Course_Environment',
+                      header => [{col1 => 'Setting',
+                                  col2 => 'Value',}],
                       ordered => ['languages','timezone','datelocale'],
                       itemtext => {
                                     languages  => 'Languages used',
@@ -374,7 +378,9 @@
                     { text => 'Feedback messages',
                       help => 'Course_Environment',
                       header => [{col1 => 'Questions about:',
-                                  col2 => 'Recipients'}],
+                                  col2 => 'Recipients'},
+                                 {col1 => 'Questions about:',
+                                  col2 => 'Custom Text'}],
                       ordered => ['question.email','comment.email','policy.email'],
                       itemtext => {
                                      'question.email' => 'Resource Content',
@@ -423,6 +429,8 @@
         'appearance' =>
                    { text => 'Display of resources ',
                      help => 'Course_Environment',
+                     header => [{col1 => 'Setting',
+                                 col2 => 'Value',}],
                      ordered => ['default_xml_style','pageseparators',
                                  'disable_receipt_display','texengine',
                                  'tthoptions'],
@@ -437,6 +445,8 @@
         'grading' =>
                   { text => 'Grading',
                     help => 'Course_Environment',
+                    header => [{col1 => 'Setting',
+                                col2 => 'Value',}],
                     ordered => ['grading','rndseed',
                                 'receiptalg','disablesigfigs'],
                     itemtext => {
@@ -450,6 +460,8 @@
         'printouts' =>
                   { text => 'Printout generation',
                     help => 'Course_Environment',
+                    header => [{col1 => 'Setting',
+                                col2 => 'Value',}],
                     ordered => ['problem_stream_switch','suppress_tries',
                                 'default_paper_size','print_header_format',
                                 'disableexampointprint','canuse_pdfforms'],
@@ -465,6 +477,8 @@
         'spreadsheet' =>
                   { text => 'Spreadsheets',
                     help => 'Course_Environment',
+                    header => [{col1 => 'Setting',
+                                col2 => 'Value'}],
                     ordered => ['spreadsheet_default_classcalc',
                                 'spreadsheet_default_studentcalc',
                                 'spreadsheet_default_assesscalc','hideemptyrows'],
@@ -478,6 +492,8 @@
         'bridgetasks' =>
                   { text => 'Bridge tasks',
                     help => 'Course_Environment',
+                    header => [{col1 => 'Setting',
+                                col2 => 'Value'}],
                     ordered => ['task_messages','task_grading',
                                 'suppress_embed_prompt'],
                     itemtext => {
@@ -533,12 +549,17 @@
     my $itemtext = $item->{'itemtext'};
     my $rowtotal = 0;
     my $output =
-        '<h3><a href="#">'.&mt($item->{text}).'</a></h3>
-        <div>&nbsp;<span style="float:right">'.
-         &Apache::loncommon::help_open_topic($item->{'help'}).'</span>';
+         '<table class="LC_nested_outer">
+          <tr>
+           <th align="left" valign="middle"><span class="LC_nobreak" style="font-size: larger;" >'.
+           &mt($item->{text}).'&nbsp;'.
+           &Apache::loncommon::help_open_topic($item->{'help'}).'</span></th>'."\n".
+          '</tr>';
     if (($action eq 'feedback') || ($action eq 'classlists')) {
         $output .= '
-            <table class="LC_nested">';   
+          <tr>
+           <td>
+            <table class="LC_nested">';
         if (exists $item->{'header'}->[0]->{'col1'} || 
             exists $item->{'header'}->[0]->{'col2'}) {
 			$output .= '          
@@ -555,6 +576,10 @@
         }
         $output .= '
            </table>
+          </td>
+         </tr>
+         <tr>
+           <td>
             <table class="LC_nested">
              <tr class="LC_info_row">
               <td class="LC_left_item">'.&mt($item->{'header'}->[1]->{'col1'}).'</td>';
@@ -565,6 +590,10 @@
             $output .= &print_classlists('middle',$cdom,$settings,$itemtext,\$rowtotal,$crstype).
                        '
             </table>
+           </td>
+          </tr>
+          <tr>
+           <td>
             <table class="LC_nested">';
             if (exists $item->{'header'}->[0]->{'col1'} || 
             	exists $item->{'header'}->[0]->{'col2'}) {
@@ -573,10 +602,12 @@
 				  <td class="LC_left_item">'.&mt($item->{'header'}->[0]->{'col1'}).'</td>
 				  <td class="LC_right_item">'.&mt($item->{'header'}->[0]->{'col2'}).'</td>
 				</tr>';
-        	}
+            }
         }
     } else {
         $output .= '
+          <tr>
+           <td>
             <table class="LC_nested">';
         if (exists $item->{'header'}->[0]->{'col1'} || 
             exists $item->{'header'}->[0]->{'col2'}) {
@@ -613,7 +644,9 @@
     }
     $output .= '
    </table>
-</div>';
+  </td>
+ </tr>
+</table><br />';
     return ($output,$rowtotal);
 }
 
@@ -1659,7 +1692,6 @@
                            '</span>',
                    input => 'textbox',
                    size  => '40',
-                   advanced => 1
                  },
         'description'  => { 
                    text => '<b>'.&mt($itemtext->{'description'}).'</b>',
@@ -1683,14 +1715,12 @@
                            &mt('Owner and Coordinators included automatically'),
                    input => 'textbox',
                    size  => '40',
-                   advanced => 1
                          },
         'rolenames'  => { 
                    text  => '<b>'.&mt($itemtext->{'rolenames'}).'</b><br />'.
                             '('.$replace.')',
                    input => 'textbox',
                    size  => '20',
-                   advanced => 1
                         },
         'externalsyllabus' => {
                    text => '<b>'.&mt($itemtext->{'externalsyllabus'}).'</b><br />('.
@@ -1719,11 +1749,7 @@
             next if (!$can_categorize);
         }
         $count ++;
-        if (exists $items{$item}{advanced} && $items{$item}{advanced} == 1) {
-        	$datatable .= &item_table_row_start($items{$item}{text},$count,"advanced");
-        } else {
-        	$datatable .= &item_table_row_start($items{$item}{text},$count);
-        }
+        $datatable .= &item_table_row_start($items{$item}{text},$count);
         if ($items{$item}{input} eq 'radio') {
             $datatable .= &yesno_radio($item,$settings);
         } elsif ($item eq 'cloners') {
@@ -2281,18 +2307,14 @@
 
     foreach my $item (@{$ordered}) {
         $count ++;
-        if ($position eq 'top') {
-        	$datatable .= &item_table_row_start($items{$item}{text},$count);
-        } else {
-        	$datatable .= &item_table_row_start($items{$item}{text}."<br/>(Custom text)",$count, "advanced");
-        }
+       	$datatable .= &item_table_row_start($items{$item}{text},$count);
         if ($position eq 'top') {
             my $includeempty = 0;
             $datatable .= &user_table($cdom,$item,\@sections,
                                       $settings->{$item},\%lt);
         } else {
             $datatable .= &Apache::lonhtmlcommon::textbox($item.'.text',
-                              $settings->{$item.'.text'},$items{$item}{size});  
+                              $settings->{$item.'.text'},$items{$item}{size});
         }
         $datatable .= &item_table_row_end();
     }

--raeburn1281793573--