--- loncom/interface/londocs.pm 2003/04/12 15:56:42 1.51 +++ loncom/interface/londocs.pm 2003/07/07 07:32:16 1.63 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.51 2003/04/12 15:56:42 www Exp $ +# $Id: londocs.pm,v 1.63 2003/07/07 07:32:16 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -179,6 +179,20 @@ sub editor { # Store the changed version &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 # ---------------------------------------------------------------- Print screen @@ -218,16 +232,18 @@ sub entryline { # Edit commands if ($allowed) { $line.=(< -
+ + - -
+ UP
+
+ DOWN
- -Remove +
+ +Remove -Rename +Rename END } # Figure out what kind of a resource this is @@ -523,7 +539,13 @@ ENDHEADERS $iconpath = $r->dir_config('lonIconsURL') . "/"; 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 $r->print(< @@ -549,6 +571,15 @@ function makenewext(targetname) { window.open('/adm/rat/extpickframe.html'); } +function makeexamupload() { + var title=prompt('Listed Title for the Uploaded Score'); + if (title) { + this.document.forms.newexamupload.importdetail.value= + title+'=/res/lib/templates/examupload.problem'; + this.document.forms.newexamupload.submit(); + } +} + function makesmppage() { var title=prompt('Listed Title for the Page'); if (title) { @@ -558,6 +589,16 @@ function makesmppage() { } } +function makesmpproblem() { + $noeggforyou + var title=prompt('Listed Title for the Problem'); + if (title) { + this.document.forms.newsmpproblem.importdetail.value= + title+'=/res/lib/templates/simpleproblem.problem'; + this.document.forms.newsmpproblem.submit(); + } +} + function makebulboard() { var title=prompt('Listed Title for the Bulletin Board'); if (title) { @@ -585,6 +626,14 @@ function changename(folder,index,oldtitl 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(); + } +} ENDNEWSCRIPT @@ -647,75 +696,125 @@ $ENV{'request.role'}.'" value="1" /> File:
- +
-Title:
+Title:
- $help{'Uploading_From_Harddrive'}
+ + $help{'Uploading_From_Harddrive'} + +
+ + + -$help{'Importing_LON-CAPA_Resource'} +$help{'Importing_LON-CAPA_Resource'} +
+

+


+ + +

+
+ $help{'Adding_Folders'} +value="New Folder" />$help{'Adding_Folders'} +
+ $help{'Adding_External_Resource'} +
+ - $help{'Creating_From_Template'} + $help{'Creating_From_Template'} +
+
+ $help{'Navigate_Content'} +
+ $help{'Creating_From_Template'} + +
+
+ + + + +$help{'Creating_From_Template'} + +
+
+ + + + + +
+ -$help{'Creating_From_Template'} +$help{'Creating_From_Template'} +
+
+ -$help{'Creating_From_Template'} +$help{'Creating_From_Template'} +
+ ENDFORM @@ -742,55 +841,77 @@ ENDFORM
- +
Comment:
+ - $help{'Uploading_From_Harddrive'} + $help{'Uploading_From_Harddrive'} +
+
+ + $help{'Importing_LON-CAPA_Resource'} +

+


+ + +

+ $help{'Adding_Folders'} +
+ $help{'Adding_External_Resource'} +
+ -$help{'Creating_From_Template'} +$help{'Creating_From_Template'} +
+
+ -$help{'Creating_From_Template'} +$help{'Creating_From_Template'} +
+ ENDSUPFORM