version 1.11, 2002/08/27 12:18:13
|
version 1.15, 2002/09/02 15:27:08
|
Line 34 use Apache::lonnet;
|
Line 34 use Apache::lonnet;
|
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::lonratedt; |
use Apache::lonratedt; |
use Apache::lonratsrv; |
use Apache::lonratsrv; |
|
use Apache::lonxml; |
|
|
my $iconpath; |
my $iconpath; |
|
|
Line 54 sub storemap {
|
Line 55 sub storemap {
|
my ($coursenum,$coursedom,$map)=@_; |
my ($coursenum,$coursedom,$map)=@_; |
return |
return |
&Apache::lonratedt::storemap('/uploaded/'.$coursedom.'/'.$coursenum.'/'. |
&Apache::lonratedt::storemap('/uploaded/'.$coursedom.'/'.$coursenum.'/'. |
$map); |
$map,1); |
} |
} |
|
|
sub editor { |
sub editor { |
Line 192 sub handler {
|
Line 193 sub handler {
|
|
|
# is this a standard course? |
# is this a standard course? |
|
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['folder']); |
|
my $standard=($ENV{'request.course.uri'}=~/^\/uploaded\//); |
my $standard=($ENV{'request.course.uri'}=~/^\/uploaded\//); |
my $forcestandard=($ENV{'form.folder'}=~/^default_/); |
my $forcestandard; |
my $forcesupplement=($ENV{'form.folder'}=~/^supplemental_/); |
my $forcesupplement; |
|
my $script=''; |
|
my $allowed; |
|
my $events=''; |
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
|
['folder','showdoc']); |
|
unless ($ENV{'form.showdoc'}) { # got called from remote |
|
$forcestandard=($ENV{'form.folder'}=~/^default_/); |
|
$forcesupplement=($ENV{'form.folder'}=~/^supplemental_/); |
|
|
# does this user have privileges to post, etc? |
# does this user have privileges to post, etc? |
my $allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}); |
$allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}); |
my $script=''; |
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'); |
} |
|
} else { # got called in sequence from course |
|
$allowed=0; |
|
$forcestandard=1; |
|
$forcesupplement=0; |
|
$script=&Apache::&Apache::lonxml::registerurl(1,undef); |
|
$events='onLoad="'.&Apache::lonxml::loadevents. |
|
'" onUnload="'.&Apache::lonxml::unloadevents.'"'; |
} |
} |
|
|
# 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 |
|
|
|
my $uname=$ENV{'user.name'}; |
|
my $udom=$ENV{'user.domain'}; |
|
my $plainname=&Apache::lonnet::escape( |
|
&Apache::loncommon::plainname($uname,$udom)); |
|
|
# graphics settings |
# graphics settings |
|
|
$iconpath = $r->dir_config('lonIconsURL') . "/"; |
$iconpath = $r->dir_config('lonIconsURL') . "/"; |
Line 221 sub handler {
|
Line 243 sub handler {
|
<script>$script</script> |
<script>$script</script> |
</head> |
</head> |
ENDDOCUMENT |
ENDDOCUMENT |
$r->print(&Apache::loncommon::bodytag('Course Documents')); |
$r->print(&Apache::loncommon::bodytag('Course Documents','',$events)); |
# --------------------------------------------------0------ Standard documents |
# --------------------------------------------------0------ Standard documents |
if (($standard) && ($allowed) && (!$forcesupplement)) { |
if (($standard) && ($allowed) && (!$forcesupplement)) { |
$r->print('<h2>Main Course Documents</h2>'); |
$r->print('<h2>Main Course Documents</h2>'); |
Line 256 Title:<br />
|
Line 278 Title:<br />
|
</form> |
</form> |
</td><td> |
</td><td> |
<form action="/adm/coursedocs" method="post" name="newfolder"> |
<form action="/adm/coursedocs" method="post" name="newfolder"> |
|
<input type=hidden name="importdetail" value=""> |
<input name="newfolder" type="button" onClick="javascript:newfolder();" |
<input name="newfolder" type="button" onClick="javascript:newfolder();" |
value="New Folder" /> |
value="New Folder" /> |
</form> |
</form> |
<form action="/adm/coursedocs" method="post" name="newext"> |
<form action="/adm/coursedocs" method="post" name="newext"> |
|
<input type=hidden name="importdetail" value=""> |
<input name="newext" type="button" onClick="javascript:newext();" |
<input name="newext" type="button" onClick="javascript:newext();" |
value="External Resource" /> |
value="External Resource" /> |
</form> |
</form> |
<form action="/adm/coursedocs" method="post" name="newsyl"> |
<form action="/adm/coursedocs" method="post" name="newsyl"> |
<input name="newsyl" type="button" onClick="javascript:newsyl();" |
<input type=hidden name="importdetail" |
value="Syllabus" /> |
value="Syllabus=/public/$coursedom/$coursenum/syllabus"> |
|
<input name="newsyl" type="submit" value="Syllabus" /> |
|
</form> |
|
<form action="/adm/coursedocs" method="post" name="newsyl"> |
|
<input type=hidden name="importdetail" |
|
value="Navigate Content=/adm/navmaps"> |
|
<input name="newsyl" type="submit" value="Navigate Content" /> |
|
</form> |
|
<form action="/adm/coursedocs" method="post" name="newaboutme"> |
|
<input type=hidden name="importdetail" |
|
value="$plainname=/adm/$udom/$uname/aboutme"> |
|
<input name="newaboutme" type="submit" onClick="javascript:newaboutme();" |
|
value="My Personal Info" /> |
</form> |
</form> |
</td></tr> |
</td></tr> |
</table> |
</table> |