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

version 1.570, 2016/10/25 18:19:19 version 1.575, 2017/07/10 13:37:59
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 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.

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


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