version 1.122, 2003/09/04 01:09:04
|
version 1.132, 2003/10/09 16:30:00
|
Line 61 use Apache::loncommon;
|
Line 61 use Apache::loncommon;
|
use GDBM_File; |
use GDBM_File; |
use Apache::lonhomework; |
use Apache::lonhomework; |
use Apache::lonxml; |
use Apache::lonxml; |
|
use Apache::lonlocal; |
|
|
my %courseopt; |
my %courseopt; |
my %useropt; |
my %useropt; |
Line 653 sub assessparms {
|
Line 653 sub assessparms {
|
|
|
my $r=shift; |
my $r=shift; |
# -------------------------------------------------------- Variable declaration |
# -------------------------------------------------------- Variable declaration |
my %allkeys; |
my %allkeys=(); |
my %allmaps; |
my %allmaps=(); |
my %alllevs; |
my %alllevs=(); |
|
|
$alllevs{'Resource Level'}='full'; |
$alllevs{'Resource Level'}='full'; |
# $alllevs{'Resource Level [BRIEF]'}='brief'; |
# $alllevs{'Resource Level [BRIEF]'}='brief'; |
Line 864 sub assessparms {
|
Line 864 sub assessparms {
|
$message.="<font color=red>Write Error: $1</font>"; |
$message.="<font color=red>Write Error: $1</font>"; |
} |
} |
# ---------------------------------------------------------------- Done storing |
# ---------------------------------------------------------------- Done storing |
$message.='<h3>Changes can take up to 10 minutes before being active for all students.'.&Apache::loncommon::help_open_topic('Caching').'</h3>'; |
$message.='<h3>'.&mt('Changes can take up to 10 minutes before being active for all students.').&Apache::loncommon::help_open_topic('Caching').'</h3>'; |
} |
} |
# --------------------------------------------- Devalidate cache for this child |
# --------------------------------------------- Devalidate cache for this child |
&Apache::lonnet::devalidatecourseresdata( |
&Apache::lonnet::devalidatecourseresdata( |
Line 923 sub assessparms {
|
Line 923 sub assessparms {
|
|
|
$r->print('<h2>'.$message.'</h2><table>'); |
$r->print('<h2>'.$message.'</h2><table>'); |
|
|
my $submitmessage = 'Update Section or Specific User'; |
my $submitmessage = &mt('Update Section or Specific User'); |
if (!$pssymb) { |
if (!$pssymb) { |
$r->print('<tr><td>Select Parameter Level</td><td colspan="2">'); |
$r->print('<tr><td>'.&mt('Select Parameter Level').'</td><td colspan="2">'); |
$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{$_}.'"'); |
Line 937 sub assessparms {
|
Line 937 sub assessparms {
|
$r->print("</select></td>\n"); |
$r->print("</select></td>\n"); |
|
|
$r->print('</tr>'); |
$r->print('</tr>'); |
|
if ($parmlev ne 'general') { |
$r->print('<tr><td>Select Enclosing Map or Folder</td>'); |
$r->print('<tr><td>'.&mt('Select Enclosing Map or Folder').'</td>'); |
$r->print('<td colspan="2"><select name="pschp">'); |
$r->print('<td colspan="2"><select name="pschp">'); |
$r->print('<option value="all">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) { |
$r->print('<option value="'.$_.'"'); |
$r->print('<option value="'.$_.'"'); |
if (($pschp eq $_)) { $r->print(' selected'); } |
if (($pschp eq $_)) { $r->print(' selected'); } |
$r->print('>'.$maptitles{$_}.($allmaps{$_}!~/^uploaded/?' ['.$allmaps{$_}.']':'').'</option>'); |
$r->print('>'.$maptitles{$_}.($allmaps{$_}!~/^uploaded/?' ['.$allmaps{$_}.']':'').'</option>'); |
} |
} |
$r->print("</select></td></tr>\n"); |
$r->print("</select></td></tr>\n"); |
|
} |
} else { |
} else { |
my ($map,$id,$resource)=split(/___/,$pssymb); |
my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb); |
$r->print("<tr><td>Specific Resource</td><td>$resource</td>"); |
$r->print("<tr><td>".&mt('Specific Resource')."</td><td>$resource</td>"); |
$r->print('<td><input type="submit" name="dis" value="'.$submitmessage.'"></td>'); |
$r->print('<td><input type="submit" name="dis" value="'.$submitmessage.'"></td>'); |
$r->print('</tr>'); |
$r->print('</tr>'); |
$r->print('<input type="hidden" value="'.$pssymb.'" name="symb">'); |
$r->print('<input type="hidden" value="'.$pssymb.'" name="symb">'); |
Line 957 sub assessparms {
|
Line 958 sub assessparms {
|
|
|
$r->print('<tr><td colspan="3"><hr /><input type="checkbox"'); |
$r->print('<tr><td colspan="3"><hr /><input type="checkbox"'); |
if ($showoptions eq 'show') {$r->print(" checked ");} |
if ($showoptions eq 'show') {$r->print(" checked ");} |
$r->print(' name="showoptions" value="show">Show More Options<hr /></td></tr>'); |
$r->print(' name="showoptions" value="show">'.&mt('Show More Options').'<hr /></td></tr>'); |
# $r->print("<tr><td>Show: $showoptions</td></tr>"); |
# $r->print("<tr><td>Show: $showoptions</td></tr>"); |
# $r->print("<tr><td>pscat: @pscat</td></tr>"); |
# $r->print("<tr><td>pscat: @pscat</td></tr>"); |
# $r->print("<tr><td>psprt: @psprt</td></tr>"); |
# $r->print("<tr><td>psprt: @psprt</td></tr>"); |
Line 966 sub assessparms {
|
Line 967 sub assessparms {
|
if ($showoptions eq 'show') { |
if ($showoptions eq 'show') { |
my $tempkey; |
my $tempkey; |
|
|
$r->print('<tr><td colspan="3" align="center">Select Parameters to View</td></tr>'); |
$r->print('<tr><td colspan="3" align="center">'.&mt('Select Parameters to View').'</td></tr>'); |
|
|
$r->print('<tr><td colspan="2"><table>'); |
$r->print('<tr><td colspan="2"><table>'); |
$r->print('<tr><td><input type="checkbox" name="pscat" value="all"'); |
$r->print('<tr><td><input type="checkbox" name="pscat" value="all"'); |
$r->print(' checked') unless (@pscat); |
$r->print(' checked') unless (@pscat); |
$r->print('>All Parameters</td>'); |
$r->print('>'.&mt('All Parameters').'</td>'); |
|
|
my $cnt=0; |
my $cnt=0; |
foreach $tempkey (sort { $allparms{$a} cmp $allparms{$b} } |
foreach $tempkey (sort { $allparms{$a} cmp $allparms{$b} } |
Line 991 sub assessparms {
|
Line 992 sub assessparms {
|
$r->print('<td><select multiple name="psprt" size="5">'); |
$r->print('<td><select multiple name="psprt" size="5">'); |
$r->print('<option value="all"'); |
$r->print('<option value="all"'); |
$r->print(' selected') unless (@psprt); |
$r->print(' selected') unless (@psprt); |
$r->print('>All Parts</option>'); |
$r->print('>'.&mt('All Parts').'</option>'); |
my %temphash=(); |
my %temphash=(); |
foreach (@psprt) { $temphash{$_}=1; } |
foreach (@psprt) { $temphash{$_}=1; } |
foreach $tempkey (sort keys %allparts) { |
foreach $tempkey (sort keys %allparts) { |
Line 1005 sub assessparms {
|
Line 1006 sub assessparms {
|
} |
} |
$r->print('</select></td></tr><tr><td colspan="3"><hr /></td></tr>'); |
$r->print('</select></td></tr><tr><td colspan="3"><hr /></td></tr>'); |
|
|
$r->print('<tr><td>Sort list by</td><td>'); |
$r->print('<tr><td>'.&mt('Sort list by').'</td><td>'); |
$r->print('<select name="fcat">'); |
$r->print('<select name="fcat">'); |
$r->print('<option value="">Enclosing Map or Folder</option>'); |
$r->print('<option value="">'.&mt('Enclosing Map or Folder').'</option>'); |
foreach (sort keys %allkeys) { |
foreach (sort keys %allkeys) { |
$r->print('<option value="'.$_.'"'); |
$r->print('<option value="'.$_.'"'); |
if ($fcat eq $_) { $r->print(' selected'); } |
if ($fcat eq $_) { $r->print(' selected'); } |
Line 1044 sub assessparms {
|
Line 1045 sub assessparms {
|
} |
} |
$r->print('</table><br />'); |
$r->print('</table><br />'); |
if (($prevvisit) || ($pschp) || ($pssymb)) { |
if (($prevvisit) || ($pschp) || ($pssymb)) { |
$submitmessage = "Update Course Assessment Parameter Display"; |
$submitmessage = &mt("Update Course Assessment Parameter Display"); |
} else { |
} else { |
$submitmessage = "Set/Modify Course Assessment Parameters"; |
$submitmessage = &mt("Set/Modify Course Assessment Parameters"); |
} |
} |
$r->print('<input type="submit" name="dis" value="'.$submitmessage.'">'); |
$r->print('<input type="submit" name="dis" value="'.$submitmessage.'">'); |
|
|
Line 1075 sub assessparms {
|
Line 1076 sub assessparms {
|
my $coursespan=$csec?8:5; |
my $coursespan=$csec?8:5; |
$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).'>Any User</th>'); |
$r->print('<th colspan='.($coursespan).'>'.&mt('Any User').'</th>'); |
if ($uname) { |
if ($uname) { |
$r->print("<th colspan=3 rowspan=2>"); |
$r->print("<th colspan=3 rowspan=2>"); |
$r->print("User $uname at Domain $udom</th>"); |
$r->print(&mt("User")." $uname ".&mt('at Domain')." $udom</th>"); |
} |
} |
$r->print(<<ENDTABLETWO); |
$r->print(<<ENDTABLETWO); |
<th rowspan=3>Parameter in Effect</th> |
<th rowspan=3>Parameter in Effect</th> |
Line 1097 ENDTABLETWO
|
Line 1098 ENDTABLETWO
|
ENDTABLEHEADFOUR |
ENDTABLEHEADFOUR |
|
|
if ($csec) { |
if ($csec) { |
$r->print('<th>general</th><th>for Enclosing Map or Folder</th><th>for Resource</th>'); |
$r->print('<th>'.&mt('general').'</th><th>'.&mt('for Enclosing Map or Folder').'</th><th>'.&mt('for Resource').'</th>'); |
} |
} |
|
|
if ($uname) { |
if ($uname) { |
$r->print('<th>general</th><th>for Enclosing Map or Folder</th><th>for Resource</th>'); |
$r->print('<th>'.&mt('general').'</th><th>'.&mt('for Enclosing Map or Folder').'</th><th>'.&mt('for Resource').'</th>'); |
} |
} |
|
|
$r->print('</tr>'); |
$r->print('</tr>'); |
Line 1152 ENDTABLEHEADFOUR
|
Line 1153 ENDTABLEHEADFOUR
|
my $totalparms=scalar keys %name; |
my $totalparms=scalar keys %name; |
if ($totalparms>0) { |
if ($totalparms>0) { |
my $firstrow=1; |
my $firstrow=1; |
|
my $title=$bighash{'title_'.$rid}; |
|
$title=~s/\:/:/g; |
$r->print('<tr><td bgcolor='.$defbgone. |
$r->print('<tr><td bgcolor='.$defbgone. |
' rowspan='.$totalparms. |
' rowspan='.$totalparms. |
'><tt><font size=-1>'. |
'><tt><font size=-1>'. |
Line 1160 ENDTABLEHEADFOUR
|
Line 1162 ENDTABLEHEADFOUR
|
'</font></tt><p><b>'. |
'</font></tt><p><b>'. |
"<a href=\"javascript:openWindow('/res/".$uri. |
"<a href=\"javascript:openWindow('/res/".$uri. |
"', 'metadatafile', '450', '500', 'no', 'yes')\";". |
"', 'metadatafile', '450', '500', 'no', 'yes')\";". |
" TARGET=_self>$bighash{'title_'.$rid}"); |
" TARGET=_self>$title"); |
|
|
if ($thistitle) { |
if ($thistitle) { |
$r->print(' ('.$thistitle.')'); |
$r->print(' ('.$thistitle.')'); |
Line 1275 ENDMAPONE
|
Line 1277 ENDMAPONE
|
('firstname','middlename','lastname','generation', 'id')); |
('firstname','middlename','lastname','generation', 'id')); |
my $person=$name{'firstname'}.' '.$name{'middlename'}.' ' |
my $person=$name{'firstname'}.' '.$name{'middlename'}.' ' |
.$name{'lastname'}.' '.$name{'generation'}; |
.$name{'lastname'}.' '.$name{'generation'}; |
$r->print("User <i>$uname \($person\) </i> in \n"); |
$r->print(&mt("User")." <i>$uname \($person\) </i> ". |
|
&mt('in')." \n"); |
} else { |
} else { |
$r->print("<i>all</i> users in \n"); |
$r->print("<i>".&mt('all').'</i> '.&mt('users in')." \n"); |
} |
} |
|
|
if ($csec) {$r->print("Section <i>$csec</i> of \n")}; |
if ($csec) {$r->print(&mt("Section")." <i>$csec</i> ". |
|
&mt('of')." \n")}; |
|
|
$r->print("<i>$coursename</i><br />"); |
$r->print("<i>$coursename</i><br />"); |
$r->print("</font></h4>\n"); |
$r->print("</font></h4>\n"); |
#---------------------------------------------------------------- print table |
#---------------------------------------------------------------- print table |
$r->print('<p><table border="2">'); |
$r->print('<p><table border="2">'); |
$r->print('<tr><th>Parameter Name</th>'); |
$r->print('<tr><th>'.&mt('Parameter Name').'</th>'); |
$r->print('<th>Default Value</th>'); |
$r->print('<th>'.&mt('Default Value').'</th>'); |
$r->print('<th>Parameter in Effect</th></tr>'); |
$r->print('<th>'.&mt('Parameter in Effect').'</th></tr>'); |
|
|
foreach (sort keys %name) { |
foreach (sort keys %name) { |
&print_row($r,$_,\%part,\%name,$mapid,\%default, |
&print_row($r,$_,\%part,\%name,$mapid,\%default, |
Line 1354 ENDMAPONE
|
Line 1358 ENDMAPONE
|
('firstname','middlename','lastname','generation', 'id')); |
('firstname','middlename','lastname','generation', 'id')); |
my $person=$name{'firstname'}.' '.$name{'middlename'}.' ' |
my $person=$name{'firstname'}.' '.$name{'middlename'}.' ' |
.$name{'lastname'}.' '.$name{'generation'}; |
.$name{'lastname'}.' '.$name{'generation'}; |
$r->print(" User <i>$uname \($person\) </i> \n"); |
$r->print(" ".&mt("User")." <i>$uname \($person\) </i> \n"); |
} else { |
} else { |
$r->print("<i>ALL</i> USERS \n"); |
$r->print("<i>".&mt("ALL")."</i> ".&mt("USERS")." \n"); |
} |
} |
|
|
if ($csec) {$r->print("Section <i>$csec</i>\n")}; |
if ($csec) {$r->print(&mt("Section")." <i>$csec</i>\n")}; |
$r->print("</font></h4>\n"); |
$r->print("</font></h4>\n"); |
#---------------------------------------------------------------- print table |
#---------------------------------------------------------------- print table |
$r->print('<p><table border="2">'); |
$r->print('<p><table border="2">'); |
$r->print('<tr><th>Parameter Name</th>'); |
$r->print('<tr><th>'.&mt('Parameter Name').'</th>'); |
$r->print('<th>Default Value</th>'); |
$r->print('<th>'.&mt('Default Value').'</th>'); |
$r->print('<th>Parameter in Effect</th></tr>'); |
$r->print('<th>'.&mt('Parameter in Effect').'</th></tr>'); |
|
|
foreach (sort keys %name) { |
foreach (sort keys %name) { |
&print_row($r,$_,\%part,\%name,$mapid,\%default, |
&print_row($r,$_,\%part,\%name,$mapid,\%default, |
Line 1421 sub crsenv {
|
Line 1425 sub crsenv {
|
my $bkuptime=time; |
my $bkuptime=time; |
my @tmp = &Apache::lonnet::get |
my @tmp = &Apache::lonnet::get |
('environment',['url'],$dom,$crs); |
('environment',['url'],$dom,$crs); |
$setoutput.='Backing up previous URL: '. |
$setoutput.=&mt('Backing up previous URL').': '. |
&Apache::lonnet::put |
&Apache::lonnet::put |
('environment', |
('environment', |
{'top level map backup '.$bkuptime => $tmp[1] }, |
{'top level map backup '.$bkuptime => $tmp[1] }, |
Line 1460 sub crsenv {
|
Line 1464 sub crsenv {
|
my $put_result = &Apache::lonnet::put('environment', |
my $put_result = &Apache::lonnet::put('environment', |
{$name=>$value},$dom,$crs); |
{$name=>$value},$dom,$crs); |
if ($put_result eq 'ok') { |
if ($put_result eq 'ok') { |
$setoutput.='Set <b>'.$name.'</b> to <b>'.$value.'</b>.<br />'; |
$setoutput.=&mt('Set').' <b>'.$name.'</b> '.&mt('to').' <b>'.$value.'</b>.<br />'; |
} else { |
} else { |
$setoutput.='Unable to set <b>'.$name.'</b> to '. |
$setoutput.=&mt('Unable to set').' <b>'.$name.'</b> '.&mt('to'). |
'<b>'.$value.'</b> due to '.$put_result.'.<br />'; |
' <b>'.$value.'</b> '.&mt('due to').' '.$put_result.'.<br />'; |
} |
} |
} |
} |
} |
} |
Line 1614 sub crsenv {
|
Line 1618 sub crsenv {
|
my $onchange = 'onFocus="javascript:window.document.forms'. |
my $onchange = 'onFocus="javascript:window.document.forms'. |
'[\'envform\'].elements[\'newp_setparmval\']'. |
'[\'envform\'].elements[\'newp_setparmval\']'. |
'.checked=true;"'; |
'.checked=true;"'; |
$output.='<tr><td><i>Create New Environment Variable</i><br />'. |
$output.='<tr><td><i>'.&mt('Create New Environment Variable').'</i><br />'. |
'<input type="text" size=40 name="newp_name" '. |
'<input type="text" size=40 name="newp_name" '. |
$onchange.' /></td><td>'. |
$onchange.' /></td><td>'. |
'<input type="text" size=40 name="newp_value" '. |
'<input type="text" size=40 name="newp_value" '. |
Line 1666 ENDENV
|
Line 1670 ENDENV
|
} |
} |
################################################## |
################################################## |
|
|
|
my $tableopen; |
|
|
|
sub tablestart { |
|
if ($tableopen) { |
|
return ''; |
|
} else { |
|
$tableopen=1; |
|
return '<table border="2"><tr><th>'.&mt('Parameter').'</th><th>'. |
|
&mt('Delete').'</th><th>'.&mt('Set to ...').'</th></tr>'; |
|
} |
|
} |
|
|
|
sub tableend { |
|
if ($tableopen) { |
|
$tableopen=0; |
|
return '</table>'; |
|
} else { |
|
return''; |
|
} |
|
} |
|
|
sub overview { |
sub overview { |
my $r=shift; |
my $r=shift; |
my $bodytag=&Apache::loncommon::bodytag( |
my $bodytag=&Apache::loncommon::bodytag( |
Line 1678 sub overview {
|
Line 1703 sub overview {
|
<title>LON-CAPA Course Environment</title> |
<title>LON-CAPA Course Environment</title> |
</head> |
</head> |
$bodytag |
$bodytag |
<form method="post" action="/adm/parmset" name="overview"> |
<form method="post" action="/adm/parmset" name="overviewform"> |
<input type="hidden" name="overview" value="1" /> |
<input type="hidden" name="overview" value="1" /> |
ENDOVER |
ENDOVER |
|
# Setting |
|
my %olddata=&Apache::lonnet::dump('resourcedata',$dom,$crs); |
|
my %newdata=(); |
|
undef %newdata; |
|
my @deldata=(); |
|
undef @deldata; |
|
foreach (keys %ENV) { |
|
if ($_=~/^form\.([a-z]+)\_(.+)$/) { |
|
my $cmd=$1; |
|
my $thiskey=$2; |
|
if ($cmd eq 'set') { |
|
my $data=$ENV{$_}; |
|
if ($olddata{$thiskey} ne $data) { $newdata{$thiskey}=$data; } |
|
} elsif ($cmd eq 'del') { |
|
push (@deldata,$thiskey); |
|
} elsif ($cmd eq 'datepointer') { |
|
my $data=&Apache::lonhtmlcommon::get_date_from_form($ENV{$_}); |
|
if ($olddata{$thiskey} ne $data) { $newdata{$thiskey}=$data; } |
|
} |
|
} |
|
} |
|
# Store |
|
&Apache::lonnet::del('resourcedata',\@deldata,$dom,$crs); |
|
&Apache::lonnet::put('resourcedata',\%newdata,$dom,$crs); |
# Read and display |
# Read and display |
my %resourcedata=&Apache::lonnet::dump('resourcedata',$dom,$crs); |
my %resourcedata=&Apache::lonnet::dump('resourcedata',$dom,$crs); |
my $oldsection=''; |
my $oldsection=''; |
my $oldrealm=''; |
my $oldrealm=''; |
my $oldpart=''; |
my $oldpart=''; |
|
my $pointer=0; |
|
$tableopen=0; |
foreach my $thiskey (sort keys %resourcedata) { |
foreach my $thiskey (sort keys %resourcedata) { |
my ($course,$middle,$part,$name)= |
if ($resourcedata{$thiskey.'.type'}) { |
($thiskey=~/^(\w+)\.(.*)\.*([\w\s]+)\.(\w+)$/); |
my ($course,$middle,$part,$name)= |
unless ($name eq 'type') { |
($thiskey=~/^(\w+)\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/); |
my $section='All Students'; |
my $section=&mt('All Students'); |
if ($middle=~/^\[(.*)\]\./) { |
if ($middle=~/^\[(.*)\]\./) { |
$section='Group/Section: '.$1; |
$section=&mt('Group/Section').': '.$1; |
$middle=~s/^\[(.*)\]\.//; |
$middle=~s/^\[(.*)\]\.//; |
} |
} |
my $realm='All Resources'; |
$middle=~s/\.$//; |
|
my $realm='<font color="red">'.&mt('All Resources').'</font>'; |
if ($middle=~/^(.+)\_\_\_\(all\)$/) { |
if ($middle=~/^(.+)\_\_\_\(all\)$/) { |
$realm='Folder/Map: '.$1; |
$realm='<font color="green">'.&mt('Folder/Map').': '.&Apache::lonnet::gettitle($1).'</font>'; |
} elsif ($middle) { |
} elsif ($middle) { |
$realm='Resource: '.$middle; |
$realm='<font color="orange">'.&mt('Resource').': '.&Apache::lonnet::gettitle($middle).'</font>'; |
} |
} |
if ($section ne $oldsection) { |
if ($section ne $oldsection) { |
$r->print("\n<hr /><h1>$section</h1>"); |
$r->print(&tableend()."\n<hr /><h1>$section</h1>"); |
$oldsection=$section; |
$oldsection=$section; |
$oldrealm=''; |
$oldrealm=''; |
} |
} |
if ($realm ne $oldrealm) { |
if ($realm ne $oldrealm) { |
$r->print("\n<h2>$realm</h2>"); |
$r->print(&tableend()."\n<h2>$realm</h2>"); |
$oldrealm=$realm; |
$oldrealm=$realm; |
$oldpart=''; |
$oldpart=''; |
} |
} |
if ($part ne $oldpart) { |
if ($part ne $oldpart) { |
$r->print("\n<h3>Part: $part</h3>"); |
$r->print(&tableend(). |
|
"\n<h3><font color='blue'>".&mt('Part').": $part</font></h3>"); |
$oldpart=$part; |
$oldpart=$part; |
} |
} |
|
# |
$r->print('<br />'.$name.': '.$thiskey.' = '.$resourcedata{$thiskey}); |
# Ready to print |
|
# |
|
$r->print(&tablestart().'<tr><td><b>'.$name. |
|
':</b></td><td><input type="checkbox" name="del_'. |
|
$thiskey.'" /></td><td>'); |
|
if ($resourcedata{$thiskey.'.type'}=~/^date/) { |
|
my $jskey='key_'.$pointer; |
|
$pointer++; |
|
$r->print( |
|
&Apache::lonhtmlcommon::date_setter('overviewform', |
|
$jskey, |
|
$resourcedata{$thiskey}). |
|
'<input type="hidden" name="datepointer_'.$thiskey.'" value="'.$jskey.'" />' |
|
); |
|
} else { |
|
$r->print( |
|
'<input type="text" name="set_'.$thiskey.'" value="'. |
|
$resourcedata{$thiskey}.'">'); |
|
} |
|
$r->print('</td></tr>'); |
} |
} |
} |
} |
$r->print('</form></body></html>'); |
|
|
$r->print(&tableend(). |
|
'<p><input type="submit" value="'.&mt('Modify Parameters').'" /></p></form></body></html>'); |
} |
} |
|
|
################################################## |
################################################## |
Line 1740 sub handler {
|
Line 1814 sub handler {
|
my $r=shift; |
my $r=shift; |
|
|
if ($r->header_only) { |
if ($r->header_only) { |
$r->content_type('text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
return OK; |
return OK; |
} |
} |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}); |
|
|
|
# ----------------------------------------------------------- Clear out garbage |
|
|
|
%courseopt=(); |
|
%useropt=(); |
|
%parmhash=(); |
|
|
|
@ids=(); |
|
%symbp=(); |
|
%mapp=(); |
|
%typep=(); |
|
%keyp=(); |
|
|
|
%maptitles=(); |
|
|
# ----------------------------------------------------- Needs to be in a course |
# ----------------------------------------------------- Needs to be in a course |
|
|
if (($ENV{'request.course.id'}) && |
if (($ENV{'request.course.id'}) && |
(&Apache::lonnet::allowed('opa',$ENV{'request.course.id'}))) { |
(&Apache::lonnet::allowed('opa',$ENV{'request.course.id'}))) { |
|
|
$r->content_type('text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
|
|
$coursename=$ENV{'course.'.$ENV{'request.course.id'}.'.description'}; |
$coursename=$ENV{'course.'.$ENV{'request.course.id'}.'.description'}; |