version 1.143, 2004/09/14 21:27:36
|
version 1.153, 2004/12/10 20:47:33
|
Line 934 sub editor {
|
Line 934 sub editor {
|
$comment=~s/\</\<\;/g; |
$comment=~s/\</\<\;/g; |
$comment=~s/\>/\>\;/g; |
$comment=~s/\>/\>\;/g; |
$comment=~s/\:/\:/g; |
$comment=~s/\:/\:/g; |
$Apache::lonratedt::resources[ |
if ($comment=~/\S/) { |
|
$Apache::lonratedt::resources[ |
$Apache::lonratedt::order[$idx]]= |
$Apache::lonratedt::order[$idx]]= |
$comment.':'.join(':',@rrest); |
$comment.':'.join(':',@rrest); |
|
} |
} |
} |
# Store the changed version |
# Store the changed version |
($errtext,$fatal)=&storemap($coursenum,$coursedom, |
($errtext,$fatal)=&storemap($coursenum,$coursedom, |
Line 988 sub editor {
|
Line 989 sub editor {
|
# ---------------------------------------------------------------- End commands |
# ---------------------------------------------------------------- End commands |
# ---------------------------------------------------------------- Print screen |
# ---------------------------------------------------------------- Print screen |
my $idx=0; |
my $idx=0; |
|
my $shown=0; |
$r->print('<table>'); |
$r->print('<table>'); |
foreach (@Apache::lonratedt::order) { |
foreach (@Apache::lonratedt::order) { |
my ($name,$url)=split(/\:/,$Apache::lonratedt::resources[$_]); |
my ($name,$url)=split(/\:/,$Apache::lonratedt::resources[$_]); |
unless ($name) { $name=(split(/\//,$url))[-1]; } |
unless ($name) { $name=(split(/\//,$url))[-1]; } |
unless ($name) { next; } |
unless ($name) { $idx++; next; } |
$r->print(&entryline($idx,$name,$url,$folder,$allowed,$_,$coursenum)); |
$r->print(&entryline($idx,$name,$url,$folder,$allowed,$_,$coursenum)); |
$idx++; |
$idx++; |
|
$shown++; |
} |
} |
unless ($idx) { |
unless ($shown) { |
$r->print('<tr><td>'.&mt('Currently no documents.').'</td></tr>'); |
$r->print('<tr><td>'.&mt('Currently no documents.').'</td></tr>'); |
} |
} |
$r->print('</table>'); |
$r->print('</table>'); |
Line 1146 END
|
Line 1149 END
|
} elsif ($url!~/\.(sequence|page)$/) { |
} elsif ($url!~/\.(sequence|page)$/) { |
$url='/adm/coursedocs/showdoc'.$url; |
$url='/adm/coursedocs/showdoc'.$url; |
} |
} |
|
} elsif ($url=~m|^/ext/|) { |
|
$url='/adm/wrapper'.$url; |
} |
} |
unless ($container eq 'page') { |
$url.=(($url=~/\?/)?'&':'?').'symb='.&Apache::lonnet::escape($symb); |
|
if ($container eq 'page') { |
|
my $symb=$ENV{'form.pagesymb'}; |
|
|
|
$url=&Apache::lonnet::clutter((&Apache::lonnet::decode_symb($symb))[2]); |
$url.=(($url=~/\?/)?'&':'?').'symb='.&Apache::lonnet::escape($symb); |
$url.=(($url=~/\?/)?'&':'?').'symb='.&Apache::lonnet::escape($symb); |
} |
} |
} |
} |
my $parameterset=' '; |
my $parameterset=' '; |
if ($isfolder) { |
if ($isfolder) { |
Line 1158 END
|
Line 1167 END
|
if ($folderpath) { $folderpath.='&' }; |
if ($folderpath) { $folderpath.='&' }; |
$folderpath.=$folderarg.'&'.$foldername; |
$folderpath.=$folderarg.'&'.$foldername; |
$url.='folderpath='.&Apache::lonnet::escape($folderpath); |
$url.='folderpath='.&Apache::lonnet::escape($folderpath); |
$parameterset=&mt('Randomly Pick: '). |
$parameterset='<label>'.&mt('Randomly Pick: '). |
'<input type="text" size="4" name="randpick_'.$orderidx.'" value="'. |
'<input type="text" size="4" name="randpick_'.$orderidx.'" value="'. |
(&Apache::lonratedt::getparameter($orderidx,'parameter_randompick'))[0].'" />'; |
(&Apache::lonratedt::getparameter($orderidx, |
|
'parameter_randompick'))[0]. |
|
'" />'.'</label>'; |
|
|
} |
} |
if ($ispage) { |
if ($ispage) { |
my $pagename=&Apache::lonnet::escape($pagetitle); |
my $pagename=&Apache::lonnet::escape($pagetitle); |
Line 1168 END
|
Line 1180 END
|
my $folderpath=$ENV{'form.folderpath'}; |
my $folderpath=$ENV{'form.folderpath'}; |
if ($folderpath) { $pagepath = $folderpath.'&' }; |
if ($folderpath) { $pagepath = $folderpath.'&' }; |
$pagepath.=$pagearg.'&'.$pagename; |
$pagepath.=$pagearg.'&'.$pagename; |
$url.='pagepath='.&Apache::lonnet::escape($pagepath); |
my $symb=$ENV{'form.pagesymb'}; |
|
if (!$symb) { |
|
my $path='uploaded/'. |
|
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}.'/'. |
|
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}.'/'; |
|
$symb=&Apache::lonnet::encode_symb($path.$folder.'.sequence', |
|
$residx, |
|
$path.$pagearg.'.page'); |
|
} |
|
$url.='pagepath='.&Apache::lonnet::escape($pagepath). |
|
'&pagesymb='.&Apache::lonnet::escape($symb); |
} |
} |
|
&Apache::lonnet::logthis(" link \n$url"); |
$line.='<td bgcolor="#FFFFBB"><a href="'.$url.'"><img src="'.$icon. |
$line.='<td bgcolor="#FFFFBB"><a href="'.$url.'"><img src="'.$icon. |
'" border="0"></a></td>'. |
'" border="0"></a></td>'. |
"<td bgcolor='#FFFFBB'><a href='$url'>$title</a></td>"; |
"<td bgcolor='#FFFFBB'><a href='$url'>$title</a></td>"; |
Line 1184 END
|
Line 1207 END
|
((&Apache::lonratedt::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i?' checked="1"':''); |
((&Apache::lonratedt::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i?' checked="1"':''); |
$line.=(<<ENDPARMS); |
$line.=(<<ENDPARMS); |
<td bgcolor="#BBBBFF"><font size='-2'> |
<td bgcolor="#BBBBFF"><font size='-2'> |
<input type="checkbox" name="hidprs_$orderidx" $hidtext/> $lt{'hd'}</td> |
<nobr><label><input type="checkbox" name="hidprs_$orderidx" $hidtext/> $lt{'hd'}</label></nobr></td> |
<!--<td bgcolor="#BBBBFF"><font size='-2'> |
<td bgcolor="#BBBBFF"><font size='-2'> |
<input type="checkbox" name="encprs_$orderidx" $enctext/> $lt{'ec'}</td>--> |
<nobr><label><input type="checkbox" name="encprs_$orderidx" $enctext/> $lt{'ec'}</label></nobr></td> |
<td bgcolor="#BBBBFF"><font size="-2">$parameterset</font></td> |
<td bgcolor="#BBBBFF"><font size="-2">$parameterset</font></td> |
<td bgcolor="#BBBBFF"><font size='-2'> |
<td bgcolor="#BBBBFF"><font size='-2'> |
<input type="submit" value="$lt{'sp'}" /> |
<input type="submit" value="$lt{'sp'}" /> |
Line 1599 sub is_hash_old {
|
Line 1622 sub is_hash_old {
|
sub changewarning { |
sub changewarning { |
my ($r,$postexec)=@_; |
my ($r,$postexec)=@_; |
if (!&is_hash_old()) { return; } |
if (!&is_hash_old()) { return; } |
|
my $pathvar='folderpath'; |
|
my $path=&Apache::lonnet::escape($ENV{'form.folderpath'}); |
|
if (defined($ENV{'form.pagepath'})) { |
|
$pathvar='pagepath'; |
|
$path=&Apache::lonnet::escape($ENV{'form.pagepath'}); |
|
} |
$r->print( |
$r->print( |
'<script>function reinit(tf) { tf.submit();'.$postexec.' }</script>'. |
'<script>function reinit(tf) { tf.submit();'.$postexec.' }</script>'. |
'<form method="post" action="/adm/roles" target="loncapaclient">'. |
'<form method="post" action="/adm/roles" target="loncapaclient">'. |
'<input type="hidden" name="orgurl" value="/adm/coursedocs?folderpath='. |
'<input type="hidden" name="orgurl" value="/adm/coursedocs?'. |
&Apache::lonnet::escape($ENV{'form.folderpath'}). |
$pathvar.'='.$path. |
'" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">'. |
'" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">'. |
&mt('Changes will become active for your current session after'). |
&mt('Changes will become active for your current session after'). |
' <input type="hidden" name="'. |
' <input type="hidden" name="'. |
Line 1662 sub handler {
|
Line 1691 sub handler {
|
my $containertag; |
my $containertag; |
my $uploadtag; |
my $uploadtag; |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['folderpath','pagepath']); |
['folderpath','pagepath','pagesymb']); |
if ($ENV{'form.folderpath'}) { |
if ($ENV{'form.folderpath'}) { |
my (@folderpath)=split('&',$ENV{'form.folderpath'}); |
my (@folderpath)=split('&',$ENV{'form.folderpath'}); |
$ENV{'form.foldername'}=&Apache::lonnet::unescape(pop(@folderpath)); |
$ENV{'form.foldername'}=&Apache::lonnet::unescape(pop(@folderpath)); |