version 1.10, 2002/08/26 12:44:45
|
version 1.11, 2002/08/27 12:18:13
|
Line 112 sub editor {
|
Line 112 sub editor {
|
# Store the changed version |
# Store the changed version |
&storemap($coursenum,$coursedom,$folder.'.sequence'); |
&storemap($coursenum,$coursedom,$folder.'.sequence'); |
} |
} |
|
# Group import/search |
|
if ($ENV{'form.importdetail'}) { |
|
foreach (split(/\&/,$ENV{'form.importdetail'})) { |
|
if (defined($_)) { |
|
my ($name,$url)=split(/\=/,$_); |
|
$name=&Apache::lonnet::unescape($name); |
|
$url=&Apache::lonnet::unescape($url); |
|
if ($url) { |
|
my $idx=$#Apache::lonratedt::resources+1; |
|
$Apache::lonratedt::order |
|
[$#Apache::lonratedt::order+1]=$idx; |
|
my $ext='false'; |
|
if ($url=~/^http\:\/\//) { $ext='true'; } |
|
$url=~s/\:/\:/g; |
|
$Apache::lonratedt::resources[$idx]= |
|
$name.':'.$url.':'.$ext.':normal:res'; |
|
} |
|
} |
|
} |
|
# Store the changed version |
|
&storemap($coursenum,$coursedom,$folder.'.sequence'); |
|
} |
} |
} |
# ---------------------------------------------------------------- Print screen |
# ---------------------------------------------------------------- Print screen |
my $idx=0; |
my $idx=0; |
Line 180 sub handler {
|
Line 202 sub handler {
|
my $script=''; |
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('docs'); |
$script=&Apache::lonratedt::editscript('simple'); |
} |
} |
|
|
# get course data |
# get course data |
Line 207 $r->print(&Apache::loncommon::bodytag('C
|
Line 229 $r->print(&Apache::loncommon::bodytag('C
|
unless ($folder=~/^default/) { $folder='default'; } |
unless ($folder=~/^default/) { $folder='default'; } |
&editor($r,$coursenum,$coursedom,$folder,$allowed); |
&editor($r,$coursenum,$coursedom,$folder,$allowed); |
$r->print(<<ENDFORM); |
$r->print(<<ENDFORM); |
<h3>Post a new main course document</h3> |
<table><tr> |
|
<th>Upload a new main course document</th> |
|
<th>Import a published document</th> |
|
<th>Special documents</th> |
|
</tr> |
|
<tr><td> |
|
File:<br /> |
<form action="/adm/coursedocs" method="post" enctype="multipart/form-data"> |
<form action="/adm/coursedocs" method="post" enctype="multipart/form-data"> |
<input type="file" name="uploaddoc" size="50"> |
<input type="file" name="uploaddoc" size="50"> |
<br /> |
<br /> |
Title: <input type="text" size="50" name="comment"> |
Title:<br /> |
|
<input type="text" size="50" name="comment"> |
<input type="hidden" name="folder" value="$folder"> |
<input type="hidden" name="folder" value="$folder"> |
<input type="hidden" name="cmd" value="upload_default"> |
<input type="hidden" name="cmd" value="upload_default"> |
<input type="submit" value="Upload Document"> |
<input type="submit" value="Upload Document"> |
</form> |
</form> |
|
</td> |
|
<td> |
|
<form action="/adm/coursedocs" method="post" name="simpleedit"> |
|
<input type=hidden name="importdetail" value=""> |
|
<input type=button onClick= |
|
"javascript:groupsearch()" value="Group Search"> |
|
<input type=button onClick= |
|
"javascript:groupimport();" value="Group Import"> |
|
</form> |
|
</td><td> |
|
<form action="/adm/coursedocs" method="post" name="newfolder"> |
|
<input name="newfolder" type="button" onClick="javascript:newfolder();" |
|
value="New Folder" /> |
|
</form> |
|
<form action="/adm/coursedocs" method="post" name="newext"> |
|
<input name="newext" type="button" onClick="javascript:newext();" |
|
value="External Resource" /> |
|
</form> |
|
<form action="/adm/coursedocs" method="post" name="newsyl"> |
|
<input name="newsyl" type="button" onClick="javascript:newsyl();" |
|
value="Syllabus" /> |
|
</form> |
|
</td></tr> |
|
</table> |
ENDFORM |
ENDFORM |
$r->print('<hr />'); |
$r->print('<hr />'); |
} |
} |