Diff for /loncom/interface/lonparmset.pm between versions 1.158 and 1.173

version 1.158, 2004/04/28 18:10:54 version 1.173, 2004/08/17 20:27:04
Line 307  sub startpage { Line 307  sub startpage {
     'ad'    => "at Domain"      'ad'    => "at Domain"
        );         );
     my $overallhelp=      my $overallhelp=
  &Apache::loncommon::help_open_topic("Course_Setting_Parameters").   &Apache::loncommon::help_open_menu('','Setting Parameters','Course_Setting_Parameters','',10,'Instructor Interface');
  &Apache::loncommon::help_open_faq(10).  
  &Apache::loncommon::help_open_bug('Instructor Interface');  
     my $assessparmhelp=&Apache::loncommon::help_open_topic("Cascading_Parameters","Assessment Parameters");      my $assessparmhelp=&Apache::loncommon::help_open_topic("Cascading_Parameters","Assessment Parameters");
     $r->print(<<ENDHEAD);      $r->print(<<ENDHEAD);
 <html>  <html>
Line 359  sub startpage { Line 357  sub startpage {
 $selscript  $selscript
 </head>  </head>
 $bodytag  $bodytag
   $overallhelp
 ENDHEAD  ENDHEAD
   
     unless ($trimheader) {$r->print(<<ENDHEAD2);      unless ($trimheader) {$r->print(<<ENDHEAD2);
Line 439  sub print_row { Line 437  sub print_row {
         $parm=~s|\[.*\]\s||g;          $parm=~s|\[.*\]\s||g;
     }      }
   
     $r->print('<td bgcolor='.$defbgone.'>'.&mt($parm).'</td>');      $r->print('<td bgcolor='.$defbgone.'>'.$parm.'</td>');
         
     my $thismarker=$which;      my $thismarker=$which;
     $thismarker=~s/^parameter\_//;      $thismarker=~s/^parameter\_//;
Line 544  Input: See list below: Line 542  Input: See list below:
   
 =item B<typep>: hash, id->type, where "type" contains the extension of the file, thus, I<problem exam quiz assess survey form>.  =item B<typep>: hash, id->type, where "type" contains the extension of the file, thus, I<problem exam quiz assess survey form>.
   
 =item B<keyp>: hash, id->key list, will contain a comma seperated list of the meta-data keys available for the given id  =item B<keyp>: hash, id->key list, will contain a comma separated list of the meta-data keys available for the given id
   
 =item B<allparms>: hash, name of parameter->display value (what is the display value?)  =item B<allparms>: hash, name of parameter->display value (what is the display value?)
   
Line 587  sub extractResourceInformation { Line 585  sub extractResourceInformation {
     my $resid=$2;      my $resid=$2;
     my $id=$mapid.'.'.$resid;      my $id=$mapid.'.'.$resid;
     my $srcf=$$bighash{$_};      my $srcf=$$bighash{$_};
 #    if ($srcf=~/\.(problem|exam|quiz|assess|survey|form)$/) {  
     if (1) {      if (1) {
    $srcf=~/\.(\w+)$/;
  $$ids[$#$ids+1]=$id;   $$ids[$#$ids+1]=$id;
  $$typep{$id}=$1;   $$typep{$id}=$1;
  $$keyp{$id}='';   $$keyp{$id}='';
Line 597  sub extractResourceInformation { Line 595  sub extractResourceInformation {
                     my $key=$_;                      my $key=$_;
                     my $allkey=$1;                      my $allkey=$1;
                     $allkey=~s/\_/\./g;                      $allkey=~s/\_/\./g;
       if (&Apache::lonnet::metadata($srcf,$key.'.hidden') eq 
    'parm') {
    next; #hide hidden things
       }
                     my $display= &Apache::lonnet::metadata($srcf,$key.'.display');                      my $display= &Apache::lonnet::metadata($srcf,$key.'.display');
                     my $name=&Apache::lonnet::metadata($srcf,$key.'.name');                      my $name=&Apache::lonnet::metadata($srcf,$key.'.name');
                     my $part= &Apache::lonnet::metadata($srcf,$key.'.part');                      my $part= &Apache::lonnet::metadata($srcf,$key.'.part');
Line 691  sub assessparms { Line 693  sub assessparms {
     my $message='';      my $message='';
   
     $csec=$ENV{'form.csec'};      $csec=$ENV{'form.csec'};
     $udom=$ENV{'form.udom'};      if      ($udom=$ENV{'form.udom'}) {
     unless ($udom) { $udom=$r->dir_config('lonDefDomain'); }      } elsif ($udom=$ENV{'request.role.domain'}) {
       } elsif ($udom=$ENV{'user.domain'}) {
       } else {
    $udom=$r->dir_config('lonDefDomain');
       }
   
     my @pscat=&Apache::loncommon::get_env_multiple('form.pscat');      my @pscat=&Apache::loncommon::get_env_multiple('form.pscat');
     my $pschp=$ENV{'form.pschp'};      my $pschp=$ENV{'form.pschp'};
Line 944  sub assessparms { Line 950  sub assessparms {
                                                   
     my $submitmessage = &mt('Update Section or Specific User');      my $submitmessage = &mt('Update Section or Specific User');
     if (!$pssymb) {      if (!$pssymb) {
         $r->print('<tr><td>'.&mt('Select Parameter Level').'</td><td colspan="2">');          $r->print('<tr><td>'.&mt('Select Parameter Level').
          &Apache::loncommon::help_open_topic('Course_Parameter_Levels').
     '</td><td colspan="2">');
         $r->print('<select name="parmlev">');          $r->print('<select name="parmlev">');
         foreach (reverse sort keys %alllevs) {          foreach (reverse sort keys %alllevs) {
             $r->print('<option value="'.$alllevs{$_}.'"');              $r->print('<option value="'.$alllevs{$_}.'"');
Line 1335  ENDMAPONE Line 1343  ENDMAPONE
                 $r->print('<th>'.&mt('Parameter in Effect').'</th></tr>');                  $r->print('<th>'.&mt('Parameter in Effect').'</th></tr>');
   
         foreach (sort keys %name) {          foreach (sort keys %name) {
                       $r->print('<tr>');
                     &print_row($r,$_,\%part,\%name,$mapid,\%default,                      &print_row($r,$_,\%part,\%name,$mapid,\%default,
                            \%type,\%display,$defbgone,$defbgtwo,                             \%type,\%display,$defbgone,$defbgtwo,
                            $parmlev);                             $parmlev);
Line 1412  ENDMAPONE Line 1421  ENDMAPONE
             $r->print('<th>'.&mt('Parameter in Effect').'</th></tr>');              $r->print('<th>'.&mt('Parameter in Effect').'</th></tr>');
   
     foreach (sort keys %name) {      foreach (sort keys %name) {
                   $r->print('<tr>');
                 &print_row($r,$_,\%part,\%name,$mapid,\%default,                  &print_row($r,$_,\%part,\%name,$mapid,\%default,
                        \%type,\%display,$defbgone,$defbgtwo,$parmlev);                         \%type,\%display,$defbgone,$defbgtwo,$parmlev);
 #                    $r->print("<tr><td>resource.$part{$_}.$name{$_},$symbp{$mapid}</td></tr>\n");  #                    $r->print("<tr><td>resource.$part{$_}.$name{$_},$symbp{$mapid}</td></tr>\n");
Line 1551  sub crsenv { Line 1561  sub crsenv {
              'pageseparators'  => '<b>'.&mt('Visibly Separate Items on Pages').'</b><br />'.               'pageseparators'  => '<b>'.&mt('Visibly Separate Items on Pages').'</b><br />'.
                                  '('.&mt('"[_1]" for visible separation','<tt>yes</tt>').', '.                                   '('.&mt('"[_1]" for visible separation','<tt>yes</tt>').', '.
                                  &mt('changes will not show until next login').')',                                   &mt('changes will not show until next login').')',
                'student_classlist_view' => '<b>'.&mt('Allow students to view classlist.').'</b>'.&mt('("all":students can view all sections,"section":students can only view their own section.blank or "disabled" prevents student view.'),
   
              'plc.roles.denied'=> '<b>'.&mt('Disallow live chatroom use for Roles').               'plc.roles.denied'=> '<b>'.&mt('Disallow live chatroom use for Roles').
                                   '</b><br />"<tt>st</tt>": '.                                    '</b><br />"<tt>st</tt>": '.
Line 1589  sub crsenv { Line 1600  sub crsenv {
      'allow_limited_html_in_feedback'       'allow_limited_html_in_feedback'
          => '<b>'.&mt('Allow limited HTML in discussion posts').'</b><br />'.           => '<b>'.&mt('Allow limited HTML in discussion posts').'</b><br />'.
             '('.&mt('Set value to "[_1]" to allow',"<tt>yes</tt>").')',              '('.&mt('Set value to "[_1]" to allow',"<tt>yes</tt>").')',
                'allow_discussion_post_editing'
                    => '<b>'.&mt('Allow users to edit/delete their own discussion posts').'</b><br />'.
                       '('.&mt('Set value to "[_1]" to allow',"<tt>yes</tt>").')',
      'rndseed'       'rndseed'
          => '<b>'.&mt('Randomization algorithm used').'</b> <br />'.           => '<b>'.&mt('Randomization algorithm used').'</b> <br />'.
                     '<font color="red">'.&mt('Modifying this will make problems').' '.                      '<font color="red">'.&mt('Modifying this will make problems').' '.
Line 1596  sub crsenv { Line 1610  sub crsenv {
      'receiptalg'       'receiptalg'
          => '<b>'.&mt('Receipt algorithm used').'</b> <br />'.           => '<b>'.&mt('Receipt algorithm used').'</b> <br />'.
                     &mt('This controls how receipt numbers are generated.'),                      &mt('This controls how receipt numbers are generated.'),
                'suppress_tries'
                    => '<b>'.&mt('Suppress number of tries in printing').'</b>('.
                       &mt('yes if supress').')',
              'problem_stream_switch'               'problem_stream_switch'
                  => '<b>'.&mt('Allow problems to be split over pages').'</b><br />'.                   => '<b>'.&mt('Allow problems to be split over pages').'</b><br />'.
                     ' ('.&mt('"[_1]" if allowed, anything else if not','<tt>yes</tt>').')',                      ' ('.&mt('"[_1]" if allowed, anything else if not','<tt>yes</tt>').')',
                'default_paper_size' 
                    => '<b>'.&mt('Default paper type').'</b><br />'.
                       ' ('.&mt('supported types').': Letter [8 1/2x11 in], Legal [8 1/2x14 in],'. 
                       ' Tabloid [11x17 in], Executive [7 1/2x10 in], A2 [420x594 mm],'. 
                       ' A3 [297x420 mm], A4 [210x297 mm], A5 [148x210 mm], A6 [105x148 mm])',
              'anonymous_quiz'               'anonymous_quiz'
                  => '<b>'.&mt('Anonymous quiz/exam').'</b><br />'.                   => '<b>'.&mt('Anonymous quiz/exam').'</b><br />'.
                     ' (<tt><b>'.&mt('yes').'</b> '.&mt('to avoid print students names').' </tt>)',                      ' (<tt><b>'.&mt('yes').'</b> '.&mt('to avoid print students names').' </tt>)',
Line 1610  sub crsenv { Line 1632  sub crsenv {
              'disable_receipt_display'               'disable_receipt_display'
                  => '<b>'.&mt('Disable display of problem receipts').'</b><br />'.                   => '<b>'.&mt('Disable display of problem receipts').'</b><br />'.
                     ' ('.&mt('"[_1]" to disable, anything else if not','<tt>yes</tt>').')',                      ' ('.&mt('"[_1]" to disable, anything else if not','<tt>yes</tt>').')',
        'disablesigfigs'
            => '<b>'.&mt('Disable checking of Significant Figures').'</b><br />'.
                       ' ('.&mt('"[_1]" to disable, anything else if not','<tt>yes</tt>').')',
      'tthoptions'       'tthoptions'
          => '<b>'.&mt('Default set of options to pass to tth/m when converting tex').'</b>'           => '<b>'.&mt('Default set of options to pass to tth/m when converting tex').'</b>'
              );                ); 
         my @Display_Order = ('url','description','courseid','grading',          my @Display_Order = ('url','description','courseid','grading',
                              'default_xml_style','pageseparators',                               'default_xml_style','pageseparators',
                              'question.email','comment.email','policy.email',                               'question.email','comment.email','policy.email',
                                'student_classlist_view',
                              'plc.roles.denied','plc.users.denied',                               'plc.roles.denied','plc.users.denied',
                              'pch.roles.denied','pch.users.denied',                               'pch.roles.denied','pch.users.denied',
                              'allow_limited_html_in_feedback',                               'allow_limited_html_in_feedback',
                                'allow_discussion_post_editing',
                              'languages',                               'languages',
      'nothideprivileged',       'nothideprivileged',
                              'rndseed',                               'rndseed',
                              'receiptalg',                               'receiptalg',
                              'problem_stream_switch',                               'problem_stream_switch',
        'suppress_tries',
                                'default_paper_size',
                              'disable_receipt_display',                               'disable_receipt_display',
                              'spreadsheet_default_classcalc',                               'spreadsheet_default_classcalc',
                              'spreadsheet_default_studentcalc',                               'spreadsheet_default_studentcalc',
Line 1631  sub crsenv { Line 1660  sub crsenv {
                              'hideemptyrows',                               'hideemptyrows',
                              'default_enrollment_start_date',                               'default_enrollment_start_date',
                              'default_enrollment_end_date',                               'default_enrollment_end_date',
      'tthoptions'       'tthoptions',
        'disablesigfigs'
                              );                               );
  foreach my $parameter (sort(keys(%values))) {   foreach my $parameter (sort(keys(%values))) {
             unless ($parameter =~ m/^internal\./) {              unless ($parameter =~ m/^internal\./) {
Line 1686  sub crsenv { Line 1716  sub crsenv {
     my $Parameter=&mt('Parameter');      my $Parameter=&mt('Parameter');
     my $Value=&mt('Value');      my $Value=&mt('Value');
     my $Set=&mt('Set');      my $Set=&mt('Set');
     my $browse_js=&Apache::loncommon::browser_and_searcher_javascript();      my $browse_js=&Apache::loncommon::browser_and_searcher_javascript('parmset');
     $r->print(<<ENDENV);      $r->print(<<ENDENV);
 <html>  <html>
 <script type="text/javascript" language="Javascript" >  <script type="text/javascript" language="Javascript" >
Line 1897  sub handler { Line 1927  sub handler {
 # ----------------------------------------------------- Needs to be in a course  # ----------------------------------------------------- Needs to be in a course
   
     if (($ENV{'request.course.id'}) &&       if (($ENV{'request.course.id'}) && 
  (&Apache::lonnet::allowed('opa',$ENV{'request.course.id'}))) {   (&Apache::lonnet::allowed('opa',$ENV{'request.course.id'}) || 
    &Apache::lonnet::allowed('opa',$ENV{'request.course.id'}.'/'.
     $ENV{'request.course.sec'})
    )) {
   
         &Apache::loncommon::content_type($r,'text/html');          &Apache::loncommon::content_type($r,'text/html');
         $r->send_http_header;          $r->send_http_header;

Removed from v.1.158  
changed lines
  Added in v.1.173


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