Diff for /loncom/interface/courseprefs.pm between versions 1.27 and 1.28.2.4

version 1.27, 2010/04/02 21:39:12 version 1.28.2.4, 2010/12/22 16:46:43
Line 344  sub handler { Line 344  sub handler {
         'courseinfo' =>          'courseinfo' =>
                    { text => $lt{'gens'},                     { text => $lt{'gens'},
                      help => 'Course_Environment',                       help => 'Course_Environment',
                        header => [{col1 => 'Setting',
                                    col2 => 'Value'}],
                      ordered => ['owner','co-owners','description','courseid',                       ordered => ['owner','co-owners','description','courseid',
                                  'categories','hidefromcat','externalsyllabus',                                   'categories','hidefromcat','externalsyllabus',
                                  'cloners','url','rolenames'],                                   'url','rolenames','cloners'],
                      itemtext => {                       itemtext => {
                                    'owner'            => $lt{'ownr'},                                     'owner'            => $lt{'ownr'},
                                    'co-owners'        => $lt{'cown'},                                     'co-owners'        => $lt{'cown'},
Line 363  sub handler { Line 365  sub handler {
         'localization' =>          'localization' =>
                     { text => 'Language and Time Localization',                      { text => 'Language and Time Localization',
                       help => 'Course_Environment',                        help => 'Course_Environment',
                         header => [{col1 => 'Setting',
                                     col2 => 'Value',}],
                       ordered => ['languages','timezone','datelocale'],                        ordered => ['languages','timezone','datelocale'],
                       itemtext => {                        itemtext => {
                                     languages  => 'Languages used',                                      languages  => 'Languages used',
Line 374  sub handler { Line 378  sub handler {
                     { text => 'Feedback messages',                      { text => 'Feedback messages',
                       help => 'Course_Environment',                        help => 'Course_Environment',
                       header => [{col1 => 'Questions about:',                        header => [{col1 => 'Questions about:',
                                   col2 => 'Recipients'}],                                    col2 => 'Recipients'},
                                    {col1 => 'Questions about:',
                                     col2 => 'Custom Text'}],
                       ordered => ['question.email','comment.email','policy.email'],                        ordered => ['question.email','comment.email','policy.email'],
                       itemtext => {                        itemtext => {
                                      'question.email' => 'Resource Content',                                       'question.email' => 'Resource Content',
Line 385  sub handler { Line 391  sub handler {
         'discussion' =>          'discussion' =>
                     { text => 'Discussion and Chat',                      { text => 'Discussion and Chat',
                       help => 'Course_Environment',                        help => 'Course_Environment',
                       ordered => ['plc.roles.denied','plc.users.denied',                        ordered => ['pch.roles.denied','pch.users.denied',
                                   'pch.roles.denied','pch.users.denied',                                    'plc.roles.denied','plc.users.denied',
                                   'allow_limited_html_in_feedback',                                    'allow_limited_html_in_feedback',
                                   'allow_discussion_post_editing'],                                    'allow_discussion_post_editing'],
                       itemtext => {                        itemtext => {
                          'plc.roles.denied'             => 'No Resource Discussion',                           'pch.roles.denied'             => 'No Resource Discussion',
                          'plc.users.denied'             => 'No Resource Discussion',                           'pch.users.denied'             => 'No Resource Discussion',
                          'pch.roles.denied'             => 'No Chat room use',                           'plc.roles.denied'             => 'No Chat room use',
                          'pch.users.denied'             => 'No Chat room use',                           'plc.users.denied'             => 'No Chat room use',
                          allow_limited_html_in_feedback => 'Allow limited HTML in discussion',                           allow_limited_html_in_feedback => 'Allow limited HTML in discussion',
                          allow_discussion_post_editing  => 'Users can edit/delete own discussion posts',                           allow_discussion_post_editing  => 'Users can edit/delete own discussion posts',
                                   },                                    },
Line 423  sub handler { Line 429  sub handler {
         'appearance' =>          'appearance' =>
                    { text => 'Display of resources ',                     { text => 'Display of resources ',
                      help => 'Course_Environment',                       help => 'Course_Environment',
                        header => [{col1 => 'Setting',
                                    col2 => 'Value',}],
                      ordered => ['default_xml_style','pageseparators',                       ordered => ['default_xml_style','pageseparators',
                                  'disable_receipt_display','texengine',                                   'disable_receipt_display','texengine',
                                  'tthoptions'],                                   'tthoptions'],
Line 437  sub handler { Line 445  sub handler {
         'grading' =>          'grading' =>
                   { text => 'Grading',                    { text => 'Grading',
                     help => 'Course_Environment',                      help => 'Course_Environment',
                       header => [{col1 => 'Setting',
                                   col2 => 'Value',}],
                     ordered => ['grading','rndseed',                      ordered => ['grading','rndseed',
                                 'receiptalg','disablesigfigs'],                                  'receiptalg','disablesigfigs'],
                     itemtext => {                      itemtext => {
Line 450  sub handler { Line 460  sub handler {
         'printouts' =>          'printouts' =>
                   { text => 'Printout generation',                    { text => 'Printout generation',
                     help => 'Course_Environment',                      help => 'Course_Environment',
                       header => [{col1 => 'Setting',
                                   col2 => 'Value',}],
                     ordered => ['problem_stream_switch','suppress_tries',                      ordered => ['problem_stream_switch','suppress_tries',
                                 'default_paper_size','print_header_format',                                  'default_paper_size','print_header_format',
                                 'disableexampointprint','canuse_pdfforms'],                                  'disableexampointprint','canuse_pdfforms'],
Line 465  sub handler { Line 477  sub handler {
         'spreadsheet' =>          'spreadsheet' =>
                   { text => 'Spreadsheets',                    { text => 'Spreadsheets',
                     help => 'Course_Environment',                      help => 'Course_Environment',
                       header => [{col1 => 'Setting',
                                   col2 => 'Value'}],
                     ordered => ['spreadsheet_default_classcalc',                      ordered => ['spreadsheet_default_classcalc',
                                 'spreadsheet_default_studentcalc',                                  'spreadsheet_default_studentcalc',
                                 'spreadsheet_default_assesscalc','hideemptyrows'],                                  'spreadsheet_default_assesscalc','hideemptyrows'],
Line 478  sub handler { Line 492  sub handler {
         'bridgetasks' =>          'bridgetasks' =>
                   { text => 'Bridge tasks',                    { text => 'Bridge tasks',
                     help => 'Course_Environment',                      help => 'Course_Environment',
                       header => [{col1 => 'Setting',
                                   col2 => 'Value'}],
                     ordered => ['task_messages','task_grading',                      ordered => ['task_messages','task_grading',
                                 'suppress_embed_prompt'],                                  'suppress_embed_prompt'],
                     itemtext => {                      itemtext => {
Line 533  sub print_config_box { Line 549  sub print_config_box {
     my $itemtext = $item->{'itemtext'};      my $itemtext = $item->{'itemtext'};
     my $rowtotal = 0;      my $rowtotal = 0;
     my $output =      my $output =
         '<h3><a href="#">'.&mt($item->{text}).'</a></h3>           '<table class="LC_nested_outer">
         <div>&nbsp;<span style="float:right">'.            <tr>
          &Apache::loncommon::help_open_topic($item->{'help'}).'</span>';             <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')) {      if (($action eq 'feedback') || ($action eq 'classlists')) {
         $output .= '          $output .= '
             <table class="LC_nested">';               <tr>
              <td>
               <table class="LC_nested">';
         if (exists $item->{'header'}->[0]->{'col1'} ||           if (exists $item->{'header'}->[0]->{'col1'} || 
             exists $item->{'header'}->[0]->{'col2'}) {              exists $item->{'header'}->[0]->{'col2'}) {
  $output .= '             $output .= '          
Line 555  sub print_config_box { Line 576  sub print_config_box {
         }          }
         $output .= '          $output .= '
            </table>             </table>
             </td>
            </tr>
            <tr>
              <td>
             <table class="LC_nested">              <table class="LC_nested">
              <tr class="LC_info_row">               <tr class="LC_info_row">
               <td class="LC_left_item">'.&mt($item->{'header'}->[1]->{'col1'}).'</td>';                <td class="LC_left_item">'.&mt($item->{'header'}->[1]->{'col1'}).'</td>';
Line 565  sub print_config_box { Line 590  sub print_config_box {
             $output .= &print_classlists('middle',$cdom,$settings,$itemtext,\$rowtotal,$crstype).              $output .= &print_classlists('middle',$cdom,$settings,$itemtext,\$rowtotal,$crstype).
                        '                         '
             </table>              </table>
              </td>
             </tr>
             <tr>
              <td>
             <table class="LC_nested">';              <table class="LC_nested">';
             if (exists $item->{'header'}->[0]->{'col1'} ||               if (exists $item->{'header'}->[0]->{'col1'} || 
             exists $item->{'header'}->[0]->{'col2'}) {              exists $item->{'header'}->[0]->{'col2'}) {
Line 573  sub print_config_box { Line 602  sub print_config_box {
   <td class="LC_left_item">'.&mt($item->{'header'}->[0]->{'col1'}).'</td>    <td class="LC_left_item">'.&mt($item->{'header'}->[0]->{'col1'}).'</td>
   <td class="LC_right_item">'.&mt($item->{'header'}->[0]->{'col2'}).'</td>    <td class="LC_right_item">'.&mt($item->{'header'}->[0]->{'col2'}).'</td>
  </tr>';   </tr>';
         }              }
         }          }
     } else {      } else {
         $output .= '          $output .= '
             <tr>
              <td>
             <table class="LC_nested">';              <table class="LC_nested">';
         if (exists $item->{'header'}->[0]->{'col1'} ||           if (exists $item->{'header'}->[0]->{'col1'} || 
             exists $item->{'header'}->[0]->{'col2'}) {              exists $item->{'header'}->[0]->{'col2'}) {
Line 613  sub print_config_box { Line 644  sub print_config_box {
     }      }
     $output .= '      $output .= '
    </table>     </table>
 </div>';    </td>
    </tr>
   </table><br />';
     return ($output,$rowtotal);      return ($output,$rowtotal);
 }  }
   
Line 687  sub process_changes { Line 720  sub process_changes {
                                 if (exists($env{'form.cloners_activate'})) {                                  if (exists($env{'form.cloners_activate'})) {
                                     my $actnum = $env{'form.cloners_activate'};                                      my $actnum = $env{'form.cloners_activate'};
                                     if ($actnum ne '') {                                      if ($actnum ne '') {
                                         if ($env{'form.clonersdom_'.$actnum} ne '') {                                          if ($env{'form.cloners_dom_'.$actnum} ne '') {
                                             my $clonedom = $env{'form.clonersdom_'.$actnum};                                              my $clonedom = $env{'form.cloners_dom_'.$actnum};
                                             if (&check_clone($clonedom,$disallowed) eq 'ok') {                                              if (&check_clone($clonedom,$disallowed) eq 'ok') {
                                                 $newvalues{$entry} = '*:'.$clonedom;                                                  $newvalues{$entry} = '*:'.$clonedom;
                                                 push(@clonedoms,$newvalues{$entry});                                                  push(@clonedoms,$newvalues{$entry});
Line 1000  sub process_changes { Line 1033  sub process_changes {
                                                 $hdr .= $env{'form.printfmthdr_limit_'.$i};                                                  $hdr .= $env{'form.printfmthdr_limit_'.$i};
                                             }                                              }
                                             $hdr .= $env{'form.printfmthdr_sub_'.$i};                                              $hdr .= $env{'form.printfmthdr_sub_'.$i};
                                         } elsif ($env{'form.printfmthdr_sub_'.$i} ne '') {                                          } elsif ($env{'form.printfmthdr_text_'.$i} ne '') {
                                             $hdr = $env{'form.printfmthdr_sub_'.$i};                                              $hdr = $env{'form.printfmthdr_text_'.$i};
                                         }                                          }
                                         $newhdr[$env{'form.printfmthdr_pos_'.$i}] = $hdr;                                          $newhdr[$env{'form.printfmthdr_pos_'.$i}] = $hdr;
                                     }                                      }
Line 1296  sub store_changes { Line 1329  sub store_changes {
                                         if ($key eq 'url') {                                          if ($key eq 'url') {
                                             my $bkuptime=time;                                              my $bkuptime=time;
                                             $output .= ('&nbsp;'x2).&mt('(Previous URL backed up)').': '.                                              $output .= ('&nbsp;'x2).&mt('(Previous URL backed up)').': '.
                                             $storehash{'top level map backup '.$bkuptime} => $values->{$key};                                              $storehash{'top level map backup '.$bkuptime} = $values->{$key};
                                         }                                          }
                                         $output .= '</li>';                                          $output .= '</li>';
                                     }                                      }
Line 1659  sub print_courseinfo { Line 1692  sub print_courseinfo {
                            '</span>',                             '</span>',
                    input => 'textbox',                     input => 'textbox',
                    size  => '40',                     size  => '40',
                    advanced => 1  
                  },                   },
         'description'  => {           'description'  => { 
                    text => '<b>'.&mt($itemtext->{'description'}).'</b>',                     text => '<b>'.&mt($itemtext->{'description'}).'</b>',
Line 1683  sub print_courseinfo { Line 1715  sub print_courseinfo {
                            &mt('Owner and Coordinators included automatically'),                             &mt('Owner and Coordinators included automatically'),
                    input => 'textbox',                     input => 'textbox',
                    size  => '40',                     size  => '40',
                    advanced => 1  
                          },                           },
         'rolenames'  => {           'rolenames'  => { 
                    text  => '<b>'.&mt($itemtext->{'rolenames'}).'</b><br />'.                     text  => '<b>'.&mt($itemtext->{'rolenames'}).'</b><br />'.
                             '('.$replace.')',                              '('.$replace.')',
                    input => 'textbox',                     input => 'textbox',
                    size  => '20',                     size  => '20',
                    advanced => 1  
                         },                          },
         'externalsyllabus' => {          'externalsyllabus' => {
                    text => '<b>'.&mt($itemtext->{'externalsyllabus'}).'</b><br />('.                     text => '<b>'.&mt($itemtext->{'externalsyllabus'}).'</b><br />('.
Line 1719  sub print_courseinfo { Line 1749  sub print_courseinfo {
             next if (!$can_categorize);              next if (!$can_categorize);
         }          }
         $count ++;          $count ++;
         if (exists $items{$item}{advanced} && $items{$item}{advanced} == 1) {          $datatable .= &item_table_row_start($items{$item}{text},$count);
         $datatable .= &item_table_row_start($items{$item}{text},$count,"advanced");  
         } else {  
         $datatable .= &item_table_row_start($items{$item}{text},$count);  
         }  
         if ($items{$item}{input} eq 'radio') {          if ($items{$item}{input} eq 'radio') {
             $datatable .= &yesno_radio($item,$settings);              $datatable .= &yesno_radio($item,$settings);
         } elsif ($item eq 'cloners') {          } elsif ($item eq 'cloners') {
Line 2281  sub print_feedback { Line 2307  sub print_feedback {
   
     foreach my $item (@{$ordered}) {      foreach my $item (@{$ordered}) {
         $count ++;          $count ++;
         if ($position eq 'top') {          $datatable .= &item_table_row_start($items{$item}{text},$count);
         $datatable .= &item_table_row_start($items{$item}{text},$count);  
         } else {  
         $datatable .= &item_table_row_start($items{$item}{text}."<br/>(Custom text)",$count, "advanced");  
         }  
         if ($position eq 'top') {          if ($position eq 'top') {
             my $includeempty = 0;              my $includeempty = 0;
             $datatable .= &user_table($cdom,$item,\@sections,              $datatable .= &user_table($cdom,$item,\@sections,
                                       $settings->{$item},\%lt);                                        $settings->{$item},\%lt);
         } else {          } else {
             $datatable .= &Apache::lonhtmlcommon::textbox($item.'.text',              $datatable .= &Apache::lonhtmlcommon::textbox($item.'.text',
                               $settings->{$item.'.text'},$items{$item}{size});                                  $settings->{$item.'.text'},$items{$item}{size});
         }          }
         $datatable .= &item_table_row_end();          $datatable .= &item_table_row_end();
     }      }
Line 2556  sub role_checkboxes { Line 2578  sub role_checkboxes {
                 $output .= '<tr>';                  $output .= '<tr>';
             }              }
         }          }
         $output .= '<td align="left"><span class="LC_nobreak"><label><input type="checkbox" name='.          $output .= '<td align="left"><span class="LC_nobreak"><label><input type="checkbox" name="'.
                    $item.'" value="'.$role.'"'.$checked.'/>&nbsp;'.                     $item.'" value="'.$role.'"'.$checked.'/>&nbsp;'.
                    $plrole.'</label></span></td>';                     $plrole.'</label></span></td>';
         if ($showsections) {          if ($showsections) {
Line 2588  sub role_checkboxes { Line 2610  sub role_checkboxes {
                     $output .= '<tr>';                      $output .= '<tr>';
                 }                  }
             }              }
             $output .= '<td><span class="LC_nobreak"><label><input type="checkbox" name='.              $output .= '<td><span class="LC_nobreak"><label><input type="checkbox" name="'.
                        $item.'" value="'.$value.'"'.$checked.' />&nbsp;'.$rolename.                         $item.'" value="'.$value.'"'.$checked.' />&nbsp;'.$rolename.
                        '</label></span></td>';                         '</label></span></td>';
             if ($showsections) {              if ($showsections) {
Line 3301  sub substitution_selector { Line 3323  sub substitution_selector {
                     a => 'assignment note',                      a => 'assignment note',
              );               );
     my $output .= &mt('Substitution').'<br />'.      my $output .= &mt('Substitution').'<br />'.
                   '<select name=""printfmthdr_sub__'.$num.'">';                    '<select name="printfmthdr_sub_'.$num.'">';
     if ($subst eq '') {      if ($subst eq '') {
         $output .= '<option value="" selected="selected"> </option>';          $output .= '<option value="" selected="selected"> </option>';
     }      }

Removed from v.1.27  
changed lines
  Added in v.1.28.2.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>