--- loncom/interface/lonparmset.pm 2023/04/03 15:39:10 1.618 +++ loncom/interface/lonparmset.pm 2023/04/03 19:53:30 1.619 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.618 2023/04/03 15:39:10 raeburn Exp $ +# $Id: lonparmset.pm,v 1.619 2023/04/03 19:53:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1750,6 +1750,24 @@ sub print_row { if ($automatic) { $parm.='
'.&mt('Automatically sets').' '.join(', ',split(/\:/,$automatic)).'
'; } + my $advice; + if ((ref($name) eq 'HASH') && ($name->{$which} eq 'mapalias') && + (ref($symbp) eq 'HASH') && ($parmlev eq 'full')) { + if ($symbp->{$rid} =~ m{^uploaded/}) { + if ($result == 14) { + $advice = &mt('Use Course Editor to modify this.'); + } else { + $advice = &mt('Use Course Editor to set this.'); + } + } else { + if ($result == 14) { + $advice = &mt('Use Resource Assembly Tool to modify this.'); + } else { + $advice = &mt('Use Resource Assembly Tool to set this.'); + } + } + $parm .= '
'.$advice.''; + } $r->print(''.$parm.''); my $thismarker=$which; @@ -5028,15 +5046,26 @@ sub listdata { # Ready to print # my $parmitem = &standard_parameter_names($name); + my $advice; + if (($name eq 'mapalias') && ($middle) && (!$is_map)) { + if ($middle =~ m{^uploaded/}) { + $advice = &mt('Use Course Editor to set this.'); + } else { + $advice = &mt('Use Resource Assembly Tool to set this.'); + } + $advice = '
'.$advice.''; + } $r->print(&tablestart($readonly,$is_map). &Apache::loncommon::start_data_table_row(). ''.&mt($parmitem). - ''); + ''.$advice.''); unless ($readonly) { my $disabled; if (($name eq 'availablestudent') && (($showval eq '') || ($userscope))) { $disabled = ' disabled="disabled"'; + } elsif (($name eq 'mapalias') && ($showval eq '')) { + $disabled = ' disabled="disabled"'; } $r->print(''); @@ -5069,6 +5098,8 @@ sub listdata { } elsif ($thistype =~ m/^string/) { if ($name eq 'availablestudent') { $readonly = 1; + } elsif (($name eq 'mapalias') && ($showval eq '')) { + $readonly = 1; } $r->print(&string_selector($thistype,$thiskey, $showval,$name,$readonly));