--- loncom/interface/londocs.pm 2003/06/09 22:26:32 1.60 +++ 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.60 2003/06/09 22:26:32 albertel 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); @@ -539,13 +552,7 @@ 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(< @@ -571,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) { @@ -581,11 +597,10 @@ 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'; + title+'=/res/lib/templates/simpleproblem.problem'; this.document.forms.newsmpproblem.submit(); } } @@ -673,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'; @@ -713,10 +729,11 @@ $help{'Importing_LON-CAPA_Resource'}


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

@@ -746,7 +763,7 @@ value="External Resource" /> $help{'Addi value="Syllabus=/public/$coursedom/$coursenum/syllabus"> - $help{'Creating_From_Template'} + $help{'Syllabus'}
@@ -765,7 +782,7 @@ $help{'Navigate_Content'} $help{'Creating_From_Template'} +onClick="javascript:makesmppage();" /> $help{'Simple Page'}
@@ -774,7 +791,17 @@ onClick="javascript:makesmppage();" /> $ $help{'Creating_From_Template'} +onClick="javascript:makesmpproblem();" />$help{'Simple Problem'} + +
+
+ + + + + +$help{'Score_Upload_Form'}
@@ -784,7 +811,7 @@ onClick="javascript:makesmpproblem();" / -$help{'Creating_From_Template'} +$help{'Bulletin Board'}
@@ -794,7 +821,7 @@ $help{'Creating_From_Template'} value="$plainname=/adm/$udom/$uname/aboutme"> -$help{'Creating_From_Template'} +$help{'My Personal Info'}
@@ -850,7 +877,7 @@ ENDFORM +value="Select Map">

@@ -881,7 +908,7 @@ value="External Resource" /> $help{'Addi value="Syllabus=/public/$coursedom/$coursenum/syllabus"> -$help{'Creating_From_Template'} +$help{'Syllabus'}
@@ -891,7 +918,7 @@ $help{'Creating_From_Template'} value="$plainname=/adm/$udom/$uname/aboutme"> -$help{'Creating_From_Template'} +$help{'My Personal Info'}