version 1.144, 2004/09/18 17:03:25
|
version 1.147, 2004/09/27 15:20:23
|
Line 1147 END
|
Line 1147 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') { |
unless ($container eq 'page') { |
$url.=(($url=~/\?/)?'&':'?').'symb='.&Apache::lonnet::escape($symb); |
$url.=(($url=~/\?/)?'&':'?').'symb='.&Apache::lonnet::escape($symb); |
Line 1159 END
|
Line 1161 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 1185 END
|
Line 1190 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 1203 ENDPARMS
|
Line 1208 ENDPARMS
|
sub tiehash { |
sub tiehash { |
my ($mode)=@_; |
my ($mode)=@_; |
$hashtied=0; |
$hashtied=0; |
|
&Apache::lonnet::logthis(" tiehash1 -- $hashtied "); |
if ($ENV{'request.course.fn'}) { |
if ($ENV{'request.course.fn'}) { |
|
&Apache::lonnet::logthis(" tiehash2 -- $hashtied "); |
if ($mode eq 'write') { |
if ($mode eq 'write') { |
|
&Apache::lonnet::logthis(" tiehash3 -- $hashtied "); |
if (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.".db", |
if (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.".db", |
&GDBM_WRCREAT(),0640)) { |
&GDBM_WRCREAT(),0640)) { |
$hashtied=2; |
$hashtied=2; |
|
&Apache::lonnet::logthis(" tiehash4 -- $hashtied "); |
} |
} |
} else { |
} else { |
|
&Apache::lonnet::logthis(" tiehash5 -- $hashtied "); |
if (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.".db", |
if (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.".db", |
&GDBM_READER(),0640)) { |
&GDBM_READER(),0640)) { |
$hashtied=1; |
$hashtied=1; |
|
&Apache::lonnet::logthis(" tiehash6 -- $hashtied "); |
} |
} |
} |
} |
} |
} |
|
&Apache::lonnet::logthis(" tiehash7 -- $hashtied "); |
} |
} |
|
|
sub untiehash { |
sub untiehash { |
|
&Apache::lonnet::logthis(" untiehash1 -- $hashtied "); |
if ($hashtied) { untie %hash; } |
if ($hashtied) { untie %hash; } |
$hashtied=0; |
$hashtied=0; |
|
&Apache::lonnet::logthis(" untiehash2 -- $hashtied "); |
} |
} |
|
|
# --------------------------------------------------------------- check on this |
# --------------------------------------------------------------- check on this |
Line 1576 ENDHEADERS
|
Line 1590 ENDHEADERS
|
|
|
sub mark_hash_old { |
sub mark_hash_old { |
my $retie_hash=0; |
my $retie_hash=0; |
|
&Apache::lonnet::logthis(" markold1 -- $hashtied $retie_hash "); |
if ($hashtied) { |
if ($hashtied) { |
$retie_hash=1; |
$retie_hash=1; |
|
&Apache::lonnet::logthis(" markold2 -- $hashtied $retie_hash "); |
&untiehash(); |
&untiehash(); |
|
&Apache::lonnet::logthis(" markold3 -- $hashtied $retie_hash "); |
} |
} |
&tiehash('write'); |
&tiehash('write'); |
|
&Apache::lonnet::logthis(" markold4 -- $hashtied $retie_hash "); |
$hash{'old'}=1; |
$hash{'old'}=1; |
|
&Apache::lonnet::logthis(" markold5 -- $hashtied $retie_hash "); |
&untiehash(); |
&untiehash(); |
|
&Apache::lonnet::logthis(" markold6 -- $hashtied $retie_hash "); |
if ($retie_hash) { &tiehash(); } |
if ($retie_hash) { &tiehash(); } |
|
&Apache::lonnet::logthis(" markold7 -- $hashtied $retie_hash "); |
} |
} |
|
|
sub is_hash_old { |
sub is_hash_old { |