Diff for /loncom/interface/lonparmset.pm between versions 1.568 and 1.575

version 1.568, 2016/10/16 21:49:51 version 1.575, 2017/07/10 13:37:59
Line 1484  sub print_row { Line 1484  sub print_row {
         }          }
   
         if ($cgroup) {          if ($cgroup) {
             &print_td($r,8,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp,'',$readonly);              &print_td($r,8,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp,$readonly);
             &print_td($r,7,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp,'',$readonly);              &print_td($r,7,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp,$readonly);
             &print_td($r,6,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp,'',$readonly);              &print_td($r,6,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp,$readonly);
             &print_td($r,5,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp.'',$readonly);              &print_td($r,5,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp.$readonly);
         }          }
   
         if ($uname) {          if ($uname) {
Line 1543  sub print_td { Line 1543  sub print_td {
     if ($readonly) {      if ($readonly) {
         $nolink = 1;          $nolink = 1;
     } else {       } else { 
         if ($which == 14 || $which == 15) {          if ($which == 14 || $which == 15 || $mprefix =~ /mapalias\&/) {
             $nolink = 1;              $nolink = 1;
         } elsif (($env{'request.course.sec'} ne '') && ($which > 12)) {          } elsif (($env{'request.course.sec'} ne '') && ($which > 12)) {
             $nolink = 1;              $nolink = 1;
Line 1559  sub print_td { Line 1559  sub print_td {
             unless ($which == 2) {              unless ($which == 2) {
                 $nolink = 1;                  $nolink = 1;
             }              }
           } elsif ($mprefix =~ /(encrypturl|hiddenresource)/) {
               if ($which == 16 || $which == 10 || $which == 6 || $which == 2) {
                   $nolink = 1;
               }
         }          }
     }      }
     if ($nolink) {      if ($nolink) {
Line 1935  sub lookUpTableParameter { Line 1939  sub lookUpTableParameter {
         'retrypartial' => 'tries',          'retrypartial' => 'tries',
         'discussvote'  => 'misc',          'discussvote'  => 'misc',
         'examcode' => 'high_level_randomization',           'examcode' => 'high_level_randomization', 
     );          );
 }  }
   
 # Adds the given parameter name to an array of arrays listing all parameters for each category.  # Adds the given parameter name to an array of arrays listing all parameters for each category.
Line 2029  sub parmboxes { Line 2033  sub parmboxes {
         $r->print('<div class="LC_Box LC_400Box">'          $r->print('<div class="LC_Box LC_400Box">'
                  .'<h4 class="LC_hcell">'.&mt($categories{$key}).'</h4>'."\n");                   .'<h4 class="LC_hcell">'.&mt($categories{$key}).'</h4>'."\n");
         foreach my $tempkey (&keysindisplayorderCategory($categoryList{$key},$keyorder)) {          foreach my $tempkey (&keysindisplayorderCategory($categoryList{$key},$keyorder)) {
               next if ($tempkey eq '');
             $r->print('<span class="LC_nobreak">'              $r->print('<span class="LC_nobreak">'
                      .'<label><input type="checkbox" name="pscat" '                       .'<label><input type="checkbox" name="pscat" '
                      .'value="'.$tempkey.'" ');                       .'value="'.$tempkey.'" ');
Line 3938  sub listdata { Line 3943  sub listdata {
                 $thistype=$$resourcedata{$thiskey.'.type'};                  $thistype=$$resourcedata{$thiskey.'.type'};
             }              }
             my ($middle,$part,$name)=              my ($middle,$part,$name)=
                 ($thiskey=~/^$env{'request.course.id'}\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/);                  ($thiskey=~/^$env{'request.course.id'}\.(?:(.+)\.)*([\w\s\-]+)\.(\w+)$/);
             my $section=&mt('All Students');              my $section=&mt('All Students');
             if ($middle=~/^\[(.*)\]/) {              if ($middle=~/^\[(.*)\]/) {
                 my $issection=$1;                  my $issection=$1;
Line 5186  sub parse_key { Line 5191  sub parse_key {
     my ($key) = @_;      my ($key) = @_;
     my %data;      my %data;
     my ($middle,$part,$name)=      my ($middle,$part,$name)=
     ($key=~/^$env{'request.course.id'}\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/);      ($key=~/^$env{'request.course.id'}\.(?:(.+)\.)*([\w\s\-]+)\.(\w+)$/);
     $data{'scope_type'} = 'all';      $data{'scope_type'} = 'all';
     if ($middle=~/^\[(.*)\]/) {      if ($middle=~/^\[(.*)\]/) {
         $data{'scope'} = $1;          $data{'scope'} = $1;
Line 5351  ENDMAINFORMHEAD Line 5356  ENDMAINFORMHEAD
             }]},              }]},
            { categorytitle => 'Existing Parameter Settings for Resources',             { categorytitle => 'Existing Parameter Settings for Resources',
          items => [           items => [
           { linktext => $linktext{'setoverview'},,            { linktext => $linktext{'setoverview'},
             url => '/adm/parmset?action=setoverview',              url => '/adm/parmset?action=setoverview',
             permission => $parm_permission->{'setoverview'},              permission => $parm_permission->{'setoverview'},
             linktitle => $linktitle{'setoverview'},              linktitle => $linktitle{'setoverview'},
Line 5594  sub addmetafield { Line 5599  sub addmetafield {
             $r->print('<input type="submit" name="undelete" value="Undelete" />');              $r->print('<input type="submit" name="undelete" value="Undelete" />');
             $r->print('</form>');              $r->print('</form>');
         }          }
         $r->print('<hr /><strong>Or</strong> you may enter a new metadata field name.<form method="post" action="/adm/parmset?action=addmetadata"'); # FIXME: HTML error, input will not be displayed !          $r->print('<hr /><strong>Or</strong> you may enter a new metadata field name.<form method="post" action="/adm/parmset?action=addmetadata">');
         $r->print('<input type="text" name="fieldname" /><br />');          $r->print('<input type="text" name="fieldname" /><br />');
         $r->print('<input type="submit" value="Add Metadata Field" />');          $r->print('<input type="submit" value="Add Metadata Field" />');
     }      }
Line 5938  sub components { Line 5943  sub components {
     }      }
   
     my ($middle,$part,$name)=      my ($middle,$part,$name)=
         ($key=~/^$env{'request.course.id'}\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/);          ($key=~/^$env{'request.course.id'}\.(?:(.+)\.)*([\w\s\-]+)\.(\w+)$/);
     my $issection;      my $issection;
   
     my $section=&mt('All Students');      my $section=&mt('All Students');
Line 5998  sub load_parameter_names { Line 6003  sub load_parameter_names {
     close($config);      close($config);
     $standard_parms{'int_pos'}      = 'Positive Integer';      $standard_parms{'int_pos'}      = 'Positive Integer';
     $standard_parms{'int_zero_pos'} = 'Positive Integer or Zero';      $standard_parms{'int_zero_pos'} = 'Positive Integer or Zero';
       $standard_parms{'scoreformat'}  = 'Format for display of score';
 }  }
   
 # Returns a parameter title for standard parameters, the name for others.  # Returns a parameter title for standard parameters, the name for others.
Line 6056  sub parm_change_log { Line 6062  sub parm_change_log {
     my ($r,$parm_permission)=@_;      my ($r,$parm_permission)=@_;
     my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};      my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
     my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};      my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
     my $crstype = $env{'course.'.$env{'request.course.id'}.'.type'}      my $crstype = $env{'course.'.$env{'request.course.id'}.'.type'};
     &Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=settable',      &Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=settable',
     text=>"Parameter Change Log"});      text=>"Parameter Change Log"});
     my $js = '<script type="text/javascript">'."\n".      my $js = '<script type="text/javascript">'."\n".

Removed from v.1.568  
changed lines
  Added in v.1.575


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