--- loncom/interface/londocs.pm 2003/01/23 19:00:06 1.46 +++ loncom/interface/londocs.pm 2003/02/04 18:23:21 1.47 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.46 2003/01/23 19:00:06 www Exp $ +# $Id: londocs.pm,v 1.47 2003/02/04 18:23:21 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -47,6 +47,10 @@ my %alreadyseen=(); my $hadchanges; +# Available help topics + +my %help=(); + # Mapread read maps into lonratedt::global arrays # @order and @resources, determines status # sets @order - pointer to resources in right order @@ -341,7 +345,15 @@ sub handler { $r->send_http_header; return OK if $r->header_only; - +# --------------------------------------------- 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', + 'Importing_LON-CAPA_Resource','Uploading_From_Harddrive') { + $help{$_}=&Apache::loncommon::help_open_topic('Docs_'.$_); + } + if ($ENV{'form.verify'}) { my $loaderror=&Apache::lonnet::overloaderror($r); @@ -569,6 +581,8 @@ ENDNEWSCRIPT &Apache::loncommon::bodytag('Course Documents','',$events)); unless ($showdoc) { if ($allowed) { + $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc', + 'Editing the Table of Contents for your Course')); $r->print(< @@ -588,7 +602,8 @@ ENDCOURSEVERIFY # --------------------------------------------------------- Standard documents $r->print(''); if (($standard) && ($allowed) && (!$forcesupplement)) { - $r->print(' @@ -617,7 +633,7 @@ Title:
- + $help{'Uploading_From_Harddrive'}

Main Course Documents

'); + $r->print('

Main Course Documents'. + ($allowed?' '.$help{'Main_Course_Documents'}:'').'

'); my $folder=$ENV{'form.folder'}; unless ($folder=~/^default/) { $folder='default'; } $hadchanges=0; @@ -600,6 +615,7 @@ $ENV{'request.role'}.'" value="re-initia } my $folderseq='/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time. '.sequence'; + $r->print(<
Upload a new main course document
@@ -625,7 +641,7 @@ Title:
"javascript:document.forms.simpleedit.folder.value='$folder';groupsearch()" value="Search"> -
+$help{'Importing_LON-CAPA_Resource'}
@@ -633,35 +649,36 @@ Title:
+value="New Folder" /> $help{'Adding_Folders'}
+value="External Resource" /> $help{'Adding_External_Resource'}
- -
+ + $help{'Creating_From_Template'}
+$help{'Navigate_Content'}
+onClick="javascript:makesmppage();" /> $help{'Creating_From_Template'}
@@ -669,14 +686,14 @@ onClick="javascript:makesmppage();" /> -
+$help{'Creating_From_Template'}
-
+$help{'Creating_From_Template'}
ENDFORM @@ -685,7 +702,8 @@ ENDFORM # ----------------------------------------------------- Supplemental documents if (!$forcestandard) { $r->print( - '

Supplemental Course Documents

'); + '

Supplemental Course Documents'. + ($allowed?' '.$help{'Supplemental'}:'').'

'); my $folder=$ENV{'form.folder'}; unless ($folder=~/supplemental/) { $folder='supplemental'; } &editor($r,$coursenum,$coursedom,$folder,$allowed); @@ -710,7 +728,7 @@ ENDFORM - + $help{'Uploading_From_Harddrive'}
@@ -718,7 +736,7 @@ ENDFORM +"javascript:document.forms.simpleedit.folder.value='$folder';groupimport();" value="Import">$help{'Importing_LON-CAPA_Resource'}
@@ -727,7 +745,7 @@ ENDFORM +value="New Folder" /> $help{'Adding_Folders'}
@@ -735,7 +753,7 @@ value="New Folder" /> +value="External Resource" /> $help{'Adding_External_Resource'}
@@ -743,14 +761,14 @@ value="External Resource" /> -
+$help{'Creating_From_Template'}
-
+$help{'Creating_From_Template'} ENDSUPFORM