version 1.160, 2004/12/23 17:28:31
|
version 1.178, 2005/06/08 17:42:01
|
Line 86 sub authorhosts {
|
Line 86 sub authorhosts {
|
my %outhash=(); |
my %outhash=(); |
my $home=0; |
my $home=0; |
my $other=0; |
my $other=0; |
foreach (keys %ENV) { |
foreach (keys %env) { |
if ($_=~/^user\.role\.(au|ca)\.(.+)$/) { |
if ($_=~/^user\.role\.(au|ca)\.(.+)$/) { |
my $role=$1; |
my $role=$1; |
my $realm=$2; |
my $realm=$2; |
my ($start,$end)=split(/\./,$ENV{$_}); |
my ($start,$end)=split(/\./,$env{$_}); |
if (($start) && ($start>time)) { next; } |
if (($start) && ($start>time)) { next; } |
if (($end) && (time>$end)) { next; } |
if (($end) && (time>$end)) { next; } |
my $ca; my $cd; |
my $ca; my $cd; |
if ($1 eq 'au') { |
if ($1 eq 'au') { |
$ca=$ENV{'user.name'}; |
$ca=$env{'user.name'}; |
$cd=$ENV{'user.domain'}; |
$cd=$env{'user.domain'}; |
} else { |
} else { |
($cd,$ca)=($realm=~/^\/(\w+)\/(\w+)$/); |
($cd,$ca)=($realm=~/^\/(\w+)\/(\w+)$/); |
} |
} |
Line 132 sub dumpbutton {
|
Line 132 sub dumpbutton {
|
} |
} |
} |
} |
|
|
|
sub clean { |
|
my ($title)=@_; |
|
$title=~s/[^\w\/\!\$\%\^\*\-\_\=\+\;\:\,\\\|\`\~]+/\_/gs; |
|
return $title; |
|
} |
# -------------------------------------------------------- Actually dump course |
# -------------------------------------------------------- Actually dump course |
|
|
sub dumpcourse { |
sub dumpcourse { |
my $r=shift; |
my $r=shift; |
$r->print('<html><head><title>Dump DOCS</title></head>'. |
my $html=&Apache::lonxml::xmlbegin(); |
|
$r->print($html.'<head><title>Dump DOCS</title></head>'. |
&Apache::loncommon::bodytag('Dump Course DOCS to Construction Space'). |
&Apache::loncommon::bodytag('Dump Course DOCS to Construction Space'). |
'<form name="dumpdoc" method="post">'); |
'<form name="dumpdoc" method="post">'); |
my ($home,$other,%outhash)=&authorhosts(); |
my ($home,$other,%outhash)=&authorhosts(); |
unless ($home) { return ''; } |
unless ($home) { return ''; } |
my $origcrsid=$ENV{'request.course.id'}; |
my $origcrsid=$env{'request.course.id'}; |
my %origcrsdata=&Apache::lonnet::coursedescription($origcrsid); |
my %origcrsdata=&Apache::lonnet::coursedescription($origcrsid); |
if (($ENV{'form.authorspace'}) && ($ENV{'form.authorfolder'}=~/\w/)) { |
if (($env{'form.authorspace'}) && ($env{'form.authorfolder'}=~/\w/)) { |
# Do the dumping |
# Do the dumping |
unless ($outhash{'home_'.$ENV{'form.authorspace'}}) { return ''; } |
unless ($outhash{'home_'.$env{'form.authorspace'}}) { return ''; } |
my ($ca,$cd)=split(/\@/,$ENV{'form.authorspace'}); |
my ($ca,$cd)=split(/\@/,$env{'form.authorspace'}); |
$r->print('<h3>'.&mt('Copying Files').'</h3>'); |
$r->print('<h3>'.&mt('Copying Files').'</h3>'); |
my $title=$ENV{'form.authorfolder'}; |
my $title=$env{'form.authorfolder'}; |
$title=~s/[^\w\/]+/\_/g; |
$title=&clean($title); |
my %replacehash=(); |
my %replacehash=(); |
foreach (keys %ENV) { |
foreach (keys %env) { |
if ($_=~/^form\.namefor\_(.+)/) { |
if ($_=~/^form\.namefor\_(.+)/) { |
$replacehash{$1}=$ENV{$_}; |
$replacehash{$1}=$env{$_}; |
} |
} |
} |
} |
my $crs='/uploaded/'.$ENV{'request.course.id'}.'/'; |
my $crs='/uploaded/'.$env{'request.course.id'}.'/'; |
$crs=~s/\_/\//g; |
$crs=~s/\_/\//g; |
foreach (keys %replacehash) { |
foreach (keys %replacehash) { |
my $newfilename=$title.'/'.$replacehash{$_}; |
my $newfilename=$title.'/'.$replacehash{$_}; |
$newfilename=~s/[^\w\/\.\/]+/\_/g; |
$newfilename=&clean($newfilename); |
my @dirs=split(/\//,$newfilename); |
my @dirs=split(/\//,$newfilename); |
my $path='/home/'.$ca.'/public_html'; |
my $path='/home/'.$ca.'/public_html'; |
my $makepath=$path; |
my $makepath=$path; |
Line 175 sub dumpcourse {
|
Line 181 sub dumpcourse {
|
if (my $fh=Apache::File->new('>'.$path.'/'.$newfilename)) { |
if (my $fh=Apache::File->new('>'.$path.'/'.$newfilename)) { |
if ($_=~/\.(sequence|page|html|htm|xml|xhtml)$/) { |
if ($_=~/\.(sequence|page|html|htm|xml|xhtml)$/) { |
print $fh &Apache::loncreatecourse::rewritefile( |
print $fh &Apache::loncreatecourse::rewritefile( |
&Apache::loncreatecourse::readfile($ENV{'request.course.id'},$_), |
&Apache::loncreatecourse::readfile($env{'request.course.id'},$_), |
(%replacehash,$crs => '') |
(%replacehash,$crs => '') |
); |
); |
} else { |
} else { |
print $fh |
print $fh |
&Apache::loncreatecourse::readfile($ENV{'request.course.id'},$_); |
&Apache::loncreatecourse::readfile($env{'request.course.id'},$_); |
} |
} |
$fh->close(); |
$fh->close(); |
} else { |
} else { |
Line 214 sub dumpcourse {
|
Line 220 sub dumpcourse {
|
} |
} |
my $title=$origcrsdata{'description'}; |
my $title=$origcrsdata{'description'}; |
$title=~s/\s+/\_/gs; |
$title=~s/\s+/\_/gs; |
$title=~s/\W//gs; |
$title=&clean($title); |
$r->print('<h3>'.&mt('Folder in Construction Space').'</h3><input type="text" size="50" name="authorfolder" value="'.$title.'" /><br />'); |
$r->print('<h3>'.&mt('Folder in Construction Space').'</h3><input type="text" size="50" name="authorfolder" value="'.$title.'" /><br />'); |
&tiehash(); |
&tiehash(); |
$r->print('<h3>'.&mt('Filenames in Construction Space').'</h3><table border="2"><tr><th>'.&mt('Internal Filename').'</th><th>'.&mt('Title').'</th><th>'.&mt('Save as ...').'</th></tr>'); |
$r->print('<h3>'.&mt('Filenames in Construction Space').'</h3><table border="2"><tr><th>'.&mt('Internal Filename').'</th><th>'.&mt('Title').'</th><th>'.&mt('Save as ...').'</th></tr>'); |
Line 223 sub dumpcourse {
|
Line 229 sub dumpcourse {
|
my ($ext)=($_=~/\.(\w+)$/); |
my ($ext)=($_=~/\.(\w+)$/); |
my $title=$hash{'title_'.$hash{ |
my $title=$hash{'title_'.$hash{ |
'ids_/uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/'.$_}}; |
'ids_/uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/'.$_}}; |
|
$title=~s/:/:/g; |
$r->print('<td>'.($title?$title:' ').'</td>'); |
$r->print('<td>'.($title?$title:' ').'</td>'); |
unless ($title) { |
unless ($title) { |
$title=$_; |
$title=$_; |
} |
} |
$title=~s/\.(\w+)$//; |
$title=~s/\.(\w+)$//; |
$title=~s/[^\w\/]+/\_/gs; |
$title=&clean($title); |
$title.='.'.$ext; |
$title.='.'.$ext; |
$r->print("\n<td><input type='text' size='60' name='namefor_".$_."' value='".$title."' /></td></tr>\n"); |
$r->print("\n<td><input type='text' size='60' name='namefor_".$_."' value='".$title."' /></td></tr>\n"); |
} |
} |
Line 242 sub dumpcourse {
|
Line 249 sub dumpcourse {
|
# ------------------------------------------------------ Generate "export" button |
# ------------------------------------------------------ Generate "export" button |
|
|
sub exportbutton { |
sub exportbutton { |
|
return ''; |
return '</td><td bgcolor="#DDDDCC">'. |
return '</td><td bgcolor="#DDDDCC">'. |
'<input type="submit" name="exportcourse" value="'. |
'<input type="submit" name="exportcourse" value="'. |
&mt('Export Course to IMS').'" />'. |
&mt('Export Course to IMS').'" />'. |
Line 251 sub exportbutton {
|
Line 259 sub exportbutton {
|
sub exportcourse { |
sub exportcourse { |
my $r=shift; |
my $r=shift; |
my %discussiontime = &Apache::lonnet::dump('discussiontimes', |
my %discussiontime = &Apache::lonnet::dump('discussiontimes', |
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, $ENV{'course.'.$ENV{'request.course.id'}.'.num'}); |
$env{'course.'.$env{'request.course.id'}.'.domain'}, $env{'course.'.$env{'request.course.id'}.'.num'}); |
my $numdisc = keys %discussiontime; |
my $numdisc = keys %discussiontime; |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $it=$navmap->getIterator(undef,undef,undef,1,undef,undef); |
my $it=$navmap->getIterator(undef,undef,undef,1,undef,undef); |
Line 260 sub exportcourse {
|
Line 268 sub exportcourse {
|
|
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['finishexport']); |
['finishexport']); |
if ($ENV{'form.finishexport'}) { |
if ($env{'form.finishexport'}) { |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['archive','discussion']); |
['archive','discussion']); |
|
|
my @exportitems = (); |
my @exportitems = &Apache::loncommon::get_env_multiple('form.archive'); |
if (defined($ENV{'form.archive'})) { |
my @discussions = &Apache::loncommon::get_env_multiple('form.discussion'); |
if (ref($ENV{'form.archive'}) eq 'ARRAY') { |
|
@exportitems = @{$ENV{'form.archive'}}; |
|
} else { |
|
$exportitems[0] = $ENV{'form.archive'}; |
|
} |
|
} |
|
my @discussions = (); |
|
if (defined($ENV{'form.discussion'})) { |
|
if (ref($ENV{'form.discussion'}) eq 'ARRAY') { |
|
@discussions = $ENV{'form.discussion'}; |
|
} else { |
|
$discussions[0] = $ENV{'form.discussion'}; |
|
} |
|
} |
|
if (@exportitems == 0 && @discussions == 0) { |
if (@exportitems == 0 && @discussions == 0) { |
$outcome = '<br />As you did not select any content items or discussions for export, an IMS package has not been created. Please <a href="javascript:history.go(-1)">go back</a> to select either content items or discussions for export'; |
$outcome = '<br />As you did not select any content items or discussions for export, an IMS package has not been created. Please <a href="javascript:history.go(-1)">go back</a> to select either content items or discussions for export'; |
} else { |
} else { |
Line 296 sub exportcourse {
|
Line 290 sub exportcourse {
|
|
|
#Create zip file in prtspool |
#Create zip file in prtspool |
my $imszipfile = '/prtspool/'. |
my $imszipfile = '/prtspool/'. |
$ENV{'user.name'}.'_'.$ENV{'user.domain'}.'_'. |
$env{'user.name'}.'_'.$env{'user.domain'}.'_'. |
time.'_'.rand(1000000000).'.zip'; |
time.'_'.rand(1000000000).'.zip'; |
# zip can cause an sh launch which can pass along all of %ENV |
|
# which can be too large for /bin/sh to handle |
|
my %oldENV=%ENV; |
|
undef(%ENV); |
|
my $cwd = &Cwd::getcwd(); |
my $cwd = &Cwd::getcwd(); |
my $imszip = '/home/httpd/'.$imszipfile; |
my $imszip = '/home/httpd/'.$imszipfile; |
chdir $tempexport; |
chdir $tempexport; |
open(OUTPUT, "zip -r $imszip * 2> /dev/null |"); |
open(OUTPUT, "zip -r $imszip * 2> /dev/null |"); |
close(OUTPUT); |
close(OUTPUT); |
chdir $cwd; |
chdir $cwd; |
%ENV=%oldENV; |
|
undef(%oldENV); |
|
$outcome .= 'Download the zip file from <a href="'.$imszipfile.'">IMS course archive</a><br />'; |
$outcome .= 'Download the zip file from <a href="'.$imszipfile.'">IMS course archive</a><br />'; |
if ($copyresult) { |
if ($copyresult) { |
$outcome .= 'The following errors occurred during export - '.$copyresult; |
$outcome .= 'The following errors occurred during export - '.$copyresult; |
Line 318 sub exportcourse {
|
Line 306 sub exportcourse {
|
$outcome = '<br />Unfortunately you will not be able to retrieve an IMS archive of this posts at this time, because there was a problem creating a manifest file.<br />'; |
$outcome = '<br />Unfortunately you will not be able to retrieve an IMS archive of this posts at this time, because there was a problem creating a manifest file.<br />'; |
} |
} |
} |
} |
|
my $html=&Apache::lonxml::xmlbegin(); |
$r->print('<html><head><title>Export Course</title></head>'. |
$r->print($html.'<head><title>Export Course</title></head>'. |
&Apache::loncommon::bodytag('Export course to IMS content package')); |
&Apache::loncommon::bodytag('Export course to IMS content package')); |
$r->print($outcome); |
$r->print($outcome); |
$r->print('</body></html>'); |
$r->print('</body></html>'); |
Line 460 function containerCheck(item) {
|
Line 448 function containerCheck(item) {
|
|
|
</script> |
</script> |
|; |
|; |
$r->print('<html><head><title>Export Course</title>'.$scripttag.'</head>'. |
my $html=&Apache::lonxml::xmlbegin(); |
|
$r->print($html.'<head><title>Export Course</title>'.$scripttag.'</head>'. |
&Apache::loncommon::bodytag('Export course to IMS content package' |
&Apache::loncommon::bodytag('Export course to IMS content package' |
)); |
)); |
|
|
Line 482 sub create_ims_store {
|
Line 471 sub create_ims_store {
|
if (!-e $$tempexport) { |
if (!-e $$tempexport) { |
mkdir($$tempexport,0700); |
mkdir($$tempexport,0700); |
} |
} |
$$tempexport .= '/'.$ENV{'user.domain'}.'_'.$ENV{'user.name'}; |
$$tempexport .= '/'.$env{'user.domain'}.'_'.$env{'user.name'}; |
if (!-e $$tempexport) { |
if (!-e $$tempexport) { |
mkdir($$tempexport,0700); |
mkdir($$tempexport,0700); |
} |
} |
Line 499 sub create_ims_store {
|
Line 488 sub create_ims_store {
|
'<manifest xmlns="http://www.imsglobal.org/xsd/imscp_v1p1"'. |
'<manifest xmlns="http://www.imsglobal.org/xsd/imscp_v1p1"'. |
' xmlns:imsmd="http://www.imsglobal.org/xsd/imsmd_v1p2"'. |
' xmlns:imsmd="http://www.imsglobal.org/xsd/imsmd_v1p2"'. |
' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'. |
' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'. |
' identifier="MANIFEST-'.$ENV{'request.course.id'}.'-'.$now.'"'. |
' identifier="MANIFEST-'.$env{'request.course.id'}.'-'.$now.'"'. |
' xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1imscp_v1p1.xsd'. |
' xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1imscp_v1p1.xsd'. |
' http://www.imsglobal.org/xsd/imsmd_v1p2 imsmd_v1p2p2.xsd">'."\n". |
' http://www.imsglobal.org/xsd/imsmd_v1p2 imsmd_v1p2p2.xsd">'."\n". |
' <organizations default="ORG-'.$ENV{'request.course.id'}.'-'.$now.'">'."\n". |
' <organizations default="ORG-'.$env{'request.course.id'}.'-'.$now.'">'."\n". |
' <organization identifier="ORG-'.$ENV{'request.course.id'}.'-'.$now.'"'. |
' <organization identifier="ORG-'.$env{'request.course.id'}.'-'.$now.'"'. |
' structure="hierarchical">'."\n". |
' structure="hierarchical">'."\n". |
' <title>'.$ENV{'request.'.$ENV{'request.course.id'}.'.description'}.'</title>' |
' <title>'.$env{'request.'.$env{'request.course.id'}.'.description'}.'</title>' |
} else { |
} else { |
$$outcome .= 'An error occurred opening the IMS manifest file.<br />' |
$$outcome .= 'An error occurred opening the IMS manifest file.<br />' |
; |
; |
Line 523 sub build_package {
|
Line 512 sub build_package {
|
my $lastcontainer = 0; |
my $lastcontainer = 0; |
my %parent = (); |
my %parent = (); |
my @dependencies = (); |
my @dependencies = (); |
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'}; |
while ($curRes = $it->next()) { |
while ($curRes = $it->next()) { |
if (ref($curRes)) { |
if (ref($curRes)) { |
$count ++; |
$count ++; |
Line 574 sub build_package {
|
Line 563 sub build_package {
|
$isvisible = 'false'; |
$isvisible = 'false'; |
} |
} |
unless ($curRes->is_sequence()) { |
unless ($curRes->is_sequence()) { |
$resourceref = 'identifierref="RES-'.$ENV{'request.course.id'}.'-'.$count.'"'; |
$resourceref = 'identifierref="RES-'.$env{'request.course.id'}.'-'.$count.'"'; |
} |
} |
if (($depth <= $prevdepth) && ($count > 1) && ($included)) { |
if (($depth <= $prevdepth) && ($count > 1) && ($included)) { |
print $ims_manifest "\n".' </item>'."\n"; |
print $ims_manifest "\n".' </item>'."\n"; |
Line 583 sub build_package {
|
Line 572 sub build_package {
|
$prevdepth = $depth; |
$prevdepth = $depth; |
|
|
my $itementry = |
my $itementry = |
'<item identifier="ITEM-'.$ENV{'request.course.id'}.'-'.$count. |
'<item identifier="ITEM-'.$env{'request.course.id'}.'-'.$count. |
'" isvisible="'.$isvisible.'" '.$resourceref.'>'. |
'" isvisible="'.$isvisible.'" '.$resourceref.'>'. |
'<title>'.$curRes->title().'</title>'; |
'<title>'.$curRes->title().'</title>'; |
print $ims_manifest "\n".$itementry; |
print $ims_manifest "\n".$itementry; |
Line 594 sub build_package {
|
Line 583 sub build_package {
|
&process_content($count,$curRes,$cdom,$cnum,$symb,\$content_file,\@hrefs,$copyresult,$tempexport); |
&process_content($count,$curRes,$cdom,$cnum,$symb,\$content_file,\@hrefs,$copyresult,$tempexport); |
if ($content_file) { |
if ($content_file) { |
$imsresources .= "\n". |
$imsresources .= "\n". |
' <resource identifier="RES-'.$ENV{'request.course.id'}.'-'.$count. |
' <resource identifier="RES-'.$env{'request.course.id'}.'-'.$count. |
'" type="webcontent" href="'.$content_file.'">'."\n". |
'" type="webcontent" href="'.$content_file.'">'."\n". |
' <file href="'.$content_file.'" />'."\n"; |
' <file href="'.$content_file.'" />'."\n"; |
foreach (@hrefs) { |
foreach (@hrefs) { |
Line 704 sub process_content {
|
Line 693 sub process_content {
|
if ($contents) { |
if ($contents) { |
$$content_file = &store_template($contents,$tempexport,$count,$content_type); |
$$content_file = &store_template($contents,$tempexport,$count,$content_type); |
} |
} |
} elsif ($symb =~ m-uploaded/$cdom/$cnum-) { |
|
$$content_file = &replicate_content($cdom,$cnum,$tempexport,$symb,$count,\$message,$href,'uploaded'); |
|
} elsif ($symb =~ m-\.(sequence|page)___\d+___uploaded/$cdom/$cnum/-) { |
} elsif ($symb =~ m-\.(sequence|page)___\d+___uploaded/$cdom/$cnum/-) { |
$$content_file = &replicate_content($cdom,$cnum,$tempexport,$symb,$count,\$message,$href,'uploaded'); |
$$content_file = &replicate_content($cdom,$cnum,$tempexport,$symb,$count,\$message,$href,'uploaded'); |
} elsif ($symb =~ m-\.(sequence|page)___\d+___([^/])/([^/])-) { |
} elsif ($symb =~ m-\.(sequence|page)___\d+___([^/]+)/([^/]+)-) { |
my $coauth = $3.':'.$2.':ca'; |
|
my $canedit = 0; |
my $canedit = 0; |
if ($2 eq $ENV{'user.domain'} && $3 eq $ENV{'user.name'}) { |
if ($2 eq $env{'user.domain'} && $3 eq $env{'user.name'}) { |
$canedit= 1; |
$canedit= 1; |
} |
} |
if ($canedit) { |
if ($canedit) { |
Line 719 sub process_content {
|
Line 705 sub process_content {
|
} else { |
} else { |
$$content_file = &replicate_content($cdom,$cnum,$tempexport,$symb,$count,\$message,$href,'noedit'); |
$$content_file = &replicate_content($cdom,$cnum,$tempexport,$symb,$count,\$message,$href,'noedit'); |
} |
} |
|
} elsif ($symb =~ m-uploaded/$cdom/$cnum-) { |
|
$$content_file = &replicate_content($cdom,$cnum,$tempexport,$symb,$count,\$message,$href,'uploaded'); |
} |
} |
if (@uploads > 0) { |
if (@uploads > 0) { |
foreach my $item (@uploads) { |
foreach my $item (@uploads) { |
Line 760 sub replicate_content {
|
Line 748 sub replicate_content {
|
if ($copiedfile = Apache::File->new('>'.$destination)) { |
if ($copiedfile = Apache::File->new('>'.$destination)) { |
my $content; |
my $content; |
if ($caller eq 'resource') { |
if ($caller eq 'resource') { |
$content = &Apache::lonnet::getfile($url); |
$content = &Apache::lonnet::getfile('/home/httpd/html/res/'.$url); |
if ($content eq -1) { |
if ($content eq -1) { |
$$message = 'Could not copy file '.$filename; |
$$message = 'Could not copy file '.$filename; |
} else { |
} else { |
&extract_media($content,$count,$tempexport,$href,'resource'); |
&extract_media($content,$count,$tempexport,$href,'resource'); |
$repstatus = 'ok'; |
$repstatus = 'ok'; |
} |
} |
} elsif ($caller eq 'noedit' || $caller eq 'uploaded' || $caller eq 'templateupload') { |
} elsif ($caller eq 'uploaded' || $caller eq 'templateupload') { |
my $rtncode; |
my $rtncode; |
$repstatus = &Apache::lonnet::getuploaded('GET',$url,$cdom,$cnum,\$content,$rtncode); |
$repstatus = &Apache::lonnet::getuploaded('GET',$url,$cdom,$cnum,\$content,$rtncode); |
if ($repstatus eq 'ok') { |
if ($repstatus eq 'ok') { |
Line 777 sub replicate_content {
|
Line 765 sub replicate_content {
|
} else { |
} else { |
$$message = 'Could not render '.$url.' server message - '.$rtncode; |
$$message = 'Could not render '.$url.' server message - '.$rtncode; |
} |
} |
|
} elsif ($caller eq 'noedit') { |
|
# Need to render the resource without the LON-CAPA Internal header and the Post discussion footer, and then set $content equal to this. |
|
$repstatus = 'ok'; |
|
$content = 'Not the owner of this resource'; |
} |
} |
if ($repstatus eq 'ok') { |
if ($repstatus eq 'ok') { |
print $copiedfile $content; |
print $copiedfile $content; |
Line 847 sub group_import {
|
Line 839 sub group_import {
|
'<link from="1" to="2" index="1"></link>'."\n". |
'<link from="1" to="2" index="1"></link>'."\n". |
'<resource id="2" src="" type="finish"></resource>'."\n". |
'<resource id="2" src="" type="finish"></resource>'."\n". |
'</map>'; |
'</map>'; |
$ENV{'form.output'}=$newmapstr; |
$env{'form.output'}=$newmapstr; |
my $home=&Apache::lonnet::homeserver($coursenum,$coursedom); |
my $home=&Apache::lonnet::homeserver($coursenum,$coursedom); |
my $result=&Apache::lonnet::finishuserfileupload($coursenum,$coursedom,$home, |
my $result=&Apache::lonnet::finishuserfileupload($coursenum,$coursedom,$home, |
'output',$1.$2); |
'output',$1.$2); |
Line 860 sub group_import {
|
Line 852 sub group_import {
|
} |
} |
} |
} |
if ($url) { |
if ($url) { |
my $idx = $#Apache::lonratedt::resources + 1; |
my $idx = &Apache::lonratedt::getresidx($url); |
$Apache::lonratedt::order[$#Apache::lonratedt::order+1]=$idx; |
$Apache::lonratedt::order[$#Apache::lonratedt::order+1]=$idx; |
my $ext = 'false'; |
my $ext = 'false'; |
if ($url=~/^http:\/\//) { $ext = 'true'; } |
if ($url=~/^http:\/\//) { $ext = 'true'; } |
Line 877 sub breadcrumbs {
|
Line 869 sub breadcrumbs {
|
my ($where)=@_; |
my ($where)=@_; |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
my (@folders); |
my (@folders); |
if ($ENV{'form.pagepath'}) { |
if ($env{'form.pagepath'}) { |
@folders = split('&',$ENV{'form.pagepath'}); |
@folders = split('&',$env{'form.pagepath'}); |
} else { |
} else { |
@folders=split('&',$ENV{'form.folderpath'}); |
@folders=split('&',$env{'form.folderpath'}); |
} |
} |
my $folderpath; |
my $folderpath; |
|
my $cpinfo=''; |
|
if ($env{'form.markedcopy_url'}) { |
|
&Apache::lonnet::logthis('Found '.$env{'form.markedcopy_url'}); |
|
$cpinfo='&markedcopy_url='. |
|
&Apache::lonnet::escape($env{'form.markedcopy_url'}). |
|
'&markedcopy_title='. |
|
&Apache::lonnet::escape($env{'form.markedcopy_title'}); |
|
} |
while (@folders) { |
while (@folders) { |
my $folder=shift(@folders); |
my $folder=shift(@folders); |
my $foldername=shift(@folders); |
my $foldername=shift(@folders); |
Line 891 sub breadcrumbs {
|
Line 891 sub breadcrumbs {
|
my $url='/adm/coursedocs?folderpath='. |
my $url='/adm/coursedocs?folderpath='. |
&Apache::lonnet::escape($folderpath); |
&Apache::lonnet::escape($folderpath); |
&Apache::lonhtmlcommon::add_breadcrumb( |
&Apache::lonhtmlcommon::add_breadcrumb( |
{'href'=>$url, |
{'href'=>$url.$cpinfo, |
'title'=>&Apache::lonnet::unescape($foldername), |
'title'=>&Apache::lonnet::unescape($foldername), |
'text'=>'<font size="+1">'. |
'text'=>'<font size="+1">'. |
&Apache::lonnet::unescape($foldername).'</font>' |
&Apache::lonnet::unescape($foldername).'</font>' |
Line 905 sub breadcrumbs {
|
Line 905 sub breadcrumbs {
|
|
|
sub editor { |
sub editor { |
my ($r,$coursenum,$coursedom,$folder,$allowed)=@_; |
my ($r,$coursenum,$coursedom,$folder,$allowed)=@_; |
|
|
$r->print(&breadcrumbs($folder)); |
|
my $errtext=''; |
my $errtext=''; |
my $fatal=0; |
my $fatal=0; |
my $container='sequence'; |
my $container='sequence'; |
if ($ENV{'form.pagepath'}) { |
if ($env{'form.pagepath'}) { |
$container='page'; |
$container='page'; |
} |
} |
($errtext,$fatal)= |
($errtext,$fatal)= |
&mapread($coursenum,$coursedom,$folder.'.'.$container); |
&mapread($coursenum,$coursedom,$folder.'.'.$container); |
if ($#Apache::lonratedt::order<1) { |
if ($#Apache::lonratedt::order<1) { |
$Apache::lonratedt::order[0]=1; |
my $idx=&Apache::lonratedt::getresidx(); |
$Apache::lonratedt::resources[1]=''; |
if ($idx<=0) { $idx=1; } |
|
$Apache::lonratedt::order[0]=$idx; |
|
$Apache::lonratedt::resources[$idx]=''; |
|
} |
|
if (defined($env{'form.markcopy'})) { |
|
# Mark for copying |
|
my ($title,$url)=split(':',$Apache::lonratedt::resources[$Apache::lonratedt::order[$env{'form.markcopy'}]]); |
|
$env{'form.markedcopy_title'}=$title; |
|
$env{'form.markedcopy_url'}=$url; |
} |
} |
|
$r->print(&breadcrumbs($folder)); |
if ($fatal) { |
if ($fatal) { |
$r->print('<p><font color="red">'.$errtext.'</font></p>'); |
$r->print('<p><font color="red">'.$errtext.'</font></p>'); |
} else { |
} else { |
# ------------------------------------------------------------ Process commands |
# ------------------------------------------------------------ Process commands |
|
|
# ---------------- if they are for this folder and user allowed to make changes |
# ---------------- if they are for this folder and user allowed to make changes |
if (($allowed) && ($ENV{'form.folder'} eq $folder)) { |
if (($allowed) && ($env{'form.folder'} eq $folder)) { |
# set parameters and change order |
# set parameters and change order |
if (defined($ENV{'form.setparms'})) { |
if (defined($env{'form.setparms'})) { |
my $idx=$ENV{'form.setparms'}; |
my $idx=$env{'form.setparms'}; |
# set parameters |
# set parameters |
if ($ENV{'form.randpick_'.$idx}) { |
if ($env{'form.randpick_'.$idx}) { |
&Apache::lonratedt::storeparameter($idx,'parameter_randompick',$ENV{'form.randpick_'.$idx},'int_pos'); |
&Apache::lonratedt::storeparameter($idx,'parameter_randompick',$env{'form.randpick_'.$idx},'int_pos'); |
} else { |
} else { |
&Apache::lonratedt::delparameter($idx,'parameter_randompick'); |
&Apache::lonratedt::delparameter($idx,'parameter_randompick'); |
} |
} |
if ($ENV{'form.hidprs_'.$idx}) { |
if ($env{'form.hidprs_'.$idx}) { |
&Apache::lonratedt::storeparameter($idx,'parameter_hiddenresource','yes','string_yesno'); |
&Apache::lonratedt::storeparameter($idx,'parameter_hiddenresource','yes','string_yesno'); |
} else { |
} else { |
&Apache::lonratedt::delparameter($idx,'parameter_hiddenresource'); |
&Apache::lonratedt::delparameter($idx,'parameter_hiddenresource'); |
} |
} |
if ($ENV{'form.encprs_'.$idx}) { |
if ($env{'form.encprs_'.$idx}) { |
&Apache::lonratedt::storeparameter($idx,'parameter_encrypturl','yes','string_yesno'); |
&Apache::lonratedt::storeparameter($idx,'parameter_encrypturl','yes','string_yesno'); |
} else { |
} else { |
&Apache::lonratedt::delparameter($idx,'parameter_encrypturl'); |
&Apache::lonratedt::delparameter($idx,'parameter_encrypturl'); |
} |
} |
|
|
if ($ENV{'form.newpos'}) { |
if ($env{'form.newpos'}) { |
# change order |
# change order |
|
|
my $newpos=$ENV{'form.newpos'}-1; |
my $newpos=$env{'form.newpos'}-1; |
my $currentpos=$ENV{'form.currentpos'}-1; |
my $currentpos=$env{'form.currentpos'}-1; |
my $i; |
my $i; |
my @neworder=(); |
my @neworder=(); |
if ($newpos>$currentpos) { |
if ($newpos>$currentpos) { |
Line 989 sub editor {
|
Line 996 sub editor {
|
} |
} |
|
|
} |
} |
|
if ($env{'form.pastemarked'}) { |
|
# paste resource to end of list |
|
my $url=$env{'form.markedcopy_url'}; |
|
my $title=$env{'form.markedcopy_title'}; |
|
# Maps need to be copied first |
|
if (($url=~/\.(page|sequence)$/) || ($url=~/^\/uploaded\//)) { |
|
$title=&mt('Copy of').' '.$title; |
|
my $newid=$$.time; |
|
$url=~/^(.+)\.(\w+)$/; |
|
my $newurl=$1.$newid.'.'.$2; |
|
my $storefn=$newurl; |
|
$storefn=~s/^\/\w+\/\w+\/\w+\///; |
|
&Apache::loncreatecourse::writefile |
|
($env{'request.course.id'},$storefn, |
|
&Apache::lonnet::getfile($url)); |
|
$url=$newurl; |
|
} |
|
$title=~s/\</\<\;/g; |
|
$title=~s/\>/\>\;/g; |
|
$title=~s/\:/\:/g; |
|
my $ext='false'; |
|
if ($url=~/^http\:\/\//) { $ext='true'; } |
|
$url=~s/\:/\:/g; |
|
# Now insert the URL at the bottom |
|
my $newidx=1+$#Apache::lonratedt::resources; |
|
$Apache::lonratedt::resources[$newidx]= |
|
$title.':'.$url.':'.$ext.':normal:res'; |
|
$Apache::lonratedt::order[1+$#Apache::lonratedt::order]=$newidx; |
|
# Store the result |
|
($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.'.$container); |
|
if ($fatal) { |
|
$r->print('<p><font color="red">'.$errtext.'</font></p>'); |
|
return; |
|
} |
|
|
|
} |
# upload a file, if present |
# upload a file, if present |
if (($ENV{'form.uploaddoc.filename'}) && |
if (($env{'form.uploaddoc.filename'}) && |
($ENV{'form.cmd'}=~/^upload_(\w+)/)) { |
($env{'form.cmd'}=~/^upload_(\w+)/)) { |
if ( ($folder=~/^$1/) || ($1 eq 'default') ) { |
if ( ($folder=~/^$1/) || ($1 eq 'default') ) { |
# this is for a course, not a user, so set coursedoc flag |
# this is for a course, not a user, so set coursedoc flag |
# probably the only place in the system where this should be "1" |
# probably the only place in the system where this should be "1" |
my $url=&Apache::lonnet::userfileupload('uploaddoc',1,'docs'); |
my $newidx=$#Apache::lonratedt::resources+1; |
|
my $url=&Apache::lonnet::userfileupload('uploaddoc',1,'docs/'.$newidx); |
my $ext='false'; |
my $ext='false'; |
if ($url=~/^http\:\/\//) { $ext='true'; } |
if ($url=~/^http\:\/\//) { $ext='true'; } |
$url=~s/\:/\:/g; |
$url=~s/\:/\:/g; |
my $comment=$ENV{'form.comment'}; |
my $comment=$env{'form.comment'}; |
$comment=~s/\</\<\;/g; |
$comment=~s/\</\<\;/g; |
$comment=~s/\>/\>\;/g; |
$comment=~s/\>/\>\;/g; |
$comment=~s/\:/\:/g; |
$comment=~s/\:/\:/g; |
if ($folder=~/^supplemental/) { |
if ($folder=~/^supplemental/) { |
$comment=time.'___&&&___'.$ENV{'user.name'}.'___&&&___'. |
$comment=time.'___&&&___'.$env{'user.name'}.'___&&&___'. |
$ENV{'user.domain'}.'___&&&___'.$comment; |
$env{'user.domain'}.'___&&&___'.$comment; |
} |
} |
my $newidx=$#Apache::lonratedt::resources+1; |
|
$Apache::lonratedt::resources[$newidx]= |
$Apache::lonratedt::resources[$newidx]= |
$comment.':'.$url.':'.$ext.':normal:res'; |
$comment.':'.$url.':'.$ext.':normal:res'; |
$Apache::lonratedt::order[$#Apache::lonratedt::order+1]= |
$Apache::lonratedt::order[$#Apache::lonratedt::order+1]= |
Line 1021 sub editor {
|
Line 1063 sub editor {
|
} |
} |
} |
} |
} |
} |
if ($ENV{'form.cmd'}) { |
if ($env{'form.cmd'}) { |
my ($cmd,$idx)=split(/\_/,$ENV{'form.cmd'}); |
my ($cmd,$idx)=split(/\_/,$env{'form.cmd'}); |
if ($cmd eq 'del') { |
if ($cmd eq 'del') { |
my (undef,$url)=split(':',$Apache::lonratedt::resources[$Apache::lonratedt::order[$idx]]); |
my (undef,$url)=split(':',$Apache::lonratedt::resources[$Apache::lonratedt::order[$idx]]); |
if ($url=~m|/+uploaded/\Q$coursedom\E/\Q$coursenum\E/|) { |
if ($url=~m|/+uploaded/\Q$coursedom\E/\Q$coursenum\E/|) { |
Line 1033 sub editor {
|
Line 1075 sub editor {
|
$Apache::lonratedt::order[$i+1]; |
$Apache::lonratedt::order[$i+1]; |
} |
} |
$#Apache::lonratedt::order--; |
$#Apache::lonratedt::order--; |
|
} elsif ($cmd eq 'cut') { |
|
my (undef,$url)=split(':',$Apache::lonratedt::resources[$Apache::lonratedt::order[$idx]]); |
|
for (my $i=$idx;$i<$#Apache::lonratedt::order;$i++) { |
|
$Apache::lonratedt::order[$i]= |
|
$Apache::lonratedt::order[$i+1]; |
|
} |
|
$#Apache::lonratedt::order--; |
} elsif ($cmd eq 'up') { |
} elsif ($cmd eq 'up') { |
if (($idx) && (defined($Apache::lonratedt::order[$idx-1]))) { |
if (($idx) && (defined($Apache::lonratedt::order[$idx-1]))) { |
my $i=$Apache::lonratedt::order[$idx-1]; |
my $i=$Apache::lonratedt::order[$idx-1]; |
Line 1053 sub editor {
|
Line 1102 sub editor {
|
$Apache::lonratedt::resources[ |
$Apache::lonratedt::resources[ |
$Apache::lonratedt::order[$idx]]); |
$Apache::lonratedt::order[$idx]]); |
my $comment= |
my $comment= |
&HTML::Entities::decode($ENV{'form.title'}); |
&HTML::Entities::decode($env{'form.title'}); |
$comment=~s/\</\<\;/g; |
$comment=~s/\</\<\;/g; |
$comment=~s/\>/\>\;/g; |
$comment=~s/\>/\>\;/g; |
$comment=~s/\:/\:/g; |
$comment=~s/\:/\:/g; |
Line 1072 sub editor {
|
Line 1121 sub editor {
|
} |
} |
} |
} |
# Group import/search |
# Group import/search |
if ($ENV{'form.importdetail'}) { |
if ($env{'form.importdetail'}) { |
my @imports; |
my @imports; |
foreach (split(/\&/,$ENV{'form.importdetail'})) { |
foreach (split(/\&/,$env{'form.importdetail'})) { |
if (defined($_)) { |
if (defined($_)) { |
my ($name,$url)=split(/\=/,$_); |
my ($name,$url)=split(/\=/,$_); |
$name=&Apache::lonnet::unescape($name); |
$name=&Apache::lonnet::unescape($name); |
Line 1091 sub editor {
|
Line 1140 sub editor {
|
} |
} |
} |
} |
# Loading a complete map |
# Loading a complete map |
if (($ENV{'form.importmap'}) && ($ENV{'form.loadmap'})) { |
if (($env{'form.importmap'}) && ($env{'form.loadmap'})) { |
foreach (&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$ENV{'form.importmap'}))) { |
foreach (&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$env{'form.importmap'}))) { |
my $idx=$#Apache::lonratedt::resources; |
my $idx=$#Apache::lonratedt::resources; |
$idx++; |
$idx++; |
$Apache::lonratedt::resources[$idx]=$_; |
$Apache::lonratedt::resources[$idx]=$_; |
Line 1125 sub editor {
|
Line 1174 sub editor {
|
unless ($shown) { |
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("\n</table>\n"); |
|
if ($env{'form.markedcopy_url'}) { |
|
$r->print(<<ENDPASTE); |
|
<p><form name="pasteform" action="/adm/coursedocs" method="post"> |
|
<input type="hidden" name="markedcopy_url" value="$env{'form.markedcopy_url'}" /> |
|
<input type="hidden" name="markedcopy_title" value="$env{'form.markedcopy_title'}" /> |
|
ENDPASTE |
|
$r->print( |
|
'<input type="submit" name="pastemarked" value="'.&mt('Paste'). |
|
'" /> '.&Apache::loncommon::filedescription( |
|
(split(/\./,$env{'form.markedcopy_url'}))[-1]).': '. |
|
$env{'form.markedcopy_title'}); |
|
if ($container eq 'page') { |
|
$r->print(<<PAGEINFO); |
|
<input type="hidden" name="pagepath" value="$env{'form.pagepath'}" /> |
|
<input type="hidden" name="pagesymb" value="$env{'form.pagesymb'}" /> |
|
PAGEINFO |
|
} else { |
|
$r->print(<<FOLDERINFO); |
|
<input type="hidden" name="folderpath" value="$env{'form.folderpath'}" /> |
|
FOLDERINFO |
|
} |
|
$r->print('</form></p>'); |
|
} |
} |
} |
} |
} |
|
|
Line 1152 sub entryline {
|
Line 1224 sub entryline {
|
# Edit commands |
# Edit commands |
my $container; |
my $container; |
my $folderpath; |
my $folderpath; |
if ($ENV{'form.folderpath'}) { |
if ($env{'form.folderpath'}) { |
$container = 'sequence'; |
$container = 'sequence'; |
$folderpath=&Apache::lonnet::escape($ENV{'form.folderpath'}); |
$folderpath=&Apache::lonnet::escape($env{'form.folderpath'}); |
# $htmlfoldername=&HTML::Entities::encode($ENV{'form.foldername'},'<>&"'); |
# $htmlfoldername=&HTML::Entities::encode($env{'form.foldername'},'<>&"'); |
} |
} |
my ($pagepath,$pagesymb); |
my ($pagepath,$pagesymb); |
if ($ENV{'form.pagepath'}) { |
if ($env{'form.pagepath'}) { |
$container = 'page'; |
$container = 'page'; |
$pagepath=&Apache::lonnet::escape($ENV{'form.pagepath'}); |
$pagepath=&Apache::lonnet::escape($env{'form.pagepath'}); |
$pagesymb=&Apache::lonnet::escape($ENV{'form.pagesymb'}); |
$pagesymb=&Apache::lonnet::escape($env{'form.pagesymb'}); |
|
} |
|
my $cpinfo=''; |
|
if ($env{'form.markedcopy_url'}) { |
|
$cpinfo='&markedcopy_url='. |
|
&Apache::lonnet::escape($env{'form.markedcopy_url'}). |
|
'&markedcopy_title='. |
|
&Apache::lonnet::escape($env{'form.markedcopy_title'}); |
} |
} |
if ($allowed) { |
if ($allowed) { |
my $incindex=$index+1; |
my $incindex=$index+1; |
my $selectbox=''; |
my $selectbox=''; |
if ($folder!~/^supplemental/) { |
if (($folder!~/^supplemental/) && |
|
($#Apache::lonratedt::order>0) && |
|
((split(/\:/, |
|
$Apache::lonratedt::resources[$Apache::lonratedt::order[0]]))[1] |
|
ne '') && |
|
((split(/\:/, |
|
$Apache::lonratedt::resources[$Apache::lonratedt::order[1]]))[1] |
|
ne '')) { |
$selectbox= |
$selectbox= |
'<input type="hidden" name="currentpos" value="'.$incindex.'" />'. |
'<input type="hidden" name="currentpos" value="'.$incindex.'" />'. |
'<select name="newpos" onChange="this.form.submit()">'; |
'<select name="newpos" onChange="this.form.submit()">'; |
Line 1183 sub entryline {
|
Line 1269 sub entryline {
|
'up' => 'Move Up', |
'up' => 'Move Up', |
'dw' => 'Move Down', |
'dw' => 'Move Down', |
'rm' => 'Remove', |
'rm' => 'Remove', |
'rn' => 'Rename'); |
'ct' => 'Cut', |
if ($ENV{'form.pagepath'}) { |
'rn' => 'Rename', |
|
'cp' => 'Copy'); |
|
if ($env{'form.pagepath'}) { |
$line.=(<<END); |
$line.=(<<END); |
<form name="entry_$index" action="/adm/coursedocs" method="post"> |
<form name="entry_$index" action="/adm/coursedocs" method="post"> |
<input type="hidden" name="pagepath" value="$ENV{'form.pagepath'}" /> |
<input type="hidden" name="pagepath" value="$env{'form.pagepath'}" /> |
<input type="hidden" name="pagesymb" value="$ENV{'form.pagesymb'}" /> |
<input type="hidden" name="pagesymb" value="$env{'form.pagesymb'}" /> |
|
<input type="hidden" name="markedcopy_url" value="$env{'form.markedcopy_url'}" /> |
|
<input type="hidden" name="markedcopy_title" value="$env{'form.markedcopy_title'}" /> |
<input type="hidden" name="setparms" value="$orderidx" /> |
<input type="hidden" name="setparms" value="$orderidx" /> |
<td><table border='0' cellspacing='2' cellpadding='0'> |
<td><table border='0' cellspacing='2' cellpadding='0'> |
<tr><td bgcolor="#DDDDDD"> |
<tr><td bgcolor="#DDDDDD"> |
<a href='/adm/coursedocs?cmd=up_$index&pagepath=$pagepath&pagesymb=$pagesymb'> |
<a href='/adm/coursedocs?cmd=up_$index&pagepath=$pagepath&pagesymb=$pagesymb$cpinfo'> |
<img src="${iconpath}move_up.gif" alt='$lt{'up'}' border='0' /></a></td></tr> |
<img src="${iconpath}move_up.gif" alt='$lt{'up'}' border='0' /></a></td></tr> |
<tr><td bgcolor="#DDDDDD"> |
<tr><td bgcolor="#DDDDDD"> |
<a href='/adm/coursedocs?cmd=down_$index&pagepath=$pagepath&pagesymb=$pagesymb'> |
<a href='/adm/coursedocs?cmd=down_$index&pagepath=$pagepath&pagesymb=$pagesymb$cpinfo'> |
<img src="${iconpath}move_down.gif" alt='$lt{'dw'}' border='0' /></a></td></tr> |
<img src="${iconpath}move_down.gif" alt='$lt{'dw'}' border='0' /></a></td></tr> |
</table></td> |
</table></td> |
<td>$selectbox |
<td>$selectbox |
</td><td bgcolor="#DDDDDD"> |
</td><td bgcolor="#DDDDDD"> |
<a href='javascript:removeres("$pagepath","$index","$renametitle","page","$pagesymb");'> |
<a href='javascript:removeres("$pagepath","$index","$renametitle","page","$pagesymb");'> |
<font size="-2" color="#990000">$lt{'rm'}</font></a> |
<font size="-2" color="#990000">$lt{'rm'}</font></a> |
|
<a href='javascript:cutres("$pagepath","$index","$renametitle","page","$pagesymb");'> |
|
<font size="-2" color="#550044">$lt{'ct'}</font></a> |
<a href='javascript:changename("$pagepath","$index","$renametitle","page","$pagesymb");'> |
<a href='javascript:changename("$pagepath","$index","$renametitle","page","$pagesymb");'> |
<font size="-2" color="#009900">$lt{'rn'}</font></a></td> |
<font size="-2" color="#009900">$lt{'rn'}</font></a> |
|
<a href='javascript:markcopy("$pagepath","$index","$renametitle","page","$pagesymb");'> |
|
<font size="-2" color="#000099">$lt{'cp'}</font></a></td> |
END |
END |
} else { |
} else { |
$line.=(<<END); |
$line.=(<<END); |
<form name="entry_$index" action="/adm/coursedocs" method="post"> |
<form name="entry_$index" action="/adm/coursedocs" method="post"> |
<input type="hidden" name="folderpath" value="$ENV{'form.folderpath'}" /> |
<input type="hidden" name="folderpath" value="$env{'form.folderpath'}" /> |
|
<input type="hidden" name="markedcopy_url" value="$env{'form.markedcopy_url'}" /> |
|
<input type="hidden" name="markedcopy_title" value="$env{'form.markedcopy_title'}" /> |
<input type="hidden" name="setparms" value="$orderidx" /> |
<input type="hidden" name="setparms" value="$orderidx" /> |
<td><table border='0' cellspacing='2' cellpadding='0'> |
<td><table border='0' cellspacing='2' cellpadding='0'> |
<tr><td bgcolor="#DDDDDD"> |
<tr><td bgcolor="#DDDDDD"> |
<a href='/adm/coursedocs?cmd=up_$index&folderpath=$folderpath'> |
<a href='/adm/coursedocs?cmd=up_$index&folderpath=$folderpath$cpinfo'> |
<img src="${iconpath}move_up.gif" alt='$lt{'up'}' border='0' /></a></td></tr> |
<img src="${iconpath}move_up.gif" alt='$lt{'up'}' border='0' /></a></td></tr> |
<tr><td bgcolor="#DDDDDD"> |
<tr><td bgcolor="#DDDDDD"> |
<a href='/adm/coursedocs?cmd=down_$index&folderpath=$folderpath'> |
<a href='/adm/coursedocs?cmd=down_$index&folderpath=$folderpath$cpinfo'> |
<img src="${iconpath}move_down.gif" alt='$lt{'dw'}' border='0' /></a></td></tr> |
<img src="${iconpath}move_down.gif" alt='$lt{'dw'}' border='0' /></a></td></tr> |
</table></td> |
</table></td> |
<td>$selectbox |
<td>$selectbox |
</td><td bgcolor="#DDDDDD"> |
</td><td bgcolor="#DDDDDD"> |
<a href='javascript:removeres("$folderpath","$index","$renametitle","sequence");'> |
<a href='javascript:removeres("$folderpath","$index","$renametitle","sequence");'> |
<font size="-2" color="#990000">$lt{'rm'}</font></a> |
<font size="-2" color="#990000">$lt{'rm'}</font></a> |
|
<a href='javascript:cutres("$folderpath","$index","$renametitle","sequence");'> |
|
<font size="-2" color="#550044">$lt{'ct'}</font></a> |
<a href='javascript:changename("$folderpath","$index","$renametitle","sequence");'> |
<a href='javascript:changename("$folderpath","$index","$renametitle","sequence");'> |
<font size="-2" color="#009900">$lt{'rn'}</font></a></td> |
<font size="-2" color="#009900">$lt{'rn'}</font></a> |
|
<a href='javascript:markcopy("$folderpath","$index","$renametitle","sequence");'> |
|
<font size="-2" color="#000099">$lt{'cp'}</font></a></td> |
END |
END |
} |
} |
} |
} |
Line 1257 END
|
Line 1357 END
|
if ((!$isfolder) && ($residx) && ($folder!~/supplemental/) && (!$ispage)) { |
if ((!$isfolder) && ($residx) && ($folder!~/supplemental/) && (!$ispage)) { |
my $symb=&Apache::lonnet::symbclean( |
my $symb=&Apache::lonnet::symbclean( |
&Apache::lonnet::declutter('uploaded/'. |
&Apache::lonnet::declutter('uploaded/'. |
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}.'/'. |
$env{'course.'.$env{'request.course.id'}.'.domain'}.'/'. |
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}.'/'.$folder. |
$env{'course.'.$env{'request.course.id'}.'.num'}.'/'.$folder. |
'.sequence'). |
'.sequence'). |
'___'.$residx.'___'. |
'___'.$residx.'___'. |
&Apache::lonnet::declutter($url)); |
&Apache::lonnet::declutter($url)); |
Line 1279 END
|
Line 1379 END
|
} |
} |
$url.=(($url=~/\?/)?'&':'?').'symb='.&Apache::lonnet::escape($symb); |
$url.=(($url=~/\?/)?'&':'?').'symb='.&Apache::lonnet::escape($symb); |
if ($container eq 'page') { |
if ($container eq 'page') { |
my $symb=$ENV{'form.pagesymb'}; |
my $symb=$env{'form.pagesymb'}; |
|
|
$url=&Apache::lonnet::clutter((&Apache::lonnet::decode_symb($symb))[2]); |
$url=&Apache::lonnet::clutter((&Apache::lonnet::decode_symb($symb))[2]); |
$url.=(($url=~/\?/)?'&':'?').'symb='.&Apache::lonnet::escape($symb); |
$url.=(($url=~/\?/)?'&':'?').'symb='.&Apache::lonnet::escape($symb); |
Line 1288 END
|
Line 1388 END
|
my $parameterset=' '; |
my $parameterset=' '; |
if ($isfolder) { |
if ($isfolder) { |
my $foldername=&Apache::lonnet::escape($foldertitle); |
my $foldername=&Apache::lonnet::escape($foldertitle); |
my $folderpath=$ENV{'form.folderpath'}; |
my $folderpath=$env{'form.folderpath'}; |
if ($folderpath) { $folderpath.='&' }; |
if ($folderpath) { $folderpath.='&' }; |
$folderpath.=$folderarg.'&'.$foldername; |
$folderpath.=$folderarg.'&'.$foldername; |
$url.='folderpath='.&Apache::lonnet::escape($folderpath); |
$url.='folderpath='.&Apache::lonnet::escape($folderpath).$cpinfo; |
$parameterset='<label>'.&mt('Randomly Pick: '). |
$parameterset='<label>'.&mt('Randomly Pick: '). |
'<input type="text" size="4" name="randpick_'.$orderidx.'" value="'. |
'<input type="text" size="4" onChange="this.form.submit()" name="randpick_'.$orderidx.'" value="'. |
(&Apache::lonratedt::getparameter($orderidx, |
(&Apache::lonratedt::getparameter($orderidx, |
'parameter_randompick'))[0]. |
'parameter_randompick'))[0]. |
'" />'.'</label>'; |
'" />'. |
|
'<font size="-2"><a href="javascript:void(0)">'.&mt('Store').'</a></font></label>'; |
|
|
} |
} |
if ($ispage) { |
if ($ispage) { |
my $pagename=&Apache::lonnet::escape($pagetitle); |
my $pagename=&Apache::lonnet::escape($pagetitle); |
my $pagepath; |
my $pagepath; |
my $folderpath=$ENV{'form.folderpath'}; |
my $folderpath=$env{'form.folderpath'}; |
if ($folderpath) { $pagepath = $folderpath.'&' }; |
if ($folderpath) { $pagepath = $folderpath.'&' }; |
$pagepath.=$pagearg.'&'.$pagename; |
$pagepath.=$pagearg.'&'.$pagename; |
my $symb=$ENV{'form.pagesymb'}; |
my $symb=$env{'form.pagesymb'}; |
if (!$symb) { |
if (!$symb) { |
my $path='uploaded/'. |
my $path='uploaded/'. |
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}.'/'. |
$env{'course.'.$env{'request.course.id'}.'.domain'}.'/'. |
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}.'/'; |
$env{'course.'.$env{'request.course.id'}.'.num'}.'/'; |
$symb=&Apache::lonnet::encode_symb($path.$folder.'.sequence', |
$symb=&Apache::lonnet::encode_symb($path.$folder.'.sequence', |
$residx, |
$residx, |
$path.$pagearg.'.page'); |
$path.$pagearg.'.page'); |
} |
} |
$url.='pagepath='.&Apache::lonnet::escape($pagepath). |
$url.='pagepath='.&Apache::lonnet::escape($pagepath). |
'&pagesymb='.&Apache::lonnet::escape($symb); |
'&pagesymb='.&Apache::lonnet::escape($symb).$cpinfo; |
} |
} |
$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>'. |
Line 1323 END
|
Line 1424 END
|
if (($allowed) && ($folder!~/^supplemental/)) { |
if (($allowed) && ($folder!~/^supplemental/)) { |
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'hd' => 'Hidden', |
'hd' => 'Hidden', |
'ec' => 'URL hidden', |
'ec' => 'URL hidden'); |
'sp' => 'Store Parameters'); |
|
my $enctext= |
my $enctext= |
((&Apache::lonratedt::getparameter($orderidx,'parameter_encrypturl'))[0]=~/^yes$/i?' checked="1"':''); |
((&Apache::lonratedt::getparameter($orderidx,'parameter_encrypturl'))[0]=~/^yes$/i?' checked="1"':''); |
my $hidtext= |
my $hidtext= |
((&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'> |
<nobr><label><input type="checkbox" name="hidprs_$orderidx" $hidtext/> $lt{'hd'}</label></nobr></td> |
<nobr><label><input type="checkbox" name="hidprs_$orderidx" onClick="this.form.submit()" $hidtext /> $lt{'hd'}</label></nobr></td> |
<td bgcolor="#BBBBFF"><font size='-2'> |
<td bgcolor="#BBBBFF"><font size='-2'> |
<nobr><label><input type="checkbox" name="encprs_$orderidx" $enctext/> $lt{'ec'}</label></nobr></td> |
<nobr><label><input type="checkbox" name="encprs_$orderidx" onClick="this.form.submit()" $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'> |
|
<input type="submit" value="$lt{'sp'}" /> |
|
</font></td> |
|
ENDPARMS |
ENDPARMS |
} |
} |
$line.="</form></tr>"; |
$line.="</form></tr>"; |
Line 1349 ENDPARMS
|
Line 1446 ENDPARMS
|
sub tiehash { |
sub tiehash { |
my ($mode)=@_; |
my ($mode)=@_; |
$hashtied=0; |
$hashtied=0; |
if ($ENV{'request.course.fn'}) { |
if ($env{'request.course.fn'}) { |
if ($mode eq 'write') { |
if ($mode eq 'write') { |
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; |
} |
} |
} else { |
} else { |
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; |
} |
} |
Line 1386 sub checkonthis {
|
Line 1483 sub checkonthis {
|
if ($url=~/^\/res\//) { |
if ($url=~/^\/res\//) { |
my $result=&Apache::lonnet::repcopy( |
my $result=&Apache::lonnet::repcopy( |
&Apache::lonnet::filelocation('',$url)); |
&Apache::lonnet::filelocation('',$url)); |
if ($result==OK) { |
if ($result eq 'ok') { |
$r->print('<font color="green">'.&mt('ok').'</font>'); |
$r->print('<font color="green">'.&mt('ok').'</font>'); |
$r->rflush(); |
$r->rflush(); |
&Apache::lonnet::countacc($url); |
&Apache::lonnet::countacc($url); |
Line 1398 sub checkonthis {
|
Line 1495 sub checkonthis {
|
$r->print(' '); |
$r->print(' '); |
} |
} |
$r->print('- '.&mt('Rendering').': '); |
$r->print('- '.&mt('Rendering').': '); |
my $oldpath=$ENV{'request.filename'}; |
my ($errorcount,$warningcount)=split(/:/, |
$ENV{'request.filename'}=&Apache::lonnet::filelocation('',$url); |
&Apache::lonnet::ssi_body($url, |
&Apache::lonxml::xmlparse($r,'web', |
('grade_target'=>'web', |
&Apache::lonnet::getfile( |
'return_only_error_and_warning_counts' => 1))); |
&Apache::lonnet::filelocation('',$url))); |
if (($errorcount) || |
undef($Apache::lonhomework::parsing_a_problem); |
($warningcount)) { |
$ENV{'request.filename'}=$oldpath; |
if ($errorcount) { |
if (($Apache::lonxml::errorcount) || |
|
($Apache::lonxml::warningcount)) { |
|
if ($Apache::lonxml::errorcount) { |
|
$r->print('<img src="/adm/lonMisc/bomb.gif" /><font color="red"><b>'. |
$r->print('<img src="/adm/lonMisc/bomb.gif" /><font color="red"><b>'. |
$Apache::lonxml::errorcount.' '. |
$errorcount.' '. |
&mt('error(s)').'</b></font> '); |
&mt('error(s)').'</b></font> '); |
} |
} |
if ($Apache::lonxml::warningcount) { |
if ($warningcount) { |
$r->print('<font color="blue">'. |
$r->print('<font color="blue">'. |
$Apache::lonxml::warningcount.' '. |
$warningcount.' '. |
&mt('warning(s)').'</font>'); |
&mt('warning(s)').'</font>'); |
} |
} |
} else { |
} else { |
Line 1429 sub checkonthis {
|
Line 1523 sub checkonthis {
|
&checkonthis($r,$_,$level+1); |
&checkonthis($r,$_,$level+1); |
} |
} |
} |
} |
} elsif ($result==HTTP_SERVICE_UNAVAILABLE) { |
} elsif ($result eq 'unavailable') { |
$r->print('<font color="red"><b>'.&mt('connection down').'</b></font>'); |
$r->print('<font color="red"><b>'.&mt('connection down').'</b></font>'); |
} elsif ($result==HTTP_NOT_FOUND) { |
} elsif ($result eq 'not_found') { |
unless ($url=~/\$/) { |
unless ($url=~/\$/) { |
$r->print('<font color="red"><b>'.&mt('not found').'</b></font>'); |
$r->print('<font color="red"><b>'.&mt('not found').'</b></font>'); |
} else { |
} else { |
Line 1452 sub verifycontent {
|
Line 1546 sub verifycontent {
|
my $r=shift; |
my $r=shift; |
my $loaderror=&Apache::lonnet::overloaderror($r); |
my $loaderror=&Apache::lonnet::overloaderror($r); |
if ($loaderror) { return $loaderror; } |
if ($loaderror) { return $loaderror; } |
|
my $html=&Apache::lonxml::xmlbegin(); |
$r->print('<html><head><title>Verify Content</title></head>'. |
$r->print($html.'<head><title>Verify Content</title></head>'. |
&Apache::loncommon::bodytag('Verify Course Documents')); |
&Apache::loncommon::bodytag('Verify Course Documents')); |
$hashtied=0; |
$hashtied=0; |
undef %alreadyseen; |
undef %alreadyseen; |
Line 1481 sub verifycontent {
|
Line 1575 sub verifycontent {
|
|
|
sub checkversions { |
sub checkversions { |
my $r=shift; |
my $r=shift; |
$r->print('<html><head><title>Check Versions</title></head>'. |
my $html=&Apache::lonxml::xmlbegin(); |
|
$r->print($html.'<head><title>Check Versions</title></head>'. |
&Apache::loncommon::bodytag('Check Course Document Versions')); |
&Apache::loncommon::bodytag('Check Course Document Versions')); |
my $header=''; |
my $header=''; |
my $startsel=''; |
my $startsel=''; |
Line 1493 sub checkversions {
|
Line 1588 sub checkversions {
|
my $starttime=0; |
my $starttime=0; |
my $haschanged=0; |
my $haschanged=0; |
my %setversions=&Apache::lonnet::dump('resourceversions', |
my %setversions=&Apache::lonnet::dump('resourceversions', |
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, |
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}); |
$env{'course.'.$env{'request.course.id'}.'.num'}); |
|
|
$hashtied=0; |
$hashtied=0; |
&tiehash(); |
&tiehash(); |
my %newsetversions=(); |
my %newsetversions=(); |
if ($ENV{'form.setmostrecent'}) { |
if ($env{'form.setmostrecent'}) { |
$haschanged=1; |
$haschanged=1; |
foreach (keys %hash) { |
foreach (keys %hash) { |
if ($_=~/^ids\_(\/res\/.+)$/) { |
if ($_=~/^ids\_(\/res\/.+)$/) { |
$newsetversions{$1}='mostrecent'; |
$newsetversions{$1}='mostrecent'; |
} |
} |
} |
} |
} elsif ($ENV{'form.setcurrent'}) { |
} elsif ($env{'form.setcurrent'}) { |
$haschanged=1; |
$haschanged=1; |
foreach (keys %hash) { |
foreach (keys %hash) { |
if ($_=~/^ids\_(\/res\/.+)$/) { |
if ($_=~/^ids\_(\/res\/.+)$/) { |
Line 1516 sub checkversions {
|
Line 1611 sub checkversions {
|
} |
} |
} |
} |
} |
} |
} elsif ($ENV{'form.setversions'}) { |
} elsif ($env{'form.setversions'}) { |
$haschanged=1; |
$haschanged=1; |
foreach (keys %ENV) { |
foreach (keys %env) { |
if ($_=~/^form\.set_version_(.+)$/) { |
if ($_=~/^form\.set_version_(.+)$/) { |
my $src=$1; |
my $src=$1; |
if (($ENV{$_}) && ($ENV{$_} ne $setversions{$src})) { |
if (($env{$_}) && ($env{$_} ne $setversions{$src})) { |
$newsetversions{$src}=$ENV{$_}; |
$newsetversions{$src}=$env{$_}; |
} |
} |
} |
} |
} |
} |
} |
} |
if ($haschanged) { |
if ($haschanged) { |
if (&Apache::lonnet::put('resourceversions',\%newsetversions, |
if (&Apache::lonnet::put('resourceversions',\%newsetversions, |
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, |
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}) eq 'ok') { |
$env{'course.'.$env{'request.course.id'}.'.num'}) eq 'ok') { |
$r->print('<h1>'.&mt('Your Version Settings have been Stored').'</h1>'); |
$r->print('<h1>'.&mt('Your Version Settings have been Stored').'</h1>'); |
} else { |
} else { |
$r->print('<h1><font color="red">'.&mt('An Error Occured while Attempting to Store your Version Settings').'</font></h1>'); |
$r->print('<h1><font color="red">'.&mt('An Error Occured while Attempting to Store your Version Settings').'</font></h1>'); |
Line 1538 sub checkversions {
|
Line 1633 sub checkversions {
|
&mark_hash_old(); |
&mark_hash_old(); |
} |
} |
&changewarning($r,''); |
&changewarning($r,''); |
if ($ENV{'form.timerange'} eq 'all') { |
if ($env{'form.timerange'} eq 'all') { |
# show all documents |
# show all documents |
$header=&mt('All Documents in Course'); |
$header=&mt('All Documents in Course'); |
$allsel=1; |
$allsel=1; |
Line 1551 sub checkversions {
|
Line 1646 sub checkversions {
|
} else { |
} else { |
# show documents which changed |
# show documents which changed |
%changes=&Apache::lonnet::dump |
%changes=&Apache::lonnet::dump |
('versionupdate',$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, |
('versionupdate',$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}); |
$env{'course.'.$env{'request.course.id'}.'.num'}); |
my $firstkey=(keys %changes)[0]; |
my $firstkey=(keys %changes)[0]; |
unless ($firstkey=~/^error\:/) { |
unless ($firstkey=~/^error\:/) { |
unless ($ENV{'form.timerange'}) { |
unless ($env{'form.timerange'}) { |
$ENV{'form.timerange'}=604800; |
$env{'form.timerange'}=604800; |
} |
} |
my $seltext=&mt('during the last').' '.$ENV{'form.timerange'}.' ' |
my $seltext=&mt('during the last').' '.$env{'form.timerange'}.' ' |
.&mt('seconds'); |
.&mt('seconds'); |
if ($ENV{'form.timerange'}==-1) { |
if ($env{'form.timerange'}==-1) { |
$seltext='since start of course'; |
$seltext='since start of course'; |
$startsel='selected'; |
$startsel='selected'; |
$ENV{'form.timerange'}=time; |
$env{'form.timerange'}=time; |
} |
} |
$starttime=time-$ENV{'form.timerange'}; |
$starttime=time-$env{'form.timerange'}; |
if ($ENV{'form.timerange'}==2592000) { |
if ($env{'form.timerange'}==2592000) { |
$seltext=&mt('during the last month').' ('.&Apache::lonlocal::locallocaltime($starttime).')'; |
$seltext=&mt('during the last month').' ('.&Apache::lonlocal::locallocaltime($starttime).')'; |
$monthsel='selected'; |
$monthsel='selected'; |
} elsif ($ENV{'form.timerange'}==604800) { |
} elsif ($env{'form.timerange'}==604800) { |
$seltext=&mt('during the last week').' ('.&Apache::lonlocal::locallocaltime($starttime).')'; |
$seltext=&mt('during the last week').' ('.&Apache::lonlocal::locallocaltime($starttime).')'; |
$weeksel='selected'; |
$weeksel='selected'; |
} elsif ($ENV{'form.timerange'}==86400) { |
} elsif ($env{'form.timerange'}==86400) { |
$seltext=&mt('since yesterday').' ('.&Apache::lonlocal::locallocaltime($starttime).')'; |
$seltext=&mt('since yesterday').' ('.&Apache::lonlocal::locallocaltime($starttime).')'; |
$daysel='selected'; |
$daysel='selected'; |
} |
} |
Line 1582 sub checkversions {
|
Line 1677 sub checkversions {
|
} |
} |
} |
} |
%setversions=&Apache::lonnet::dump('resourceversions', |
%setversions=&Apache::lonnet::dump('resourceversions', |
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, |
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}); |
$env{'course.'.$env{'request.course.id'}.'.num'}); |
my %lt=&Apache::lonlocal::texthash |
my %lt=&Apache::lonlocal::texthash |
('st' => 'Version changes since start of Course', |
('st' => 'Version changes since start of Course', |
'lm' => 'Version changes since last Month', |
'lm' => 'Version changes since last Month', |
Line 1744 sub is_hash_old {
|
Line 1839 sub is_hash_old {
|
} |
} |
|
|
sub changewarning { |
sub changewarning { |
my ($r,$postexec)=@_; |
my ($r,$postexec,$message,$url)=@_; |
if (!&is_hash_old()) { return; } |
if (!&is_hash_old()) { return; } |
my $pathvar='folderpath'; |
my $pathvar='folderpath'; |
my $path=&Apache::lonnet::escape($ENV{'form.folderpath'}); |
my $path=&Apache::lonnet::escape($env{'form.folderpath'}); |
if (defined($ENV{'form.pagepath'})) { |
if (!defined($url)) { |
$pathvar='pagepath'; |
if (defined($env{'form.pagepath'})) { |
$path=&Apache::lonnet::escape($ENV{'form.pagepath'}); |
$pathvar='pagepath'; |
$path.='&symb='.&Apache::lonnet::escape($ENV{'form.pagesymb'}); |
$path=&Apache::lonnet::escape($env{'form.pagepath'}); |
|
$path.='&symb='.&Apache::lonnet::escape($env{'form.pagesymb'}); |
|
} |
|
$url='/adm/coursedocs?'.$pathvar.'='.$path; |
|
} |
|
if (!defined($message)) { |
|
$message='Changes will become active for your current session after [_1], or the next time you log in.'; |
} |
} |
$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?'. |
'<input type="hidden" name="orgurl" value="'.$url. |
$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($message,' <input type="hidden" name="'. |
' <input type="hidden" name="'. |
$env{'request.role'}.'" value="1" /><input type="button" value="'. |
$ENV{'request.role'}.'" value="1" /><input type="button" value="'. |
&mt('re-initializing course').'" onClick="reinit(this.form)" />'). |
&mt('re-initializing course').'" onClick="reinit(this.form)"/>'.&mt(', or the next time you log in.'). |
|
$help{'Caching'}.'</font></h3></form>'); |
$help{'Caching'}.'</font></h3></form>'); |
} |
} |
|
|
Line 1795 sub handler {
|
Line 1894 sub handler {
|
'Docs_About_My_Personal_Info,Docs_Editing_Templated_Pages'); |
'Docs_About_My_Personal_Info,Docs_Editing_Templated_Pages'); |
$help{'Caching'} = &Apache::loncommon::help_open_topic('Caching'); |
$help{'Caching'} = &Apache::loncommon::help_open_topic('Caching'); |
|
|
if ($ENV{'form.verify'}) { |
if ($env{'form.verify'}) { |
&verifycontent($r); |
&verifycontent($r); |
} elsif ($ENV{'form.versions'}) { |
} elsif ($env{'form.versions'}) { |
&checkversions($r); |
&checkversions($r); |
} elsif ($ENV{'form.dumpcourse'}) { |
} elsif ($env{'form.dumpcourse'}) { |
&dumpcourse($r); |
&dumpcourse($r); |
} elsif ($ENV{'form.exportcourse'}) { |
} elsif ($env{'form.exportcourse'}) { |
&exportcourse($r); |
&exportcourse($r); |
} else { |
} else { |
# is this a standard course? |
# is this a standard course? |
|
|
my $standard=($ENV{'request.course.uri'}=~/^\/uploaded\//); |
my $standard=($env{'request.course.uri'}=~/^\/uploaded\//); |
my $forcestandard = 0; |
my $forcestandard = 0; |
my $forcesupplement; |
my $forcesupplement; |
my $script=''; |
my $script=''; |
Line 1816 sub handler {
|
Line 1915 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','pagesymb']); |
['folderpath','pagepath','pagesymb','markedcopy_url','markedcopy_title']); |
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)); |
$ENV{'form.folder'}=pop(@folderpath); |
$env{'form.folder'}=pop(@folderpath); |
} |
} |
if ($ENV{'form.pagepath'}) { |
if ($env{'form.pagepath'}) { |
my (@pagepath)=split('&',$ENV{'form.pagepath'}); |
my (@pagepath)=split('&',$env{'form.pagepath'}); |
$ENV{'form.pagename'}=&Apache::lonnet::unescape(pop(@pagepath)); |
$env{'form.pagename'}=&Apache::lonnet::unescape(pop(@pagepath)); |
$ENV{'form.folder'}=pop(@pagepath); |
$env{'form.folder'}=pop(@pagepath); |
$containertag = '<input type="hidden" name="pagepath" value="" />'. |
$containertag = '<input type="hidden" name="pagepath" value="" />'. |
'<input type="hidden" name="pagesymb" value="" />'; |
'<input type="hidden" name="pagesymb" value="" />'; |
$uploadtag = '<input type="hidden" name="pagepath" value="'.$ENV{'form.pagepath'}.'" />'. |
$uploadtag = '<input type="hidden" name="pagepath" value="'.$env{'form.pagepath'}.'" />'. |
'<input type="hidden" name="pagesymb" value="'.$ENV{'form.pagesymb'}.'" />'; |
'<input type="hidden" name="pagesymb" value="'.$env{'form.pagesymb'}.'" />'; |
} |
} |
if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) { |
if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) { |
$showdoc='/'.$1; |
$showdoc='/'.$1; |
} |
} |
unless ($showdoc) { # got called from remote |
unless ($showdoc) { # got called from remote |
if (($ENV{'form.folder'}=~/^default_/) || |
if (($env{'form.folder'}=~/^default_/) || |
($ENV{'form.folder'} =~ m#^\d+/(pages|sequences)/#)) { |
($env{'form.folder'} =~ m#^\d+/(pages|sequences)/#)) { |
$forcestandard = 1; |
$forcestandard = 1; |
} |
} |
$forcesupplement=($ENV{'form.folder'}=~/^supplemental_/); |
$forcesupplement=($env{'form.folder'}=~/^supplemental_/); |
|
|
# does this user have privileges to post, etc? |
# does this user have privileges to post, etc? |
$allowed=&Apache::lonnet::allowed('mdc',$ENV{'request.course.id'}); |
$allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'}); |
if ($allowed) { |
if ($allowed) { |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['cmd']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['cmd']); |
$script=&Apache::lonratedt::editscript('simple'); |
$script=&Apache::lonratedt::editscript('simple'); |
Line 1855 sub handler {
|
Line 1954 sub handler {
|
} |
} |
|
|
# get course data |
# get course data |
my $coursenum=$ENV{'course.'.$ENV{'request.course.id'}.'.num'}; |
my $coursenum=$env{'course.'.$env{'request.course.id'}.'.num'}; |
my $coursedom=$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}; |
my $coursedom=$env{'course.'.$env{'request.course.id'}.'.domain'}; |
|
|
# get personal data |
# get personal data |
|
|
my $uname=$ENV{'user.name'}; |
my $uname=$env{'user.name'}; |
my $udom=$ENV{'user.domain'}; |
my $udom=$env{'user.domain'}; |
my $plainname=&Apache::lonnet::escape( |
my $plainname=&Apache::lonnet::escape( |
&Apache::loncommon::plainname($uname,$udom)); |
&Apache::loncommon::plainname($uname,$udom)); |
|
|
# graphics settings |
# graphics settings |
|
|
$iconpath = $r->dir_config('lonIconsURL') . "/"; |
$iconpath = &Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL') . "/"); |
|
|
my $now=time; |
my $now=time; |
|
|
# print screen |
# print screen |
|
my $html=&Apache::lonxml::xmlbegin(); |
$r->print(<<ENDDOCUMENT); |
$r->print(<<ENDDOCUMENT); |
<html> |
$html |
<head> |
<head> |
<title>The LearningOnline Network with CAPA</title> |
<title>The LearningOnline Network with CAPA</title> |
<script> |
<script> |
Line 1950 function makeabout() {
|
Line 2050 function makeabout() {
|
this.document.forms.newaboutsomeone.importdetail.value= |
this.document.forms.newaboutsomeone.importdetail.value= |
'About '+user+'=/adm/'+comp[1]+'/'+comp[0]+'/aboutme'; |
'About '+user+'=/adm/'+comp[1]+'/'+comp[0]+'/aboutme'; |
this.document.forms.newaboutsomeone.submit(); |
this.document.forms.newaboutsomeone.submit(); |
} |
} else { |
|
alert("Not a valid user\@domain"); |
|
} |
|
} else { |
|
alert("Please enter both user and domain in the format user\@domain"); |
} |
} |
} |
} |
} |
} |
|
|
function makeims() { |
function makeims() { |
var caller = document.forms.ims.folder.value |
var caller = document.forms.ims.folder.value; |
var newlocation = "/adm/imsimportdocs?folder="+caller+"&phase=one" |
var newlocation = "/adm/imsimportdocs?folder="+caller+"&phase=one"; |
newWindow = window.open("","IMSimport","HEIGHT=700,WIDTH=750,scrollbars=yes") |
newWindow = window.open("","IMSimport","HEIGHT=700,WIDTH=750,scrollbars=yes"); |
newWindow.location.href = newlocation |
newWindow.location.href = newlocation; |
} |
} |
|
|
|
|
Line 1989 function changename(folderpath,index,old
|
Line 2093 function changename(folderpath,index,old
|
} |
} |
|
|
function removeres(folderpath,index,oldtitle,container,pagesymb) { |
function removeres(folderpath,index,oldtitle,container,pagesymb) { |
if (confirm('Remove "'+oldtitle+'"?')) { |
if (confirm('WARNING: Removing a resource makes associated grades and scores inaccessible!\\nRemove "'+oldtitle+'"?')) { |
this.document.forms.renameform.cmd.value='del_'+index; |
this.document.forms.renameform.cmd.value='del_'+index; |
if (container == 'sequence') { |
if (container == 'sequence') { |
this.document.forms.renameform.folderpath.value=folderpath; |
this.document.forms.renameform.folderpath.value=folderpath; |
Line 2002 function removeres(folderpath,index,oldt
|
Line 2106 function removeres(folderpath,index,oldt
|
} |
} |
} |
} |
|
|
|
function cutres(folderpath,index,oldtitle,container,pagesymb) { |
|
if (confirm('WARNING: Cutting a resource makes associated grades and scores inaccessible,\\neven if it is pasted in again elsewhere!\\nCut "'+oldtitle+'"?')) { |
|
this.document.forms.renameform.cmd.value='cut_'+index; |
|
this.document.forms.renameform.markcopy.value=index; |
|
if (container == 'sequence') { |
|
this.document.forms.renameform.folderpath.value=folderpath; |
|
} |
|
if (container == 'page') { |
|
this.document.forms.renameform.pagepath.value=folderpath; |
|
this.document.forms.renameform.pagesymb.value=pagesymb; |
|
} |
|
this.document.forms.renameform.submit(); |
|
} |
|
} |
|
|
|
function markcopy(folderpath,index,oldtitle,container,pagesymb) { |
|
this.document.forms.renameform.markcopy.value=index; |
|
if (container == 'sequence') { |
|
this.document.forms.renameform.folderpath.value=folderpath; |
|
} |
|
if (container == 'page') { |
|
this.document.forms.renameform.pagepath.value=folderpath; |
|
this.document.forms.renameform.pagesymb.value=pagesymb; |
|
} |
|
this.document.forms.renameform.submit(); |
|
} |
|
|
</script> |
</script> |
|
|
ENDNEWSCRIPT |
ENDNEWSCRIPT |
Line 2016 ENDNEWSCRIPT
|
Line 2147 ENDNEWSCRIPT
|
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'uplm' => 'Upload a new main course document', |
'uplm' => 'Upload a new main course document', |
'upls' => 'Upload a new supplemental course document', |
'upls' => 'Upload a new supplemental course document', |
'impp' => 'Import a published document', |
'impp' => 'Import a document', |
|
'pubd' => 'Published documents', |
|
'copm' => 'All documents out of a published map', |
'spec' => 'Special documents', |
'spec' => 'Special documents', |
'upld' => 'Upload Document', |
'upld' => 'Upload Document', |
'srch' => 'Search', |
'srch' => 'Search', |
Line 2048 ENDNEWSCRIPT
|
Line 2181 ENDNEWSCRIPT
|
'cv' => 'Check/Set Resource Versions', |
'cv' => 'Check/Set Resource Versions', |
); |
); |
|
|
my $folderpath=$ENV{'form.folderpath'}; |
my $folderpath=$env{'form.folderpath'}; |
if (!$folderpath) { |
if (!$folderpath) { |
if ($ENV{'form.folder'} eq '' || |
if ($env{'form.folder'} eq '' || |
$ENV{'form.folder'} eq 'supplemental') { |
$env{'form.folder'} eq 'supplemental') { |
$folderpath='default&'. |
$folderpath='default&'. |
&Apache::lonnet::escape(&mt('Main Course Documents')); |
&Apache::lonnet::escape(&mt('Main Course Documents')); |
} |
} |
} |
} |
unless ($ENV{'form.pagepath'}) { |
unless ($env{'form.pagepath'}) { |
$containertag = '<input type="hidden" name="folderpath" value="" />'; |
$containertag = '<input type="hidden" name="folderpath" value="" />'; |
$uploadtag = '<input type="hidden" name="folderpath" value="'.$folderpath.'" />'; |
$uploadtag = '<input type="hidden" name="folderpath" value="'.$folderpath.'" />'; |
} |
} |
Line 2065 ENDNEWSCRIPT
|
Line 2198 ENDNEWSCRIPT
|
<form name="renameform" method="post" action="/adm/coursedocs"> |
<form name="renameform" method="post" action="/adm/coursedocs"> |
<input type="hidden" name="title" /> |
<input type="hidden" name="title" /> |
<input type="hidden" name="cmd" /> |
<input type="hidden" name="cmd" /> |
|
<input type="hidden" name="markcopy" /> |
$containertag |
$containertag |
</form> |
</form> |
<form name="simpleedit" method="post" action="/adm/coursedocs"> |
<form name="simpleedit" method="post" action="/adm/coursedocs"> |
Line 2091 ENDCOURSEVERIFY
|
Line 2225 ENDCOURSEVERIFY
|
$r->print('<tr><td bgcolor="#BBBBBB">'); |
$r->print('<tr><td bgcolor="#BBBBBB">'); |
# '<h2>'.&mt('Main Course Documents'). |
# '<h2>'.&mt('Main Course Documents'). |
# ($allowed?' '.$help{'Main_Course_Documents'}:'').'</h2>'); |
# ($allowed?' '.$help{'Main_Course_Documents'}:'').'</h2>'); |
my $folder=$ENV{'form.folder'}; |
my $folder=$env{'form.folder'}; |
if ($folder eq '' || $folder eq 'supplemental') { |
if ($folder eq '' || $folder eq 'supplemental') { |
$folder='default'; |
$folder='default'; |
$ENV{'form.folderpath'}='default&'.&Apache::lonnet::escape(&mt('Main Course Documents')); |
$env{'form.folderpath'}='default&'.&Apache::lonnet::escape(&mt('Main Course Documents')); |
} |
} |
my $postexec=''; |
my $postexec=''; |
if ($folder eq 'default') { |
if ($folder eq 'default') { |
Line 2136 $uploadtag
|
Line 2270 $uploadtag
|
</td> |
</td> |
<td bgcolor="#DDDDDD"> |
<td bgcolor="#DDDDDD"> |
<form action="/adm/coursedocs" method="post" name="simpleeditdefault"> |
<form action="/adm/coursedocs" method="post" name="simpleeditdefault"> |
|
$lt{'pubd'}<br /> |
$uploadtag |
$uploadtag |
<input type=button onClick="javascript:groupsearch()" value="$lt{'srch'}"> |
<input type=button onClick="javascript:groupsearch()" value="$lt{'srch'}"> |
<nobr> |
<nobr> |
Line 2144 $help{'Importing_LON-CAPA_Resource'}
|
Line 2279 $help{'Importing_LON-CAPA_Resource'}
|
</nobr> |
</nobr> |
<p> |
<p> |
<hr /> |
<hr /> |
|
$lt{'copm'} |
<input type="text" size="20" name="importmap"><br /> |
<input type="text" size="20" name="importmap"><br /> |
<nobr><input type=button |
<nobr><input type=button |
onClick="javascript:openbrowser('simpleeditdefault','importmap','sequence,page','')" |
onClick="javascript:openbrowser('simpleeditdefault','importmap','sequence,page','')" |
Line 2151 value="$lt{'selm'}"> <input type="submit
|
Line 2287 value="$lt{'selm'}"> <input type="submit
|
$help{'Load_Map'}</nobr> |
$help{'Load_Map'}</nobr> |
</p> |
</p> |
</form> |
</form> |
</td> |
|
<td bgcolor="#DDDDDD"> |
|
ENDFORM |
ENDFORM |
unless ($ENV{'form.pagepath'}) { |
unless ($env{'form.pagepath'}) { |
|
$r->print(<<ENDFORM); |
|
<hr /> |
|
<form action="/adm/coursedocs" method="post" name="newext"> |
|
$uploadtag |
|
<input type=hidden name="importdetail" value=""> |
|
<nobr> |
|
<input name="newext" type="button" onClick="javascript:makenewext('newext');" |
|
value="$lt{'extr'}" /> $help{'Adding_External_Resource'} |
|
</nobr> |
|
</form> |
|
<form action="/adm/imsimportdocs" method="post" name="ims"> |
|
<input type="hidden" name="folder" value="$folder" /> |
|
<input name="imsimport" type="button" value="$lt{'imsf'}" onClick="javascript:makeims();" /> |
|
</nobr> |
|
</form> |
|
ENDFORM |
|
} |
|
$r->print('</td><td bgcolor="#DDDDDD">'); |
|
unless ($env{'form.pagepath'}) { |
$r->print(<<ENDFORM); |
$r->print(<<ENDFORM); |
<form action="/adm/coursedocs" method="post" name="newfolder"> |
<form action="/adm/coursedocs" method="post" name="newfolder"> |
<input type="hidden" name="folderpath" value="$ENV{'form.folderpath'}" /> |
<input type="hidden" name="folderpath" value="$env{'form.folderpath'}" /> |
<input type=hidden name="importdetail" value=""> |
<input type=hidden name="importdetail" value=""> |
<nobr> |
<nobr> |
<input name="newfolder" type="button" |
<input name="newfolder" type="button" |
Line 2166 value="$lt{'newf'}" />$help{'Adding_Fold
|
Line 2319 value="$lt{'newf'}" />$help{'Adding_Fold
|
</nobr> |
</nobr> |
</form> |
</form> |
<form action="/adm/coursedocs" method="post" name="newpage"> |
<form action="/adm/coursedocs" method="post" name="newpage"> |
<input type="hidden" name="folderpath" value="$ENV{'form.folderpath'}" /> |
<input type="hidden" name="folderpath" value="$env{'form.folderpath'}" /> |
<input type=hidden name="importdetail" value=""> |
<input type=hidden name="importdetail" value=""> |
<nobr> |
<nobr> |
<input name="newpage" type="button" |
<input name="newpage" type="button" |
Line 2174 onClick="javascript:makenewpage(this.for
|
Line 2327 onClick="javascript:makenewpage(this.for
|
value="$lt{'newp'}" />$help{'Adding_Pages'} |
value="$lt{'newp'}" />$help{'Adding_Pages'} |
</nobr> |
</nobr> |
</form> |
</form> |
<form action="/adm/coursedocs" method="post" name="newext"> |
|
$uploadtag |
|
<input type=hidden name="importdetail" value=""> |
|
<nobr> |
|
<input name="newext" type="button" onClick="javascript:makenewext('newext');" |
|
value="$lt{'extr'}" /> $help{'Adding_External_Resource'} |
|
</nobr> |
|
</form> |
|
<form action="/adm/coursedocs" method="post" name="newsyl"> |
<form action="/adm/coursedocs" method="post" name="newsyl"> |
$uploadtag |
$uploadtag |
<input type=hidden name="importdetail" |
<input type=hidden name="importdetail" |
Line 2252 onClick="javascript:makeabout();" />
|
Line 2397 onClick="javascript:makeabout();" />
|
</nobr> |
</nobr> |
ENDFORM |
ENDFORM |
} |
} |
if ($ENV{'form.pagepath'}) { |
if ($env{'form.pagepath'}) { |
$r->print(<<ENDBLOCK); |
$r->print(<<ENDBLOCK); |
<form action="/adm/coursedocs" method="post" name="newsmpproblem"> |
<form action="/adm/coursedocs" method="post" name="newsmpproblem"> |
$uploadtag |
$uploadtag |
Line 2270 $uploadtag
|
Line 2415 $uploadtag
|
onClick="javascript:makeexamupload();" /> |
onClick="javascript:makeexamupload();" /> |
$help{'Score_Upload_Form'} |
$help{'Score_Upload_Form'} |
</nobr> |
</nobr> |
</form> |
|
ENDBLOCK |
ENDBLOCK |
} else { |
$r->print('</form>'); |
$r->print(<<ENDFORM); |
|
</form> |
|
<form action="/adm/imsimportdocs" method="post" name="ims"> |
|
<input type="hidden" name="folder" value="$folder" /> |
|
<input name="imsimport" type="button" value="$lt{'imsf'}" onClick="javascript:makeims();" /> |
|
</nobr> |
|
</form> |
|
ENDFORM |
|
} |
} |
$r->print('</td></tr>'."\n". |
$r->print('</td></tr>'."\n". |
'</table>'); |
'</table>'); |
Line 2291 ENDFORM
|
Line 2427 ENDFORM
|
$r->print('<tr><td bgcolor="#BBBBBB">'); |
$r->print('<tr><td bgcolor="#BBBBBB">'); |
# '<h2>'.&mt('Supplemental Course Documents'). |
# '<h2>'.&mt('Supplemental Course Documents'). |
# ($allowed?' '.$help{'Supplemental'}:'').'</h2>'); |
# ($allowed?' '.$help{'Supplemental'}:'').'</h2>'); |
my $folder=$ENV{'form.folder'}; |
my $folder=$env{'form.folder'}; |
unless ($folder=~/^supplemental/) { |
unless ($folder=~/^supplemental/) { |
$folder='supplemental'; |
$folder='supplemental'; |
} |
} |
if ($folder =~ /^supplemental$/ && |
if ($folder =~ /^supplemental$/ && |
$ENV{'form.folderpath'} =~ /^default\&/) { |
$env{'form.folderpath'} =~ /^default\&/) { |
$ENV{'form.folderpath'}='supplemental&'. |
$env{'form.folderpath'}='supplemental&'. |
&Apache::lonnet::escape(&mt('Supplemental Course Documents')); |
&Apache::lonnet::escape(&mt('Supplemental Course Documents')); |
} |
} |
&editor($r,$coursenum,$coursedom,$folder,$allowed); |
&editor($r,$coursenum,$coursedom,$folder,$allowed); |
Line 2318 ENDFORM
|
Line 2454 ENDFORM
|
<textarea cols=50 rows=4 name='comment'> |
<textarea cols=50 rows=4 name='comment'> |
</textarea> |
</textarea> |
<br /> |
<br /> |
<input type="hidden" name="folderpath" value="$ENV{'form.folderpath'}" /> |
<input type="hidden" name="folderpath" value="$env{'form.folderpath'}" /> |
<input type="hidden" name="cmd" value="upload_supplemental"> |
<input type="hidden" name="cmd" value="upload_supplemental"> |
<nobr> |
<nobr> |
<input type="submit" value="$lt{'upld'}"> |
<input type="submit" value="$lt{'upld'}"> |
Line 2328 ENDFORM
|
Line 2464 ENDFORM
|
</td> |
</td> |
<td bgcolor="#DDDDDD"> |
<td bgcolor="#DDDDDD"> |
<form action="/adm/coursedocs" method="post" name="supnewfolder"> |
<form action="/adm/coursedocs" method="post" name="supnewfolder"> |
<input type="hidden" name="folderpath" value="$ENV{'form.folderpath'}" /> |
<input type="hidden" name="folderpath" value="$env{'form.folderpath'}" /> |
<input type=hidden name="importdetail" value=""> |
<input type=hidden name="importdetail" value=""> |
<nobr> |
<nobr> |
<input name="newfolder" type="button" |
<input name="newfolder" type="button" |
Line 2337 value="$lt{'newf'}" /> $help{'Adding_Fol
|
Line 2473 value="$lt{'newf'}" /> $help{'Adding_Fol
|
</nobr> |
</nobr> |
</form> |
</form> |
<form action="/adm/coursedocs" method="post" name="supnewext"> |
<form action="/adm/coursedocs" method="post" name="supnewext"> |
<input type="hidden" name="folderpath" value="$ENV{'form.folderpath'}" /> |
<input type="hidden" name="folderpath" value="$env{'form.folderpath'}" /> |
<input type=hidden name="importdetail" value=""> |
<input type=hidden name="importdetail" value=""> |
<nobr> |
<nobr> |
<input name="newext" type="button" |
<input name="newext" type="button" |
Line 2346 value="$lt{'extr'}" /> $help{'Adding_Ext
|
Line 2482 value="$lt{'extr'}" /> $help{'Adding_Ext
|
</nobr> |
</nobr> |
</form> |
</form> |
<form action="/adm/coursedocs" method="post" name="supnewsyl"> |
<form action="/adm/coursedocs" method="post" name="supnewsyl"> |
<input type="hidden" name="folderpath" value="$ENV{'form.folderpath'}" /> |
<input type="hidden" name="folderpath" value="$env{'form.folderpath'}" /> |
<input type=hidden name="importdetail" |
<input type=hidden name="importdetail" |
value="Syllabus=/public/$coursedom/$coursenum/syllabus"> |
value="Syllabus=/public/$coursedom/$coursenum/syllabus"> |
<nobr> |
<nobr> |
Line 2355 $help{'Syllabus'}
|
Line 2491 $help{'Syllabus'}
|
</nobr> |
</nobr> |
</form> |
</form> |
<form action="/adm/coursedocs" method="post" name="subnewaboutme"> |
<form action="/adm/coursedocs" method="post" name="subnewaboutme"> |
<input type="hidden" name="folderpath" value="$ENV{'form.folderpath'}" /> |
<input type="hidden" name="folderpath" value="$env{'form.folderpath'}" /> |
<input type=hidden name="importdetail" |
<input type=hidden name="importdetail" |
value="$plainname=/adm/$udom/$uname/aboutme"> |
value="$plainname=/adm/$udom/$uname/aboutme"> |
<nobr> |
<nobr> |