version 1.522.2.12, 2013/12/19 19:31:53
|
version 1.531, 2013/04/08 23:21:15
|
Line 46 This module sets coursewide and assessme
|
Line 46 This module sets coursewide and assessme
|
|
|
=over |
=over |
|
|
|
=pod |
|
|
=item parmval() |
=item parmval() |
|
|
Figure out a cascading parameter. |
Figure out a cascading parameter. |
Line 137 javascript function 'pjump'.
|
Line 139 javascript function 'pjump'.
|
|
|
extractResourceInformation extracts lots of information about all of the the course's resources into a variety of hashes. |
extractResourceInformation extracts lots of information about all of the the course's resources into a variety of hashes. |
|
|
Input: See list below |
Input: See list below: |
|
|
=over 4 |
|
|
|
=item * B<env{'user.name'}> : Current username |
=item * B<env{'user.name'}> : Current username |
|
|
=item * B<env{'user.domain'}> : Domain of current user. |
=item * B<env{'user.domain'}> : Domain of current user. |
|
|
=item * B<env{"request.course.fn"}> : Course |
=item * b<env{"request.course.fn"} : Course |
|
|
=back |
|
|
|
Outputs: See list below |
|
|
|
=over 4 |
Outputs: See list below: |
|
|
=item * B<ids> (out) : An array that will contain all of the ids in the course. |
=item * B<ids> (out) : An array that will contain all of the ids in the course. |
|
|
Line 177 Outputs: See list below
|
Line 173 Outputs: See list below
|
|
|
=item * B<defkeytype> |
=item * B<defkeytype> |
|
|
=back |
|
|
|
=item isdateparm() |
=item isdateparm() |
|
|
=item parmmenu() |
=item parmmenu() |
Line 216 Returns: nothing
|
Line 210 Returns: nothing
|
|
|
Variables used (guessed by Jeremy): |
Variables used (guessed by Jeremy): |
|
|
=over |
|
|
|
=item * B<pscat>: ParameterS CATegories? ends up a list of the types of parameters that exist, e.g., tol, weight, acc, opendate, duedate, answerdate, sig, maxtries, type. |
=item * B<pscat>: ParameterS CATegories? ends up a list of the types of parameters that exist, e.g., tol, weight, acc, opendate, duedate, answerdate, sig, maxtries, type. |
|
|
=item * B<psprt>: ParameterS PaRTs? a list of the parts of a problem that we are displaying? Used to display only selected parts? |
=item * B<psprt>: ParameterS PaRTs? a list of the parts of a problem that we are displaying? Used to display only selected parts? |
Line 230 Variables used (guessed by Jeremy):
|
Line 222 Variables used (guessed by Jeremy):
|
When storing information, store as part 0 |
When storing information, store as part 0 |
When requesting information, request from full part |
When requesting information, request from full part |
|
|
=back |
|
|
|
=item tablestart() |
=item tablestart() |
|
|
=item tableend() |
=item tableend() |
Line 298 Set portfolio metadata
|
Line 288 Set portfolio metadata
|
|
|
Main handler. Calls &assessparms subroutine. |
Main handler. Calls &assessparms subroutine. |
|
|
|
|
=back |
=back |
|
|
=cut |
=cut |
Line 323 use HTML::Entities;
|
Line 314 use HTML::Entities;
|
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
|
|
|
|
|
sub startSettingsScreen { |
|
my ($r,$mode,$crstype)=@_; |
|
|
|
my $tabtext = &mt('Course Settings'); |
|
if ($crstype eq 'Community') { |
|
$tabtext = &mt('Community Settings'); |
|
} |
|
$r->print("\n".'<ul class="LC_TabContentBigger" id="main">'); |
|
$r->print("\n".'<li'.($mode eq 'coursepref'?' class="active"':'').'><a href="/adm/courseprefs"><b> '. |
|
$tabtext. |
|
' </b></a></li>'); |
|
|
|
$r->print("\n".'<li'.($mode eq 'parmset'?' class="active"':'').' id="tabbededitor"><a href="/adm/parmset"><b>'. |
|
&mt('Content and Problem Settings').'</b></a></li>'); |
|
$r->print("\n".'</ul>'."\n"); |
|
$r->print('<div class="LC_Box" style="clear:both;margin:0;" id="parameditor"><div id="maincoursedoc" style="margin:0 0;padding:0 0;"><div class="LC_ContentBox" id="mainCourseDocuments" style="display: block;">'); |
|
} |
|
|
|
sub endSettingsScreen { |
|
my ($r)=@_; |
|
$r->print('</div></div></div>'); |
|
} |
|
|
|
|
|
|
sub parmval { |
sub parmval { |
my ($what,$id,$def,$uname,$udom,$csec,$cgroup,$courseopt)=@_; |
my ($what,$id,$def,$uname,$udom,$csec,$cgroup,$courseopt)=@_; |
return &parmval_by_symb($what,&symbcache($id),$def,$uname,$udom,$csec, |
return &parmval_by_symb($what,&symbcache($id),$def,$uname,$udom,$csec, |
Line 760 sub valout {
|
Line 776 sub valout {
|
$result = |
$result = |
'<img src="/res/adm/pages/editmap.png"' |
'<img src="/res/adm/pages/editmap.png"' |
.' alt="'.&mt('Change').'"' |
.' alt="'.&mt('Change').'"' |
.' title="'.&mt('Change').'" style="border:0;" />'; |
.' title="'.&mt('Change').'" />'; |
} else { |
} else { |
$result=' '; |
$result=' '; |
} |
} |
Line 878 sub page_js {
|
Line 894 sub page_js {
|
var newWin = window.open(url, wdwName, options); |
var newWin = window.open(url, wdwName, options); |
newWin.focus(); |
newWin.focus(); |
} |
} |
|
|
// ]]> |
// ]]> |
|
|
</script> |
</script> |
$selscript |
$selscript |
ENDJS |
ENDJS |
Line 906 COURSECONTENTSCRIPT
|
Line 924 COURSECONTENTSCRIPT
|
} |
} |
|
|
sub startpage { |
sub startpage { |
my ($r,$psymb) = @_; |
my ($r,$psymb,$crstype) = @_; |
|
|
my %loaditems = ( |
my %loaditems = ( |
'onload' => "group_or_section('cgroup')", |
'onload' => "group_or_section('cgroup')", |
Line 933 sub startpage {
|
Line 951 sub startpage {
|
</script> |
</script> |
'; |
'; |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Set/Modify Course Parameters',$js, |
&Apache::loncommon::start_page('Set/Modify Course Parameters',$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'); |
my $escfilter=&Apache::lonhtmlcommon::entity_encode($env{'form.filter'}); |
my $escfilter=&Apache::lonhtmlcommon::entity_encode($env{'form.filter'}); |
my $escpart=&Apache::lonhtmlcommon::entity_encode($env{'form.part'}); |
my $escpart=&Apache::lonhtmlcommon::entity_encode($env{'form.part'}); |
$r->print($start_page.$breadcrumbs); |
$r->print($start_page.$breadcrumbs); |
|
&startSettingsScreen($r,'parmset',$crstype); |
$r->print(<<ENDHEAD); |
$r->print(<<ENDHEAD); |
<form method="post" action="/adm/parmset?action=settable" name="parmform"> |
<form method="post" action="/adm/parmset?action=settable" name="parmform"> |
<input type="hidden" value="" name="pres_value" /> |
<input type="hidden" value="" name="pres_value" /> |
Line 1091 sub print_td {
|
Line 1110 sub print_td {
|
if ($which > 3) { |
if ($which > 3) { |
$nolink = 1; |
$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])); |
Line 1248 sub extractResourceInformation {
|
Line 1263 sub extractResourceInformation {
|
$$mapp{$mapid}=$$mapp{$id}; |
$$mapp{$mapid}=$$mapp{$id}; |
$$allmaps{$mapid}=$$mapp{$id}; |
$$allmaps{$mapid}=$$mapp{$id}; |
if ($mapid eq '1') { |
if ($mapid eq '1') { |
$$maptitles{$mapid}=&mt('Main Content'); |
$$maptitles{$mapid}=&mt('Main Course Documents'); |
} else { |
} else { |
$$maptitles{$mapid}=&Apache::lonnet::gettitle($$mapp{$id}); |
$$maptitles{$mapid}=&Apache::lonnet::gettitle($$mapp{$id}); |
} |
} |
Line 1418 sub lookUpTableParameter {
|
Line 1433 sub lookUpTableParameter {
|
'lenient' => 'grading', |
'lenient' => 'grading', |
'retrypartial' => 'tries', |
'retrypartial' => 'tries', |
'discussvote' => 'misc', |
'discussvote' => 'misc', |
'examcode' => 'high_level_randomization', |
|
); |
); |
} |
} |
|
|
Line 1495 sub parmboxes {
|
Line 1510 sub parmboxes {
|
|
|
#Print parameters |
#Print parameters |
for my $key (sort { $category_order{$a} <=> $category_order{$b} } keys %categoryList) { |
for my $key (sort { $category_order{$a} <=> $category_order{$b} } keys %categoryList) { |
next if(@{$categoryList{$key}} == 0); |
if(@{$categoryList{$key}} == 0) { |
$r->print('<div class="LC_Box LC_400Box">' |
next; |
.'<h4 class="LC_hcell">' |
} else { |
.&mt($categories{$key}) |
$r->print('<div class="LC_Box LC_400Box">' |
.'</h4>'."\n"); |
.'<h4 class="LC_hcell">' |
foreach $tempkey (&keysindisplayorderCategory($categoryList{$key},$keyorder)) { |
.&mt($categories{$key}) |
$r->print('<span class="LC_nobreak">' |
.'</h4>'."\n"); |
.'<label><input type="checkbox" name="pscat" ' |
foreach $tempkey (&keysindisplayorderCategory($categoryList{$key},$keyorder)) { |
.'value="'.$tempkey.'" '); |
$r->print('<span class="LC_nobreak">' |
if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) { |
.'<label><input type="checkbox" name="pscat" '); |
$r->print(' checked="checked"'); |
$r->print('value="'.$tempkey.'" '); |
} |
if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) { |
$r->print(' />'.($$allparms{$tempkey}=~/\S/ ? $$allparms{$tempkey} |
$r->print(' checked="checked"'); |
|
} |
|
$r->print(' />'.($$allparms{$tempkey}=~/\S/ ? $$allparms{$tempkey} |
: $tempkey) |
: $tempkey) |
.'</label></span><br />'."\n"); |
.'</label></span><br />'."\n"); |
|
} |
|
$r->print("</div>\n"); |
} |
} |
$r->print("</div>\n"); |
|
} |
} |
|
|
$r->print("</div>\n"); |
$r->print("</div>\n"); |
Line 1679 function group_or_section(caller) {
|
Line 1697 function group_or_section(caller) {
|
# This function shows on table Mode the available Parameters for the selected Resources |
# This function shows on table Mode the available Parameters for the selected Resources |
# |
# |
sub displaymenu { |
sub displaymenu { |
my ($r,$allparms,$pscat,$psprt,$keyorder,$divid)=@_; |
my ($r,$allparms,$pscat,$psprt,$keyorder)=@_; |
|
|
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parameters to View'))); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parameters to View'))); |
|
|
&parmmenu($r,$allparms,$pscat,$keyorder); |
&parmmenu($r,$allparms,$pscat,$keyorder); |
$r->print(&Apache::loncommon::start_scrollbox('480px','440px','200px',$divid)); |
$r->print(&Apache::loncommon::start_scrollbox()); |
&parmboxes($r,$allparms,$pscat,$keyorder); |
&parmboxes($r,$allparms,$pscat,$keyorder); |
$r->print(&Apache::loncommon::end_scrollbox()); |
$r->print(&Apache::loncommon::end_scrollbox()); |
|
|
Line 1759 sub mapmenu {
|
Line 1777 sub mapmenu {
|
.'</div>' |
.'</div>' |
); |
); |
|
|
$r->print(&Apache::loncommon::start_scrollbox('700px','680px','400px','mapmenuscroll')); |
$r->print(&Apache::loncommon::start_scrollbox(undef,undef,undef,'mapmenuscroll')); |
$r->print(&Apache::loncommon::start_data_table(undef,'mapmenuinner')); |
$r->print(&Apache::loncommon::start_data_table(undef,'mapmenuinner')); |
|
|
# Display row: "All Maps or Folders" |
# Display row: "All Maps or Folders" |
Line 1778 sub mapmenu {
|
Line 1796 sub mapmenu {
|
.&Apache::loncommon::end_data_table_row() |
.&Apache::loncommon::end_data_table_row() |
); |
); |
|
|
# Display row: "Main Content" |
# Display row: "Main Course Documents" |
if (exists($$allmaps{1})) { |
if (exists($$allmaps{1})) { |
$r->print( |
$r->print( |
&Apache::loncommon::start_data_table_row() |
&Apache::loncommon::start_data_table_row() |
Line 2036 sub assessparms {
|
Line 2054 sub assessparms {
|
|
|
|
|
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]='all'; } |
if (($env{'form.part'}) && ($psprt[0] ne 'all')) { $psprt[0]=$env{'form.part'}; } |
if (($env{'form.part'}) && ($psprt[0] ne 'all')) { $psprt[0]=$env{'form.part'}; } |
|
|
my $pssymb=''; |
my $pssymb=''; |
Line 2172 sub assessparms {
|
Line 2190 sub assessparms {
|
} |
} |
} |
} |
} |
} |
} elsif ($markers[$i] =~ /_(type|lenient|retrypartial|discussvote|examcode)\&\d+$/) { |
} elsif ($markers[$i] =~ /_(type|lenient|retrypartial|discussvote)\&\d+$/) { |
$name = $1; |
$name = $1; |
my $val = $values[$i]; |
|
if ($name eq 'examcode') { |
|
if (&Apache::lonnet::validCODE($values[$i])) { |
|
$val = 'valid'; |
|
} |
|
} |
|
$needsrelease = |
$needsrelease = |
$Apache::lonnet::needsrelease{"parameter:$name:$val"}; |
$Apache::lonnet::needsrelease{"parameter:$name:$values[$i]"}; |
if ($needsrelease) { |
if ($needsrelease) { |
unless ($got_chostname) { |
unless ($got_chostname) { |
($chostname,$cmajor,$cminor) = ¶meter_release_vars(); |
($chostname,$cmajor,$cminor) = ¶meter_release_vars(); |
$got_chostname = 1; |
$got_chostname = 1; |
} |
} |
$needsnewer = ¶meter_releasecheck($name,$val, |
$needsnewer = ¶meter_releasecheck($name,$values[$i], |
$needsrelease, |
$needsrelease, |
$chostname, |
$chostname, |
$cmajor,$cminor); |
$cmajor,$cminor); |
Line 2218 sub assessparms {
|
Line 2230 sub assessparms {
|
if ($psprt[0] eq "all" || !@psprt) {@psprt = (keys %allparts);} |
if ($psprt[0] eq "all" || !@psprt) {@psprt = (keys %allparts);} |
# ------------------------------------------------------------------ Start page |
# ------------------------------------------------------------------ Start page |
|
|
&startpage($r,$pssymb); |
my $crstype = &Apache::loncommon::course_type(); |
|
&startpage($r,$pssymb,$crstype); |
|
|
foreach ('tolerance','date_default','date_start','date_end', |
foreach ('tolerance','date_default','date_start','date_end', |
'date_interval','int','float','string') { |
'date_interval','int','float','string') { |
Line 2270 ENDPARMSELSCRIPT
|
Line 2283 ENDPARMSELSCRIPT
|
|
|
# Step 2 |
# Step 2 |
$r->print(&Apache::lonhtmlcommon::topic_bar(2,&mt('Parameter Specification'),'parmstep2')); |
$r->print(&Apache::lonhtmlcommon::topic_bar(2,&mt('Parameter Specification'),'parmstep2')); |
&displaymenu($r,\%allparms,\@pscat,\@psprt,\%keyorder,'parmmenuscroll'); |
&displaymenu($r,\%allparms,\@pscat,\@psprt,\%keyorder); |
|
|
# Step 3 |
# Step 3 |
$r->print(&Apache::lonhtmlcommon::topic_bar(3,&mt('User Specification (optional)'),'parmstep3')); |
$r->print(&Apache::lonhtmlcommon::topic_bar(3,&mt('User Specification (optional)'),'parmstep3')); |
Line 2298 ENDPARMSELSCRIPT
|
Line 2311 ENDPARMSELSCRIPT
|
.'</a>' |
.'</a>' |
.'</p>'); |
.'</p>'); |
} else { |
} else { |
$r->print(); |
|
# parameter screen for a single resource. |
# parameter screen for a single resource. |
my ($map,$iid,$resource)=&Apache::lonnet::decode_symb($pssymb); |
my ($map,$iid,$resource)=&Apache::lonnet::decode_symb($pssymb); |
my $title = &Apache::lonnet::gettitle($pssymb); |
my $title = &Apache::lonnet::gettitle($pssymb); |
Line 2308 ENDPARMSELSCRIPT
|
Line 2320 ENDPARMSELSCRIPT
|
'<br />'); |
'<br />'); |
$r->print(&Apache::lonhtmlcommon::topic_bar('',&mt('Additional Display Specification (optional)'))); |
$r->print(&Apache::lonhtmlcommon::topic_bar('',&mt('Additional Display Specification (optional)'))); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::start_pick_box()); |
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View')). |
|
'<label>'. |
|
'<input type="checkbox" name="psprt" value="all"'. |
|
($env{'form.psprt'}?' checked="checked"':'').' />'. |
|
&mt('Show all parts'). |
|
'</label></td></tr>'); |
|
&usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups); |
&usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups); |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
$r->print(&Apache::lonhtmlcommon::row_closure(1)); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
$r->print(&Apache::lonhtmlcommon::end_pick_box()); |
Line 2428 ENDTABLEHEADFOUR
|
Line 2434 ENDTABLEHEADFOUR
|
my $defbgtwo=''; |
my $defbgtwo=''; |
my $defbgthree = ''; |
my $defbgthree = ''; |
|
|
foreach (@ids) { |
foreach my $rid (@ids) { |
|
|
my $rid=$_; |
|
my ($inmapid)=($rid=~/\.(\d+)$/); |
my ($inmapid)=($rid=~/\.(\d+)$/); |
|
|
if ((!$pssymb && |
if ((!$pssymb && |
Line 2751 ENDMAPONE
|
Line 2756 ENDMAPONE
|
} # end of $parmlev eq general |
} # end of $parmlev eq general |
} |
} |
$r->print('</form>'); |
$r->print('</form>'); |
|
&endSettingsScreen($r); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} # end sub assessparms |
} # end sub assessparms |
|
|
Line 2835 sub storedata {
|
Line 2841 sub storedata {
|
$name = 'lenient'; |
$name = 'lenient'; |
} elsif ($typeof eq 'string_discussvote') { |
} elsif ($typeof eq 'string_discussvote') { |
$name = 'discussvote'; |
$name = 'discussvote'; |
} elsif ($typeof eq 'string_examcode') { |
|
$name = 'examcode'; |
|
} elsif ($typeof eq 'string_yesno') { |
} elsif ($typeof eq 'string_yesno') { |
if ($thiskey =~ /\.retrypartial$/) { |
if ($thiskey =~ /\.retrypartial$/) { |
$name = 'retrypartial'; |
$name = 'retrypartial'; |
Line 3161 my %strings =
|
Line 3165 my %strings =
|
=> [[ 'problem', 'Standard Problem'], |
=> [[ 'problem', 'Standard Problem'], |
[ 'survey', 'Survey'], |
[ 'survey', 'Survey'], |
[ 'anonsurveycred', 'Anonymous Survey (credit for submission)'], |
[ 'anonsurveycred', 'Anonymous Survey (credit for submission)'], |
[ 'exam', 'Exam'], |
[ 'exam', 'Bubblesheet Exam'], |
[ 'anonsurvey', 'Anonymous Survey'], |
[ 'anonsurvey', 'Anonymous Survey'], |
[ 'randomizetry', 'New Randomization Each N Tries (default N=1)'], |
[ 'randomizetry', 'New Randomization Each N Tries (default N=1)'], |
[ 'practice', 'Practice'], |
[ 'practice', 'Practice'], |
Line 3306 sub newoverview {
|
Line 3310 sub newoverview {
|
|
|
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'}; |
&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 3325 sub newoverview {
|
Line 3330 sub newoverview {
|
{'add_entries' => \%loaditems,}); |
{'add_entries' => \%loaditems,}); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Overview'); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Overview'); |
$r->print($start_page.$breadcrumbs); |
$r->print($start_page.$breadcrumbs); |
|
&startSettingsScreen($r,'parmset',$crstype); |
$r->print(<<ENDOVER); |
$r->print(<<ENDOVER); |
<form method="post" action="/adm/parmset?action=newoverview" name="parmform"> |
<form method="post" action="/adm/parmset?action=newoverview" name="parmform"> |
ENDOVER |
ENDOVER |
Line 3353 ENDOVER
|
Line 3359 ENDOVER
|
my $pschp=$env{'form.pschp'}; |
my $pschp=$env{'form.pschp'}; |
|
|
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]='all'; } |
|
|
my @selected_sections = |
my @selected_sections = |
&Apache::loncommon::get_env_multiple('form.Section'); |
&Apache::loncommon::get_env_multiple('form.Section'); |
Line 3450 ENDOVER
|
Line 3456 ENDOVER
|
$r->print(&tableend(). |
$r->print(&tableend(). |
((($env{'form.store'}) || ($env{'form.dis'}))?'<p><input type="submit" name="store" value="'.&mt('Save').'" /></p>':''). |
((($env{'form.store'}) || ($env{'form.dis'}))?'<p><input type="submit" name="store" value="'.&mt('Save').'" /></p>':''). |
'</form>'); |
'</form>'); |
|
&endSettingsScreen($r); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} |
} |
|
|
Line 3492 sub overview {
|
Line 3499 sub overview {
|
my ($r) = @_; |
my ($r) = @_; |
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'}; |
|
|
&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'); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Overview'); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Overview'); |
$r->print($start_page.$breadcrumbs); |
$r->print($start_page.$breadcrumbs); |
|
&startSettingsScreen($r,'parmset',$crstype); |
$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 |
Line 3595 ENDOVER
|
Line 3604 ENDOVER
|
my ($map,$resid,$url) = |
my ($map,$resid,$url) = |
&Apache::lonnet::decode_symb($data{'realm'}); |
&Apache::lonnet::decode_symb($data{'realm'}); |
$r->print(&mt('Resource: [_1]with ID: [_2]in folder [_3]', |
$r->print(&mt('Resource: [_1]with ID: [_2]in folder [_3]', |
$url.' <br /> ', |
$url.' <br /> ', |
$resid.' <br /> ',$map)); |
$resid.' <br /> ',$map)); |
} |
} |
$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>'); |
Line 3606 ENDOVER
|
Line 3615 ENDOVER
|
$r->print(&Apache::loncommon::end_data_table().'<p>'. |
$r->print(&Apache::loncommon::end_data_table().'<p>'. |
'<input type="submit" value="'.&mt('Delete Selected').'" />'. |
'<input type="submit" value="'.&mt('Delete Selected').'" />'. |
'</p></form>'); |
'</p></form>'); |
|
&endSettingsScreen($r); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} |
} |
|
|
Line 3613 sub date_shift_one {
|
Line 3623 sub date_shift_one {
|
my ($r) = @_; |
my ($r) = @_; |
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'}; |
|
|
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=dateshift1&timebase='.$env{'form.timebase'}, |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=dateshift1&timebase='.$env{'form.timebase'}, |
text=>"Shifting Dates"}); |
text=>"Shifting Dates"}); |
my $start_page=&Apache::loncommon::start_page('Shift Dates'); |
my $start_page=&Apache::loncommon::start_page('Shift Dates'); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Shift'); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Shift'); |
$r->print($start_page.$breadcrumbs); |
$r->print($start_page.$breadcrumbs); |
$r->print('<form name="shiftform" method="post" action="">'. |
&startSettingsScreen($r,'parmset',$crstype); |
|
$r->print('<form name="shiftform" method="post">'. |
'<table><tr><td>'.&mt('Currently set date:').'</td><td>'. |
'<table><tr><td>'.&mt('Currently set date:').'</td><td>'. |
&Apache::lonlocal::locallocaltime($env{'form.timebase'}).'</td></tr>'. |
&Apache::lonlocal::locallocaltime($env{'form.timebase'}).'</td></tr>'. |
'<tr><td>'.&mt('Shifted date:').'</td><td>'. |
'<tr><td>'.&mt('Shifted date:').'</td><td>'. |
&Apache::lonhtmlcommon::date_setter('shiftform', |
&Apache::lonhtmlcommon::dshowerfuck.net |
|
ate_setter('shiftform', |
'timeshifted', |
'timeshifted', |
$env{'form.timebase'},, |
$env{'form.timebase'},, |
''). |
''). |
Line 3631 sub date_shift_one {
|
Line 3644 sub date_shift_one {
|
'<input type="hidden" name="action" value="dateshift2" />'. |
'<input type="hidden" name="action" value="dateshift2" />'. |
'<input type="hidden" name="timebase" value="'.$env{'form.timebase'}.'" />'. |
'<input type="hidden" name="timebase" value="'.$env{'form.timebase'}.'" />'. |
'<input type="submit" value="'.&mt('Shift all dates accordingly').'" /></form>'); |
'<input type="submit" value="'.&mt('Shift all dates accordingly').'" /></form>'); |
|
&endSettingsScreen($r); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} |
} |
|
|
Line 3638 sub date_shift_two {
|
Line 3652 sub date_shift_two {
|
my ($r) = @_; |
my ($r) = @_; |
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'}; |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=dateshift1&timebase='.$env{'form.timebase'}, |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=dateshift1&timebase='.$env{'form.timebase'}, |
text=>"Shifting Dates"}); |
text=>"Shifting Dates"}); |
my $start_page=&Apache::loncommon::start_page('Shift Dates'); |
my $start_page=&Apache::loncommon::start_page('Shift Dates'); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Shift'); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Shift'); |
$r->print($start_page.$breadcrumbs); |
$r->print($start_page.$breadcrumbs); |
|
&startSettingsScreen($r,'parmset',$crstype); |
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(&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))); |
my $delta=$timeshifted-$env{'form.timebase'}; |
my $delta=$timeshifted-$env{'form.timebase'}; |
&dateshift($delta); |
&dateshift($delta); |
|
&endSettingsScreen($r); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} |
} |
|
|
Line 3693 sub parse_key {
|
Line 3710 sub parse_key {
|
|
|
|
|
sub header { |
sub header { |
return &Apache::loncommon::start_page('Content and Problem Settings'); |
return &Apache::loncommon::start_page('Settings'); |
} |
} |
|
|
|
|
Line 3703 sub print_main_menu {
|
Line 3720 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); |
|
|
|
&startSettingsScreen($r,'parmset',$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 3718 ENDMAINFORMHEAD
|
Line 3739 ENDMAINFORMHEAD
|
'/'.$env{'request.course.sec'}); |
'/'.$env{'request.course.sec'}); |
} |
} |
|
|
my $crstype = &Apache::loncommon::course_type(); |
|
my $lc_crstype = lc($crstype); |
|
|
|
my @menu = |
my @menu = |
( { categorytitle=>"Content Settings for this $crstype", |
( { categorytitle=>"Content Settings for this $crstype", |
items => [ |
items => [ |
Line 3788 ENDMAINFORMHEAD
|
Line 3806 ENDMAINFORMHEAD
|
}]} |
}]} |
); |
); |
$r->print(&Apache::lonhtmlcommon::generate_menu(@menu)); |
$r->print(&Apache::lonhtmlcommon::generate_menu(@menu)); |
$r->print('</form>'.&Apache::loncommon::end_page()); |
&endSettingsScreen($r); |
return; |
return; |
} |
} |
|
|
Line 3856 sub order_meta_fields {
|
Line 3874 sub order_meta_fields {
|
my $idx = 1; |
my $idx = 1; |
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'};; |
$r->print(&Apache::loncommon::start_page('Order Metadata Fields')); |
$r->print(&Apache::loncommon::start_page('Order Metadata Fields')); |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=addmetadata', |
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=addmetadata', |
text=>"Add Metadata Field"}); |
text=>"Add Metadata Field"}); |
Line 3864 sub order_meta_fields {
|
Line 3883 sub order_meta_fields {
|
text=>"Restrict Metadata"}, |
text=>"Restrict Metadata"}, |
{text=>"Order Metadata"}); |
{text=>"Order Metadata"}); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Order Metadata')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Order Metadata')); |
|
&startSettingsScreen($r,'parmset',$crstype); |
if ($env{'form.storeorder'}) { |
if ($env{'form.storeorder'}) { |
my $newpos = $env{'form.newpos'} - 1; |
my $newpos = $env{'form.newpos'} - 1; |
my $currentpos = $env{'form.currentpos'} - 1; |
my $currentpos = $env{'form.currentpos'} - 1; |
Line 3917 sub order_meta_fields {
|
Line 3937 sub order_meta_fields {
|
foreach my $key (@fields_in_order) { |
foreach my $key (@fields_in_order) { |
$r->print('<tr><td>'); |
$r->print('<tr><td>'); |
$r->print('<form method="post" action="">'); |
$r->print('<form method="post" action="">'); |
$r->print('<select name="newpos" onchange="this.form.submit()">'); |
$r->print('<select name="newpos" onChange="this.form.submit()">'); |
for (my $i = 1;$i le $num_fields;$i ++) { |
for (my $i = 1;$i le $num_fields;$i ++) { |
if ($i eq $idx) { |
if ($i eq $idx) { |
$r->print('<option value="'.$i.'" SELECTED>('.$i.')</option>'); |
$r->print('<option value="'.$i.'" SELECTED>('.$i.')</option>'); |
Line 3933 sub order_meta_fields {
|
Line 3953 sub order_meta_fields {
|
$idx ++; |
$idx ++; |
} |
} |
$r->print('</table>'); |
$r->print('</table>'); |
|
&endSettingsScreen($r); |
return 'ok'; |
return 'ok'; |
} |
} |
|
|
Line 3954 sub addmetafield {
|
Line 3975 sub addmetafield {
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Add Metadata Field')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Add Metadata Field')); |
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'}; |
|
&startSettingsScreen($r,'parmset',$crstype); |
if (exists($env{'form.undelete'})) { |
if (exists($env{'form.undelete'})) { |
my @meta_fields = &Apache::loncommon::get_env_multiple('form.undeletefield'); |
my @meta_fields = &Apache::loncommon::get_env_multiple('form.undeletefield'); |
foreach my $meta_field(@meta_fields) { |
foreach my $meta_field(@meta_fields) { |
Line 3993 sub addmetafield {
|
Line 4016 sub addmetafield {
|
$r->print('<input type="submit" value="Add Metadata Field" />'); |
$r->print('<input type="submit" value="Add Metadata Field" />'); |
} |
} |
$r->print('</form>'); |
$r->print('</form>'); |
|
&endSettingsScreen($r); |
} |
} |
|
|
|
|
Line 4009 sub setrestrictmeta {
|
Line 4033 sub setrestrictmeta {
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Restrict Metadata')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Restrict Metadata')); |
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'}; |
|
&startSettingsScreen($r,'parmset',$crstype); |
my $key_base = $env{'course.'.$env{'request.course.id'}.'.'}; |
my $key_base = $env{'course.'.$env{'request.course.id'}.'.'}; |
my $save_field = ''; |
my $save_field = ''; |
if ($env{'form.restrictmeta'}) { |
if ($env{'form.restrictmeta'}) { |
Line 4079 ENDButtons
|
Line 4105 ENDButtons
|
$buttons |
$buttons |
</form> |
</form> |
ENDenv |
ENDenv |
|
&endSettingsScreen($r); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
return 'ok'; |
return 'ok'; |
} |
} |
Line 4119 sub defaultsetter {
|
Line 4146 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 $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
|
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
my $crstype = $env{'course.'.$env{'request.course.id'}.'.type'}; |
my $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($start_page.$breadcrumbs); |
$r->print($start_page.$breadcrumbs); |
|
&startSettingsScreen($r,'parmset',$crstype); |
$r->print('<form method="post" action="/adm/parmset?action=setdefaults" name="defaultform">'); |
$r->print('<form method="post" action="/adm/parmset?action=setdefaults" name="defaultform">'); |
|
|
my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
|
my $crs = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
my @ids=(); |
my @ids=(); |
my %typep=(); |
my %typep=(); |
my %keyp=(); |
my %keyp=(); |
Line 4180 sub defaultsetter {
|
Line 4209 sub defaultsetter {
|
foreach my $key (keys %allparms) { |
foreach my $key (keys %allparms) { |
$newrules{$key.'_triggers'}=$triggers{$key}; |
$newrules{$key.'_triggers'}=$triggers{$key}; |
} |
} |
&Apache::lonnet::put('parmdefactions',\%newrules,$dom,$crs); |
&Apache::lonnet::put('parmdefactions',\%newrules,$cdom,$cnum); |
&Apache::lonnet::del('parmdefactions',\@delrules,$dom,$crs); |
&Apache::lonnet::del('parmdefactions',\@delrules,$cdom,$cnum); |
&resetrulescache(); |
&resetrulescache(); |
} |
} |
my %lt=&Apache::lonlocal::texthash('days' => 'Days', |
my %lt=&Apache::lonlocal::texthash('days' => 'Days', |
Line 4269 ENDYESNO
|
Line 4298 ENDYESNO
|
$r->print(&Apache::loncommon::end_data_table(). |
$r->print(&Apache::loncommon::end_data_table(). |
"\n".'<input type="submit" name="storerules" value="'. |
"\n".'<input type="submit" name="storerules" value="'. |
&mt('Save').'" /></form>'."\n"); |
&mt('Save').'" /></form>'."\n"); |
|
&endSettingsScreen($r); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |
Line 4357 sub standard_parameter_types {
|
Line 4387 sub standard_parameter_types {
|
|
|
sub parm_change_log { |
sub parm_change_log { |
my ($r)=@_; |
my ($r)=@_; |
|
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
|
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
my $crstype = $env{'course.'.$env{'request.course.id'}.'.type'} |
&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 4366 sub parm_change_log {
|
Line 4399 sub parm_change_log {
|
'</script>'."\n"; |
'</script>'."\n"; |
$r->print(&Apache::loncommon::start_page('Parameter Change Log',$js)); |
$r->print(&Apache::loncommon::start_page('Parameter Change Log',$js)); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Parameter Change Log')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Parameter Change Log')); |
my %parmlog=&Apache::lonnet::dump('nohist_parameterlog', |
&startSettingsScreen($r,'parmset',$crstype); |
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
my %parmlog=&Apache::lonnet::dump('nohist_parameterlog',$cdom,$cnum); |
$env{'course.'.$env{'request.course.id'}.'.num'}); |
|
|
|
if ((keys(%parmlog))[0]=~/^error\:/) { undef(%parmlog); } |
if ((keys(%parmlog))[0]=~/^error\:/) { undef(%parmlog); } |
|
|
Line 4386 sub parm_change_log {
|
Line 4418 sub parm_change_log {
|
'<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 $courseopt=&Apache::lonnet::get_courseresdata($env{'course.'.$env{'request.course.id'}.'.num'}, |
my $courseopt=&Apache::lonnet::get_courseresdata($cnum,$cdom); |
$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><th>'.&mt('Announce').'</th>'. |
Line 4534 sub parm_change_log {
|
Line 4565 sub parm_change_log {
|
|| $shown<=$env{'form.show'})) { last; } |
|| $shown<=$env{'form.show'})) { last; } |
} |
} |
$r->print(&Apache::loncommon::end_data_table()); |
$r->print(&Apache::loncommon::end_data_table()); |
|
&endSettingsScreen($r); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} |
} |
|
|
Line 4582 sub update_slots {
|
Line 4614 sub update_slots {
|
context => 'parameter', |
context => 'parameter', |
); |
); |
&Apache::lonnet::write_log('course','slotreservationslog',\%storehash, |
&Apache::lonnet::write_log('course','slotreservationslog',\%storehash, |
'',$uname,$udom,$cnum,$cdom); |
'',$uname,$udom,$cnum,$cdom); |
|
|
&Apache::lonnet::write_log('course',$cdom.'_'.$cnum.'_slotlog',\%storehash, |
&Apache::lonnet::write_log('course',$cdom.'_'.$cnum.'_slotlog',\%storehash, |
'',$uname,$udom,$uname,$udom); |
'',$uname,$udom,$uname,$udom); |
} |
} |
return $success; |
return $success; |
} |
} |
Line 4616 sub delete_slots {
|
Line 4648 sub delete_slots {
|
context => 'parameter', |
context => 'parameter', |
); |
); |
&Apache::lonnet::write_log('course','slotreservationslog',\%storehash, |
&Apache::lonnet::write_log('course','slotreservationslog',\%storehash, |
1,$uname,$udom,$cnum,$cdom); |
1,$uname,$udom,$cnum,$cdom); |
&Apache::lonnet::write_log('course',$cdom.'_'.$cnum.'_slotlog',\%storehash, |
&Apache::lonnet::write_log('course',$cdom.'_'.$cnum.'_slotlog',\%storehash, |
1,$uname,$udom,$uname,$udom); |
1,$uname,$udom,$uname,$udom); |
} |
} |
} |
} |
} |
} |
Line 4661 sub oldversion_warning {
|
Line 4693 sub oldversion_warning {
|
lenient => 'string_lenient', |
lenient => 'string_lenient', |
retrypartial => 'string_yesno', |
retrypartial => 'string_yesno', |
discussvote => 'string_discussvote', |
discussvote => 'string_discussvote', |
examcode => 'string_examcode', |
|
); |
); |
if (exists($stringtypes{$name})) { |
if (exists($stringtypes{$name})) { |
if ($name eq 'examcode') { |
if (ref($strings{$stringtypes{$name}}) eq 'ARRAY') { |
$desc = $value; |
|
} elsif (ref($strings{$stringtypes{$name}}) eq 'ARRAY') { |
|
foreach my $possibilities (@{ $strings{$stringtypes{$name}} }) { |
foreach my $possibilities (@{ $strings{$stringtypes{$name}} }) { |
next unless (ref($possibilities) eq 'ARRAY'); |
next unless (ref($possibilities) eq 'ARRAY'); |
my ($parmval, $description) = @{ $possibilities }; |
my ($parmval, $description) = @{ $possibilities }; |