version 1.52, 2003/04/30 21:09:12
|
version 1.57, 2003/05/29 01:26:33
|
Line 179 sub editor {
|
Line 179 sub editor {
|
# Store the changed version |
# Store the changed version |
&storemap($coursenum,$coursedom,$folder.'.sequence'); |
&storemap($coursenum,$coursedom,$folder.'.sequence'); |
} |
} |
|
# Loading a complete map |
|
if (($ENV{'form.importmap'}) && ($ENV{'form.loadmap'})) { |
|
foreach |
|
(&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$ENV{'form.importmap'}))) { |
|
my $idx=$#Apache::lonratedt::resources; |
|
$idx++; |
|
$Apache::lonratedt::resources[$idx]=$_; |
|
$Apache::lonratedt::order |
|
[$#Apache::lonratedt::order+1]=$idx; |
|
} |
|
|
|
# Store the changed version |
|
&storemap($coursenum,$coursedom,$folder.'.sequence'); |
|
} |
} |
} |
# ---------------------------------------------------------------- End commands |
# ---------------------------------------------------------------- End commands |
# ---------------------------------------------------------------- Print screen |
# ---------------------------------------------------------------- Print screen |
Line 218 sub entryline {
|
Line 232 sub entryline {
|
# Edit commands |
# Edit commands |
if ($allowed) { |
if ($allowed) { |
$line.=(<<END); |
$line.=(<<END); |
<td><table border='0' cellspacing='0' cellpadding='0'> |
<td><table border='0' cellspacing='2' cellpadding='0'> |
<tr><td><a href='/adm/coursedocs?folder=$folder&cmd=up_$index'> |
<tr><td bgcolor="#DDDDDD"> |
|
<a href='/adm/coursedocs?folder=$folder&cmd=up_$index'> |
<img src="${iconpath}move_up.gif" alt='UP' border='0' /></a></td></tr> |
<img src="${iconpath}move_up.gif" alt='UP' border='0' /></a></td></tr> |
<tr><td><a href='/adm/coursedocs?folder=$folder&cmd=down_$index'> |
<tr><td bgcolor="#DDDDDD"> |
|
<a href='/adm/coursedocs?folder=$folder&cmd=down_$index'> |
<img src="${iconpath}move_down.gif" alt='DOWN' border='0' /></a></td></tr> |
<img src="${iconpath}move_down.gif" alt='DOWN' border='0' /></a></td></tr> |
</table></td><td> |
</table></td><td bgcolor="#DDDDDD"> |
<a href='/adm/coursedocs?folder=$folder&cmd=del_$index'> |
<a href='javascript:removeres("$folder","$index","$renametitle");'> |
<font size="-2">Remove</font></a> |
<font size="-2" color="#990000">Remove</font></a> |
<a href='javascript:changename("$folder","$index","$renametitle");'> |
<a href='javascript:changename("$folder","$index","$renametitle");'> |
<font size="-2">Rename</font></a></td> |
<font size="-2" color="#009900">Rename</font></a></td> |
END |
END |
} |
} |
# Figure out what kind of a resource this is |
# Figure out what kind of a resource this is |
Line 523 ENDHEADERS
|
Line 539 ENDHEADERS
|
$iconpath = $r->dir_config('lonIconsURL') . "/"; |
$iconpath = $r->dir_config('lonIconsURL') . "/"; |
|
|
my $now=time; |
my $now=time; |
|
# |
|
# FIXME: hack to disable new problem |
|
# |
|
my $noeggforyou=''; |
|
unless ($ENV{'user.debug'}) { |
|
$noeggforyou='alert("Sorry, not implemented yet."); return 0;'; |
|
} |
# print screen |
# print screen |
$r->print(<<ENDDOCUMENT); |
$r->print(<<ENDDOCUMENT); |
<html> |
<html> |
Line 558 function makesmppage() {
|
Line 580 function makesmppage() {
|
} |
} |
} |
} |
|
|
|
function makesmpproblem() { |
|
$noeggforyou |
|
var title=prompt('Listed Title for the Problem'); |
|
if (title) { |
|
this.document.forms.newsmpproblem.importdetail.value= |
|
title+'=/adm/wrapper/uploaded/$udom/$uname/$now.problem'; |
|
this.document.forms.newsmpproblem.submit(); |
|
} |
|
} |
|
|
function makebulboard() { |
function makebulboard() { |
var title=prompt('Listed Title for the Bulletin Board'); |
var title=prompt('Listed Title for the Bulletin Board'); |
if (title) { |
if (title) { |
Line 585 function changename(folder,index,oldtitl
|
Line 617 function changename(folder,index,oldtitl
|
this.document.forms.renameform.submit(); |
this.document.forms.renameform.submit(); |
} |
} |
} |
} |
|
|
|
function removeres(folder,index,oldtitle) { |
|
if ((oldtitle=='NO RESOURCE') || (confirm('Remove "'+oldtitle+'"?'))) { |
|
this.document.forms.renameform.cmd.value='del_'+index; |
|
this.document.forms.renameform.folder.value=folder; |
|
this.document.forms.renameform.submit(); |
|
} |
|
} |
</script> |
</script> |
|
|
ENDNEWSCRIPT |
ENDNEWSCRIPT |
Line 659 Title:<br />
|
Line 699 Title:<br />
|
</td> |
</td> |
<td bgcolor="#DDDDDD"> |
<td bgcolor="#DDDDDD"> |
<form action="/adm/coursedocs" method="post" name="simpleeditdefault"> |
<form action="/adm/coursedocs" method="post" name="simpleeditdefault"> |
|
<input type="hidden" name="folder" value="$folder"> |
|
<input type="hidden" name="foldername" value="$ENV{'form.foldername'}"> |
<input type=button onClick= |
<input type=button onClick= |
"javascript:document.forms.simpleedit.folder.value='$folder';groupsearch()" value="Search"> |
"javascript:document.forms.simpleedit.folder.value='$folder';groupsearch()" value="Search"> |
<input type=button onClick= |
<input type=button onClick= |
Line 707 $help{'Navigate_Content'}
|
Line 749 $help{'Navigate_Content'}
|
<input name="newsmppg" type="button" value="Simple Page" |
<input name="newsmppg" type="button" value="Simple Page" |
onClick="javascript:makesmppage();" /> $help{'Creating_From_Template'} |
onClick="javascript:makesmppage();" /> $help{'Creating_From_Template'} |
</form> |
</form> |
|
<form action="/adm/coursedocs" method="post" name="newsmpproblem"> |
|
<input type="hidden" name="folder" value="$folder"> |
|
<input type="hidden" name="foldername" value="$ENV{'form.foldername'}"> |
|
<input type=hidden name="importdetail" value=""> |
|
<input name="newsmpproblem" type="button" value="Simple Problem" |
|
onClick="javascript:makesmpproblem();" /> $help{'Creating_From_Template'} |
|
</form> |
<form action="/adm/coursedocs" method="post" name="newbul"> |
<form action="/adm/coursedocs" method="post" name="newbul"> |
<input type="hidden" name="folder" value="$folder"> |
<input type="hidden" name="folder" value="$folder"> |
<input type="hidden" name="foldername" value="$ENV{'form.foldername'}"> |
<input type="hidden" name="foldername" value="$ENV{'form.foldername'}"> |
Line 759 ENDFORM
|
Line 808 ENDFORM
|
</td> |
</td> |
<td bgcolor="#DDDDDD"> |
<td bgcolor="#DDDDDD"> |
<form action="/adm/coursedocs" method="post" name="simpleeditsupplement"> |
<form action="/adm/coursedocs" method="post" name="simpleeditsupplement"> |
|
<input type="hidden" name="folder" value="$folder"> |
|
<input type="hidden" name="foldername" value="$ENV{'form.foldername'}"> |
<input type=hidden name="importdetail" value=""> |
<input type=hidden name="importdetail" value=""> |
<input type=button onClick= |
<input type=button onClick= |
"javascript:document.forms.simpleedit.folder.value='$folder';groupsearch()" value="Search"> |
"javascript:document.forms.simpleedit.folder.value='$folder';groupsearch()" value="Search"> |
<input type=button onClick= |
<input type=button onClick= |
"javascript:document.forms.simpleedit.folder.value='$folder';groupimport();" value="Import">$help{'Importing_LON-CAPA_Resource'} |
"javascript:document.forms.simpleedit.folder.value='$folder';groupimport();" value="Import">$help{'Importing_LON-CAPA_Resource'} |
|
<br /> |
|
<input type="text" size="20" name="importmap"> |
|
<input type=button |
|
onClick="javascript:openbrowser('simpleeditsupplement','importmap','sequence,page','')" |
|
value="Browse"><input type="submit" name="loadmap" value="Load Map"> |
</form> |
</form> |
</td><td bgcolor="#DDDDDD"> |
</td><td bgcolor="#DDDDDD"> |
<form action="/adm/coursedocs" method="post" name="supnewfolder"> |
<form action="/adm/coursedocs" method="post" name="supnewfolder"> |