version 1.439, 2009/03/30 15:57:26
|
version 1.446, 2009/05/12 10:54:11
|
Line 366 sub parmval_by_symb {
|
Line 366 sub parmval_by_symb {
|
my $result=''; |
my $result=''; |
my @outpar=(); |
my @outpar=(); |
# ----------------------------------------------------- Cascading lookup scheme |
# ----------------------------------------------------- Cascading lookup scheme |
my $map=(&Apache::lonnet::decode_symb($symb))[0]; |
my $map=(&Apache::lonnet::decode_symb($symb))[0]; |
$map = &Apache::lonnet::deversion($map); |
$map = &Apache::lonnet::deversion($map); |
|
|
my $symbparm=$symb.'.'.$what; |
my $symbparm=$symb.'.'.$what; |
Line 468 sub parmval_by_symb {
|
Line 468 sub parmval_by_symb {
|
|
|
# --- Caches local to lonparmset |
# --- Caches local to lonparmset |
|
|
|
|
sub reset_caches { |
sub reset_caches { |
&resetparmhash(); |
&resetparmhash(); |
&resetsymbcache(); |
&resetsymbcache(); |
Line 482 sub reset_caches {
|
Line 482 sub reset_caches {
|
undef($parmhashid); |
undef($parmhashid); |
undef(%parmhash); |
undef(%parmhash); |
} |
} |
|
|
sub cacheparmhash { |
sub cacheparmhash { |
if ($parmhashid eq $env{'request.course.fn'}) { return; } |
if ($parmhashid eq $env{'request.course.fn'}) { return; } |
my %parmhashfile; |
my %parmhashfile; |
Line 493 sub reset_caches {
|
Line 493 sub reset_caches {
|
$parmhashid=$env{'request.course.fn'}; |
$parmhashid=$env{'request.course.fn'}; |
} |
} |
} |
} |
|
|
sub parmhash { |
sub parmhash { |
my ($id) = @_; |
my ($id) = @_; |
&cacheparmhash(); |
&cacheparmhash(); |
Line 501 sub reset_caches {
|
Line 501 sub reset_caches {
|
} |
} |
} |
} |
|
|
{ |
{ |
my $symbsid; |
my $symbsid; |
my %symbs; |
my %symbs; |
sub resetsymbcache { |
sub resetsymbcache { |
undef($symbsid); |
undef($symbsid); |
undef(%symbs); |
undef(%symbs); |
} |
} |
|
|
sub symbcache { |
sub symbcache { |
my $id=shift; |
my $id=shift; |
if ($symbsid ne $env{'request.course.id'}) { |
if ($symbsid ne $env{'request.course.id'}) { |
Line 529 sub reset_caches {
|
Line 529 sub reset_caches {
|
} |
} |
} |
} |
|
|
{ |
{ |
my $rulesid; |
my $rulesid; |
my %rules; |
my %rules; |
sub resetrulescache { |
sub resetrulescache { |
undef($rulesid); |
undef($rulesid); |
undef(%rules); |
undef(%rules); |
} |
} |
|
|
sub rulescache { |
sub rulescache { |
my $id=shift; |
my $id=shift; |
if ($rulesid ne $env{'request.course.id'} |
if ($rulesid ne $env{'request.course.id'} |
Line 683 sub storeparm_by_symb_inner {
|
Line 683 sub storeparm_by_symb_inner {
|
my ($symb,$spnam,$snum,$nval,$ntype,$uname,$udom,$csec,$cgroup)=@_; |
my ($symb,$spnam,$snum,$nval,$ntype,$uname,$udom,$csec,$cgroup)=@_; |
# ---------------------------------------------------------- Construct prefixes |
# ---------------------------------------------------------- Construct prefixes |
$spnam=~s/\_([^\_]+)$/\.$1/; |
$spnam=~s/\_([^\_]+)$/\.$1/; |
my $map=(&Apache::lonnet::decode_symb($symb))[0]; |
my $map=(&Apache::lonnet::decode_symb($symb))[0]; |
$map = &Apache::lonnet::deversion($map); |
$map = &Apache::lonnet::deversion($map); |
|
|
my $symbparm=$symb.'.'.$spnam; |
my $symbparm=$symb.'.'.$spnam; |
Line 696 sub storeparm_by_symb_inner {
|
Line 696 sub storeparm_by_symb_inner {
|
my $seclevel=$env{'request.course.id'}.'.['.$csec.'].'.$spnam; |
my $seclevel=$env{'request.course.id'}.'.['.$csec.'].'.$spnam; |
my $seclevelr=$env{'request.course.id'}.'.['.$csec.'].'.$symbparm; |
my $seclevelr=$env{'request.course.id'}.'.['.$csec.'].'.$symbparm; |
my $seclevelm=$env{'request.course.id'}.'.['.$csec.'].'.$mapparm; |
my $seclevelm=$env{'request.course.id'}.'.['.$csec.'].'.$mapparm; |
|
|
my $courselevel=$env{'request.course.id'}.'.'.$spnam; |
my $courselevel=$env{'request.course.id'}.'.'.$spnam; |
my $courselevelr=$env{'request.course.id'}.'.'.$symbparm; |
my $courselevelr=$env{'request.course.id'}.'.'.$symbparm; |
my $courselevelm=$env{'request.course.id'}.'.'.$mapparm; |
my $courselevelm=$env{'request.course.id'}.'.'.$mapparm; |
|
|
my $storeunder=''; |
my $storeunder=''; |
if (($snum==14) || ($snum==3)) { $storeunder=$courselevel; } |
if (($snum==14) || ($snum==3)) { $storeunder=$courselevel; } |
if (($snum==13) || ($snum==2)) { $storeunder=$courselevelm; } |
if (($snum==13) || ($snum==2)) { $storeunder=$courselevelm; } |
Line 712 sub storeparm_by_symb_inner {
|
Line 712 sub storeparm_by_symb_inner {
|
if ($snum==5) { $storeunder=$grplevelm; } |
if ($snum==5) { $storeunder=$grplevelm; } |
if ($snum==4) { $storeunder=$grplevelr; } |
if ($snum==4) { $storeunder=$grplevelr; } |
|
|
|
|
my $delete; |
my $delete; |
if ($nval eq '') { $delete=1;} |
if ($nval eq '') { $delete=1;} |
my %storecontent = ($storeunder => $nval, |
my %storecontent = ($storeunder => $nval, |
Line 769 sub storeparm_by_symb_inner {
|
Line 769 sub storeparm_by_symb_inner {
|
} |
} |
&Apache::lonnet::devalidateuserresdata($uname,$udom); |
&Apache::lonnet::devalidateuserresdata($uname,$udom); |
} |
} |
|
|
if ($reply=~/^error\:(.*)/) { |
if ($reply=~/^error\:(.*)/) { |
return "<span class=\"LC_error\">Write Error: $1</span>"; |
return "<span class=\"LC_error\">Write Error: $1</span>"; |
} |
} |
Line 926 sub startpage {
|
Line 926 sub startpage {
|
text=>"Table Mode", |
text=>"Table Mode", |
help => 'Course_Setting_Parameters'}); |
help => 'Course_Setting_Parameters'}); |
} |
} |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Set/Modify Course Parameters', |
&Apache::loncommon::start_page('Set/Modify Course Parameters', |
&page_js(), |
&page_js(), |
{'add_entries' => \%loaditems,}); |
{'add_entries' => \%loaditems,}); |
my $breadcrumbs = |
my $breadcrumbs = |
&Apache::lonhtmlcommon::breadcrumbs('Table Mode Parameter Setting','Table_Mode'); |
&Apache::lonhtmlcommon::breadcrumbs('Table Mode Parameter Setting','Table_Mode'); |
$r->print(<<ENDHEAD); |
$r->print(<<ENDHEAD); |
$start_page |
$start_page |
Line 962 sub print_row {
|
Line 962 sub print_row {
|
# cascade down manually |
# cascade down manually |
my $cascadetype=$$defaulttype{$which}; |
my $cascadetype=$$defaulttype{$which}; |
for (my $i=14;$i>0;$i--) { |
for (my $i=14;$i>0;$i--) { |
if ($typeoutpar[$i]) { |
if ($typeoutpar[$i]) { |
$cascadetype=$typeoutpar[$i]; |
$cascadetype=$typeoutpar[$i]; |
} else { |
} else { |
$typeoutpar[$i]=$cascadetype; |
$typeoutpar[$i]=$cascadetype; |
Line 981 sub print_row {
|
Line 981 sub print_row {
|
$parm.='<span class="LC_warning"><br />'.&mt('Automatically sets').' '.join(', ',split(/\:/,$automatic)).'</span>'; |
$parm.='<span class="LC_warning"><br />'.&mt('Automatically sets').' '.join(', ',split(/\:/,$automatic)).'</span>'; |
} |
} |
$r->print('<td>'.$parm.'</td>'); |
$r->print('<td>'.$parm.'</td>'); |
|
|
my $thismarker=$which; |
my $thismarker=$which; |
$thismarker=~s/^parameter\_//; |
$thismarker=~s/^parameter\_//; |
my $mprefix=$rid.'&'.$thismarker.'&'; |
my $mprefix=$rid.'&'.$thismarker.'&'; |
Line 995 sub print_row {
|
Line 995 sub print_row {
|
} elsif ($cgroup) { |
} elsif ($cgroup) { |
&print_td($r,6,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,6,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
} elsif ($csec) { |
} elsif ($csec) { |
&print_td($r,9,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,9,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
} else { |
} else { |
&print_td($r,14,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,14,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
} |
} |
} elsif ($parmlev eq 'map') { |
} elsif ($parmlev eq 'map') { |
|
|
Line 1034 sub print_row {
|
Line 1034 sub print_row {
|
&print_td($r,12,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,12,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,11,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,11,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,10,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,10,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
|
|
if ($csec) { |
if ($csec) { |
&print_td($r,9,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,9,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,8,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,8,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
Line 1046 sub print_row {
|
Line 1046 sub print_row {
|
&print_td($r,5,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,5,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,4,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
&print_td($r,4,$defbgthree,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display); |
} |
} |
|
|
if ($uname) { |
if ($uname) { |
if ($othergrp) { |
if ($othergrp) { |
$r->print($othergrp); |
$r->print($othergrp); |
Line 1107 sub print_usergroups {
|
Line 1107 sub print_usergroups {
|
$courseopt); |
$courseopt); |
my $bgcolor = $defbg; |
my $bgcolor = $defbg; |
my $grp_parm; |
my $grp_parm; |
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); |
Line 1221 sub extractResourceInformation {
|
Line 1221 sub extractResourceInformation {
|
} |
} |
# |
# |
# Put in order |
# Put in order |
# |
# |
unless ($$keyorder{$key}) { |
unless ($$keyorder{$key}) { |
$$keyorder{$key}=$keyordercnt; |
$$keyorder{$key}=$keyordercnt; |
$keyordercnt++; |
$keyordercnt++; |
} |
} |
} |
} |
|
|
|
|
if (!exists($$mapp{$mapid})) { |
if (!exists($$mapp{$mapid})) { |
$$mapp{$id}= |
$$mapp{$id}= |
&Apache::lonnet::declutter($resource->enclosing_map_src()); |
&Apache::lonnet::declutter($resource->enclosing_map_src()); |
Line 1238 sub extractResourceInformation {
|
Line 1238 sub extractResourceInformation {
|
$$maptitles{$mapid}=&mt('Main Course Documents'); |
$$maptitles{$mapid}=&mt('Main Course Documents'); |
} else { |
} else { |
$$maptitles{$mapid}= |
$$maptitles{$mapid}= |
&Apache::lonnet::gettitle($$mapp{$id}); |
&Apache::lonnet::gettitle($$mapp{$id}); |
} |
} |
$$maptitles{$$mapp{$id}}=$$maptitles{$mapid}; |
$$maptitles{$$mapp{$id}}=$$maptitles{$mapid}; |
$$symbp{$mapid}=$$mapp{$id}.'___(all)'; |
$$symbp{$mapid}=$$mapp{$id}.'___(all)'; |
Line 1296 sub parmmenu {
|
Line 1296 sub parmmenu {
|
checkthis('contentopen','pscat'); |
checkthis('contentopen','pscat'); |
checkthis('contentclose','pscat'); |
checkthis('contentclose','pscat'); |
} |
} |
|
|
|
|
function checkvisi() { |
function checkvisi() { |
checkthis('hiddenresource','pscat'); |
checkthis('hiddenresource','pscat'); |
Line 1322 sub parmmenu {
|
Line 1322 sub parmmenu {
|
</script> |
</script> |
ENDSCRIPT |
ENDSCRIPT |
$r->print(); |
$r->print(); |
|
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parameters to View'))); |
$r->print("\n".'<table id="LC_parm_overview_parm_menu"><tr>'); |
$r->print("\n".'<table id="LC_parm_overview_parm_menu"><tr>'); |
my $cnt=0; |
my $cnt=0; |
foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) { |
foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) { |
Line 1383 ENDSCRIPT
|
Line 1384 ENDSCRIPT
|
|
|
sub partmenu { |
sub partmenu { |
my ($r,$allparts,$psprt)=@_; |
my ($r,$allparts,$psprt)=@_; |
|
|
$r->print('<select multiple="multiple" name="psprt" size="8">'); |
$r->print('<select multiple="multiple" name="psprt" size="8">'); |
$r->print('<option value="all"'); |
$r->print('<option value="all"'); |
$r->print(' selected="selected"') unless (@{$psprt}); |
$r->print(' selected="selected"') unless (@{$psprt}); |
Line 1457 function group_or_section(caller) {
|
Line 1459 function group_or_section(caller) {
|
} |
} |
</script> |
</script> |
|; |
|; |
} |
} |
|
|
if (%grouphash) { |
if (%grouphash) { |
$groups=&mt('Group:').' <select name="cgroup"'; |
$groups=&mt('Group:').' <select name="cgroup"'; |
Line 1484 function group_or_section(caller) {
|
Line 1486 function group_or_section(caller) {
|
} |
} |
|
|
if (%sectionhash || %grouphash) { |
if (%sectionhash || %grouphash) { |
$g_s_header='<fieldset><legend>'.&mt('Group/Section').'</legend><div>'; |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Group/Section'))); |
$g_s_footer='</div></fieldset>'; |
$r->print($sections.$groups); |
} |
} |
|
|
$r->print('<b>' |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('User'))); |
.$g_s_header |
$r->print(&mt('For User [_1] or Student/Employee ID [_2] at Domain [_3]' |
.$sections |
|
.$groups |
|
.$g_s_footer |
|
.'<fieldset><legend>'.&mt('User').'</legend><div>' |
|
.&mt('For User [_1] or Student/Employee ID [_2] at Domain [_3]' |
|
,'<input type="text" value="'.$uname.'" size="12" name="uname" />' |
,'<input type="text" value="'.$uname.'" size="12" name="uname" />' |
,'<input type="text" value="'.$id.'" size="12" name="id" /> ' |
,'<input type="text" value="'.$id.'" size="12" name="id" /> ' |
,$chooseopt) |
,$chooseopt)); |
.'</div></fieldset>' |
|
.'</b>' |
|
); |
|
} |
} |
|
|
sub displaymenu { |
sub displaymenu { |
my ($r,$allparms,$allparts,$pscat,$psprt,$keyorder)=@_; |
my ($r,$allparms,$allparts,$pscat,$psprt,$keyorder)=@_; |
$r->print('<table border="1"><tr><th>'.&mt('Select Parameters to View').'</th><th>'. |
$r->print('<div class="LC_ContentBoxSpecial">'); |
&mt('Select Parts to View').'</th></tr><tr><td>'); |
$r->print('<h2 class="LC_hcell">Step 2</h2>'); |
|
$r->print('<div class="LC_BoxPadding">' ); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
|
|
&parmmenu($r,$allparms,$pscat,$keyorder); |
&parmmenu($r,$allparms,$pscat,$keyorder); |
$r->print('</td><td valign="top" align="center">'); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); |
&partmenu($r,$allparts,$psprt); |
&partmenu($r,$allparts,$psprt); |
$r->print('</td></tr></table>'); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
|
$r->print('</div></div>'); |
} |
} |
|
|
sub mapmenu { |
sub mapmenu { |
my ($r,$allmaps,$pschp,$maptitles)=@_; |
my ($r,$allmaps,$pschp,$maptitles)=@_; |
$r->print('<b>'.&mt('Select Enclosing Map or Folder').'</b> '); |
|
|
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Enclosing Map or Folder'))); |
$r->print('<select name="pschp">'); |
$r->print('<select name="pschp">'); |
$r->print('<option value="all">'.&mt('All Maps or Folders').'</option>'); |
$r->print('<option value="all">'.&mt('All Maps or Folders').'</option>'); |
foreach (sort {$$allmaps{$a} cmp $$allmaps{$b}} keys %{$allmaps}) { |
foreach (sort {$$allmaps{$a} cmp $$allmaps{$b}} keys %{$allmaps}) { |
Line 1524 sub mapmenu {
|
Line 1523 sub mapmenu {
|
$r->print('>'.$$maptitles{$_}.($$allmaps{$_}!~/^uploaded/?' ['.$$allmaps{$_}.']':'').'</option>'); |
$r->print('>'.$$maptitles{$_}.($$allmaps{$_}!~/^uploaded/?' ['.$$allmaps{$_}.']':'').'</option>'); |
} |
} |
$r->print("</select>"); |
$r->print("</select>"); |
|
|
} |
} |
|
|
sub levelmenu { |
sub levelmenu { |
my ($r,$alllevs,$parmlev)=@_; |
my ($r,$alllevs,$parmlev)=@_; |
$r->print('<b>'.&mt('Select Parameter Level'). |
|
&Apache::loncommon::help_open_topic('Course_Parameter_Levels').'</b> '); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parameter Level').&Apache::loncommon::help_open_topic('Course_Parameter_Levels'))); |
$r->print('<select name="parmlev">'); |
$r->print('<select name="parmlev">'); |
foreach (reverse sort keys %{$alllevs}) { |
foreach (reverse sort keys %{$alllevs}) { |
$r->print('<option value="'.$$alllevs{$_}.'"'); |
$r->print('<option value="'.$$alllevs{$_}.'"'); |
if ($parmlev eq $$alllevs{$_}) { |
if ($parmlev eq $$alllevs{$_}) { |
$r->print(' selected="selected"'); |
$r->print(' selected="selected"'); |
} |
} |
$r->print('>'.&mt($_).'</option>'); |
$r->print('>'.&mt($_).'</option>'); |
} |
} |
Line 1674 sub assessparms {
|
Line 1674 sub assessparms {
|
my $csec; |
my $csec; |
my $cgroup; |
my $cgroup; |
my @usersgroups = (); |
my @usersgroups = (); |
|
|
my $coursename=$env{'course.'.$env{'request.course.id'}.'.description'}; |
my $coursename=$env{'course.'.$env{'request.course.id'}.'.description'}; |
|
|
$alllevs{'Resource Level'}='full'; |
$alllevs{'Resource Level'}='full'; |
Line 1711 sub assessparms {
|
Line 1711 sub assessparms {
|
|
|
my $pssymb=''; |
my $pssymb=''; |
my $parmlev=''; |
my $parmlev=''; |
|
|
unless ($env{'form.parmlev'}) { |
unless ($env{'form.parmlev'}) { |
$parmlev = 'map'; |
$parmlev = 'map'; |
} else { |
} else { |
Line 1762 sub assessparms {
|
Line 1762 sub assessparms {
|
} else { |
} else { |
$csec=&Apache::lonnet::getsection($udom,$uname, |
$csec=&Apache::lonnet::getsection($udom,$uname, |
$env{'request.course.id'}); |
$env{'request.course.id'}); |
|
|
if ($csec eq '-1') { |
if ($csec eq '-1') { |
$message='<span class="LC_error">'. |
$message='<span class="LC_error">'. |
&mt("User")." '$uname' ".&mt("at domain")." '$udom' ". |
&mt("User")." '$uname' ".&mt("at domain")." '$udom' ". |
Line 1792 sub assessparms {
|
Line 1792 sub assessparms {
|
unless ($cgroup) { $cgroup=''; } |
unless ($cgroup) { $cgroup=''; } |
|
|
# --------------------------------------------------------- Get all assessments |
# --------------------------------------------------------- Get all assessments |
&extractResourceInformation(\@ids, \%typep,\%keyp, \%allparms, \%allparts, \%allmaps, |
&extractResourceInformation(\@ids, \%typep,\%keyp, \%allparms, \%allparts, \%allmaps, |
\%mapp, \%symbp,\%maptitles,\%uris, |
\%mapp, \%symbp,\%maptitles,\%uris, |
\%keyorder); |
\%keyorder); |
|
|
Line 1848 sub assessparms {
|
Line 1848 sub assessparms {
|
} |
} |
#----------------------------------------------- if all selected, fill in array |
#----------------------------------------------- if all selected, fill in array |
if ($pscat[0] eq "all") {@pscat = (keys %allparms);} |
if ($pscat[0] eq "all") {@pscat = (keys %allparms);} |
if (!@pscat) { @pscat=('duedate','opendate','answerdate','weight','maxtries') }; |
if (!@pscat) { @pscat=('duedate','opendate','answerdate','weight','maxtries') }; |
if ($psprt[0] eq "all" || !@psprt) {@psprt = (keys %allparts);} |
if ($psprt[0] eq "all" || !@psprt) {@psprt = (keys %allparts);} |
# ------------------------------------------------------------------ Start page |
# ------------------------------------------------------------------ Start page |
|
|
Line 1860 sub assessparms {
|
Line 1860 sub assessparms {
|
&HTML::Entities::encode($env{'form.recent_'.$_},'"&<>'). |
&HTML::Entities::encode($env{'form.recent_'.$_},'"&<>'). |
'" name="recent_'.$_.'" />'); |
'" name="recent_'.$_.'" />'); |
} |
} |
|
|
if (!$pssymb) { |
if (!$pssymb) { |
$r->print('<table border="1"><tr><td>'); |
|
|
$r->print('<div class="LC_ContentBoxSpecial">'); |
|
$r->print('<h2 class="LC_hcell">Step 1</h2>'); |
|
$r->print('<div class="LC_BoxPadding">' ); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
|
|
&levelmenu($r,\%alllevs,$parmlev); |
&levelmenu($r,\%alllevs,$parmlev); |
$r->print('</td>'); |
|
if ($parmlev ne 'general') { |
if ($parmlev ne 'general') { |
$r->print('<td>'); |
|
&mapmenu($r,\%allmaps,$pschp,\%maptitles); |
&mapmenu($r,\%allmaps,$pschp,\%maptitles); |
$r->print('</td>'); |
|
} |
} |
$r->print('</tr></table>'); |
|
|
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
|
$r->print('</div></div>'); |
|
|
&displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder); |
&displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder); |
} else { |
} else { |
my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb); |
my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb); |
Line 1880 sub assessparms {
|
Line 1886 sub assessparms {
|
'<br /><label><b>'.&mt('Show all parts').': <input type="checkbox" name="psprt" value="all"'. |
'<br /><label><b>'.&mt('Show all parts').': <input type="checkbox" name="psprt" value="all"'. |
($env{'form.psprt'}?' checked="checked"':'').' /></b></label><br />'); |
($env{'form.psprt'}?' checked="checked"':'').' /></b></label><br />'); |
} |
} |
&usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups); |
$r->print('<div class="LC_ContentBoxSpecial">'); |
|
$r->print('<h2 class="LC_hcell">Step 3</h2>'); |
|
$r->print('<div class="LC_BoxPadding">' ); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
|
&usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups); |
|
|
|
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
|
$r->print('</div></div>'); |
|
|
$r->print('<p>'.$message.'</p>'); |
$r->print('<p>'.$message.'</p>'); |
|
|
Line 1905 sub assessparms {
|
Line 1918 sub assessparms {
|
my $userspan=3; |
my $userspan=3; |
if ($cgroup ne '') { |
if ($cgroup ne '') { |
$coursespan += 3; |
$coursespan += 3; |
} |
} |
|
|
$r->print('<p><table border="2">'); |
$r->print('<p><table border="2">'); |
$r->print('<tr><td colspan="5"></td>'); |
$r->print('<tr><td colspan="5"></td>'); |
$r->print('<th colspan="'.($coursespan).'">'.&mt('Any User').'</th>'); |
$r->print('<th colspan="'.($coursespan).'">'.&mt('Any User').'</th>'); |
Line 1982 ENDTABLEHEADFOUR
|
Line 1995 ENDTABLEHEADFOUR
|
my $rid=$_; |
my $rid=$_; |
my ($inmapid)=($rid=~/\.(\d+)$/); |
my ($inmapid)=($rid=~/\.(\d+)$/); |
|
|
if ((!$pssymb && |
if ((!$pssymb && |
(($pschp eq 'all') || ($allmaps{$pschp} eq $mapp{$rid}))) |
(($pschp eq 'all') || ($allmaps{$pschp} eq $mapp{$rid}))) |
|| |
|| |
($pssymb && $pssymb eq $symbp{$rid})) { |
($pssymb && $pssymb eq $symbp{$rid})) { |
Line 2087 ENDTABLEHEADFOUR
|
Line 2100 ENDTABLEHEADFOUR
|
my %maplist; |
my %maplist; |
|
|
if ($pschp eq 'all') { |
if ($pschp eq 'all') { |
%maplist = %allmaps; |
%maplist = %allmaps; |
} else { |
} else { |
%maplist = ($pschp => $mapp{$pschp}); |
%maplist = ($pschp => $mapp{$pschp}); |
} |
} |
Line 2107 ENDTABLEHEADFOUR
|
Line 2120 ENDTABLEHEADFOUR
|
my $map = 0; |
my $map = 0; |
|
|
# $r->print("Catmarker: @catmarker<br />\n"); |
# $r->print("Catmarker: @catmarker<br />\n"); |
|
|
foreach (@ids) { |
foreach (@ids) { |
($map)=(/([\d]*?)\./); |
($map)=(/([\d]*?)\./); |
my $rid = $_; |
my $rid = $_; |
|
|
# $r->print("$mapid:$map: $rid <br /> \n"); |
# $r->print("$mapid:$map: $rid <br /> \n"); |
|
|
if ($map eq $mapid) { |
if ($map eq $mapid) { |
Line 2129 ENDTABLEHEADFOUR
|
Line 2142 ENDTABLEHEADFOUR
|
my $tempkeyp = $_; |
my $tempkeyp = $_; |
my $fullkeyp = $tempkeyp; |
my $fullkeyp = $tempkeyp; |
$tempkeyp =~ s/_\w+_/_0_/; |
$tempkeyp =~ s/_\w+_/_0_/; |
|
|
if ((grep $_ eq $fullkeyp, @catmarker) &&(!$name{$tempkeyp})) { |
if ((grep $_ eq $fullkeyp, @catmarker) &&(!$name{$tempkeyp})) { |
$part{$tempkeyp}="0"; |
$part{$tempkeyp}="0"; |
$name{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.name'); |
$name{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.name'); |
Line 2152 ENDTABLEHEADFOUR
|
Line 2165 ENDTABLEHEADFOUR
|
} # end loop through keys |
} # end loop through keys |
} |
} |
} # end loop through ids |
} # end loop through ids |
|
|
#---------------------------------------------------- print header information |
#---------------------------------------------------- print header information |
my $foldermap=&mt($maptitle=~/^uploaded/?'Folder':'Map'); |
my $foldermap=&mt($maptitle=~/^uploaded/?'Folder':'Map'); |
my $showtitle=$maptitles{$maptitle}.($maptitle!~/^uploaded/?' ['.$maptitle.']':''); |
my $showtitle=$maptitles{$maptitle}.($maptitle!~/^uploaded/?' ['.$maptitle.']':''); |
Line 2215 ENDTABLEHEADFOUR
|
Line 2228 ENDTABLEHEADFOUR
|
my %display = (); |
my %display = (); |
my %type = (); |
my %type = (); |
my %default = (); |
my %default = (); |
|
|
foreach (@ids) { |
foreach (@ids) { |
my $rid = $_; |
my $rid = $_; |
|
|
my $uri=&Apache::lonnet::declutter($uris{$rid}); |
my $uri=&Apache::lonnet::declutter($uris{$rid}); |
|
|
#-------------------------------------------------------------------- |
#-------------------------------------------------------------------- |
Line 2253 ENDTABLEHEADFOUR
|
Line 2266 ENDTABLEHEADFOUR
|
} |
} |
} # end loop through keys |
} # end loop through keys |
} # end loop through ids |
} # end loop through ids |
|
|
#---------------------------------------------------- print header information |
#---------------------------------------------------- print header information |
my $setdef=&mt("Set Defaults for All Resources in Course"); |
my $setdef=&mt("Set Defaults for All Resources in Course"); |
$r->print(<<ENDMAPONE); |
$r->print(<<ENDMAPONE); |
Line 2267 ENDMAPONE
|
Line 2280 ENDMAPONE
|
} else { |
} else { |
$r->print("<i><font color=\"red\"> ".&mt("ALL")."</i> ".&mt("USERS")."</font> \n"); |
$r->print("<i><font color=\"red\"> ".&mt("ALL")."</i> ".&mt("USERS")."</font> \n"); |
} |
} |
|
|
if ($csec) {$r->print(&mt("Section")."<font color=\"red\"> <i>$csec</i></font>\n")}; |
if ($csec) {$r->print(&mt("Section")."<font color=\"red\"> <i>$csec</i></font>\n")}; |
if ($cgroup) {$r->print(&mt("Group")."<font color=\"red\"> <i>$cgroup</i></font>\n")}; |
if ($cgroup) {$r->print(&mt("Group")."<font color=\"red\"> <i>$cgroup</i></font>\n")}; |
$r->print("</h4>\n"); |
$r->print("</h4>\n"); |
Line 2303 sub crsenv {
|
Line 2316 sub crsenv {
|
|
|
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=crsenv', |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=crsenv', |
text=>"Course Environment"}); |
text=>"Course Environment"}); |
my $breadcrumbs = |
my $breadcrumbs = |
&Apache::lonhtmlcommon::breadcrumbs('Edit Course Environment'); |
&Apache::lonhtmlcommon::breadcrumbs('Edit Course Environment'); |
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'}; |
Line 2322 sub crsenv {
|
Line 2335 sub crsenv {
|
} |
} |
if ($name =~ /^rolenames_([^_]+)$/) { |
if ($name =~ /^rolenames_([^_]+)$/) { |
$name = $1.'.plaintext'; |
$name = $1.'.plaintext'; |
my $standardtitle = |
my $standardtitle = |
&Apache::lonnet::plaintext($1,$crstype,$env{'request.course.id'},1); |
&Apache::lonnet::plaintext($1,$crstype,$env{'request.course.id'},1); |
my %adv_roles = |
my %adv_roles = |
&Apache::lonnet::get_course_adv_roles($env{'request.course.id'},1); |
&Apache::lonnet::get_course_adv_roles($env{'request.course.id'},1); |
Line 2354 sub crsenv {
|
Line 2367 sub crsenv {
|
if ($name =~ /^spreadsheet_default_(classcalc| |
if ($name =~ /^spreadsheet_default_(classcalc| |
studentcalc| |
studentcalc| |
assesscalc)$/x) { |
assesscalc)$/x) { |
my $sheettype = $1; |
my $sheettype = $1; |
if ($sheettype eq 'classcalc') { |
if ($sheettype eq 'classcalc') { |
# no need to do anything since viewing the sheet will |
# no need to do anything since viewing the sheet will |
# cause it to be updated. |
# cause it to be updated. |
} elsif ($sheettype eq 'studentcalc') { |
} elsif ($sheettype eq 'studentcalc') { |
# expire all the student spreadsheets |
# expire all the student spreadsheets |
&Apache::lonnet::expirespread('','','studentcalc'); |
&Apache::lonnet::expirespread('','','studentcalc'); |
} else { |
} else { |
# expire all the assessment spreadsheets |
# expire all the assessment spreadsheets |
# this includes non-default spreadsheets, but better to |
# this includes non-default spreadsheets, but better to |
# be safe than sorry. |
# be safe than sorry. |
&Apache::lonnet::expirespread('','','assesscalc'); |
&Apache::lonnet::expirespread('','','assesscalc'); |
Line 2435 sub crsenv {
|
Line 2448 sub crsenv {
|
&change_clone($value,\@oldcloner); |
&change_clone($value,\@oldcloner); |
} |
} |
# Update environment and nohist_courseids.db |
# Update environment and nohist_courseids.db |
if (($name eq 'description') || ($name eq 'cloners') || |
if (($name eq 'description') || ($name eq 'cloners') || |
($name eq 'hidefromcat') || ($name eq 'categories')) { |
($name eq 'hidefromcat') || ($name eq 'categories')) { |
if ($chome eq '') { |
if ($chome eq '') { |
%crsinfo = |
%crsinfo = |
Line 2447 sub crsenv {
|
Line 2460 sub crsenv {
|
if ($name eq 'description' && defined($value)) { |
if ($name eq 'description' && defined($value)) { |
&Apache::lonnet::appenv({'course.'.$env{'request.course.id'}.'.description' => $value}); |
&Apache::lonnet::appenv({'course.'.$env{'request.course.id'}.'.description' => $value}); |
if (ref($crsinfo{$env{'request.course.id'}}) eq 'HASH') { |
if (ref($crsinfo{$env{'request.course.id'}}) eq 'HASH') { |
$crsinfo{$env{'request.course.id'}}{'description'} = $value; |
$crsinfo{$env{'request.course.id'}}{'description'} = $value; |
my $putresult = |
my $putresult = |
&Apache::lonnet::courseidput($dom,\%crsinfo, |
&Apache::lonnet::courseidput($dom,\%crsinfo, |
$chome,'notime'); |
$chome,'notime'); |
Line 2498 sub crsenv {
|
Line 2511 sub crsenv {
|
} |
} |
} |
} |
|
|
my $start_table =&Apache::loncommon::start_data_table(); |
|
my $start_header_row=&Apache::loncommon::start_data_table_header_row(); |
|
my $end_header_row =&Apache::loncommon::end_data_table_header_row(); |
|
# ------------------------- Re-init course environment entries for this session |
# ------------------------- Re-init course environment entries for this session |
|
|
&Apache::lonnet::coursedescription($env{'request.course.id'}, |
&Apache::lonnet::coursedescription($env{'request.course.id'}, |
Line 2528 sub crsenv {
|
Line 2538 sub crsenv {
|
&mt('Select Map').'</a><br /><span class="LC_warning"> '. |
&mt('Select Map').'</a><br /><span class="LC_warning"> '. |
&mt('Modification may make assessment data inaccessible!'). |
&mt('Modification may make assessment data inaccessible!'). |
'</span>', |
'</span>', |
'description' => '<b>'.&mt('Course Description').'</b>', |
'description' => '<b>'.&mt('Course Title').'</b>', |
'courseid' => '<b>'.&mt('Course ID or number'). |
'courseid' => '<b>'.&mt('Course ID or number'). |
'</b><br />'. |
'</b><br />'. |
'('.&mt('internal, optional').')', |
'('.&mt('internal, optional').')', |
Line 2570 sub crsenv {
|
Line 2580 sub crsenv {
|
.'('.&mt('[_1]: student, [_2]: TA, [_3]: instructor','"<tt>st</tt>"','"<tt>ta</tt>"','"<tt>in</tt>"').')<br />' |
.'('.&mt('[_1]: student, [_2]: TA, [_3]: instructor','"<tt>st</tt>"','"<tt>ta</tt>"','"<tt>in</tt>"').')<br />' |
.'("<tt>'.&mt('role,role,...').'</tt>") ' |
.'("<tt>'.&mt('role,role,...').'</tt>") ' |
.Apache::loncommon::help_open_topic("Course_Disable_Discussion"), |
.Apache::loncommon::help_open_topic("Course_Disable_Discussion"), |
'plc.users.denied' => |
'plc.users.denied' => |
'<b>'.&mt('Disallow chat room use for Users').'</b><br />'. |
'<b>'.&mt('Disallow chat room use for Users').'</b><br />'. |
'("<tt>'.&mt('user:domain,user:domain,...').'</tt>")', |
'("<tt>'.&mt('user:domain,user:domain,...').'</tt>")', |
|
|
Line 2578 sub crsenv {
|
Line 2588 sub crsenv {
|
.'('.&mt('[_1]: student, [_2]: TA, [_3]: instructor','"<tt>st</tt>"','"<tt>ta</tt>"','"<tt>in</tt>"') |
.'('.&mt('[_1]: student, [_2]: TA, [_3]: instructor','"<tt>st</tt>"','"<tt>ta</tt>"','"<tt>in</tt>"') |
.'("<tt>'.&mt('role,role,...').'</tt>") ' |
.'("<tt>'.&mt('role,role,...').'</tt>") ' |
.Apache::loncommon::help_open_topic("Course_Disable_Discussion"), |
.Apache::loncommon::help_open_topic("Course_Disable_Discussion"), |
'pch.users.denied' => |
'pch.users.denied' => |
'<b>'.&mt('Disallow Resource Discussion for Users').'</b><br />'. |
'<b>'.&mt('Disallow Resource Discussion for Users').'</b><br />'. |
'("<tt>'.&mt('user:domain,user:domain,...').'</tt>")', |
'("<tt>'.&mt('user:domain,user:domain,...').'</tt>")', |
'spreadsheet_default_classcalc' |
'spreadsheet_default_classcalc' |
=> '<b>'.&mt('Default Course Spreadsheet').'</b> '. |
=> '<b>'.&mt('Default Course Spreadsheet').'</b> '. |
'<a href="javascript:openbrowser'. |
'<a href="javascript:openbrowser'. |
"('envform','spreadsheet_default_classcalc'". |
"('envform','spreadsheet_default_classcalc'". |
",'spreadsheet')\">$SelectSpreadsheetFile</a><br />", |
",'spreadsheet')\">$SelectSpreadsheetFile</a><br />", |
'spreadsheet_default_studentcalc' |
'spreadsheet_default_studentcalc' |
=> '<b>'.&mt('Default Student Spreadsheet').'</b><br />'. |
=> '<b>'.&mt('Default Student Spreadsheet').'</b><br />'. |
'<a href="javascript:openbrowser'. |
'<a href="javascript:openbrowser'. |
"('envform','spreadsheet_default_calc'". |
"('envform','spreadsheet_default_calc'". |
",'spreadsheet')\">$SelectSpreadsheetFile</a><br />", |
",'spreadsheet')\">$SelectSpreadsheetFile</a><br />", |
'spreadsheet_default_assesscalc' |
'spreadsheet_default_assesscalc' |
=> '<b>'.&mt('Default Assessment Spreadsheet').'</b> '. |
=> '<b>'.&mt('Default Assessment Spreadsheet').'</b> '. |
'<a href="javascript:openbrowser'. |
'<a href="javascript:openbrowser'. |
"('envform','spreadsheet_default_assesscalc'". |
"('envform','spreadsheet_default_assesscalc'". |
Line 2619 sub crsenv {
|
Line 2629 sub crsenv {
|
'problem_stream_switch' |
'problem_stream_switch' |
=> '<b>'.&mt('Allow problems to be split over pages').'</b><br />'. |
=> '<b>'.&mt('Allow problems to be split over pages').'</b><br />'. |
' ('.&mt('[_1] if allowed, anything else if not','"<tt>yes</tt>"').')', |
' ('.&mt('[_1] if allowed, anything else if not','"<tt>yes</tt>"').')', |
'default_paper_size' |
'default_paper_size' |
=> '<b>'.&mt('Default paper type').'</b><br />'. |
=> '<b>'.&mt('Default paper type').'</b><br />'. |
' ('.&mt('supported types').': Letter [8 1/2x11 in], Legal [8 1/2x14 in],'. |
' ('.&mt('supported types').': Letter [8 1/2x11 in], Legal [8 1/2x14 in],'. |
' Tabloid [11x17 in], Executive [7 1/2x10 in], A2 [420x594 mm],'. |
' Tabloid [11x17 in], Executive [7 1/2x10 in], A2 [420x594 mm],'. |
' A3 [297x420 mm], A4 [210x297 mm], A5 [148x210 mm], A6 [105x148 mm])', |
' A3 [297x420 mm], A4 [210x297 mm], A5 [148x210 mm], A6 [105x148 mm])', |
'print_header_format' |
'print_header_format' |
=> ' <b>'.&mt('Print header format').'</b><br />' |
=> ' <b>'.&mt('Print header format').'</b><br />' |
Line 2663 sub crsenv {
|
Line 2673 sub crsenv {
|
'categories' |
'categories' |
=> '<b>'.&mt('Categorize course').'</b> <a href="javascript:catsbrowser()">'. |
=> '<b>'.&mt('Categorize course').'</b> <a href="javascript:catsbrowser()">'. |
&mt('Display Categories').'</a>', |
&mt('Display Categories').'</a>', |
'datelocale' |
'datelocale' |
=> '<b>'.&mt('Locale used for course calendar').'</b>', |
=> '<b>'.&mt('Locale used for course calendar').'</b>', |
'rolenames' |
'rolenames' |
=> '<b>'.&mt('Replacement titles for standard course roles').'</b><br />'. |
=> '<b>'.&mt('Replacement titles for standard course roles').'</b><br />'. |
Line 2671 sub crsenv {
|
Line 2681 sub crsenv {
|
); |
); |
|
|
|
|
# The following code is kept to have access to the old version of display order |
|
|
|
# my @Display_Order = ('url','description','courseid','cloners'); |
|
# (my $can_toggle_cat,$can_categorize) = &can_modify_catsettings($dom); |
|
# if ($can_toggle_cat) { |
|
# push(@Display_Order,'hidefromcat'); |
|
# } |
|
# if ($can_categorize) { |
|
# push(@Display_Order,'categories'); |
|
# } |
|
# push (@Display_Order,('grading', |
|
# 'externalsyllabus', |
|
# 'default_xml_style','pageseparators', |
|
# 'question.email','question.email.text','comment.email', |
|
# 'comment.email.text','policy.email','policy.email.text', |
|
# 'student_classlist_view', |
|
# 'student_classlist_opt_in', |
|
# 'student_classlist_portfiles', |
|
# 'plc.roles.denied','plc.users.denied', |
|
# 'pch.roles.denied','pch.users.denied', |
|
# 'allow_limited_html_in_feedback', |
|
# 'allow_discussion_post_editing', |
|
# 'languages', |
|
# 'timezone', |
|
# 'datelocale', |
|
# 'rolenames', |
|
# 'nothideprivileged', |
|
# 'rndseed', |
|
# 'receiptalg', |
|
# 'problem_stream_switch', |
|
# 'suppress_tries', |
|
# 'suppress_embed_prompt', |
|
# 'default_paper_size', |
|
# 'print_header_format', |
|
# 'disable_receipt_display', |
|
# 'spreadsheet_default_classcalc', |
|
# 'spreadsheet_default_studentcalc', |
|
# 'spreadsheet_default_assesscalc', |
|
# 'hideemptyrows', |
|
# 'default_enrollment_start_date', |
|
# 'default_enrollment_end_date', |
|
# 'tthoptions', |
|
# 'texengine', |
|
# 'disablesigfigs', |
|
# 'disableexampointprint', |
|
# 'task_messages','task_grading')); |
|
# foreach my $parameter (sort(keys(%values))) { |
|
# unless (($parameter =~ m/^internal\./)||($parameter =~ m/^metadata\./) || |
|
# ($parameter =~ m/^selfenroll_/) || ($parameter =~ /_selfenroll$/) |
|
# || ($parameter eq 'type') || |
|
# ($parameter =~ m/^(cc|in|ta|ep|ad|st)\.plaintext$/)) { |
|
# if (! $descriptions{$parameter}) { |
|
# $descriptions{$parameter}=$parameter; |
|
# push(@Display_Order,$parameter); |
|
# } |
|
# } |
|
# } |
|
|
|
|
|
|
|
|
|
# ---------------------------------------------------------------- |
# ---------------------------------------------------------------- |
# Begin: New Version with Parameter Categories |
# Begin: New Version with Parameter Categories |
|
|
sub parameter_row { |
sub parameter_row { |
# Create parameter line for course environment screen |
# Create parameter row for course environment screen |
|
|
my ($parameter, $description) = @_; |
my ($parameter, $description) = @_; |
my $output = ''; |
|
|
|
# Column 1/3: Descritive text of current parameter |
# Start Parameter Row |
$output = &Apache::loncommon::start_data_table_row() |
my $output = &Apache::loncommon::start_data_table_row(); |
.'<td>'.$description.'</td>'; |
|
|
# Column 1/3: Descriptive text of current parameter |
|
$output .= '<td>'.$description.'</td>'; |
|
|
# Column 2/3: Input field (Sometimes special field(s), depending on parameter) |
# Column 2/3: Input field (Sometimes special field(s), depending on parameter) |
# ------------------------------- |
|
# onchange is javascript to automatically check the 'Set' button. |
# onchange is javascript to automatically check the 'Set' button. |
my $onchange = 'onFocus="javascript:window.document.forms' |
my $onchange = 'onFocus="javascript:window.document.forms' |
."['envform'].elements['".$parameter."_setparmval']" |
."['envform'].elements['".$parameter."_setparmval']" |
Line 2804 sub crsenv {
|
Line 2755 sub crsenv {
|
$catdisplay .= &unescape($name).'&'; |
$catdisplay .= &unescape($name).'&'; |
} |
} |
$catdisplay =~ s/\&$//; |
$catdisplay =~ s/\&$//; |
} |
} |
$output .= '<td>'. |
$output .= '<td>'. |
'<input type="hidden" name="categories_value" value="'. |
'<input type="hidden" name="categories_value" value="'. |
$values{'categories'}.'" />'. |
$values{'categories'}.'" />'. |
Line 2817 sub crsenv {
|
Line 2768 sub crsenv {
|
40, |
40, |
$onchange) |
$onchange) |
.'</td>'; |
.'</td>'; |
# ------------------------------- |
|
} |
} |
|
|
# Column 3/3: Check Box (in most cases) |
# Column 3/3: Check Box (in most cases) |
Line 2826 sub crsenv {
|
Line 2776 sub crsenv {
|
.&Apache::lonhtmlcommon::checkbox($parameter.'_setparmval') |
.&Apache::lonhtmlcommon::checkbox($parameter.'_setparmval') |
.'</td>'; |
.'</td>'; |
} |
} |
|
|
|
# End Parameter Row |
$output .= &Apache::loncommon::end_data_table_row(); |
$output .= &Apache::loncommon::end_data_table_row(); |
|
|
return $output; |
return $output; |
} |
} # End sub parameter_row |
|
|
|
|
|
|
|
|
# Parameter Category Names |
# Parameter Category Names |
Line 2848 sub crsenv {
|
Line 2798 sub crsenv {
|
'cat_custom' => 'Parameter Category Custom', |
'cat_custom' => 'Parameter Category Custom', |
); |
); |
|
|
|
# Display Order of Parameter Categories |
|
my @Display_Order = ( |
|
'cat_0', |
|
'cat_1', |
|
'cat_2', |
|
'cat_3', |
|
'cat_4', |
|
'cat_5', |
|
'cat_6', |
|
'cat_7', |
|
'cat_can', |
|
'cat_custom', |
|
); |
|
|
# Link Parameter Categories with Parameters |
# Link Parameter Categories with Parameters |
|
# Order of parameters is display order |
my %parm_cat_parms = ( |
my %parm_cat_parms = ( |
'cat_0' => [ |
'cat_0' => [ |
'url', |
'url', |
Line 2927 sub crsenv {
|
Line 2892 sub crsenv {
|
} |
} |
$parm_cat_parms{'cat_can'} = [@can_cats]; |
$parm_cat_parms{'cat_can'} = [@can_cats]; |
|
|
# Add custom parameters to parameter categories hash |
# Add custom parameters to custom parameter category |
my @custom_cats; |
my @custom_cats; |
foreach my $parameter (sort(keys(%values))) { |
foreach my $parameter (sort(keys(%values))) { |
unless (($parameter =~ m/^internal\./)||($parameter =~ m/^metadata\./) || |
unless (($parameter =~ m/^internal\./)||($parameter =~ m/^metadata\./) || |
Line 2943 sub crsenv {
|
Line 2908 sub crsenv {
|
$parm_cat_parms{'cat_custom'} = [@custom_cats]; |
$parm_cat_parms{'cat_custom'} = [@custom_cats]; |
|
|
|
|
# Old output structure: |
# Display Course Parameter Overview |
|
|
#$start_table |
|
#$start_header_row |
|
#<th>$lt{'par'}</th><th>$lt{'val'}</th><th>$lt{'set'}</th> |
|
#$end_header_row |
|
#$output |
|
#$end_table |
|
|
|
|
|
# Display Parameter List Overview |
|
# Provide hyperlinks to detailed parameter settings |
# Provide hyperlinks to detailed parameter settings |
$output_SB .= '<a name="parmlist" />' |
$output_SB .= '<a name="parmlist" />' |
.'<h2>'.&mt('Course Parameter Overview').'</h2>' |
.'<div class="LC_ContentBoxSpecial">' |
.'<div class="LC_ContentBox">' |
.'<h2 class="LC_hcell">'.&mt('Course Parameter Overview').'</h2>' |
.'<ul>'; |
.'<ul>'; |
foreach my $catkey (keys(%parm_cat_names)) { |
foreach my $catkey (@Display_Order) { |
|
if (!@{$parm_cat_parms{$catkey}}) { next; } # Only display non-empty categories |
$output_SB .= '<li>' |
$output_SB .= '<li>' |
.'<a href="#parmlist_'.$catkey.'">' |
.'<a href="#parmlist_'.$catkey.'">' |
.$parm_cat_names{$catkey} |
.$parm_cat_names{$catkey} |
Line 2970 $output_SB .= '</ul>'
|
Line 2926 $output_SB .= '</ul>'
|
.'</div>'; |
.'</div>'; |
|
|
|
|
# Display Parameter Details |
|
my $buttons='<div align="right">' |
my $buttons='<div align="right">' |
.'<input type="submit" name="crsenv" value="'.&mt('Save All').'" />' |
.'<input type="submit" name="crsenv" value="'.&mt('Save All').'" />' |
.'<br /><a href="#parmlist">'.&mt('Back to Parameter List').'</a>' |
.'<br /><a href="#parmlist">'.&mt('Back to Course Parameter Overview').'</a>' |
.'</div>'; |
.'</div>'; |
|
|
|
# Display all Parameters grouped by categories |
$output_SB .= '<h2>'.&mt('Course Parameters').'</h2>'; |
$output_SB .= '<h2>'.&mt('Course Parameters').'</h2>'; |
|
|
foreach my $catkey (keys(%parm_cat_names)) { |
foreach my $catkey (@Display_Order) { |
|
if (!@{$parm_cat_parms{$catkey}}) { next; } # Only display non-empty categories |
$output_SB .= &Apache::loncommon::start_data_table(); |
$output_SB .= &Apache::loncommon::start_data_table(); |
$output_SB .= &Apache::loncommon::start_data_table_empty_row() |
$output_SB .= &Apache::loncommon::start_data_table_empty_row() |
.'<td colspan="3">' |
.'<td colspan="3">' |
Line 2994 foreach my $catkey (keys(%parm_cat_names
|
Line 2951 foreach my $catkey (keys(%parm_cat_names
|
my $description = $descriptions{$parameter}; |
my $description = $descriptions{$parameter}; |
$output_SB .= ¶meter_row($parameter, $description); |
$output_SB .= ¶meter_row($parameter, $description); |
} |
} |
|
# Add special row to custom category |
|
# Offer possibilty to create a new environment variable |
|
if ($catkey eq 'cat_custom') { |
|
my $onchange = 'onFocus="javascript:window.document.forms' |
|
.'[\'envform\'].elements[\'newp_setparmval\']' |
|
.'.checked=true;"'; |
|
$output_SB .= &Apache::loncommon::start_data_table_row() |
|
.'<td>' |
|
.'<i>'.&mt('Create New Environment Variable').'</i><br />' |
|
.'<input type="text" size="40" name="newp_name" '.$onchange.' />' |
|
.'</td><td>' |
|
.'<input type="text" size="40" name="newp_value" '.$onchange.' />' |
|
.'</td><td>' |
|
.'<input type="checkbox" name="newp_setparmval" /></td>' |
|
.&Apache::loncommon::end_data_table_row(); |
|
} |
|
# Add buttons row at end of each category |
$output_SB .= &Apache::loncommon::start_data_table_empty_row() |
$output_SB .= &Apache::loncommon::start_data_table_empty_row() |
.'<td colspan="3">' |
.'<td colspan="3">' |
.$buttons |
.$buttons |
.'</td>' |
.'</td>' |
.&Apache::loncommon::end_data_table_empty_row; |
.&Apache::loncommon::end_data_table_empty_row; |
|
|
$output_SB .= &Apache::loncommon::end_data_table() |
$output_SB .= &Apache::loncommon::end_data_table() |
. '<br />'; |
. '<br />'; |
} |
} |
|
|
$output_SB .= '</div>'; |
|
|
|
# End: New Version with Parameter Categories |
# End: New Version with Parameter Categories |
# ---------------------------------------------------------------- |
# ---------------------------------------------------------------- |
|
|
|
|
# # Display Parameter table |
} |
# foreach my $parameter (@Display_Order) { |
|
# my $description = $descriptions{$parameter}; |
|
# # onchange is javascript to automatically check the 'Set' button. |
|
# my $onchange = 'onFocus="javascript:window.document.forms'. |
|
# "['envform'].elements['".$parameter."_setparmval']". |
|
# '.checked=true;"'; |
|
# $output .= &Apache::loncommon::start_data_table_row(). |
|
# '<td>'.$description.'</td>'; |
|
# |
|
# |
|
# |
|
## ------------------------------- |
|
# if ($parameter =~ /^default_enrollment_(start|end)_date$/) { |
|
# $output .= '<td>'. |
|
# &Apache::lonhtmlcommon::date_setter('envform', |
|
# $parameter.'_value', |
|
# $values{$parameter}, |
|
# $onchange). |
|
# '</td>'; |
|
# } elsif ($parameter eq 'timezone') { |
|
# my $includeempty = 1; |
|
# my $timezone = &Apache::lonlocal::gettimezone(); |
|
# $output .= '<td>'. |
|
# &Apache::loncommon::select_timezone($parameter.'_value', |
|
# $timezone, |
|
# $onchange,$includeempty).'</td>'; |
|
# } elsif ($parameter eq 'datelocale') { |
|
# my $includeempty = 1; |
|
# my $locale_obj = &Apache::lonlocal::getdatelocale(); |
|
# my $currdatelocale; |
|
# if (ref($locale_obj)) { |
|
# $currdatelocale = $locale_obj->id(); |
|
# } |
|
# $output .= '<td>'. |
|
# &Apache::loncommon::select_datelocale($parameter.'_value', |
|
# $currdatelocale, |
|
# $onchange,$includeempty).'</td>'; |
|
# } elsif ($parameter eq 'rolenames') { |
|
# $output.= '<td><table>'; |
|
# foreach my $role ('cc','in','ta','ep','ad','st') { |
|
# my $onchange = 'onFocus="javascript:window.document.forms'. |
|
# "['envform'].elements['". |
|
# $parameter.'_'.$role."_setparmval']". |
|
# '.checked=true;"'; |
|
# $output.= '<tr><td>'.&Apache::lonnet::plaintext($role,$crstype,undef,1). |
|
# '</td><td>'. |
|
# &Apache::lonhtmlcommon::textbox($parameter.'_'.$role.'_value', |
|
# $values{$role.'.plaintext'}, |
|
# 15,$onchange). |
|
# '</td></tr>'; |
|
# } |
|
# $output .= '</table></td><td><table>'; |
|
# foreach my $role ('cc','in','ta','ep','ad','st') { |
|
# $output .= '<tr><td>'.&Apache::lonhtmlcommon::checkbox($parameter.'_'.$role.'_setparmval'). |
|
# '</td></tr>'; |
|
# } |
|
# $output .= '</table></td>'; |
|
# } elsif ($parameter eq 'categories') { |
|
# my $catdisplay; |
|
# if ($values{'categories'} ne '') { |
|
# my @curritems = split(/\&/,$values{'categories'}); |
|
# foreach my $item (@curritems) { |
|
# my ($name,$parent,$pos) = split(/:/,$item); |
|
# $catdisplay .= &unescape($name).'&'; |
|
# } |
|
# $catdisplay =~ s/\&$//; |
|
# } |
|
# $output .= '<td>'. |
|
# '<input type="hidden" name="categories_value" value="'. |
|
# $values{'categories'}.'" />'. |
|
# '<input type="textbox" name="categories_display" value="'. |
|
# $catdisplay.'" readonly="readonly" size="40" /></td>'; |
|
# } else { |
|
# $output .= '<td>'. |
|
# &Apache::lonhtmlcommon::textbox($parameter.'_value', |
|
# $values{$parameter}, |
|
# 40,$onchange).'</td>'; |
|
# } |
|
# ------------------------------- |
|
|
|
|
|
# unless ($parameter eq 'rolenames') { |
|
# $output .= '<td>'. |
|
# &Apache::lonhtmlcommon::checkbox($parameter.'_setparmval'). |
|
# '</td>'; |
|
# } |
|
# $output .= &Apache::loncommon::end_data_table_row()."\n"; |
|
# } |
|
my $onchange = 'onFocus="javascript:window.document.forms'. |
|
'[\'envform\'].elements[\'newp_setparmval\']'. |
|
'.checked=true;"'; |
|
$output.=&Apache::loncommon::start_data_table_row(). |
|
'<td><i>'.&mt('Create New Environment Variable').'</i><br />'. |
|
'<input type="text" size="40" name="newp_name" '. |
|
$onchange.' /></td><td>'. |
|
'<input type="text" size="40" name="newp_value" '. |
|
$onchange.' /></td><td>'. |
|
'<input type="checkbox" name="newp_setparmval" /></td>'. |
|
&Apache::loncommon::end_data_table_row()."\n"; |
|
} |
|
|
|
my $Parameter=&mt('Parameter'); |
|
my $Value=&mt('Value'); |
|
my $Set=&mt('Set'); |
|
my ($jscript,$categorize_js); |
my ($jscript,$categorize_js); |
my $browse_js = &Apache::loncommon::browser_and_searcher_javascript('parmset'); |
my $browse_js = &Apache::loncommon::browser_and_searcher_javascript('parmset'); |
if ($can_categorize) { |
if ($can_categorize) { |
Line 3126 function catsbrowser() {
|
Line 2996 function catsbrowser() {
|
} else { |
} else { |
catswin.focus(); |
catswin.focus(); |
} |
} |
} |
} |
ENDSCRIPT |
ENDSCRIPT |
} |
} |
$jscript = '<script type="text/javascript" language="Javascript">'."\n". |
$jscript = '<script type="text/javascript" language="Javascript">'."\n". |
$browse_js."\n".$categorize_js."\n".'</script>'; |
$browse_js."\n".$categorize_js."\n".'</script>'; |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Set Course Environment', |
&Apache::loncommon::start_page('Set Course Environment', |
$jscript); |
$jscript); |
my $end_page = |
my $end_page = |
&Apache::loncommon::end_page(); |
&Apache::loncommon::end_page(); |
my $end_table=&Apache::loncommon::end_data_table(); |
|
$r->print(<<ENDENV); |
$r->print(<<ENDENV); |
$start_page |
$start_page |
$breadcrumbs |
$breadcrumbs |
<form method="post" action="/adm/parmset?action=crsenv" name="envform"> |
<form method="post" action="/adm/parmset?action=crsenv" name="envform"> |
$setoutput |
$setoutput |
$output_SB |
$output_SB |
<hr class="LC_edit_problem_divide" /> |
|
<div><input type="submit" name="crsenv" value="$lt{'sav'}" /></div> |
|
$start_table |
|
$start_header_row |
|
<th>$lt{'par'}</th><th>$lt{'val'}</th><th>$lt{'set'}</th> |
|
$end_header_row |
|
$output |
|
$end_table |
|
<input type="submit" name="crsenv" value="$lt{'sav'}" /> |
|
</form> |
</form> |
$end_page |
$end_page |
ENDENV |
ENDENV |
Line 3182 sub assign_course_categories {
|
Line 3042 sub assign_course_categories {
|
if (ref($domconf{'coursecategories'}) eq 'HASH') { |
if (ref($domconf{'coursecategories'}) eq 'HASH') { |
$cathash = $domconf{'coursecategories'}{'cats'}; |
$cathash = $domconf{'coursecategories'}{'cats'}; |
if (ref($cathash) eq 'HASH') { |
if (ref($cathash) eq 'HASH') { |
$hascats = 1; |
$hascats = 1; |
} |
} |
} |
} |
my $catwin_js; |
my $catwin_js; |
Line 3224 function updateCategories() {
|
Line 3084 function updateCategories() {
|
</script> |
</script> |
ENDSCRIPT |
ENDSCRIPT |
} else { |
} else { |
my $onload; |
my $onload; |
} |
} |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Course Categories',$catwin_js, |
&Apache::loncommon::start_page('Course Categories',$catwin_js, |
Line 3331 sub storedata {
|
Line 3191 sub storedata {
|
$typeof=$env{'form.typeof_'.$thiskey}; |
$typeof=$env{'form.typeof_'.$thiskey}; |
$text = &mt('Saved modified date for'); |
$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) { |
if (&Apache::lonnet::put('resourcedata',{$tkey=>$data, |
if (&Apache::lonnet::put('resourcedata',{$tkey=>$data, |
$tkey.'.type' => $typeof}, |
$tkey.'.type' => $typeof}, |
Line 3346 sub storedata {
|
Line 3206 sub storedata {
|
&Apache::lonnet::devalidateuserresdata($tuname,$tudom); |
&Apache::lonnet::devalidateuserresdata($tuname,$tudom); |
} else { |
} else { |
$newdata{$thiskey}=$data; |
$newdata{$thiskey}=$data; |
$newdata{$thiskey.'.type'}=$typeof; |
$newdata{$thiskey.'.type'}=$typeof; |
} |
} |
} |
} |
} elsif ($cmd eq 'del') { |
} elsif ($cmd eq 'del') { |
if ($tuname) { |
if ($tuname) { |
Line 3401 sub parse_listdata_key {
|
Line 3261 sub parse_listdata_key {
|
my ($key,$listdata) = @_; |
my ($key,$listdata) = @_; |
# split into student/section affected, and |
# split into student/section affected, and |
# the realm (folder/resource part and parameter |
# the realm (folder/resource part and parameter |
my ($student,$realm) = |
my ($student,$realm) = |
($key=~/^\Q$env{'request.course.id'}\E\.\[([^\.]+)\]\.(.+)$/); |
($key=~/^\Q$env{'request.course.id'}\E\.\[([^\.]+)\]\.(.+)$/); |
# if course wide student would be undefined |
# if course wide student would be undefined |
if (!defined($student)) { |
if (!defined($student)) { |
Line 3442 sub listdata {
|
Line 3302 sub listdata {
|
if ($sortorder eq 'realmstudent') { |
if ($sortorder eq 'realmstudent') { |
if ($ares ne $bres ) { |
if ($ares ne $bres ) { |
$result = ($ares cmp $bres); |
$result = ($ares cmp $bres); |
} elsif ($astudent ne $bstudent) { |
} elsif ($astudent ne $bstudent) { |
$result = ($astudent cmp $bstudent); |
$result = ($astudent cmp $bstudent); |
} elsif ($apart ne $bpart ) { |
} elsif ($apart ne $bpart ) { |
$result = ($apart cmp $bpart); |
$result = ($apart cmp $bpart); |
} |
} |
} else { |
} else { |
if ($astudent ne $bstudent) { |
if ($astudent ne $bstudent) { |
$result = ($astudent cmp $bstudent); |
$result = ($astudent cmp $bstudent); |
} elsif ($ares ne $bres ) { |
} elsif ($ares ne $bres ) { |
$result = ($ares cmp $bres); |
$result = ($ares cmp $bres); |
Line 3456 sub listdata {
|
Line 3316 sub listdata {
|
$result = ($apart cmp $bpart); |
$result = ($apart cmp $bpart); |
} |
} |
} |
} |
|
|
if (!$result) { |
if (!$result) { |
if (defined($aparm) && defined($bparm)) { |
if (defined($aparm) && defined($bparm)) { |
$result = ($aparm <=> $bparm); |
$result = ($aparm <=> $bparm); |
Line 3606 sub default_selector {
|
Line 3466 sub default_selector {
|
return '<input type="text" name="set_'.$thiskey.'" value="'.$showval.'" />'; |
return '<input type="text" name="set_'.$thiskey.'" value="'.$showval.'" />'; |
} |
} |
|
|
my %strings = |
my %strings = |
( |
( |
'string_yesno' |
'string_yesno' |
=> [[ 'yes', 'Yes' ], |
=> [[ 'yes', 'Yes' ], |
Line 3621 my %strings =
|
Line 3481 my %strings =
|
|
|
sub string_selector { |
sub string_selector { |
my ($thistype, $thiskey, $showval) = @_; |
my ($thistype, $thiskey, $showval) = @_; |
|
|
if (!exists($strings{$thistype})) { |
if (!exists($strings{$thistype})) { |
return &default_selector($thiskey,$showval); |
return &default_selector($thiskey,$showval); |
} |
} |
Line 3714 ENDOVER
|
Line 3574 ENDOVER
|
my @psprt=&Apache::loncommon::get_env_multiple('form.psprt'); |
my @psprt=&Apache::loncommon::get_env_multiple('form.psprt'); |
if (!@psprt) { $psprt[0]='0'; } |
if (!@psprt) { $psprt[0]='0'; } |
|
|
my @selected_sections = |
my @selected_sections = |
&Apache::loncommon::get_env_multiple('form.Section'); |
&Apache::loncommon::get_env_multiple('form.Section'); |
@selected_sections = ('all') if (! @selected_sections); |
@selected_sections = ('all') if (! @selected_sections); |
foreach my $sec (@selected_sections) { |
foreach my $sec (@selected_sections) { |
Line 3727 ENDOVER
|
Line 3587 ENDOVER
|
|
|
my $pssymb=''; |
my $pssymb=''; |
my $parmlev=''; |
my $parmlev=''; |
|
|
unless ($env{'form.parmlev'}) { |
unless ($env{'form.parmlev'}) { |
$parmlev = 'map'; |
$parmlev = 'map'; |
} else { |
} else { |
$parmlev = $env{'form.parmlev'}; |
$parmlev = $env{'form.parmlev'}; |
} |
} |
|
|
&extractResourceInformation(\@ids, \%typep,\%keyp, \%allparms, \%allparts, \%allmaps, |
&extractResourceInformation(\@ids, \%typep,\%keyp, \%allparms, \%allparts, \%allmaps, |
\%mapp, \%symbp,\%maptitles,\%uris, |
\%mapp, \%symbp,\%maptitles,\%uris, |
\%keyorder,\%defkeytype); |
\%keyorder,\%defkeytype); |
|
|
Line 3743 ENDOVER
|
Line 3603 ENDOVER
|
} |
} |
# Menu to select levels, etc |
# Menu to select levels, etc |
|
|
$r->print('<table id="LC_parm_overview_scope"> |
#$r->print('<table id="LC_parm_overview_scope"> |
<tr><td class="LC_parm_overview_level_menu">'); |
# <tr><td class="LC_parm_overview_level_menu">'); |
|
$r->print('<div class="LC_ContentBoxSpecial">'); |
|
#$r->print('<h2 class="LC_hcell">Step 1</h2>'); |
|
$r->print('<div class="LC_BoxPadding">' ); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
&levelmenu($r,\%alllevs,$parmlev); |
&levelmenu($r,\%alllevs,$parmlev); |
if ($parmlev ne 'general') { |
if ($parmlev ne 'general') { |
$r->print('<td class="LC_parm_overview_map_menu">'); |
#$r->print('<td class="LC_parm_overview_map_menu">'); |
&mapmenu($r,\%allmaps,$pschp,\%maptitles); |
&mapmenu($r,\%allmaps,$pschp,\%maptitles); |
$r->print('</td>'); |
#$r->print('</td>'); |
} |
} |
$r->print('</td></tr></table>'); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
|
$r->print('</div></div>'); |
$r->print('<table id="LC_parm_overview_controls"> |
#$r->print('</td></tr></table>'); |
<tr><td class="LC_parm_overview_parm_selectors">'); |
|
|
#$r->print('<table id="LC_parm_overview_controls"> |
|
# <tr><td class="LC_parm_overview_parm_selectors">'); |
|
$r->print('<div class="LC_ContentBoxSpecial">'); |
|
$r->print('<div class="LC_BoxPadding">' ); |
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
&parmmenu($r,\%allparms,\@pscat,\%keyorder); |
&parmmenu($r,\%allparms,\@pscat,\%keyorder); |
$r->print('</td><td class="LC_parm_overview_restrictions"> |
|
<table class="LC_parm_overview_restrictions">'. |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); |
|
#$r->print('</td><td class="LC_parm_overview_restrictions">'. |
|
$r->print('<table>'. |
'<tr><th>'.&mt('Parts').'</th><th>'.&mt('Section(s)'). |
'<tr><th>'.&mt('Parts').'</th><th>'.&mt('Section(s)'). |
'</th><th>'.&mt('Group(s)').'</th></tr><tr><td>'); |
'</th><th>'.&mt('Group(s)').'</th></tr><tr><td>'); |
&partmenu($r,\%allparts,\@psprt); |
&partmenu($r,\%allparts,\@psprt); |
Line 3766 ENDOVER
|
Line 3637 ENDOVER
|
$r->print('</td><td>'); |
$r->print('</td><td>'); |
&groupmenu($r,\@selected_groups); |
&groupmenu($r,\@selected_groups); |
$r->print('</td></tr></table>'); |
$r->print('</td></tr></table>'); |
$r->print('</td></tr></table>'); |
#$r->print('</td></tr></table>'); |
|
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
|
$r->print('</div></div>'); |
|
|
|
$r->print('<div class="LC_ContentBoxSpecial">'); |
|
$r->print('<div class="LC_BoxPadding">' ); |
my $sortorder=$env{'form.sortorder'}; |
my $sortorder=$env{'form.sortorder'}; |
unless ($sortorder) { $sortorder='realmstudent'; } |
unless ($sortorder) { $sortorder='realmstudent'; } |
&sortmenu($r,$sortorder); |
&sortmenu($r,$sortorder); |
|
$r->print('</div></div>'); |
|
|
$r->print('<p><input type="submit" name="dis" value="'.&mt('Display').'" /></p>'); |
$r->print('<p><input type="submit" name="dis" value="'.&mt('Display').'" /></p>'); |
|
|
Line 3915 ENDOVER
|
Line 3791 ENDOVER
|
$r->print(&Apache::loncommon::start_data_table_row(). |
$r->print(&Apache::loncommon::start_data_table_row(). |
'<tr>'. |
'<tr>'. |
'<td><input type="checkbox" name="del_'.$thiskey.'" /></td>' ); |
'<td><input type="checkbox" name="del_'.$thiskey.'" /></td>' ); |
|
|
$r->print('<td>'); |
$r->print('<td>'); |
my $display_value = $resourcedata->{$thiskey}; |
my $display_value = $resourcedata->{$thiskey}; |
if (&isdateparm($resourcedata->{$thiskey.'.type'})) { |
if (&isdateparm($resourcedata->{$thiskey.'.type'})) { |
$display_value = |
$display_value = |
&Apache::lonlocal::locallocaltime($display_value); |
&Apache::lonlocal::locallocaltime($display_value); |
} |
} |
$r->print(&mt('Parameter: "[_1]" with value: "[_2]"', |
$r->print(&mt('Parameter: "[_1]" with value: "[_2]"', |
Line 3948 ENDOVER
|
Line 3824 ENDOVER
|
} |
} |
$r->print(' <br /> '.&mt('Part: [_1]',$data{'parameter_part'})); |
$r->print(' <br /> '.&mt('Part: [_1]',$data{'parameter_part'})); |
$r->print('</td></tr>'); |
$r->print('</td></tr>'); |
|
|
} |
} |
} |
} |
$r->print(&Apache::loncommon::end_data_table().'<p>'. |
$r->print(&Apache::loncommon::end_data_table().'<p>'. |
Line 4038 sub parse_key {
|
Line 3914 sub parse_key {
|
my ($map,$resid,$url) = &Apache::lonnet::decode_symb($data{'realm'}); |
my ($map,$resid,$url) = &Apache::lonnet::decode_symb($data{'realm'}); |
$data{'realm_exists'} = &Apache::lonnet::symbverify($data{'realm'},$url); |
$data{'realm_exists'} = &Apache::lonnet::symbverify($data{'realm'},$url); |
} |
} |
|
|
$data{'parameter_part'} = $part; |
$data{'parameter_part'} = $part; |
$data{'parameter_name'} = $name; |
$data{'parameter_name'} = $name; |
|
|
Line 4078 sub check_cloners {
|
Line 3954 sub check_cloners {
|
$disallowed{'format'} .= $currclone.','; |
$disallowed{'format'} .= $currclone.','; |
} |
} |
} elsif ($currclone !~/^($match_username)\:($match_domain)$/) { |
} elsif ($currclone !~/^($match_username)\:($match_domain)$/) { |
$disallowed{'format'} .= $currclone.','; |
$disallowed{'format'} .= $currclone.','; |
} else { |
} else { |
if (&Apache::lonnet::homeserver($uname,$udom) eq 'no_host') { |
if (&Apache::lonnet::homeserver($uname,$udom) eq 'no_host') { |
$disallowed{'newuser'} .= $currclone.','; |
$disallowed{'newuser'} .= $currclone.','; |
Line 4107 sub change_clone {
|
Line 3983 sub change_clone {
|
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 $clone_crs = $cnum.':'.$cdom; |
my $clone_crs = $cnum.':'.$cdom; |
|
|
if ($cnum && $cdom) { |
if ($cnum && $cdom) { |
my @allowclone; |
my @allowclone; |
&extract_cloners($clonelist,\@allowclone); |
&extract_cloners($clonelist,\@allowclone); |
Line 4219 ENDMAINFORMHEAD
|
Line 4095 ENDMAINFORMHEAD
|
permission => $parm_permission, |
permission => $parm_permission, |
linktitle =>'Set default actions for parameters.' , |
linktitle =>'Set default actions for parameters.' , |
icon => 'folder-new.png' , |
icon => 'folder-new.png' , |
}]}, |
}]}, |
{ categorytitle => 'New and Existing Parameter Settings for Resources', |
{ categorytitle => 'New and Existing Parameter Settings for Resources', |
items => [ |
items => [ |
{ linktext => 'Edit Resource Parameters - Helper Mode', |
{ linktext => 'Edit Resource Parameters - Helper Mode', |
Line 4251 ENDMAINFORMHEAD
|
Line 4127 ENDMAINFORMHEAD
|
linktitle =>'Set/Modify existing resource parameters in overview mode.' , |
linktitle =>'Set/Modify existing resource parameters in overview mode.' , |
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, |
Line 4368 sub order_meta_fields {
|
Line 4244 sub order_meta_fields {
|
} |
} |
my $ordered_fields = join ",", @neworder; |
my $ordered_fields = join ",", @neworder; |
my $put_result = &Apache::lonnet::put('environment', |
my $put_result = &Apache::lonnet::put('environment', |
{'metadata.addedorder'=>$ordered_fields},$dom,$crs); |
{'metadata.addedorder'=>$ordered_fields},$dom,$crs); |
&Apache::lonnet::appenv({'course.'.$env{'request.course.id'}.'.metadata.addedorder' => $ordered_fields}); |
&Apache::lonnet::appenv({'course.'.$env{'request.course.id'}.'.metadata.addedorder' => $ordered_fields}); |
} |
} |
my $fields = &get_added_meta_fieldnames($env{'request.course.id'}); |
my $fields = &get_added_meta_fieldnames($env{'request.course.id'}); |
Line 4381 sub order_meta_fields {
|
Line 4257 sub order_meta_fields {
|
$ordered_fields = join ",", @fields_in_order; |
$ordered_fields = join ",", @fields_in_order; |
} |
} |
my $put_result = &Apache::lonnet::put('environment', |
my $put_result = &Apache::lonnet::put('environment', |
{'metadata.addedorder'=>$ordered_fields},$dom,$crs); |
{'metadata.addedorder'=>$ordered_fields},$dom,$crs); |
} |
} |
$r->print('<table>'); |
$r->print('<table>'); |
my $num_fields = scalar(@fields_in_order); |
my $num_fields = scalar(@fields_in_order); |
foreach my $key (@fields_in_order) { |
foreach my $key (@fields_in_order) { |
Line 4433 sub addmetafield {
|
Line 4309 sub addmetafield {
|
$options =~ s/,,/,/; |
$options =~ s/,,/,/; |
my $put_result = &Apache::lonnet::put('environment', |
my $put_result = &Apache::lonnet::put('environment', |
{'metadata.'.$meta_field.'.options'=>$options},$dom,$crs); |
{'metadata.'.$meta_field.'.options'=>$options},$dom,$crs); |
|
|
$r->print('Undeleted Metadata Field <strong>'.$env{'course.'.$env{'request.course.id'}.'.metadata.'.$meta_field.'.added'}."</strong> with result ".$put_result.'<br />'); |
$r->print('Undeleted Metadata Field <strong>'.$env{'course.'.$env{'request.course.id'}.'.metadata.'.$meta_field.'.added'}."</strong> with result ".$put_result.'<br />'); |
} |
} |
$r->print(&continue()); |
$r->print(&continue()); |
Line 4492 sub setrestrictmeta {
|
Line 4368 sub setrestrictmeta {
|
$save_field = $meta_field; |
$save_field = $meta_field; |
if ($env{'form.'.$meta_field.'_stuadd'}) { |
if ($env{'form.'.$meta_field.'_stuadd'}) { |
$options.='stuadd,'; |
$options.='stuadd,'; |
} |
} |
if ($env{'form.'.$meta_field.'_choices'}) { |
if ($env{'form.'.$meta_field.'_choices'}) { |
$options.='choices,'; |
$options.='choices,'; |
} |
} |
if ($env{'form.'.$meta_field.'_onlyone'} eq 'single') { |
if ($env{'form.'.$meta_field.'_onlyone'} eq 'single') { |
$options.='onlyone,'; |
$options.='onlyone,'; |
} |
} |
if ($env{'form.'.$meta_field.'_active'}) { |
if ($env{'form.'.$meta_field.'_active'}) { |
$options.='active,'; |
$options.='active,'; |
} |
} |
Line 4544 ENDButtons
|
Line 4420 ENDButtons
|
$output.= &output_row($r, $field, $$added_metadata_fields{$field},$added_flag, $row_alt); |
$output.= &output_row($r, $field, $$added_metadata_fields{$field},$added_flag, $row_alt); |
} |
} |
$output .= &Apache::loncommon::end_data_table(); |
$output .= &Apache::loncommon::end_data_table(); |
$r->print(<<ENDenv); |
$r->print(<<ENDenv); |
<form method="post" action="/adm/parmset?action=setrestrictmeta" name="form"> |
<form method="post" action="/adm/parmset?action=setrestrictmeta" name="form"> |
$output |
$output |
$buttons |
$buttons |
Line 4590 sub defaultsetter {
|
Line 4466 sub defaultsetter {
|
|
|
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=setdefaults', |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=setdefaults', |
text=>"Set Defaults"}); |
text=>"Set Defaults"}); |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Parameter Setting Default Actions'); |
&Apache::loncommon::start_page('Parameter Setting Default Actions'); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Defaults'); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Defaults'); |
$r->print(<<ENDDEFHEAD); |
$r->print(<<ENDDEFHEAD); |
Line 4614 ENDDEFHEAD
|
Line 4490 ENDDEFHEAD
|
my %keyorder=&standardkeyorder(); |
my %keyorder=&standardkeyorder(); |
my %defkeytype=(); |
my %defkeytype=(); |
|
|
&extractResourceInformation(\@ids, \%typep,\%keyp, \%allparms, \%allparts, \%allmaps, |
&extractResourceInformation(\@ids, \%typep,\%keyp, \%allparms, \%allparts, \%allmaps, |
\%mapp, \%symbp,\%maptitles,\%uris, |
\%mapp, \%symbp,\%maptitles,\%uris, |
\%keyorder,\%defkeytype); |
\%keyorder,\%defkeytype); |
if ($env{'form.storerules'}) { |
if ($env{'form.storerules'}) { |
Line 4677 ENDDEFHEAD
|
Line 4553 ENDDEFHEAD
|
push @datedisplay,&mt('Automatically set later than ').$tempkey; |
push @datedisplay,&mt('Automatically set later than ').$tempkey; |
push @dateoptions,'earlier_than_'.$tempkey; |
push @dateoptions,'earlier_than_'.$tempkey; |
push @datedisplay,&mt('Automatically set earlier than ').$tempkey; |
push @datedisplay,&mt('Automatically set earlier than ').$tempkey; |
} |
} |
} |
} |
$r->print(&mt('Manual setting rules apply to all interfaces.').'<br />'. |
$r->print(&mt('Manual setting rules apply to all interfaces.').'<br />'. |
&mt('Automatic setting rules apply to table mode interfaces only.')); |
&mt('Automatic setting rules apply to table mode interfaces only.')); |
Line 4728 ENDINPUTDATE
|
Line 4604 ENDINPUTDATE
|
} elsif ($defkeytype{$tempkey} eq 'string_yesno') { |
} elsif ($defkeytype{$tempkey} eq 'string_yesno') { |
my $yeschecked=''; |
my $yeschecked=''; |
my $nochecked=''; |
my $nochecked=''; |
if (&rulescache($tempkey.'_value') eq 'yes') { $yeschecked='checked="checked"'; } |
if (&rulescache($tempkey.'_value') eq 'yes') { $yeschecked=' checked="checked"'; } |
if (&rulescache($tempkey.'_value') eq 'no') { $nochecked='checked="checked"'; } |
if (&rulescache($tempkey.'_value') eq 'no') { $nochecked=' checked="checked"'; } |
|
|
$r->print(<<ENDYESNO); |
$r->print(<<ENDYESNO); |
<label><input type="radio" name="$tempkey\_value" value="yes" $yeschecked /> $lt{'yes'}</label><br /> |
<label><input type="radio" name="$tempkey\_value" value="yes"$yeschecked /> $lt{'yes'}</label><br /> |
<label><input type="radio" name="$tempkey\_value" value="no" $nochecked /> $lt{'no'}</label> |
<label><input type="radio" name="$tempkey\_value" value="no"$nochecked /> $lt{'no'}</label> |
ENDYESNO |
ENDYESNO |
} else { |
} else { |
$r->print('<input type="text" size="20" name="'.$tempkey.'_value" value="'.&rulescache($tempkey.'_value').'" />'); |
$r->print('<input type="text" size="20" name="'.$tempkey.'_value" value="'.&rulescache($tempkey.'_value').'" />'); |
Line 4771 sub components {
|
Line 4647 sub components {
|
$issection=''; |
$issection=''; |
} |
} |
my $realm='<span class="LC_parm_scope_all">'.&mt('All Resources').'</span>'; |
my $realm='<span class="LC_parm_scope_all">'.&mt('All Resources').'</span>'; |
my $realmdescription=&mt('all resources'); |
my $realmdescription=&mt('all resources'); |
if ($middle=~/^(.+)\_\_\_\(all\)$/) { |
if ($middle=~/^(.+)\_\_\_\(all\)$/) { |
$realm='<span class="LC_parm_scope_folder">'.&mt('Folder/Map').': '.&Apache::lonnet::gettitle($1).' <span class="LC_parm_folder"><br />('.$1.')</span></span>'; |
$realm='<span class="LC_parm_scope_folder">'.&mt('Folder/Map').': '.&Apache::lonnet::gettitle($1).' <span class="LC_parm_folder"><br />('.$1.')</span></span>'; |
$realmdescription=&mt('folder').' '.&Apache::lonnet::gettitle($1); |
$realmdescription=&mt('folder').' '.&Apache::lonnet::gettitle($1); |
Line 4802 sub load_parameter_names {
|
Line 4678 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=&Apache::lonlocal::texthash(%standard_parms); |
%standard_parms=&Apache::lonlocal::texthash(%standard_parms); |
} |
} |
|
|
sub standard_parameter_names { |
sub standard_parameter_names { |
Line 4811 sub standard_parameter_names {
|
Line 4687 sub standard_parameter_names {
|
&load_parameter_names(); |
&load_parameter_names(); |
} |
} |
if ($standard_parms{$name}) { |
if ($standard_parms{$name}) { |
return $standard_parms{$name}; |
return $standard_parms{$name}; |
} else { |
} else { |
return $name; |
return $name; |
} |
} |
} |
} |
|
|
Line 4834 sub parm_change_log {
|
Line 4710 sub parm_change_log {
|
|
|
$r->print('<form action="/adm/parmset?action=parameterchangelog" |
$r->print('<form action="/adm/parmset?action=parameterchangelog" |
method="post" name="parameterlog">'); |
method="post" name="parameterlog">'); |
|
|
my %saveable_parameters = ('show' => 'scalar',); |
my %saveable_parameters = ('show' => 'scalar',); |
&Apache::loncommon::store_course_settings('parameter_log', |
&Apache::loncommon::store_course_settings('parameter_log', |
\%saveable_parameters); |
\%saveable_parameters); |
Line 4862 sub parm_change_log {
|
Line 4738 sub parm_change_log {
|
} |
} |
if ($last) { ($folder) = &Apache::lonnet::decode_symb($last); } |
if ($last) { ($folder) = &Apache::lonnet::decode_symb($last); } |
} |
} |
foreach my $id (sort |
foreach my $id (sort |
{ |
{ |
if ($parmlog{$b}{'exe_time'} ne $parmlog{$a}{'exe_time'}) { |
if ($parmlog{$b}{'exe_time'} ne $parmlog{$a}{'exe_time'}) { |
return $parmlog{$b}{'exe_time'} <=>$parmlog{$a}{'exe_time'} |
return $parmlog{$b}{'exe_time'} <=>$parmlog{$a}{'exe_time'} |
Line 4875 sub parm_change_log {
|
Line 4751 sub parm_change_log {
|
my $count = 0; |
my $count = 0; |
my $time = |
my $time = |
&Apache::lonlocal::locallocaltime($parmlog{$id}{'exe_time'}); |
&Apache::lonlocal::locallocaltime($parmlog{$id}{'exe_time'}); |
my $plainname = |
my $plainname = |
&Apache::loncommon::plainname($parmlog{$id}{'exe_uname'}, |
&Apache::loncommon::plainname($parmlog{$id}{'exe_uname'}, |
$parmlog{$id}{'exe_udom'}); |
$parmlog{$id}{'exe_udom'}); |
my $about_me_link = |
my $about_me_link = |
&Apache::loncommon::aboutmewrapper($plainname, |
&Apache::loncommon::aboutmewrapper($plainname, |
$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 ((($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 4906 sub parm_change_log {
|
Line 4782 sub parm_change_log {
|
} |
} |
} |
} |
if ($typeflag) { |
if ($typeflag) { |
$istype{$parmname}=$value; |
$istype{$parmname}=$value; |
if (!$env{'form.includetypes'}) { next; } |
if (!$env{'form.includetypes'}) { next; } |
} |
} |
$count++; |
$count++; |
if ($makenewrow) { |
if ($makenewrow) { |
Line 4945 sub parm_change_log {
|
Line 4821 sub parm_change_log {
|
my $description=&mt('Changed [_1] for [_2] to [_3]',&standard_parameter_names($parmname),$realmdescription, |
my $description=&mt('Changed [_1] for [_2] to [_3]',&standard_parameter_names($parmname),$realmdescription, |
(&isdateparm($istype{$parmname})?&Apache::lonlocal::locallocaltime($value):$value)); |
(&isdateparm($istype{$parmname})?&Apache::lonlocal::locallocaltime($value):$value)); |
if (($uname) && ($udom)) { |
if (($uname) && ($udom)) { |
$output .= |
$output .= |
&Apache::loncommon::messagewrapper('Notify User', |
&Apache::loncommon::messagewrapper('Notify User', |
$uname,$udom,$title, |
$uname,$udom,$title, |
$description); |
$description); |
} else { |
} else { |
$output .= |
$output .= |
&Apache::lonrss::course_blog_link($id,$title, |
&Apache::lonrss::course_blog_link($id,$title, |
$description); |
$description); |
} |
} |
Line 4961 sub parm_change_log {
|
Line 4837 sub parm_change_log {
|
my $wholeentry=$about_me_link.':'. |
my $wholeentry=$about_me_link.':'. |
$parmlog{$id}{'exe_uname'}.':'.$parmlog{$id}{'exe_udom'}.':'. |
$parmlog{$id}{'exe_uname'}.':'.$parmlog{$id}{'exe_udom'}.':'. |
$output; |
$output; |
if ($wholeentry!~/\Q$env{'form.containingphrase'}\E/i) { next; } |
if ($wholeentry!~/\Q$env{'form.containingphrase'}\E/i) { next; } |
} |
} |
if ($count) { |
if ($count) { |
$r->print($row_start.'<td rowspan="'.$count.'">'.$time.'</td> |
$r->print($row_start.'<td rowspan="'.$count.'">'.$time.'</td> |
Line 4971 sub parm_change_log {
|
Line 4847 sub parm_change_log {
|
$send_msg_link.'</td>'.$output); |
$send_msg_link.'</td>'.$output); |
$shown++; |
$shown++; |
} |
} |
if (!($env{'form.show'} eq &mt('all') |
if (!($env{'form.show'} eq &mt('all') |
|| $shown<=$env{'form.show'})) { last; } |
|| $shown<=$env{'form.show'})) { last; } |
} |
} |
$r->print(&Apache::loncommon::end_data_table()); |
$r->print(&Apache::loncommon::end_data_table()); |
Line 5095 sub handler {
|
Line 4971 sub handler {
|
text=>"Parameter Manager", |
text=>"Parameter Manager", |
faq=>10, |
faq=>10, |
bug=>'Instructor Interface', |
bug=>'Instructor Interface', |
help => 'Parameter_Manager'}); |
help => |
|
'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 = |
Line 5116 sub handler {
|
Line 4993 sub handler {
|
} elsif (! exists($env{'form.action'})) { |
} elsif (! exists($env{'form.action'})) { |
&print_main_menu($r,$parm_permission); |
&print_main_menu($r,$parm_permission); |
} elsif ($env{'form.action'} eq 'crsenv') { |
} elsif ($env{'form.action'} eq 'crsenv') { |
&crsenv($r); |
&crsenv($r); |
} elsif ($env{'form.action'} eq 'setoverview') { |
} elsif ($env{'form.action'} eq 'setoverview') { |
&overview($r); |
&overview($r); |
} elsif ($env{'form.action'} eq 'addmetadata') { |
} elsif ($env{'form.action'} eq 'addmetadata') { |
Line 5141 sub handler {
|
Line 5018 sub handler {
|
&date_shift_two($r); |
&date_shift_two($r); |
} elsif ($env{'form.action'} eq 'categorizecourse') { |
} elsif ($env{'form.action'} eq 'categorizecourse') { |
&assign_course_categories($r); |
&assign_course_categories($r); |
} |
} |
} else { |
} else { |
# ----------------------------- Not in a course, or not allowed to modify parms |
# ----------------------------- Not in a course, or not allowed to modify parms |
if ($exists) { |
if ($exists) { |