version 1.522.2.12, 2013/12/19 19:31:53
|
version 1.522.2.23.2.1, 2017/06/13 16:20:44
|
Line 752 sub storeparm_by_symb_inner {
|
Line 752 sub storeparm_by_symb_inner {
|
|
|
|
|
sub valout { |
sub valout { |
my ($value,$type,$editable)=@_; |
my ($value,$type,$name,$editable)=@_; |
my $result = ''; |
my $result = ''; |
# Values of zero are valid. |
# Values of zero are valid. |
if (! $value && $value ne '0') { |
if (! $value && $value ne '0') { |
Line 766 sub valout {
|
Line 766 sub valout {
|
} |
} |
} else { |
} else { |
if ($type eq 'date_interval') { |
if ($type eq 'date_interval') { |
my ($sec,$min,$hour,$mday,$mon,$year)=gmtime($value); |
my ($totalsecs,$donesuffix) = split(/_/,$value,2); |
|
my ($usesdone,$donebuttontext,$proctor,$secretkey); |
|
if ($donesuffix =~ /^done\:([^\:]+)\:(.*)$/) { |
|
$donebuttontext = $1; |
|
(undef,$proctor,$secretkey) = split(/_/,$2); |
|
$usesdone = 'done'; |
|
} elsif ($donesuffix =~ /^done(|_.+)$/) { |
|
$donebuttontext = &mt('Done'); |
|
($usesdone,$proctor,$secretkey) = split(/_/,$donesuffix); |
|
} |
|
my ($sec,$min,$hour,$mday,$mon,$year)=gmtime($totalsecs); |
my @timer; |
my @timer; |
$year=$year-70; |
$year=$year-70; |
$mday--; |
$mday--; |
Line 799 sub valout {
|
Line 809 sub valout {
|
push(@timer,&mt('[quant,_1,sec]',0)); |
push(@timer,&mt('[quant,_1,sec]',0)); |
} |
} |
$result.=join(", ",@timer); |
$result.=join(", ",@timer); |
|
if ($usesdone eq 'done') { |
|
if ($secretkey) { |
|
$result .= ' '.&mt('+ "[_1]" with proctor key: [_2]',$donebuttontext,$secretkey); |
|
} else { |
|
$result .= ' + "'.$donebuttontext.'"'; |
|
} |
|
} |
} elsif (&isdateparm($type)) { |
} elsif (&isdateparm($type)) { |
$result = &Apache::lonlocal::locallocaltime($value). |
$result = &Apache::lonlocal::locallocaltime($value). |
&date_sanity_info($value); |
&date_sanity_info($value); |
Line 825 sub plink {
|
Line 842 sub plink {
|
my ($parmname)=((split(/\&/,$marker))[1]=~/\_([^\_]+)$/); |
my ($parmname)=((split(/\&/,$marker))[1]=~/\_([^\_]+)$/); |
my ($hour,$min,$sec,$val)=&preset_defaults($parmname); |
my ($hour,$min,$sec,$val)=&preset_defaults($parmname); |
unless (defined($winvalue)) { $winvalue=$val; } |
unless (defined($winvalue)) { $winvalue=$val; } |
my $valout = &valout($value,$type,1); |
my $valout = &valout($value,$type,$parmname,1); |
my $unencmarker = $marker; |
my $unencmarker = $marker; |
foreach my $item (\$type, \$dis, \$winvalue, \$marker, \$return, \$call, |
foreach my $item (\$type, \$dis, \$winvalue, \$marker, \$return, \$call, |
\$hour, \$min, \$sec) { |
\$hour, \$min, \$sec) { |
Line 905 function showHide_courseContent() {
|
Line 922 function showHide_courseContent() {
|
COURSECONTENTSCRIPT |
COURSECONTENTSCRIPT |
} |
} |
|
|
|
sub done_proctor_js { |
|
return <<"END"; |
|
function toggleSecret(form,radio,key) { |
|
var radios = form[radio+key]; |
|
if (radios.length) { |
|
for (var i=0; i<radios.length; i++) { |
|
if (radios[i].checked) { |
|
if (radios[i].value == '_done_proctor') { |
|
if (document.getElementById('done_'+key+'_proctorkey')) { |
|
document.getElementById('done_'+key+'_proctorkey').type='text'; |
|
} |
|
} else { |
|
if (document.getElementById('done_'+key+'_proctorkey')) { |
|
document.getElementById('done_'+key+'_proctorkey').type='hidden'; |
|
document.getElementById('done_'+key+'_proctorkey').value=''; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
END |
|
|
|
} |
|
|
sub startpage { |
sub startpage { |
my ($r,$psymb) = @_; |
my ($r,$psymb) = @_; |
|
|
Line 954 ENDHEAD
|
Line 996 ENDHEAD
|
|
|
sub print_row { |
sub print_row { |
my ($r,$which,$part,$name,$symbp,$rid,$default,$defaulttype,$display,$defbgone, |
my ($r,$which,$part,$name,$symbp,$rid,$default,$defaulttype,$display,$defbgone, |
$defbgtwo,$defbgthree,$parmlev,$uname,$udom,$csec,$cgroup,$usersgroups)=@_; |
$defbgtwo,$defbgthree,$parmlev,$uname,$udom,$csec,$cgroup,$usersgroups,$noeditgrp, |
|
$readonly)=@_; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $courseopt=&Apache::lonnet::get_courseresdata($cnum,$cdom); |
my $courseopt=&Apache::lonnet::get_courseresdata($cnum,$cdom); |
Line 993 sub print_row {
|
Line 1036 sub print_row {
|
my $thismarker=$which; |
my $thismarker=$which; |
$thismarker=~s/^parameter\_//; |
$thismarker=~s/^parameter\_//; |
my $mprefix=$rid.'&'.$thismarker.'&'; |
my $mprefix=$rid.'&'.$thismarker.'&'; |
my $effective_parm = &valout($outpar[$result],$typeoutpar[$result]); |
my $effective_parm = &valout($outpar[$result],$typeoutpar[$result],$thismarker); |
my ($othergrp,$grp_parm,$controlgrp); |
my ($othergrp,$grp_parm,$controlgrp); |
|
|
if ($parmlev eq 'general') { |
if ($parmlev eq 'general') { |
|
|
if ($uname) { |
if ($uname) { |
&print_td($r,3,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,3,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
} elsif ($cgroup) { |
} elsif ($cgroup) { |
&print_td($r,6,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,6,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,$noeditgrp,$readonly); |
} elsif ($csec) { |
} elsif ($csec) { |
&print_td($r,9,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,9,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
} else { |
} else { |
&print_td($r,14,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,14,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
} |
} |
} elsif ($parmlev eq 'map') { |
} elsif ($parmlev eq 'map') { |
|
|
if ($uname) { |
if ($uname) { |
&print_td($r,2,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,2,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
} elsif ($cgroup) { |
} elsif ($cgroup) { |
&print_td($r,5,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,5,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,$noeditgrp,$readonly); |
} elsif ($csec) { |
} elsif ($csec) { |
&print_td($r,8,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,8,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
} else { |
} else { |
&print_td($r,13,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,13,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
} |
} |
} else { |
} else { |
if ($uname) { |
if ($uname) { |
Line 1036 sub print_row {
|
Line 1079 sub print_row {
|
} |
} |
} |
} |
|
|
&print_td($r,14,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,14,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
|
|
&print_td($r,13,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,13,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
&print_td($r,12,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,12,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
&print_td($r,11,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,11,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
&print_td($r,10,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,10,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
|
|
if ($csec) { |
if ($csec) { |
&print_td($r,9,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,9,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
&print_td($r,8,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,8,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
&print_td($r,7,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,7,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
} |
} |
|
|
if ($cgroup) { |
if ($cgroup) { |
&print_td($r,6,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,6,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,$noeditgrp,$readonly); |
&print_td($r,5,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,5,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,$noeditgrp,$readonly); |
&print_td($r,4,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,4,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,$noeditgrp,$readonly); |
} |
} |
|
|
if ($uname) { |
if ($uname) { |
if ($othergrp) { |
if ($othergrp) { |
$r->print($othergrp); |
$r->print($othergrp); |
} |
} |
&print_td($r,3,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,3,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
&print_td($r,2,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,2,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
&print_td($r,1,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,1,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display,'',$readonly); |
} |
} |
|
|
} # end of $parmlev if/else |
} # end of $parmlev if/else |
Line 1073 sub print_row {
|
Line 1116 sub print_row {
|
my $sessionvaltype=$typeoutpar[$result]; |
my $sessionvaltype=$typeoutpar[$result]; |
if (!defined($sessionvaltype)) { $sessionvaltype=$$defaulttype{$which}; } |
if (!defined($sessionvaltype)) { $sessionvaltype=$$defaulttype{$which}; } |
$r->print('<td style="background-color:#999999;" align="center"><font color="#FFFFFF">'. |
$r->print('<td style="background-color:#999999;" align="center"><font color="#FFFFFF">'. |
&valout($sessionval,$sessionvaltype).' '. |
&valout($sessionval,$sessionvaltype,$$name{$which}).' '. |
'</font></td>'); |
'</font></td>'); |
} |
} |
$r->print('</tr>'); |
$r->print('</tr>'); |
Line 1081 sub print_row {
|
Line 1124 sub print_row {
|
} |
} |
|
|
sub print_td { |
sub print_td { |
my ($r,$which,$defbg,$result,$outpar,$mprefix,$value,$typeoutpar,$display)=@_; |
my ($r,$which,$defbg,$result,$outpar,$mprefix,$value,$typeoutpar,$display,$noeditgrp,$readonly)=@_; |
$r->print('<td style="background-color:'.(($result==$which)?'#AAFFAA':$defbg). |
$r->print('<td style="background-color:'.(($result==$which)?'#AAFFAA':$defbg). |
';" align="center">'); |
';" align="center">'); |
my $nolink = 0; |
my $nolink = 0; |
if ($which == 11 || $which == 12) { |
if ($readonly) { |
$nolink = 1; |
$nolink = 1; |
} elsif ($mprefix =~ /availablestudent\&$/) { |
} else { |
if ($which > 3) { |
if ($which == 11 || $which == 12) { |
$nolink = 1; |
|
} |
|
} elsif ($mprefix =~ /examcode\&$/) { |
|
unless ($which == 2) { |
|
$nolink = 1; |
$nolink = 1; |
|
} elsif ($mprefix =~ /availablestudent\&$/) { |
|
if ($which > 3) { |
|
$nolink = 1; |
|
} |
|
} elsif ($mprefix =~ /examcode\&$/) { |
|
unless ($which == 2) { |
|
$nolink = 1; |
|
} |
} |
} |
} |
} |
if ($nolink) { |
if ($nolink) { |
$r->print(&valout($$outpar[$which],$$typeoutpar[$which])); |
$r->print(&valout($$outpar[$which],$$typeoutpar[$which],$mprefix)); |
} else { |
} else { |
$r->print(&plink($$typeoutpar[$which], |
$r->print(&plink($$typeoutpar[$which], |
$$display{$value},$$outpar[$which], |
$$display{$value},$$outpar[$which], |
Line 1122 sub print_usergroups {
|
Line 1169 sub print_usergroups {
|
if (($coursereply) && ($cgroup ne $resultgroup)) { |
if (($coursereply) && ($cgroup ne $resultgroup)) { |
if ($result > 3) { |
if ($result > 3) { |
$bgcolor = '#AAFFAA'; |
$bgcolor = '#AAFFAA'; |
$grp_parm = &valout($coursereply,$resulttype); |
$grp_parm = &valout($coursereply,$resulttype,$what); |
} |
} |
$grp_parm = &valout($coursereply,$resulttype); |
$grp_parm = &valout($coursereply,$resulttype,$what); |
$output = '<td style="background-color:'.$bgcolor.';" align="center">'; |
$output = '<td style="background-color:'.$bgcolor.';" align="center">'; |
if ($resultgroup && $resultlevel) { |
if ($resultgroup && $resultlevel) { |
$output .= '<small><b>'.$resultgroup.'</b> ('.$resultlevel.'): </small>'.$grp_parm; |
$output .= '<small><b>'.$resultgroup.'</b> ('.$resultlevel.'): </small>'.$grp_parm; |
Line 1382 sub lookUpTableParameter {
|
Line 1429 sub lookUpTableParameter {
|
'contentopen' => 'time_settings', |
'contentopen' => 'time_settings', |
'contentclose' => 'time_settings', |
'contentclose' => 'time_settings', |
'discussend' => 'time_settings', |
'discussend' => 'time_settings', |
'printopendate' => 'time_settings', |
'printstartdate' => 'time_settings', |
'printclosedate' => 'time_settings', |
'printenddate' => 'time_settings', |
'weight' => 'grading', |
'weight' => 'grading', |
'handgrade' => 'grading', |
'handgrade' => 'grading', |
'maxtries' => 'tries', |
'maxtries' => 'tries', |
Line 1970 sub standardkeyorder {
|
Line 2017 sub standardkeyorder {
|
'parameter_0_discussend' => 19, |
'parameter_0_discussend' => 19, |
'parameter_0_discusshide' => 20, |
'parameter_0_discusshide' => 20, |
'parameter_0_discussvote' => 21, |
'parameter_0_discussvote' => 21, |
'parameter_0_printopendate' => 22, |
'parameter_0_printstartdate' => 22, |
'parameter_0_printclosedate' => 23); |
'parameter_0_printenddate' => 23); |
} |
} |
|
|
|
|
sub assessparms { |
sub assessparms { |
|
|
my $r=shift; |
my ($r,$parm_permission) = @_; |
|
|
|
|
|
|
# -------------------------------------------------------- Variable declaration |
# -------------------------------------------------------- Variable declaration |
Line 2022 sub assessparms {
|
Line 2068 sub assessparms {
|
|
|
$csec=$env{'form.csec'}; |
$csec=$env{'form.csec'}; |
$cgroup=$env{'form.cgroup'}; |
$cgroup=$env{'form.cgroup'}; |
|
my $noeditgrp; |
|
if ($cgroup ne '') { |
|
unless (&Apache::lonnet::allowed('mdg',$env{'request.course.id'})) { |
|
if (($env{'request.course.groups'} eq '') || |
|
(!grep(/^\Q$cgroup\E$/,split(/,/,$env{'request.course.groups'})))) { |
|
$noeditgrp = 1; |
|
} |
|
} |
|
} |
|
|
if ($udom=$env{'form.udom'}) { |
if ($udom=$env{'form.udom'}) { |
} elsif ($udom=$env{'request.role.domain'}) { |
} elsif ($udom=$env{'request.role.domain'}) { |
Line 2129 sub assessparms {
|
Line 2184 sub assessparms {
|
$symbp{'0.0'} = ''; |
$symbp{'0.0'} = ''; |
|
|
# ---------------------------------------------------------- Anything to store? |
# ---------------------------------------------------------- Anything to store? |
if ($env{'form.pres_marker'}) { |
if ($env{'form.pres_marker'} && $parm_permission->{'edit'}) { |
my @markers=split(/\&\&\&/,$env{'form.pres_marker'}); |
my @markers=split(/\&\&\&/,$env{'form.pres_marker'}); |
my @values=split(/\&\&\&/,$env{'form.pres_value'}); |
my @values=split(/\&\&\&/,$env{'form.pres_value'}); |
my @types=split(/\&\&\&/,$env{'form.pres_type'}); |
my @types=split(/\&\&\&/,$env{'form.pres_type'}); |
Line 2138 sub assessparms {
|
Line 2193 sub assessparms {
|
my $chome = $env{'course.'.$env{'request.course.id'}.'.home'}; |
my $chome = $env{'course.'.$env{'request.course.id'}.'.home'}; |
my ($got_chostname,$chostname,$cmajor,$cminor); |
my ($got_chostname,$chostname,$cmajor,$cminor); |
my $totalstored = 0; |
my $totalstored = 0; |
|
my $now = time; |
|
|
for (my $i=0;$i<=$#markers;$i++) { |
for (my $i=0;$i<=$#markers;$i++) { |
my ($needsrelease,$needsnewer,$name); |
my ($needsrelease,$needsnewer,$name); |
Line 2172 sub assessparms {
|
Line 2227 sub assessparms {
|
} |
} |
} |
} |
} |
} |
} elsif ($markers[$i] =~ /_(type|lenient|retrypartial|discussvote|examcode)\&\d+$/) { |
} elsif ($markers[$i] =~ /_(type|lenient|retrypartial|discussvote|examcode|printstartdate|printenddate)\&\d+$/) { |
$name = $1; |
$name = $1; |
my $val = $values[$i]; |
my $val = $values[$i]; |
if ($name eq 'examcode') { |
if ($name eq 'examcode') { |
if (&Apache::lonnet::validCODE($values[$i])) { |
if (&Apache::lonnet::validCODE($values[$i])) { |
$val = 'valid'; |
$val = 'valid'; |
} |
} |
|
} elsif ($name eq 'printstartdate') { |
|
if ($val =~ /^\d+$/) { |
|
if ($val > $now) { |
|
$val = 'future'; |
|
} |
|
} |
|
} elsif ($name eq 'printenddate') { |
|
if ($val =~ /^\d+$/) { |
|
if ($val < $now) { |
|
$val = 'past'; |
|
} |
|
} |
} |
} |
$needsrelease = |
$needsrelease = |
$Apache::lonnet::needsrelease{"parameter:$name:$val"}; |
$Apache::lonnet::needsrelease{"parameter:$name:$val"}; |
Line 2189 sub assessparms {
|
Line 2256 sub assessparms {
|
} |
} |
$needsnewer = ¶meter_releasecheck($name,$val, |
$needsnewer = ¶meter_releasecheck($name,$val, |
$needsrelease, |
$needsrelease, |
$chostname, |
|
$cmajor,$cminor); |
$cmajor,$cminor); |
} |
} |
} |
} |
Line 2343 ENDPARMSELSCRIPT
|
Line 2409 ENDPARMSELSCRIPT
|
my @catmarker=map { tr|.|_|; 'parameter_'.$_; } @pscat; |
my @catmarker=map { tr|.|_|; 'parameter_'.$_; } @pscat; |
my $csuname=$env{'user.name'}; |
my $csuname=$env{'user.name'}; |
my $csudom=$env{'user.domain'}; |
my $csudom=$env{'user.domain'}; |
|
my $readonly = 1; |
|
if ($parm_permission->{'edit'}) { |
|
undef($readonly); |
|
} |
|
|
if ($parmlev eq 'full') { |
if ($parmlev eq 'full') { |
# |
# |
Line 2528 ENDTABLEHEADFOUR
|
Line 2598 ENDTABLEHEADFOUR
|
&print_row($r,$_,\%part,\%name,\%symbp,$rid,\%default, |
&print_row($r,$_,\%part,\%name,\%symbp,$rid,\%default, |
\%type,\%display,$defbgone,$defbgtwo, |
\%type,\%display,$defbgone,$defbgtwo, |
$defbgthree,$parmlev,$uname,$udom,$csec, |
$defbgthree,$parmlev,$uname,$udom,$csec, |
$cgroup,\@usersgroups); |
$cgroup,\@usersgroups,$noeditgrp,$readonly); |
} |
} |
} |
} |
} |
} |
Line 2651 ENDTABLEHEADFOUR
|
Line 2721 ENDTABLEHEADFOUR
|
$r->print(&Apache::loncommon::start_data_table_row()); |
$r->print(&Apache::loncommon::start_data_table_row()); |
&print_row($r,$_,\%part,\%name,\%symbp,$mapid,\%default, |
&print_row($r,$_,\%part,\%name,\%symbp,$mapid,\%default, |
\%type,\%display,$defbgone,$defbgtwo,$defbgthree, |
\%type,\%display,$defbgone,$defbgtwo,$defbgthree, |
$parmlev,$uname,$udom,$csec,$cgroup); |
$parmlev,$uname,$udom,$csec,$cgroup,'',$noeditgrp, |
|
$readonly); |
} |
} |
$r->print(&Apache::loncommon::end_data_table().'</p>' |
$r->print(&Apache::loncommon::end_data_table().'</p>' |
.'</div>' |
.'</div>' |
Line 2741 ENDMAPONE
|
Line 2812 ENDMAPONE
|
foreach (&keysinorder(\%name,\%keyorder)) { |
foreach (&keysinorder(\%name,\%keyorder)) { |
$r->print(&Apache::loncommon::start_data_table_row()); |
$r->print(&Apache::loncommon::start_data_table_row()); |
&print_row($r,$_,\%part,\%name,\%symbp,$mapid,\%default, |
&print_row($r,$_,\%part,\%name,\%symbp,$mapid,\%default, |
\%type,\%display,$defbgone,$defbgtwo,$defbgthree, |
\%type,\%display,$defbgone,$defbgtwo,$defbgthree, |
$parmlev,$uname,$udom,$csec,$cgroup); |
$parmlev,$uname,$udom,$csec,$cgroup,'',$noeditgrp, |
|
$readonly); |
} |
} |
$r->print(&Apache::loncommon::end_data_table() |
$r->print(&Apache::loncommon::end_data_table() |
.'</p>' |
.'</p>' |
Line 2760 ENDMAPONE
|
Line 2832 ENDMAPONE
|
my $tableopen; |
my $tableopen; |
|
|
sub tablestart { |
sub tablestart { |
|
my ($readonly) = @_; |
if ($tableopen) { |
if ($tableopen) { |
return ''; |
return ''; |
} else { |
} else { |
$tableopen=1; |
$tableopen=1; |
return &Apache::loncommon::start_data_table().'<tr><th>'.&mt('Parameter').'</th><th>'. |
my $output = &Apache::loncommon::start_data_table().'<tr><th>'.&mt('Parameter').'</th>'; |
&mt('Delete').'</th><th>'.&mt('Set to ...').'</th></tr>'; |
if ($readonly) { |
|
$output .= '<th>'.&mt('Current value').'</th>'; |
|
} else { |
|
$output .= '<th>'.&mt('Delete').'</th><th>'.&mt('Set to ...').'</th>'; |
|
} |
|
$output .= '</tr>'; |
|
return $output; |
} |
} |
} |
} |
|
|
Line 2798 sub readdata {
|
Line 2877 sub readdata {
|
} |
} |
} |
} |
} |
} |
return $resourcedata; |
if (wantarray) { |
|
return ($resourcedata,$classlist); |
|
} else { |
|
return $resourcedata; |
|
} |
} |
} |
|
|
|
|
Line 2814 sub storedata {
|
Line 2897 sub storedata {
|
my @deldata=(); |
my @deldata=(); |
undef @deldata; |
undef @deldata; |
my ($got_chostname,$chostname,$cmajor,$cminor); |
my ($got_chostname,$chostname,$cmajor,$cminor); |
|
my $now = time; |
foreach my $key (keys(%env)) { |
foreach my $key (keys(%env)) { |
if ($key =~ /^form\.([a-z]+)\_(.+)$/) { |
if ($key =~ /^form\.([a-z]+)\_(.+)$/) { |
my $cmd=$1; |
my $cmd=$1; |
Line 2824 sub storedata {
|
Line 2908 sub storedata {
|
$tkey=~s/\.\[useropt\:$tuname\:$tudom\]\./\./; |
$tkey=~s/\.\[useropt\:$tuname\:$tudom\]\./\./; |
} |
} |
if ($cmd eq 'set' || $cmd eq 'datepointer' || $cmd eq 'dateinterval') { |
if ($cmd eq 'set' || $cmd eq 'datepointer' || $cmd eq 'dateinterval') { |
my ($data, $typeof, $text, $name); |
my ($data, $typeof, $text, $name, $valchk); |
if ($cmd eq 'set') { |
if ($cmd eq 'set') { |
$data=$env{$key}; |
$data=$env{$key}; |
|
$valchk = $data; |
$typeof=$env{'form.typeof_'.$thiskey}; |
$typeof=$env{'form.typeof_'.$thiskey}; |
$text = &mt('Saved modified parameter for'); |
$text = &mt('Saved modified parameter for'); |
if ($typeof eq 'string_questiontype') { |
if ($typeof eq 'string_questiontype') { |
Line 2837 sub storedata {
|
Line 2922 sub storedata {
|
$name = 'discussvote'; |
$name = 'discussvote'; |
} elsif ($typeof eq 'string_examcode') { |
} elsif ($typeof eq 'string_examcode') { |
$name = 'examcode'; |
$name = 'examcode'; |
|
if (&Apache::lonnet::validCODE($data)) { |
|
$valchk = 'valid'; |
|
} |
} elsif ($typeof eq 'string_yesno') { |
} elsif ($typeof eq 'string_yesno') { |
if ($thiskey =~ /\.retrypartial$/) { |
if ($thiskey =~ /\.retrypartial$/) { |
$name = 'retrypartial'; |
$name = 'retrypartial'; |
} |
} |
} |
} |
if ($name ne '') { |
} elsif ($cmd eq 'datepointer') { |
my ($needsrelease,$needsnewer); |
$data=&Apache::lonhtmlcommon::get_date_from_form($env{$key}); |
$needsrelease = $Apache::lonnet::needsrelease{"parameter:$name:$data"}; |
$typeof=$env{'form.typeof_'.$thiskey}; |
if ($needsrelease) { |
$text = &mt('Saved modified date for'); |
unless ($got_chostname) { |
if ($typeof eq 'date_start') { |
($chostname,$cmajor,$cminor)=¶meter_release_vars(); |
if ($thiskey =~ /\.printstartdate$/) { |
$got_chostname = 1; |
$name = 'printstartdate'; |
|
if (($data) && ($data > $now)) { |
|
$valchk = 'future'; |
} |
} |
$needsnewer = ¶meter_releasecheck($name,$data, |
|
$needsrelease, |
|
$chostname,$cmajor, |
|
$cminor); |
|
} |
} |
|
} elsif ($typeof eq 'date_end') { |
|
if ($thiskey =~ /\.printenddate$/) { |
|
$name = 'printenddate'; |
|
if (($data) && ($data < $now)) { |
|
$valchk = 'past'; |
|
} |
|
} |
|
} |
|
} elsif ($cmd eq 'dateinterval') { |
|
$data=&get_date_interval_from_form($thiskey); |
|
$typeof=$env{'form.typeof_'.$thiskey}; |
|
$text = &mt('Saved modified date for'); |
|
} |
|
if ($name ne '') { |
|
my ($needsrelease,$needsnewer); |
|
$needsrelease = $Apache::lonnet::needsrelease{"parameter:$name:$valchk"}; |
|
if ($needsrelease) { |
|
unless ($got_chostname) { |
|
($chostname,$cmajor,$cminor)=¶meter_release_vars(); |
|
$got_chostname = 1; |
|
} |
|
$needsnewer = ¶meter_releasecheck($name,$valchk, |
|
$needsrelease, |
|
$cmajor,$cminor); |
if ($needsnewer) { |
if ($needsnewer) { |
$r->print('<br />'.&oldversion_warning($name,$data, |
$r->print('<br />'.&oldversion_warning($name,$data, |
$chostname,$cmajor, |
$chostname,$cmajor, |
Line 2862 sub storedata {
|
Line 2972 sub storedata {
|
next; |
next; |
} |
} |
} |
} |
} elsif ($cmd eq 'datepointer') { |
|
$data=&Apache::lonhtmlcommon::get_date_from_form($env{$key}); |
|
$typeof=$env{'form.typeof_'.$thiskey}; |
|
$text = &mt('Saved modified date for'); |
|
} elsif ($cmd eq 'dateinterval') { |
|
$data=&get_date_interval_from_form($thiskey); |
|
$typeof=$env{'form.typeof_'.$thiskey}; |
|
$text = &mt('Saved modified date for'); |
|
} |
} |
if (defined($data) and $$olddata{$thiskey} ne $data) { |
if (defined($data) and $$olddata{$thiskey} ne $data) { |
if ($tuname) { |
if ($tuname) { |
Line 2913 sub storedata {
|
Line 3015 sub storedata {
|
if (&Apache::lonnet::del('resourcedata',\@deldata,$dom,$crs) eq 'ok') { |
if (&Apache::lonnet::del('resourcedata',\@deldata,$dom,$crs) eq 'ok') { |
my %loghash=map { $_ => '' } @deldata; |
my %loghash=map { $_ => '' } @deldata; |
&log_parmset(\%loghash,1); |
&log_parmset(\%loghash,1); |
$r->print('<h2>'.&mt('Deleted [_1] parameter(s)',$delentries).'</h2>'); |
$r->print('<h2>'.&mt('Deleted [quant,_1,parameter]',$delentries/2).'</h2>'); |
} else { |
} else { |
$r->print('<div class="LC_error">'. |
$r->print('<div class="LC_error">'. |
&mt('Error deleting parameters').'</div>'); |
&mt('Error deleting parameters').'</div>'); |
Line 2923 sub storedata {
|
Line 3025 sub storedata {
|
if ($putentries) { |
if ($putentries) { |
if (&Apache::lonnet::put('resourcedata',\%newdata,$dom,$crs) eq 'ok') { |
if (&Apache::lonnet::put('resourcedata',\%newdata,$dom,$crs) eq 'ok') { |
&log_parmset(\%newdata,0); |
&log_parmset(\%newdata,0); |
$r->print('<h3>'.&mt('Saved [_1] parameter(s)',$putentries/2).'</h3>'); |
$r->print('<h3>'.&mt('Saved [quant,_1,parameter]',$putentries/2).'</h3>'); |
} else { |
} else { |
$r->print('<div class="LC_error">'. |
$r->print('<div class="LC_error">'. |
&mt('Error saving parameters').'</div>'); |
&mt('Error saving parameters').'</div>'); |
Line 2958 sub parse_listdata_key {
|
Line 3060 sub parse_listdata_key {
|
} |
} |
|
|
sub listdata { |
sub listdata { |
my ($r,$resourcedata,$listdata,$sortorder)=@_; |
my ($r,$resourcedata,$listdata,$sortorder,$caller,$classlist,$readonly)=@_; |
# Start list output |
# Start list output |
|
|
my $oldsection=''; |
my $oldsection=''; |
Line 3068 sub listdata {
|
Line 3170 sub listdata {
|
# Ready to print |
# Ready to print |
# |
# |
my $parmitem = &standard_parameter_names($name); |
my $parmitem = &standard_parameter_names($name); |
$r->print(&tablestart(). |
$r->print(&tablestart($readonly). |
&Apache::loncommon::start_data_table_row(). |
&Apache::loncommon::start_data_table_row(). |
'<td><b>'.&mt($parmitem). |
'<td><b>'.&mt($parmitem). |
'</b></td><td><input type="checkbox" name="del_'. |
'</b></td>'); |
$thiskey.'" /></td><td>'); |
unless ($readonly) { |
|
$r->print('<td><input type="checkbox" name="del_'. |
|
$thiskey.'" /></td>'); |
|
} |
|
$r->print('<td>'); |
$foundkeys++; |
$foundkeys++; |
if (&isdateparm($thistype)) { |
if (&isdateparm($thistype)) { |
my $jskey='key_'.$pointer; |
my $jskey='key_'.$pointer; |
$pointer++; |
my $state; |
$r->print( |
$pointer++; |
&Apache::lonhtmlcommon::date_setter('parmform', |
if ($readonly) { |
$jskey, |
$state = 'disabled'; |
$$resourcedata{$thiskey}, |
} |
'',1,'',''). |
$r->print( |
|
&Apache::lonhtmlcommon::date_setter('parmform', |
|
$jskey, |
|
$$resourcedata{$thiskey}, |
|
'',1,$state)); |
|
unless ($readonly) { |
|
$r->print( |
'<input type="hidden" name="datepointer_'.$thiskey.'" value="'.$jskey.'" />'. |
'<input type="hidden" name="datepointer_'.$thiskey.'" value="'.$jskey.'" />'. |
(($$resourcedata{$thiskey}!=0)?'<span class="LC_nobreak"><a href="/adm/parmset?&action=dateshift1&timebase='.$$resourcedata{$thiskey}.'">'. |
(($$resourcedata{$thiskey}!=0)?'<span class="LC_nobreak"><a href="/adm/parmset?&action=dateshift1&timebase='.$$resourcedata{$thiskey}.'">'. |
&mt('Shift all dates based on this date').'</a></span>':''). |
&mt('Shift all dates based on this date').'</a></span>':''). |
&date_sanity_info($$resourcedata{$thiskey}) |
&date_sanity_info($$resourcedata{$thiskey}) |
); |
); |
|
} |
} elsif ($thistype eq 'date_interval') { |
} elsif ($thistype eq 'date_interval') { |
$r->print(&date_interval_selector($thiskey, |
$r->print(&date_interval_selector($thiskey,$name, |
$$resourcedata{$thiskey})); |
$$resourcedata{$thiskey},$readonly)); |
} elsif ($thistype =~ m/^string/) { |
} elsif ($thistype =~ m/^string/) { |
$r->print(&string_selector($thistype,$thiskey, |
$r->print(&string_selector($thistype,$thiskey, |
$$resourcedata{$thiskey},$name)); |
$$resourcedata{$thiskey},$name,$readonly)); |
} else { |
} else { |
$r->print(&default_selector($thiskey,$$resourcedata{$thiskey})); |
$r->print(&default_selector($thiskey,$$resourcedata{$thiskey},$readonly)); |
|
} |
|
unless ($readonly) { |
|
$r->print('<input type="hidden" name="typeof_'.$thiskey.'" value="'. |
|
$thistype.'" />'); |
} |
} |
$r->print('<input type="hidden" name="typeof_'.$thiskey.'" value="'. |
|
$thistype.'" />'); |
|
$r->print('</td>'.&Apache::loncommon::end_data_table_row()); |
$r->print('</td>'.&Apache::loncommon::end_data_table_row()); |
} |
} |
} |
} |
Line 3106 sub listdata {
|
Line 3221 sub listdata {
|
|
|
|
|
sub date_interval_selector { |
sub date_interval_selector { |
my ($thiskey, $showval) = @_; |
my ($thiskey, $pname, $showval, $readonly) = @_; |
my $result; |
my ($result,%skipval); |
|
my $currval = $showval; |
foreach my $which (['days', 86400, 31], |
foreach my $which (['days', 86400, 31], |
['hours', 3600, 23], |
['hours', 3600, 23], |
['minutes', 60, 59], |
['minutes', 60, 59], |
Line 3118 sub date_interval_selector {
|
Line 3234 sub date_interval_selector {
|
my %select = ((map {$_ => $_} (0..$max)), |
my %select = ((map {$_ => $_} (0..$max)), |
'select_form_order' => [0..$max]); |
'select_form_order' => [0..$max]); |
$result .= &Apache::loncommon::select_form($amount,$name.'_'.$thiskey, |
$result .= &Apache::loncommon::select_form($amount,$name.'_'.$thiskey, |
\%select); |
\%select,'',$readonly); |
$result .= ' '.&mt($name); |
$result .= ' '.&mt($name); |
} |
} |
$result .= '<input type="hidden" name="dateinterval_'.$thiskey.'" />'; |
if ($pname eq 'interval') { |
|
unless ($skipval{'done'}) { |
|
my $checkedon = ''; |
|
my $checkedproc = ''; |
|
my $currproctorkey = ''; |
|
my $currprocdisplay = 'hidden'; |
|
my $currdonetext = &mt('Done'); |
|
my $checkedoff = ' checked="checked"'; |
|
if ($currval =~ /^(?:\d+)_done$/) { |
|
$checkedon = ' checked="checked"'; |
|
$checkedoff = ''; |
|
} elsif ($currval =~ /^(?:\d+)_done\:([^\:]+)\:$/) { |
|
$currdonetext = $1; |
|
$checkedon = ' checked="checked"'; |
|
$checkedoff = ''; |
|
} elsif ($currval =~ /^(?:\d+)_done_proctor_(.+)$/) { |
|
$currproctorkey = $1; |
|
$checkedproc = ' checked="checked"'; |
|
$checkedoff = ''; |
|
$currprocdisplay = 'text'; |
|
} elsif ($currval =~ /^(?:\d+)_done\:([^\:]+)\:_proctor_(.+)$/) { |
|
$currdonetext = $1; |
|
$currproctorkey = $2; |
|
$checkedproc = ' checked="checked"'; |
|
$checkedoff = ''; |
|
$currprocdisplay = 'text'; |
|
} |
|
my $onclick = ' onclick="toggleSecret(this.form,'."'done_','$thiskey'".');"'; |
|
my $disabled; |
|
if ($readonly) { |
|
$disabled = ' disabled="disabled"'; |
|
} |
|
$result .= '<br /><span class="LC_nobreak">'.&mt('Include "done" button'). |
|
'<label><input type="radio" value="" name="done_'.$thiskey.'"'.$checkedoff.$onclick.$disabled.' />'. |
|
&mt('No').'</label>'.(' 'x2). |
|
'<label><input type="radio" value="_done" name="done_'.$thiskey.'"'.$checkedon.$onclick.$disabled.' />'. |
|
&mt('Yes').'</label>'.(' 'x2). |
|
'<label><input type="radio" value="_done_proctor" name="done_'.$thiskey.'"'.$checkedproc.$onclick.$disabled.' />'. |
|
&mt('Yes, with proctor key').'</label>'. |
|
'<input type="'.$currprocdisplay.'" id="done_'.$thiskey.'_proctorkey" '. |
|
'name="done_'.$thiskey.'_proctorkey" value="'.&HTML::Entities::encode($currproctorkey,'"<>&').'"'.$disabled.' /></span><br />'. |
|
'<span class="LC_nobreak">'.&mt('Button text').': '. |
|
'<input type="text" name="done_'.$thiskey.'_buttontext" value="'.&HTML::Entities::encode($currdonetext,'"<>&').'"'.$disabled.' /></span>'; |
|
} |
|
} |
|
unless ($readonly) { |
|
$result .= '<input type="hidden" name="dateinterval_'.$thiskey.'" />'; |
|
} |
return $result; |
return $result; |
|
|
} |
} |
Line 3143 sub get_date_interval_from_form {
|
Line 3306 sub get_date_interval_from_form {
|
|
|
|
|
sub default_selector { |
sub default_selector { |
my ($thiskey, $showval) = @_; |
my ($thiskey, $showval, $readonly) = @_; |
return '<input type="text" name="set_'.$thiskey.'" value="'.$showval.'" />'; |
my $disabled; |
|
if ($readonly) { |
|
$disabled = ' disabled="disabled"'; |
|
} |
|
return '<input type="text" name="set_'.$thiskey.'" value="'.$showval.'"'.$disabled.' />'; |
} |
} |
|
|
my %strings = |
my %strings = |
Line 3185 sub standard_string_options {
|
Line 3352 sub standard_string_options {
|
} |
} |
|
|
sub string_selector { |
sub string_selector { |
my ($thistype, $thiskey, $showval, $name) = @_; |
my ($thistype, $thiskey, $showval, $name, $readonly) = @_; |
|
|
if (!exists($strings{$thistype})) { |
if (!exists($strings{$thistype})) { |
return &default_selector($thiskey,$showval); |
return &default_selector($thiskey,$showval,$readonly); |
} |
} |
|
|
my %skiptype; |
my %skiptype; |
Line 3207 sub string_selector {
|
Line 3374 sub string_selector {
|
$got_chostname = 1; |
$got_chostname = 1; |
} |
} |
my $needsnewer=¶meter_releasecheck($name,$parmval,$needsrelease, |
my $needsnewer=¶meter_releasecheck($name,$parmval,$needsrelease, |
$chostname,$cmajor, |
$cmajor,$cminor); |
$cminor); |
|
if ($needsnewer) { |
if ($needsnewer) { |
$skiptype{$parmval} = 1; |
$skiptype{$parmval} = 1; |
} |
} |
} |
} |
} |
} |
} |
} |
|
|
|
my ($result,$disabled); |
|
|
my $result; |
if ($readonly) { |
|
$disabled = ' disabled="disabled"'; |
|
} |
my $numinrow = 3; |
my $numinrow = 3; |
if ($thistype eq 'string_problemstatus') { |
if ($thistype eq 'string_problemstatus') { |
$numinrow = 2; |
$numinrow = 2; |
Line 3243 sub string_selector {
|
Line 3412 sub string_selector {
|
$result .= '<td class="LC_left_item">'. |
$result .= '<td class="LC_left_item">'. |
'<span class="LC_nobreak"><label>'. |
'<span class="LC_nobreak"><label>'. |
'<input type="radio" name="set_'.$thiskey. |
'<input type="radio" name="set_'.$thiskey. |
'" value="'.$name.'"'; |
'" value="'.$name.'"'.$disabled; |
if ($showval eq $name) { |
if ($showval eq $name) { |
$result .= ' checked="checked"'; |
$result .= ' checked="checked"'; |
} |
} |
Line 3302 sub dateshift {
|
Line 3471 sub dateshift {
|
} |
} |
|
|
sub newoverview { |
sub newoverview { |
my ($r) = @_; |
my ($r,$parm_permission) = @_; |
|
|
my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $crs = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $crs = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
my $readonly = 1; |
|
if ($parm_permission->{'edit'}) { |
|
undef($readonly); |
|
} |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=setoverview', |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=setoverview', |
text=>"Overview Mode"}); |
text=>"Overview Mode"}); |
|
|
Line 3318 sub newoverview {
|
Line 3491 sub newoverview {
|
'. |
'. |
&Apache::lonhtmlcommon::resize_scrollbox_js('params')."\n". |
&Apache::lonhtmlcommon::resize_scrollbox_js('params')."\n". |
&showhide_js()."\n". |
&showhide_js()."\n". |
|
&done_proctor_js()."\n". |
'// ]]> |
'// ]]> |
</script> |
</script> |
'; |
'; |
Line 3445 ENDOVER
|
Line 3619 ENDOVER
|
|
|
# List data |
# List data |
|
|
&listdata($r,$resourcedata,$listdata,$sortorder); |
&listdata($r,$resourcedata,$listdata,$sortorder,'newoverview',undef,$readonly); |
|
} |
|
$r->print(&tableend()); |
|
unless ($readonly) { |
|
$r->print(((($env{'form.store'}) || ($env{'form.dis'}))?'<p><input type="submit" name="store" value="'.&mt('Save').'" /></p>':'')); |
} |
} |
$r->print(&tableend(). |
$r->print('</form>'); |
((($env{'form.store'}) || ($env{'form.dis'}))?'<p><input type="submit" name="store" value="'.&mt('Save').'" /></p>':''). |
|
'</form>'); |
|
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} |
} |
|
|
Line 3489 sub secgroup_lister {
|
Line 3665 sub secgroup_lister {
|
} |
} |
|
|
sub overview { |
sub overview { |
my ($r) = @_; |
my ($r,$parm_permission) = @_; |
my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $crs = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $crs = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
my $crstype = $env{'course.'.$env{'request.course.id'}.'.type'}; |
|
my $js = '<script type="text/javascript">'."\n". |
|
'// <![CDATA['."\n". |
|
&done_proctor_js()."\n". |
|
'// ]]>'."\n". |
|
'</script>'."\n"; |
|
my $readonly = 1; |
|
if ($parm_permission->{'edit'}) { |
|
undef($readonly); |
|
} |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=setoverview', |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=setoverview', |
text=>"Overview Mode"}); |
text=>"Overview Mode"}); |
my $start_page=&Apache::loncommon::start_page('Modify Parameters'); |
my $start_page=&Apache::loncommon::start_page('Modify Parameters'.$js); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Overview'); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Overview'); |
$r->print($start_page.$breadcrumbs); |
$r->print($start_page.$breadcrumbs); |
$r->print('<form method="post" action="/adm/parmset?action=setoverview" name="parmform">'); |
$r->print('<form method="post" action="/adm/parmset?action=setoverview" name="parmform">'); |
|
|
# Store modified |
# Store modified |
|
unless ($readonly) { |
&storedata($r,$crs,$dom); |
&storedata($r,$crs,$dom); |
|
} |
|
|
# Read modified data |
# Read modified data |
|
|
my $resourcedata=&readdata($crs,$dom); |
my ($resourcedata,$classlist)=&readdata($crs,$dom); |
|
|
|
|
my $sortorder=$env{'form.sortorder'}; |
my $sortorder=$env{'form.sortorder'}; |
unless ($sortorder) { $sortorder='realmstudent'; } |
unless ($sortorder) { $sortorder='realmstudent'; } |
&sortmenu($r,$sortorder); |
&sortmenu($r,$sortorder); |
|
|
|
my $submitbutton = '<input type="submit" value="'.&mt('Save').'" />'; |
|
|
|
if ($readonly) { |
|
$r->print('<p>'.$submitbutton.'</p>'); |
|
} |
|
|
|
|
# List data |
# List data |
|
|
my $foundkeys=&listdata($r,$resourcedata,$resourcedata,$sortorder); |
my $foundkeys=&listdata($r,$resourcedata,$resourcedata,$sortorder,'overview',$classlist,$readonly); |
|
|
$r->print(&tableend().'<p>'. |
$r->print(&tableend().'<p>'); |
($foundkeys?'<input type="submit" value="'.&mt('Save').'" />':'<span class="LC_info">'.&mt('There are no parameters.').'</span>').'</p></form>'. |
if ($foundkeys) { |
&Apache::loncommon::end_page()); |
unless ($readonly) { |
|
$r->print('<p>'.$submitbutton.'</p>'); |
|
} |
|
} else { |
|
$r->print('<p class="LC_info">'.&mt('There are no parameters.').'</p>'); |
|
} |
|
$r->print('</form>'.&Apache::loncommon::end_page()); |
} |
} |
|
|
sub clean_parameters { |
sub clean_parameters { |
Line 3644 sub date_shift_two {
|
Line 3843 sub date_shift_two {
|
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Shift'); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Shift'); |
$r->print($start_page.$breadcrumbs); |
$r->print($start_page.$breadcrumbs); |
my $timeshifted=&Apache::lonhtmlcommon::get_date_from_form('timeshifted'); |
my $timeshifted=&Apache::lonhtmlcommon::get_date_from_form('timeshifted'); |
$r->print(&mt('Shifting all dates such that [_1] becomes [_2]', |
$r->print('<h2>'.&mt('Shift Dates').'</h2>'. |
|
'<p>'.&mt('Shifting all dates such that [_1] becomes [_2]', |
&Apache::lonlocal::locallocaltime($env{'form.timebase'}), |
&Apache::lonlocal::locallocaltime($env{'form.timebase'}), |
&Apache::lonlocal::locallocaltime($timeshifted))); |
&Apache::lonlocal::locallocaltime($timeshifted)).'</p>'); |
my $delta=$timeshifted-$env{'form.timebase'}; |
my $delta=$timeshifted-$env{'form.timebase'}; |
&dateshift($delta); |
&dateshift($delta); |
|
$r->print( |
|
&Apache::lonhtmlcommon::confirm_success(&mt('Done')). |
|
'<br /><br />'. |
|
&Apache::lonhtmlcommon::actionbox( |
|
['<a href="/adm/parmset">'.&mt('Content and Problem Settings').'</a>'])); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} |
} |
|
|
Line 3703 sub print_main_menu {
|
Line 3908 sub print_main_menu {
|
# |
# |
$r->print(&header()); |
$r->print(&header()); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Content and Problem Settings')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Content and Problem Settings')); |
|
my $crstype = &Apache::loncommon::course_type(); |
|
my $lc_crstype = lc($crstype); |
|
|
$r->print(<<ENDMAINFORMHEAD); |
$r->print(<<ENDMAINFORMHEAD); |
<form method="post" enctype="multipart/form-data" |
<form method="post" enctype="multipart/form-data" |
action="/adm/parmset" name="studentform"> |
action="/adm/parmset" name="studentform"> |
Line 3713 ENDMAINFORMHEAD
|
Line 3921 ENDMAINFORMHEAD
|
my $vgr = &Apache::lonnet::allowed('vgr',$env{'request.course.id'}); |
my $vgr = &Apache::lonnet::allowed('vgr',$env{'request.course.id'}); |
my $mgr = &Apache::lonnet::allowed('mgr',$env{'request.course.id'}); |
my $mgr = &Apache::lonnet::allowed('mgr',$env{'request.course.id'}); |
my $dcm = &Apache::lonnet::allowed('dcm',$env{'request.course.id'}); |
my $dcm = &Apache::lonnet::allowed('dcm',$env{'request.course.id'}); |
|
my $vcb = &Apache::lonnet::allowed('vcb',$env{'request.course.id'}); |
|
my $vpa = &Apache::lonnet::allowed('vpa',$env{'request.course.id'}); |
if ((!$dcm) && ($env{'request.course.sec'} ne '')) { |
if ((!$dcm) && ($env{'request.course.sec'} ne '')) { |
$dcm = &Apache::lonnet::allowed('dcm',$env{'request.course.id'}. |
$dcm = &Apache::lonnet::allowed('dcm',$env{'request.course.id'}. |
'/'.$env{'request.course.sec'}); |
'/'.$env{'request.course.sec'}); |
} |
} |
|
if ((!$vcb) && ($env{'request.course.sec'} ne '')) { |
my $crstype = &Apache::loncommon::course_type(); |
$vcb = &Apache::lonnet::allowed('vcb',$env{'request.course.id'}. |
my $lc_crstype = lc($crstype); |
'/'.$env{'request.course.sec'}); |
|
} |
|
my (%linktext,%linktitle,%url); |
|
if ($parm_permission->{'edit'}) { |
|
%linktext = ( |
|
newoverview => 'Edit Resource Parameters - Overview Mode', |
|
settable => 'Edit Resource Parameters - Table Mode', |
|
setoverview => 'Modify Resource Parameters - Overview Mode', |
|
); |
|
%linktitle = ( |
|
newoverview => 'Set/Modify resource parameters in overview mode.', |
|
settable => 'Set/Modify resource parameters in table mode.', |
|
setoverview => 'Set/Modify existing resource parameters in overview mode.', |
|
); |
|
} else { |
|
%linktext = ( |
|
newoverview => 'View Resource Parameters - Overview Mode', |
|
settable => 'View Resource Parameters - Table Mode', |
|
setoverview => 'View Resource Parameters - Overview Mode', |
|
); |
|
%linktitle = ( |
|
newoverview => 'Display resource parameters in overview mode.', |
|
settable => 'Display resource parameters in table mode.', |
|
setoverview => 'Display existing resource parameters in overview mode.', |
|
); |
|
} |
|
if ($mgr) { |
|
$linktext{'resettimes'} = 'Reset Student Access Times'; |
|
$linktitle{'resettimes'} = "Reset access times for folders/maps, resources or the $lc_crstype."; |
|
$url{'resettimes'} = '/adm/helper/resettimes.helper'; |
|
} elsif ($vgr) { |
|
$linktext{'resettimes'} = 'Display Student Access Times', |
|
$linktitle{'resettimes'} = "Display access times for folders/maps, resources or the $lc_crstype.", |
|
$url{'resettimes'} = '/adm/accesstimes'; |
|
} |
my @menu = |
my @menu = |
( { categorytitle=>"Content Settings for this $crstype", |
( { categorytitle=>"Content Settings for this $crstype", |
items => [ |
items => [ |
{ linktext => 'Portfolio Metadata', |
{ linktext => 'Portfolio Metadata', |
url => '/adm/parmset?action=setrestrictmeta', |
url => '/adm/parmset?action=setrestrictmeta', |
permission => $parm_permission, |
permission => $parm_permission->{'setrestrictmeta'}, |
linktitle => "Restrict metadata for this $lc_crstype." , |
linktitle => "Restrict metadata for this $lc_crstype." , |
icon =>'contact-new.png' , |
icon =>'contact-new.png' , |
}, |
}, |
{ linktext => 'Reset Student Access Times', |
{ linktext => $linktext{'resettimes'}, |
url => '/adm/helper/resettimes.helper', |
url => $url{'resettimes'}, |
permission => $mgr, |
permission => ($vgr || $mgr), |
linktitle => "Reset access times for folders/maps, resources or the $lc_crstype." , |
linktitle => $linktitle{'resettimes'}, |
icon => 'start-here.png' , |
icon => 'start-here.png', |
}, |
}, |
{ linktext => 'Blocking Communication/Resource Access', |
{ linktext => 'Blocking Communication/Resource Access', |
url => '/adm/setblock', |
url => '/adm/setblock', |
permission => $dcm, |
permission => ($vcb || $dcm), |
linktitle => 'Configure blocking of communication/collaboration and access to resources during an exam', |
linktitle => 'Configure blocking of communication/collaboration and access to resources during an exam', |
icon => 'comblock.png', |
icon => 'comblock.png', |
}, |
}, |
{ linktext => 'Set Parameter Setting Default Actions', |
{ linktext => 'Set Parameter Setting Default Actions', |
url => '/adm/parmset?action=setdefaults', |
url => '/adm/parmset?action=setdefaults', |
permission => $parm_permission, |
permission => $parm_permission->{'setdefaults'}, |
linktitle =>'Set default actions for parameters.' , |
linktitle =>'Set default actions for parameters.' , |
icon => 'folder-new.png' , |
icon => 'folder-new.png' , |
}]}, |
}]}, |
Line 3752 ENDMAINFORMHEAD
|
Line 3995 ENDMAINFORMHEAD
|
items => [ |
items => [ |
{ linktext => 'Edit Resource Parameters - Helper Mode', |
{ linktext => 'Edit Resource Parameters - Helper Mode', |
url => '/adm/helper/parameter.helper', |
url => '/adm/helper/parameter.helper', |
permission => $parm_permission, |
permission => $parm_permission->{'helper'}, |
linktitle =>'Set/Modify resource parameters in helper mode.' , |
linktitle =>'Set/Modify resource parameters in helper mode.' , |
icon => 'dialog-information.png' , |
icon => 'dialog-information.png' , |
#help => 'Parameter_Helper', |
#help => 'Parameter_Helper', |
}, |
}, |
{ linktext => 'Edit Resource Parameters - Overview Mode', |
{ linktext => $linktext{'newoverview'}, |
url => '/adm/parmset?action=newoverview', |
url => '/adm/parmset?action=newoverview', |
permission => $parm_permission, |
permission => $parm_permission->{'newoverview'}, |
linktitle =>'Set/Modify resource parameters in overview mode.' , |
linktitle => $linktitle{'newoverview'}, |
icon => 'edit-find.png' , |
icon => 'edit-find.png', |
#help => 'Parameter_Overview', |
#help => 'Parameter_Overview', |
}, |
}, |
{ linktext => 'Edit Resource Parameters - Table Mode', |
{ linktext => $linktext{'settable'}, |
url => '/adm/parmset?action=settable', |
url => '/adm/parmset?action=settable', |
permission => $parm_permission, |
permission => $parm_permission->{'settable'}, |
linktitle =>'Set/Modify resource parameters in table mode.' , |
linktitle => $linktitle{'settable'}, |
icon => 'edit-copy.png' , |
icon => 'edit-copy.png', |
#help => 'Table_Mode', |
#help => 'Table_Mode', |
}]}, |
}]}, |
{ categorytitle => 'Existing Parameter Settings for Resources', |
{ categorytitle => 'Existing Parameter Settings for Resources', |
items => [ |
items => [ |
{ linktext => 'Modify Resource Parameters - Overview Mode', |
{ linktext => $linktext{'setoverview'}, |
url => '/adm/parmset?action=setoverview', |
url => '/adm/parmset?action=setoverview', |
permission => $parm_permission, |
permission => $parm_permission->{'setoverview'}, |
linktitle =>'Set/Modify existing resource parameters in overview mode.' , |
linktitle => $linktitle{'setoverview'}, |
icon => 'preferences-desktop-wallpaper.png' , |
icon => 'preferences-desktop-wallpaper.png', |
#help => 'Parameter_Overview', |
#help => 'Parameter_Overview', |
}, |
}, |
{ linktext => 'Change Log', |
{ linktext => 'Change Log', |
url => '/adm/parmset?action=parameterchangelog', |
url => '/adm/parmset?action=parameterchangelog', |
permission => $parm_permission, |
permission => $parm_permission->{'parameterchangelog'}, |
linktitle =>"View parameter and $lc_crstype blog posting/user notification change log." , |
linktitle =>"View parameter and $lc_crstype blog posting/user notification change log." , |
icon => 'document-properties.png', |
icon => 'document-properties.png', |
}]} |
}]} |
Line 3988 sub addmetafield {
|
Line 4231 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"'); |
$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 4356 sub standard_parameter_types {
|
Line 4599 sub standard_parameter_types {
|
} |
} |
|
|
sub parm_change_log { |
sub parm_change_log { |
my ($r)=@_; |
my ($r,$parm_permission)=@_; |
&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". |
Line 4385 sub parm_change_log {
|
Line 4628 sub parm_change_log {
|
$r->print(&Apache::loncommon::display_filter('parmslog').' '."\n". |
$r->print(&Apache::loncommon::display_filter('parmslog').' '."\n". |
'<input type="submit" value="'.&mt('Display').'" />'. |
'<input type="submit" value="'.&mt('Display').'" />'. |
'</form></fieldset></div><br clear="all" />'); |
'</form></fieldset></div><br clear="all" />'); |
|
my $readonly = 1; |
|
if ($parm_permission->{'edit'}) { |
|
undef($readonly); |
|
} |
my $courseopt=&Apache::lonnet::get_courseresdata($env{'course.'.$env{'request.course.id'}.'.num'}, |
my $courseopt=&Apache::lonnet::get_courseresdata($env{'course.'.$env{'request.course.id'}.'.num'}, |
$env{'course.'.$env{'request.course.id'}.'.domain'}); |
$env{'course.'.$env{'request.course.id'}.'.domain'}); |
$r->print(&Apache::loncommon::start_data_table().&Apache::loncommon::start_data_table_header_row(). |
$r->print(&Apache::loncommon::start_data_table().&Apache::loncommon::start_data_table_header_row(). |
'<th>'.&mt('Time').'</th><th>'.&mt('User').'</th><th>'.&mt('Extent').'</th><th>'.&mt('Users').'</th><th>'. |
'<th>'.&mt('Time').'</th><th>'.&mt('User').'</th><th>'.&mt('Extent').'</th><th>'.&mt('Users').'</th><th>'. |
&mt('Parameter').'</th><th>'.&mt('Part').'</th><th>'.&mt('New Value').'</th><th>'.&mt('Announce').'</th>'. |
&mt('Parameter').'</th><th>'.&mt('Part').'</th><th>'.&mt('New Value').'</th>'); |
&Apache::loncommon::end_data_table_header_row()); |
unless ($readonly) { |
|
$r->print('<th>'.&mt('Announce').'</th>'); |
|
} |
|
$r->print(&Apache::loncommon::end_data_table_header_row()); |
my $shown=0; |
my $shown=0; |
my $folder=''; |
my $folder=''; |
if ($env{'form.displayfilter'} eq 'currentfolder') { |
if ($env{'form.displayfilter'} eq 'currentfolder') { |
Line 4424 sub parm_change_log {
|
Line 4673 sub parm_change_log {
|
$parmlog{$id}{'exe_uname'}, |
$parmlog{$id}{'exe_uname'}, |
$parmlog{$id}{'exe_udom'}); |
$parmlog{$id}{'exe_udom'}); |
my $send_msg_link=''; |
my $send_msg_link=''; |
if ((($parmlog{$id}{'exe_uname'} ne $env{'user.name'}) |
if ((!$readonly) && |
|
(($parmlog{$id}{'exe_uname'} ne $env{'user.name'}) |
|| ($parmlog{$id}{'exe_udom'} ne $env{'user.domain'}))) { |
|| ($parmlog{$id}{'exe_udom'} ne $env{'user.domain'}))) { |
$send_msg_link ='<br />'. |
$send_msg_link ='<br />'. |
&Apache::loncommon::messagewrapper(&mt('Send message'), |
&Apache::loncommon::messagewrapper(&mt('Send message'), |
Line 4494 sub parm_change_log {
|
Line 4744 sub parm_change_log {
|
} |
} |
} |
} |
} |
} |
$output .= '</td><td>'; |
$output .= '</td>'; |
|
|
if ($stillactive) { |
unless ($readonly) { |
my $parmitem = &standard_parameter_names($parmname); |
$output .= '<td>'; |
$parmitem = &mt($parmitem); |
if ($stillactive) { |
my $title=&mt('Changed [_1]',$parmitem); |
my $parmitem = &standard_parameter_names($parmname); |
my $description=&mt('Changed [_1] for [_2] to [_3]', |
$parmitem = &mt($parmitem); |
$parmitem,$realmdescription, |
my $title=&mt('Changed [_1]',$parmitem); |
(&isdateparm($istype{$parmname})?&Apache::lonlocal::locallocaltime($value):$value)); |
my $description=&mt('Changed [_1] for [_2] to [_3]', |
if (($uname) && ($udom)) { |
$parmitem,$realmdescription, |
$output .= |
(&isdateparm($istype{$parmname})?&Apache::lonlocal::locallocaltime($value):$value)); |
&Apache::loncommon::messagewrapper('Notify User', |
if (($uname) && ($udom)) { |
$uname,$udom,$title, |
$output .= |
$description); |
&Apache::loncommon::messagewrapper('Notify User', |
} else { |
$uname,$udom,$title, |
$output .= |
$description); |
&Apache::lonrss::course_blog_link($id,$title, |
} else { |
$description); |
$output .= |
} |
&Apache::lonrss::course_blog_link($id,$title, |
} |
$description); |
$output .= '</td>'.&Apache::loncommon::end_data_table_row(); |
} |
|
} |
|
$output .= '</td>'; |
|
} |
|
$output .= &Apache::loncommon::end_data_table_row(); |
} |
} |
if ($env{'form.displayfilter'} eq 'containing') { |
if ($env{'form.displayfilter'} eq 'containing') { |
my $wholeentry=$about_me_link.':'. |
my $wholeentry=$about_me_link.':'. |
Line 4641 sub parameter_release_vars {
|
Line 4895 sub parameter_release_vars {
|
} |
} |
|
|
sub parameter_releasecheck { |
sub parameter_releasecheck { |
my ($name,$value,$needsrelease,$chostname,$cmajor,$cminor) = @_; |
my ($name,$value,$needsrelease,$cmajor,$cminor) = @_; |
my $needsnewer; |
my $needsnewer; |
my ($needsmajor,$needsminor) = split(/\./,$needsrelease); |
my ($needsmajor,$needsminor) = split(/\./,$needsrelease); |
if (($cmajor < $needsmajor) || |
if (($cmajor < $needsmajor) || |
Line 4676 sub oldversion_warning {
|
Line 4930 sub oldversion_warning {
|
} |
} |
} |
} |
} |
} |
|
} elsif (($name eq 'printstartdate') || ($name eq 'printenddate')) { |
|
my $now = time; |
|
if ($value =~ /^\d+$/) { |
|
if ($name eq 'printstartdate') { |
|
if ($value > $now) { |
|
$desc = &Apache::lonlocal::locallocaltime($value); |
|
} |
|
} elsif ($name eq 'printenddate') { |
|
if ($value < $now) { |
|
$desc = &Apache::lonlocal::locallocaltime($value); |
|
} |
|
} |
|
} |
} |
} |
my $standard_name = &standard_parameter_names($name); |
my $standard_name = &standard_parameter_names($name); |
return '<p class="LC_warning">'. |
return '<p class="LC_warning">'. |
Line 4687 sub oldversion_warning {
|
Line 4954 sub oldversion_warning {
|
'</p>'; |
'</p>'; |
} |
} |
|
|
|
sub get_permission { |
|
my %permission; |
|
my $allowed = 0; |
|
return (\%permission,$allowed) unless ($env{'request.course.id'}); |
|
if ((&Apache::lonnet::allowed('opa',$env{'request.course.id'})) || |
|
(&Apache::lonnet::allowed('opa',$env{'request.course.id'}.'/'. |
|
$env{'request.course.sec'}))) { |
|
%permission= ( |
|
'edit' => 1, |
|
'set' => 1, |
|
'setoverview' => 1, |
|
'addmetadata' => 1, |
|
'ordermetadata' => 1, |
|
'setrestrictmeta' => 1, |
|
'newoverview' => 1, |
|
'setdefaults' => 1, |
|
'settable' => 1, |
|
'parameterchangelog' => 1, |
|
'cleanparameters' => 1, |
|
'dateshift1' => 1, |
|
'dateshift2' => 1, |
|
'helper' => 1, |
|
); |
|
} elsif ((&Apache::lonnet::allowed('vpa',$env{'request.course.id'})) || |
|
(&Apache::lonnet::allowed('vpa',$env{'request.course.id'}.'/'. |
|
$env{'request.course.sec'}))) { |
|
%permission = ( |
|
'set' => 1, |
|
'settable' => 1, |
|
'newoverview' => 1, |
|
'setoverview' => 1, |
|
'parameterchangelog' => 1, |
|
); |
|
} |
|
foreach my $perm (values(%permission)) { |
|
if ($perm) { $allowed=1; last; } |
|
} |
|
return (\%permission,$allowed); |
|
} |
|
|
sub handler { |
sub handler { |
my $r=shift; |
my $r=shift; |
|
|
Line 4714 sub handler {
|
Line 5021 sub handler {
|
'Parameter_Manager,Course_Environment,Parameter_Helper,Parameter_Overview,Table_Mode'}); |
'Parameter_Manager,Course_Environment,Parameter_Helper,Parameter_Overview,Table_Mode'}); |
|
|
# ----------------------------------------------------- Needs to be in a course |
# ----------------------------------------------------- Needs to be in a course |
my $parm_permission = |
my ($parm_permission,$allowed) = &get_permission(); |
(&Apache::lonnet::allowed('opa',$env{'request.course.id'}) || |
|
&Apache::lonnet::allowed('opa',$env{'request.course.id'}.'/'. |
|
$env{'request.course.sec'})); |
|
my $exists = &check_for_course_info(); |
my $exists = &check_for_course_info(); |
|
|
if ($env{'request.course.id'} && $parm_permission && $exists) { |
if ($env{'request.course.id'} && $allowed && $exists) { |
# |
# |
# Main switch on form.action and form.state, as appropriate |
# Main switch on form.action and form.state, as appropriate |
# |
# |
# Check first if coming from someone else headed directly for |
# Check first if coming from someone else headed directly for |
# the table mode |
# the table mode |
if ((($env{'form.command'} eq 'set') && ($env{'form.url'}) |
if (($parm_permission->{'set'}) && |
&& (!$env{'form.dis'})) || ($env{'form.symb'})) { |
((($env{'form.command'} eq 'set') && ($env{'form.url'}) |
&assessparms($r); |
&& (!$env{'form.dis'})) || ($env{'form.symb'}))) { |
|
&assessparms($r,$parm_permission); |
} elsif (! exists($env{'form.action'})) { |
} elsif (! exists($env{'form.action'})) { |
&print_main_menu($r,$parm_permission); |
&print_main_menu($r,$parm_permission); |
|
} elsif (!$parm_permission->{$env{'form.action'}}) { |
|
&print_main_menu($r,$parm_permission); |
} elsif ($env{'form.action'} eq 'setoverview') { |
} elsif ($env{'form.action'} eq 'setoverview') { |
&overview($r); |
&overview($r,$parm_permission); |
} elsif ($env{'form.action'} eq 'addmetadata') { |
} elsif ($env{'form.action'} eq 'addmetadata') { |
&addmetafield($r); |
&addmetafield($r); |
} elsif ($env{'form.action'} eq 'ordermetadata') { |
} elsif ($env{'form.action'} eq 'ordermetadata') { |
&order_meta_fields($r); |
&order_meta_fields($r); |
} elsif ($env{'form.action'} eq 'setrestrictmeta') { |
} elsif ($env{'form.action'} eq 'setrestrictmeta') { |
&setrestrictmeta($r); |
&setrestrictmeta($r); |
} elsif ($env{'form.action'} eq 'newoverview') { |
} elsif ($env{'form.action'} eq 'newoverview') { |
&newoverview($r); |
&newoverview($r,$parm_permission); |
} elsif ($env{'form.action'} eq 'setdefaults') { |
} elsif ($env{'form.action'} eq 'setdefaults') { |
&defaultsetter($r); |
&defaultsetter($r); |
} elsif ($env{'form.action'} eq 'settable') { |
} elsif ($env{'form.action'} eq 'settable') { |
&assessparms($r); |
&assessparms($r,$parm_permission); |
} elsif ($env{'form.action'} eq 'parameterchangelog') { |
} elsif ($env{'form.action'} eq 'parameterchangelog') { |
&parm_change_log($r); |
&parm_change_log($r,$parm_permission); |
} elsif ($env{'form.action'} eq 'cleanparameters') { |
} elsif ($env{'form.action'} eq 'cleanparameters') { |
&clean_parameters($r); |
&clean_parameters($r); |
} elsif ($env{'form.action'} eq 'dateshift1') { |
} elsif ($env{'form.action'} eq 'dateshift1') { |
&date_shift_one($r); |
&date_shift_one($r); |
} elsif ($env{'form.action'} eq 'dateshift2') { |
} elsif ($env{'form.action'} eq 'dateshift2') { |