--- loncom/interface/londocs.pm 2003/05/01 16:13:50 1.54 +++ loncom/interface/londocs.pm 2003/07/22 19:39:58 1.69 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.54 2003/05/01 16:13:50 www Exp $ +# $Id: londocs.pm,v 1.69 2003/07/22 19:39:58 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -329,9 +329,12 @@ sub checkonthis { $r->print(' '); } $r->print('- Rendering: '); + my $oldpath=$ENV{'request.filename'}; + $ENV{'request.filename'}=&Apache::lonnet::filelocation('',$url); &Apache::lonxml::xmlparse($r,'web', &Apache::lonnet::getfile( &Apache::lonnet::filelocation('',$url))); + $ENV{'request.filename'}=$oldpath; if (($Apache::lonxml::errorcount) || ($Apache::lonxml::warningcount)) { if ($Apache::lonxml::errorcount) { @@ -375,12 +378,22 @@ sub handler { # --------------------------------------------- Initialize help topics for this foreach ('Adding_Course_Doc','Main_Course_Documents', 'Adding_External_Resource','Navigate_Content', - 'Adding_Folders','Docs_Overview', - 'Creating_From_Template','Supplemental', + 'Adding_Folders','Docs_Overview', 'Load_Map', + 'Supplemental', 'Score_Upload_Form', 'Importing_LON-CAPA_Resource','Uploading_From_Harddrive') { $help{$_}=&Apache::loncommon::help_open_topic('Docs_'.$_); } - + # Composite help files + $help{'Syllabus'} = &Apache::loncommon::help_open_topic( + 'Docs_About_Syllabus,Docs_Editing_Templated_Pages'); + $help{'Simple Page'} = &Apache::loncommon::help_open_topic( + 'Docs_About_Simple_Page,Docs_Editing_Templated_Pages'); + $help{'Bulletin Board'} = &Apache::loncommon::help_open_topic( + 'Docs_About_Bulletin_Board,Docs_Editing_Templated_Pages'); + $help{'My Personal Info'} = &Apache::loncommon::help_open_topic( + 'Docs_About_My_Personal_Info,Docs_Editing_Templated_Pages'); + $help{'Caching'} = &Apache::loncommon::help_open_topic('Caching'); + if ($ENV{'form.verify'}) { my $loaderror=&Apache::lonnet::overloaderror($r); @@ -565,6 +578,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) { @@ -574,6 +596,15 @@ function makesmppage() { } } +function makesmpproblem() { + 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) { @@ -603,7 +634,7 @@ function changename(folder,index,oldtitl } function removeres(folder,index,oldtitle) { - if (confirm('Remove "'+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(); @@ -657,7 +688,8 @@ ENDCOURSEVERIFY ''. '
'. '

Changes will become active for your current session after , or the next time you log in.

'); +$ENV{'request.role'}.'" value="1" />, or the next time you log in.'. +$help{'Caching'}.''); } my $folderseq='/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time. '.sequence'; @@ -671,15 +703,18 @@ $ENV{'request.role'}.'" value="1" /> File:
- +
-Title:
+Title:
- $help{'Uploading_From_Harddrive'}
+ + $help{'Uploading_From_Harddrive'} + +
@@ -687,66 +722,108 @@ Title:
+ -$help{'Importing_LON-CAPA_Resource'}
- - +

+


+
+
+value="Select Map"> +$help{'Load_Map'} +

+ $help{'Adding_Folders'} +value="New Folder" />$help{'Adding_Folders'} +
+ $help{'Adding_External_Resource'} +
+ - $help{'Creating_From_Template'} + $help{'Syllabus'} +
+
+ $help{'Navigate_Content'} +
+ $help{'Creating_From_Template'} +onClick="javascript:makesmppage();" /> $help{'Simple Page'} + +
+
+ + + + +$help{'Simple Problem'} + +
+
+ + + + + +$help{'Score_Upload_Form'} +
+ -$help{'Creating_From_Template'} +$help{'Bulletin Board'} +
+
+ -$help{'Creating_From_Template'} +$help{'My Personal Info'} +
+ ENDFORM @@ -773,15 +850,18 @@ ENDFORM
- +
Comment:
+ - $help{'Uploading_From_Harddrive'} + $help{'Uploading_From_Harddrive'} +
+
@@ -792,43 +872,55 @@ ENDFORM "javascript:document.forms.simpleedit.folder.value='$folder';groupsearch()" value="Search"> $help{'Importing_LON-CAPA_Resource'} -
+

+


+value="Select Map"> +

+ $help{'Adding_Folders'} +
+ $help{'Adding_External_Resource'} +
+ -$help{'Creating_From_Template'} +$help{'Syllabus'} +
+
+ -$help{'Creating_From_Template'} +$help{'My Personal Info'} +
+ ENDSUPFORM