--- loncom/interface/lonparmset.pm 2016/10/16 21:49:51 1.568 +++ loncom/interface/lonparmset.pm 2017/07/10 12:48:41 1.574 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.568 2016/10/16 21:49:51 raeburn Exp $ +# $Id: lonparmset.pm,v 1.574 2017/07/10 12:48:41 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1484,10 +1484,10 @@ sub print_row { } if ($cgroup) { - &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,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,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,6,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp,$readonly); + &print_td($r,5,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp.$readonly); } if ($uname) { @@ -1543,7 +1543,7 @@ sub print_td { if ($readonly) { $nolink = 1; } else { - if ($which == 14 || $which == 15) { + if ($which == 14 || $which == 15 || $mprefix =~ /mapalias\&/) { $nolink = 1; } elsif (($env{'request.course.sec'} ne '') && ($which > 12)) { $nolink = 1; @@ -1559,6 +1559,10 @@ sub print_td { unless ($which == 2) { $nolink = 1; } + } elsif ($mprefix =~ /(encrypturl|hiddenresource)/) { + if ($which == 16 || $which == 10 || $which == 6 || $which == 2) { + $nolink = 1; + } } } if ($nolink) { @@ -3938,7 +3942,7 @@ sub listdata { $thistype=$$resourcedata{$thiskey.'.type'}; } 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'); if ($middle=~/^\[(.*)\]/) { my $issection=$1; @@ -5186,7 +5190,7 @@ sub parse_key { my ($key) = @_; my %data; my ($middle,$part,$name)= - ($key=~/^$env{'request.course.id'}\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/); + ($key=~/^$env{'request.course.id'}\.(?:(.+)\.)*([\w\s\-]+)\.(\w+)$/); $data{'scope_type'} = 'all'; if ($middle=~/^\[(.*)\]/) { $data{'scope'} = $1; @@ -5351,7 +5355,7 @@ ENDMAINFORMHEAD }]}, { categorytitle => 'Existing Parameter Settings for Resources', items => [ - { linktext => $linktext{'setoverview'},, + { linktext => $linktext{'setoverview'}, url => '/adm/parmset?action=setoverview', permission => $parm_permission->{'setoverview'}, linktitle => $linktitle{'setoverview'}, @@ -5594,7 +5598,7 @@ sub addmetafield { $r->print(''); $r->print(''); } - $r->print('
Or you may enter a new metadata field name.
print('
Or you may enter a new metadata field name.'); $r->print('
'); $r->print(''); } @@ -5938,7 +5942,7 @@ sub components { } my ($middle,$part,$name)= - ($key=~/^$env{'request.course.id'}\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/); + ($key=~/^$env{'request.course.id'}\.(?:(.+)\.)*([\w\s\-]+)\.(\w+)$/); my $issection; my $section=&mt('All Students'); @@ -6056,7 +6060,7 @@ sub parm_change_log { my ($r,$parm_permission)=@_; my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; 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', text=>"Parameter Change Log"}); my $js = '