Diff for /loncom/interface/courseprefs.pm between versions 1.43 and 1.47

version 1.43, 2011/01/15 01:33:04 version 1.47, 2011/10/19 21:15:53
Line 353  sub handler { Line 353  sub handler {
     my %prefs = (      my %prefs = (
         'courseinfo' =>          'courseinfo' =>
                    { text => $lt{'gens'},                     { text => $lt{'gens'},
                      help => 'Course_Environment',                       help => 'Course_Prefs_General',
                      ordered => ['owner','co-owners','loncaparev','description',                       ordered => ['owner','co-owners','loncaparev','description',
                                  'courseid','categories','hidefromcat',                                   'courseid','categories','hidefromcat',
                                  'externalsyllabus','cloners','url','rolenames'],                                   'externalsyllabus','cloners','url','rolenames'],
Line 373  sub handler { Line 373  sub handler {
                     },                      },
         'localization' =>          'localization' =>
                     { text => 'Language and time localization',                      { text => 'Language and time localization',
                       help => 'Course_Environment',                        help => 'Course_Prefs_Language',
                       ordered => ['languages','timezone','datelocale'],                        ordered => ['languages','timezone','datelocale'],
                       itemtext => {                        itemtext => {
                                     languages  => 'Languages used',                                      languages  => 'Languages used',
Line 383  sub handler { Line 383  sub handler {
                     },                      },
         'feedback' =>          'feedback' =>
                     { text => 'Feedback messages',                      { text => 'Feedback messages',
                       help => 'Course_Environment',                        help => 'Course_Prefs_Feedback',
                       header => [{col1 => 'Questions about:',                        header => [{col1 => 'Questions about:',
                                   col2 => 'Recipients'}],                                    col2 => 'Recipients'}],
                       ordered => ['question.email','comment.email','policy.email'],                        ordered => ['question.email','comment.email','policy.email'],
Line 395  sub handler { Line 395  sub handler {
                     },                      },
         'discussion' =>          'discussion' =>
                     { text => 'Discussion and Chat',                      { text => 'Discussion and Chat',
                       help => 'Course_Environment',                        help => 'Course_Prefs_Discussions',
                       ordered => ['pch.roles.denied','pch.users.denied',                        ordered => ['pch.roles.denied','pch.users.denied',
                                   'plc.roles.denied','plc.users.denied',                                    'plc.roles.denied','plc.users.denied',
                                   'allow_limited_html_in_feedback',                                    'allow_limited_html_in_feedback',
Line 411  sub handler { Line 411  sub handler {
                     },                      },
         'classlists' =>          'classlists' =>
                    { text => $lt{'clas'},                     { text => $lt{'clas'},
                      help => 'Course_Environment',                       help => 'Course_Prefs_Classlists',
                      header => [{col1 => 'Type',                       header => [{col1 => 'Type',
                                  col2 => $lt{'defd'}},                                   col2 => $lt{'defd'}},
                                 {col1 => 'Setting',                                  {col1 => 'Setting',
Line 433  sub handler { Line 433  sub handler {
                    },                     },
         'appearance' =>          'appearance' =>
                    { text => 'Display of resources ',                     { text => 'Display of resources ',
                      help => 'Course_Environment',                       help => 'Course_Prefs_Display',
                      ordered => ['default_xml_style','pageseparators',                       ordered => ['default_xml_style','pageseparators',
                                  'disable_receipt_display','texengine',                                   'disable_receipt_display','texengine',
                                  'tthoptions'],                                   'tthoptions'],
Line 447  sub handler { Line 447  sub handler {
                   },                    },
         'grading' =>          'grading' =>
                   { text => 'Grading',                    { text => 'Grading',
                     help => 'Course_Environment',                      help => 'Course_Prefs_Grading',
                     ordered => ['grading','rndseed',                      ordered => ['grading','rndseed',
                                 'receiptalg','disablesigfigs'],                                  'receiptalg','disablesigfigs'],
                     itemtext => {                      itemtext => {
Line 460  sub handler { Line 460  sub handler {
                   },                    },
         'printouts' =>          'printouts' =>
                   { text => 'Printout generation',                    { text => 'Printout generation',
                     help => 'Course_Environment',                      help => 'Course_Prefs_Printouts',
                     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 475  sub handler { Line 475  sub handler {
                   },                    },
         'spreadsheet' =>          'spreadsheet' =>
                   { text => 'Spreadsheets',                    { text => 'Spreadsheets',
                     help => 'Course_Environment',                      help => 'Course_Prefs_Spreadsheet',
                     ordered => ['spreadsheet_default_classcalc',                      ordered => ['spreadsheet_default_classcalc',
                                 'spreadsheet_default_studentcalc',                                  'spreadsheet_default_studentcalc',
                                 'spreadsheet_default_assesscalc','hideemptyrows'],                                  'spreadsheet_default_assesscalc','hideemptyrows'],
Line 488  sub handler { Line 488  sub handler {
                   },                    },
         'bridgetasks' =>          'bridgetasks' =>
                   { text => 'Bridge tasks',                    { text => 'Bridge tasks',
                     help => 'Course_Environment',                      help => 'Course_Prefs_Bridgetasks',
                     ordered => ['task_messages','task_grading',                      ordered => ['task_messages','task_grading',
                                 'suppress_embed_prompt'],                                  'suppress_embed_prompt'],
                     itemtext => {                      itemtext => {
Line 499  sub handler { Line 499  sub handler {
                   },                    },
         'other' =>          'other' =>
                   { text => 'Other settings',                    { text => 'Other settings',
                     help => 'Course_Environment',                      help => 'Course_Prefs_Other',
                     header => [ {col1 => 'Item',                      header => [ {col1 => 'Item',
                                  col2 => 'Value',                                   col2 => 'Value',
                               }],                                }],
Line 509  sub handler { Line 509  sub handler {
         my @allitems = &get_allitems(%prefs);          my @allitems = &get_allitems(%prefs);
         &Apache::lonconfigsettings::make_changes($r,$cdom,$phase,$context,          &Apache::lonconfigsettings::make_changes($r,$cdom,$phase,$context,
                                                  \@prefs_order,\%prefs,\%values,                                                   \@prefs_order,\%prefs,\%values,
                                                   $cnum,undef,\@allitems);                                                    $cnum,undef,\@allitems,'coursepref');
     } elsif ($phase eq 'display') {      } elsif ($phase eq 'display') {
         my $jscript = &get_jscript($cid,$cdom,$phase,$crstype);          my $jscript = &get_jscript($cid,$cdom,$phase,$crstype);
         my @allitems = &get_allitems(%prefs);          my @allitems = &get_allitems(%prefs);
         &Apache::lonconfigsettings::display_settings($r,$cdom,$phase,$context,          &Apache::lonconfigsettings::display_settings($r,$cdom,$phase,$context,
             \@prefs_order,\%prefs,\%values,undef,$jscript,\@allitems,$crstype);              \@prefs_order,\%prefs,\%values,undef,$jscript,\@allitems,$crstype,'coursepref');
     } else {      } else {
         &Apache::lonconfigsettings::display_choices($r,$phase,$context,          &Apache::lonconfigsettings::display_choices($r,$phase,$context,
                                                     \@prefs_order,\%prefs);                                                      \@prefs_order,\%prefs,'coursepref');
     }      }
     return OK;      return OK;
 }  }
Line 544  sub print_config_box { Line 544  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 .= '
             <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 566  sub print_config_box { Line 571  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 576  sub print_config_box { Line 585  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'}->[2]->{'col1'} ||               if (exists $item->{'header'}->[2]->{'col1'} || 
             exists $item->{'header'}->[2]->{'col2'}) {              exists $item->{'header'}->[2]->{'col2'}) {
Line 588  sub print_config_box { Line 601  sub print_config_box {
         }          }
     } 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 624  sub print_config_box { Line 639  sub print_config_box {
     }      }
     $output .= '      $output .= '
    </table>     </table>
 </div>';    </td>
    </tr>
   </table><br />';
     return ($output,$rowtotal);      return ($output,$rowtotal);
 }  }
   
Line 1346  sub store_changes { Line 1363  sub store_changes {
                     $output .= '</ul>';                      $output .= '</ul>';
                 } else {                  } else {
                     if ($crstype eq 'Community') {                      if ($crstype eq 'Community') {
                         $output = &mt('No changes made to community settings.');                          $output .= &mt('No changes made to community settings.');
                     } else {                      } else {
                         $output = &mt('No changes made to course settings.');                          $output .= &mt('No changes made to course settings.');
                     }                      }
                 }                  }
             }              }

Removed from v.1.43  
changed lines
  Added in v.1.47


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