'.
+ $r->print(''.
&mt('[quant,_1,error]',$errorcount).' ');
}
if ($warningcount) {
@@ -2174,7 +2119,7 @@ sub checkonthis {
unless ($url=~/\$/) {
$r->print(''.&mt('not found').' ');
} else {
- $r->print(''.&mt('unable to verify variable URL').' ');
+ $r->print(''.&mt('unable to verify variable URL').' ');
}
} else {
$r->print(''.&mt('access denied').' ');
@@ -2196,7 +2141,7 @@ List Symbs
sub list_symbs {
my ($r) = @_;
- my $crstype = &Apache::loncommon::course_type();
+ my $type = &Apache::loncommon::course_type();
$r->print(&Apache::loncommon::start_page('Symb List'));
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Symb List'));
my $navmap = Apache::lonnavmaps::navmap->new();
@@ -2205,7 +2150,7 @@ sub list_symbs {
''.
&mt('Unable to retrieve information about course contents').
'
');
- &Apache::lonnet::logthis('Symb list failed - could not create navmap object in '.lc($crstype).':'.$env{'request.course.id'});
+ &Apache::lonnet::logthis('Symb list failed - could not create navmap object in '.lc($type).':'.$env{'request.course.id'});
} else {
$r->print("\n");
foreach my $res ($navmap->retrieveResources()) {
@@ -2219,11 +2164,11 @@ sub list_symbs {
sub verifycontent {
my ($r) = @_;
- my $crstype = &Apache::loncommon::course_type();
+ my $type = &Apache::loncommon::course_type();
my $loaderror=&Apache::lonnet::overloaderror($r);
if ($loaderror) { return $loaderror; }
- $r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Documents'));
- $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Documents'));
+ $r->print(&Apache::loncommon::start_page('Verify '.$type.' Documents'));
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$type.' Documents'));
$hashtied=0;
undef %alreadyseen;
%alreadyseen=();
@@ -2232,7 +2177,7 @@ sub verifycontent {
if ($hash{$key}=~/\.(page|sequence)$/) {
if (($key=~/^src_/) && ($alreadyseen{&unescape($hash{$key})})) {
$r->print(''.
- &mt('The following sequence or page is included more than once in your '.$crstype.': ').
+ &mt('The following sequence or page is included more than once in your '.$type.': ').
&unescape($hash{$key}).' '.
&mt('Note that grading records for problems included in this sequence or folder will overlap. '));
}
@@ -2255,9 +2200,9 @@ sub devalidateversioncache {
sub checkversions {
my ($r) = @_;
- my $crstype = &Apache::loncommon::course_type();
- $r->print(&Apache::loncommon::start_page("Check $crstype Document Versions"));
- $r->print(&Apache::lonhtmlcommon::breadcrumbs("Check $crstype Document Versions"));
+ my $type = &Apache::loncommon::course_type();
+ $r->print(&Apache::loncommon::start_page("Check $type Document Versions"));
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs("Check $type Document Versions"));
my $header='';
my $startsel='';
my $monthsel='';
@@ -2308,7 +2253,7 @@ sub checkversions {
if ($haschanged) {
if (&Apache::lonnet::put('resourceversions',\%newsetversions,
$env{'course.'.$env{'request.course.id'}.'.domain'},
- $env{'course.'.$env{'request.course.id'}.'.num'}) eq 'ok') {
+ $env{'course.'.$env{'request.course.id'}.'.num'}) eq 'ok') {
$r->print(''.&mt('Your Version Settings have been Saved').' ');
} else {
$r->print(''.&mt('An Error Occured while Attempting to Save your Version Settings').' ');
@@ -2318,7 +2263,7 @@ sub checkversions {
&changewarning($r,'');
if ($env{'form.timerange'} eq 'all') {
# show all documents
- $header=&mt('All Documents in '.$crstype);
+ $header=&mt('All Documents in '.$type);
$allsel=1;
foreach my $key (keys(%hash)) {
if ($key=~/^ids\_(\/res\/.+)$/) {
@@ -2363,7 +2308,7 @@ sub checkversions {
$env{'course.'.$env{'request.course.id'}.'.domain'},
$env{'course.'.$env{'request.course.id'}.'.num'});
my %lt=&Apache::lonlocal::texthash
- ('st' => 'Version changes since start of '.$crstype,
+ ('st' => 'Version changes since start of '.$type,
'lm' => 'Version changes since last Month',
'lw' => 'Version changes since last Week',
'sy' => 'Version changes since Yesterday',
@@ -2372,9 +2317,9 @@ sub checkversions {
'fi' => 'File',
'md' => 'Modification Date',
'mr' => 'Most recently published Version',
- 've' => 'Version used in '.$crstype,
- 'vu' => 'Set Version to be used in '.$crstype,
-'sv' => 'Set Versions to be used in '.$crstype.' according to Selections below',
+ 've' => 'Version used in '.$type,
+ 'vu' => 'Set Version to be used in '.$type,
+'sv' => 'Set Versions to be used in '.$type.' according to Selections below',
'sm' => 'Keep all Resources up-to-date with most recent Versions (default)',
'sc' => 'Set all Resource Versions to current Version (Fix Versions)',
'di' => 'Differences');
@@ -2421,7 +2366,7 @@ ENDHEADERS
'Most Recent: '.
''.$currentversion.' '.
' '.
- 'In '.$crstype.': '.
+ ' In '.$type.': '.
'');
# Used in course
my $usedversion=$hash{'version_'.$linkurl};
@@ -2438,7 +2383,7 @@ ENDHEADERS
('select_form_order' =>
['',1..$currentversion,'mostrecent'],
'' => '',
- 'mostrecent' => &mt('most recent'),
+ 'mostrecent' => 'most recent',
map {$_,$_} (1..$currentversion))));
$r->print(' ');
my $lastold=1;
@@ -2460,7 +2405,7 @@ ENDHEADERS
$entries_per_col = $num_entries/4 + 1;
}
my $entries_count = 0;
- $r->print('');
+ $r->print(' ');
my $cols_output = 1;
for (my $prevvers=$lastold;$prevvers<$currentversion;$prevvers++) {
my $url=$root.'.'.$prevvers.'.'.$extension;
@@ -2539,19 +2484,14 @@ sub changewarning {
$message='Changes will become active for your current session after [_1], or the next time you log in.';
}
$r->print("\n\n".
-''."\n".
+''."\n".
''."\n\n");
-
+ &mt('re-initializing '.$course_type).'" onClick="reinit(this.form)" />').
+$help{'Caching'}.''."\n\n");
}
@@ -2559,7 +2499,7 @@ sub init_breadcrumbs {
my ($form,$text)=@_;
&Apache::lonhtmlcommon::clear_breadcrumbs();
&Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/coursedocs",
- text=>&Apache::loncommon::course_type().' Editor',
+ text=>"Edit ".&Apache::loncommon::course_type(),
faq=>273,
bug=>'Instructor Interface',
help => 'Docs_Adding_Course_Doc'});
@@ -2577,7 +2517,8 @@ sub handler {
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
return OK if $r->header_only;
- my $crstype = &Apache::loncommon::course_type();
+ my $type = &Apache::loncommon::course_type();
+
# --------------------------------------------- Initialize help topics for this
foreach my $topic ('Adding_Course_Doc','Main_Course_Documents',
@@ -2597,7 +2538,7 @@ sub handler {
'Option_Response_Simple');
$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(
+ $help{'My Personal Information Page'} = &Apache::loncommon::help_open_topic(
'Docs_About_My_Personal_Info,Docs_Editing_Templated_Pages');
$help{'Group Files'} = &Apache::loncommon::help_open_topic('Docs_About_Group_Files');
$help{'Caching'} = &Apache::loncommon::help_open_topic('Caching');
@@ -2620,7 +2561,7 @@ sub handler {
&init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' DOCS to Construction Space');
&dumpcourse($r);
} elsif ($allowed && $env{'form.exportcourse'}) {
- &init_breadcrumbs('exportcourse','IMS Export');
+ &init_breadcrumbs('exportcourse','Export '.&Apache::loncommon::course_type().' to IMS');
&exportcourse($r);
} else {
# is this a standard course?
@@ -2632,6 +2573,8 @@ sub handler {
my $showdoc=0;
my $containertag;
my $uploadtag;
+
+
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
['folderpath','pagepath',
'pagesymb']);
@@ -2649,7 +2592,7 @@ sub handler {
}
if ($env{'form.folderpath'} =~ /^supplemental_\d+/) {
$env{'form.folderpath'} = 'supplemental&'.
- &escape(&mt('Supplemental '.$crstype.' Documents')).'&'.
+ &escape(&mt('Supplemental '.$type.' Documents')).'&'.
$env{'form.folderpath'};
}
&Apache::loncommon::store_course_settings('docs_folderpath',
@@ -2673,15 +2616,15 @@ sub handler {
$showdoc='/'.$1;
}
unless ($showdoc) { # got called from remote
- if (($env{'form.folder'}=~/^(?:group|default)_/) ||
+ if (($env{'form.folder'}=~/^(?:group|default)_/) ||
($env{'form.folder'} =~ m:^\d+/(pages|sequences)/:)) {
$forcestandard = 1;
}
$forcesupplement=($env{'form.folder'}=~/^supplemental_/);
- if ($allowed) {
+ if ($allowed) {
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['cmd']);
- $script=&Apache::lonratedt::editscript('simple');
+ $script=&Apache::lonratedt::editscript('simple');
}
} else { # got called in sequence from course
$allowed=0;
@@ -2691,7 +2634,7 @@ sub handler {
my $coursenum=$env{'course.'.$env{'request.course.id'}.'.num'};
my $coursedom=$env{'course.'.$env{'request.course.id'}.'.domain'};
-# get personal data
+# get personal data
my $uname=$env{'user.name'};
my $udom=$env{'user.domain'};
my $plainname=&escape(&Apache::loncommon::plainname($uname,$udom));
@@ -2704,13 +2647,9 @@ sub handler {
$script .= &editing_js($udom,$uname);
}
# -------------------------------------------------------------------- Body tag
- $script = ''."\n";
- my $brcrum = [{href=>"/adm/createuser",text=>"Edit $crstype"}];
- $r->print(&Apache::loncommon::start_page("Edit $crstype", $script,
+ $script = '';
+ my $brcrum = [{href=>"/adm/createuser",text=>"$type Documents"}];
+ $r->print(&Apache::loncommon::start_page("$type Documents", $script,
{'force_register' => $showdoc,
'bread_crumbs' => $brcrum}).
&Apache::loncommon::help_open_menu('','',273,'RAT'));
@@ -2721,7 +2660,7 @@ sub handler {
if ($allowed) {
if (($env{'form.uploaddoc.filename'}) &&
($env{'form.cmd'}=~/^upload_(\w+)/)) {
-# Process file upload - phase one - upload and parse primary file.
+# Process file upload - phase one - upload and parse primary file.
undef($hadchanges);
$upload_result = &process_file_upload(\$upload_output,$coursenum,
$coursedom,\%allfiles,
@@ -2746,8 +2685,8 @@ sub handler {
$newname{$i} = &process_secondary_uploads(\$upload_output,$coursedom,$coursenum,'embedded_item_',$i,$residx);
$origname{$i} = &unescape($env{'form.embedded_orig_'.$i});
if (exists($env{'form.embedded_codebase_'.$i})) {
- $javacodebase = &unescape($env{'form.embedded_codebase_'.$i});
- $origname{$i} =~ s#^\Q$javacodebase\E/##;
+ $javacodebase = &unescape($env{'form.embedded_codebase_'.$i});
+ $origname{$i} =~ s#^\Q$javacodebase\E/##;
}
my @attributes = ();
if ($env{'form.embedded_attrib_'.$i} =~ /:/) {
@@ -2784,7 +2723,7 @@ sub handler {
}
if ($content =~ m#($attrib_regexp\s*=\s*['"]?)\Q$origname{$item}\E(['"]?)#) {
}
- $content =~ s#($attrib_regexp\s*=\s*['"]?)\Q$origname{$item}\E(['"]?)#$1$newname{$item}$2#gi;
+ $content =~ s#($attrib_regexp\s*=\s*['"]?)\Q$origname{$item}\E(['"]?)#$1$newname{$item}$2#gi;
}
if (exists($codebase{$item})) {
$content =~ s/(codebase\s*=\s*["']?)\Q$codebase{$item}\E(["']?)/$1.$2/i; #' stupid emacs
@@ -2796,7 +2735,7 @@ sub handler {
my $docudom=$env{'course.'.$env{'request.course.id'}.'.domain'};
my $url = &Apache::lonnet::store_edited_file($primary_url,$content,$docudom,$docuname,\$saveresult);
} else {
- &Apache::lonnet::logthis('retrieval of uploaded file - '.$primary_url.' - for editing, failed: '.$getstatus);
+ &Apache::lonnet::logthis('retrieval of uploaded file - '.$primary_url.' - for editing, failed: '.$getstatus);
}
}
}
@@ -2805,12 +2744,11 @@ sub handler {
unless ($showdoc || $upload_result eq 'phasetwo') {
# -----------------------------------------------------------------------------
my %lt=&Apache::lonlocal::texthash(
- 'uplm' => 'Upload a new main '.lc($crstype).' document',
- 'upls' => 'Upload a new supplemental '.lc($crstype).' document',
+ 'uplm' => 'Upload a new main '.lc($type).' document',
+ 'upls' => 'Upload a new supplemental '.lc($type).' document',
'impp' => 'Import a document',
- 'pubd' => 'Published documents',
+ 'pubd' => 'Published Documents',
'copm' => 'All documents out of a published map into this folder',
- 'spec' => 'Special documents',
'upld' => 'Upload Document',
'srch' => 'Search',
'impo' => 'Import',
@@ -2829,31 +2767,93 @@ sub handler {
'scuf' => 'Score Upload Form',
'bull' => 'Discussion Board',
'mypi' => 'My Personal Information Page',
- 'grpo' => 'Group Portfolios',
+ 'grpo' => 'Group Files',
'rost' => 'Course Roster',
- 'abou' => 'About User',
- 'imsf' => 'IMS Import',
- 'imsl' => 'Import IMS package',
+ 'abou' => 'Personal Information Page for a User',
+ 'imsf' => 'Import IMS package',
'file' => 'File',
'title' => 'Title',
'comment' => 'Comment',
- 'parse' => 'If HTML file, upload embedded images/multimedia files'
+ 'parse' => 'Upload embedded images/multimedia files if HTML file!',
+ 'nd' => 'New Document',
+ 'pm' => 'Published Map',
+ 'sd' => 'Special Document',
+ 'mo' => 'More Options',
+ 'hao' => 'Hide all Options'
);
# -----------------------------------------------------------------------------
- my %tabtitles = (
- main => {
- Course => &mt('Main Course Documents'),
- Community => &mt('Main Community Documents'),
- },
- supplemental => {
- Course => &mt('Supplemental Course Documents'),
- Community => &mt('Supplemental Community Documents'),
- },
- );
+ my $fileupload=(<
+
+FIUP
+
+ my $checkbox=(<$lt{'parse'}?
+
+ -->
+
+ $lt{'parse'}
+
+CHBO
+
+ my $fileuploadform=(<
+ $fileupload
+
+ $lt{'title'}:
+
+ $uploadtag
+
+
+
+ $checkbox
+
+
+
+
+
+ $help{'Uploading_From_Harddrive'}
+
+
+FUFORM
+
+ my $simpleeditdefaultform=(<
+ $lt{'pubd'}
+ $uploadtag
+
+
+
+
+ $help{'Importing_LON-CAPA_Resource'}
+
+
+
+
+
+ $lt{'copm'}
+
+
+ $help{'Load_Map'}
+
+
+SEDFFORM
+
+ my $extresourcesform=(<
+ $uploadtag
+
+
+ $help{'Adding_External_Resource'}
+
+
+ERFORM
+
if ($allowed) {
&update_paste_buffer($coursenum,$coursedom);
- my $dumpbut=&dumpbutton();
- my $exportbut=&exportbutton();
my %lt=&Apache::lonlocal::texthash(
'vc' => 'Verify Content',
'cv' => 'Check/Set Resource Versions',
@@ -2865,86 +2865,70 @@ sub handler {
if (!$folderpath) {
if ($env{'form.folder'} eq '' ||
$env{'form.folder'} eq 'supplemental') {
- $folderpath='default&'.&escape($tabtitles{'main'}{$crstype});
+ $folderpath='default&'.
+ &escape(&mt('Main '.$type.' Documents'));
}
}
unless ($env{'form.pagepath'}) {
$containertag = ' ';
$uploadtag = ' ';
}
-
- $r->print(<
-
-
-
-
- $containertag
-
-
-
-
-ENDCOURSEVERIFY
- $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',
- &mt('Editing the Table of Contents for your '.$crstype)));
+ $r->print(<
+
+
+
+
+ $containertag
+
+
+HIDDENFORM
+ }
+# --------------------------------------------------------- Main tab structure
+ my $activeClass = 1;
+ $r->print('');
+ if (($standard) && ($allowed) && (!$forcesupplement)) {
+ my $active = '';
+ if($activeClass == 1){
+ $active = 'class="active"';
+ $activeClass = 0;
+ }
+ $r->print(''.&mt('Main Course Documents').' ');
}
+ if (!$forcestandard) {
+ my $active = '';
+ if($activeClass == 1){
+ $active = 'class="active"';
+ }
+ $r->print(''.&mt('Supplemental Course Documents').' ');
+ }
+ $r->print(''.&mt('Special Admin Options').' ');
+ $r->print(' ');
# --------------------------------------------------------- Standard documents
- $r->print('
');
-
if (($standard) && ($allowed) && (!$forcesupplement)) {
- $r->print('');
-# ''.&mt('Main Course Documents').
-# ($allowed?' '.$help{'Main_Course_Documents'}:'').' ');
+ my $active = 'style="display: none;"';
+ if($activeClass == 0){
+ $active = 'style="display: block;"';
+ }
+ $r->print('');
+ $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',
+ &mt('Editing the Table of Contents for your '.$type)));
my $folder=$env{'form.folder'};
if ($folder eq '' || $folder eq 'supplemental') {
$folder='default';
- $env{'form.folderpath'}='default&'.&escape(&mt('Main '.$crstype.' Documents'));
+ $env{'form.folderpath'}='default&'.&escape(&mt('Main '.$type.' Documents'));
$uploadtag = '
';
}
my $postexec='';
if ($folder eq 'default') {
- $r->print(''."\n"
- );
+ $r->print('');
} else {
#$postexec='self.close();';
}
- $hadchanges=0;
- my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,
- $upload_output,$crstype);
- if ($error) {
- $r->print('
'.$error.'
');
- }
- if ($hadchanges) {
- &mark_hash_old();
- }
- &changewarning($r,$postexec);
my $folderseq='/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time.
'.sequence';
my $pageseq = '/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time.
@@ -2954,230 +2938,230 @@ ENDCOURSEVERIFY
$container='page';
}
my $readfile='/uploaded/'.$coursedom.'/'.$coursenum.'/'.$folder.'.'.$container;
- $r->print(<
-
-$lt{'uplm'}
-$lt{'impp'}
-$lt{'spec'}
-
-
-
-$lt{'file'}:
-
-
-
-
-
-
-ENDFORM
- unless ($env{'form.pagepath'}) {
- $r->print(<
-
-
-ENDFORM
- }
- $r->print(' ');
+
+
+
+ my $recoverform=(<
+
+
+RFORM
+
+ my $imspform=(<
+
+
+
+IMSPFORM
+
+ my $newnavform=(<
+ $uploadtag
+
+
+
+ $help{'Navigate_Content'}
+
+
+NNFORM
+ my $newsmppageform=(<
+ $uploadtag
+
+
+ $help{'Simple Page'}
+
+
+NSPFORM
+
+ my $newsmpproblemform=(<
+ $uploadtag
+
+
+ $help{'Simple Problem'}
+
+
+
+NSPROBFORM
+
+ my $newdropboxform=(<
+ $uploadtag
+
+
+
+
+
+NDBFORM
+
+ my $newexuploadform=(<
+ $uploadtag
+
+
+
+ $help{'Score_Upload_Form'}
+
+
+NEXUFORM
+
+ my $newbulform=(<
+ $uploadtag
+
+
+
+ $help{'Bulletin Board'}
+
+
+NBFORM
+
+ my $newaboutmeform=(<
+ $uploadtag
+
+
+
+ $help{'My Personal Information Page'}
+
+
+NAMFORM
+
+ my $newaboutsomeoneform=(<
+ $uploadtag
+
+
+
+
+
+NASOFORM
+
+
+ my $newrosterform=(<
+ $uploadtag
+
+
+
+ $help{'Course Roster'}
+
+
+NROSTFORM
+
+my $specialdocumentsform;
+
unless ($env{'form.pagepath'}) {
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
- $r->print(<
-
-
-
-
-
-
-
-
-
-
-
-
-ENDFORM
+
+ my $newpageform=(<
+
+
+
+ $help{'Adding_Pages'}
+
+
+NPFORM
+
+ my $newfolderform=(<
+
+
+
+ $help{'Adding_Folders'}
+
+
+NFFORM
+
+ my $newsylform=(<
+ $uploadtag
+
+
+
+ $help{'Syllabus'}
+
+
+NSYLFORM
+
+ my $newgroupfileform=(<
+ $uploadtag
+
+
+
+ $help{'Group Files'}
+
+
+NGFFORM
+
+ $specialdocumentsform=" $newfolderform $newpageform $newsylform $newgroupfileform";
+ }
+ $specialdocumentsform.=" $newnavform $newsmppageform
+ $newsmpproblemform $newdropboxform
+ $newexuploadform $newbulform
+ $newaboutmeform $newaboutsomeoneform
+ $newrosterform";
+if($env{'form.pagepath'}) {
+ $specialdocumentsform=" $newsmpproblemform $newexuploadform";
+}
+
+my %orderhash = (
+ 'aa' => 'New Document',
+ 'bb' => 'Published Documents',
+ 'cc' => 'Special Documents',
+ 'dd' => 'More Options',
+ 'zz' => 'Hide all Options',
+ );
+my %namehash = (
+ 'New Document' => $fileuploadform,
+ 'Published Documents' => $simpleeditdefaultform,
+ 'Special Documents' => $specialdocumentsform,
+ 'More Options' => $extresourcesform.' '.$imspform.' '.$recoverform,
+ );
+my $tid='1';
+my $content='content';
+my $navigation='navigation';
+my $varcd = 'Main Course Documents';
+$r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash));
+ $hadchanges=0;
+ my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
+ if ($error) {
+ $r->print(''.$error.'
');
+ }
+ if ($hadchanges) {
+ &mark_hash_old();
}
+
+ &changewarning($r,'');
+$r->print('');
if ($env{'form.pagepath'}) {
- $r->print(<
-$uploadtag
-
-
- $help{'Simple Problem'}
-
-
-
-ENDBLOCK
}
- $r->print(' '."\n".
-'
');
- $r->print('
');
}
# ----------------------------------------------------- Supplemental documents
if (!$forcestandard) {
- $r->print('');
-# ''.&mt('Supplemental Course Documents').
-# ($allowed?' '.$help{'Supplemental'}:'').' ');
+ my $active = 'style="display: none;"';
+ if($activeClass == 1){
+ $active = 'style="display: block;"';
+ }
+ $r->print('');
my $folder=$env{'form.folder'};
unless ($folder=~/^supplemental/) {
$folder='supplemental';
@@ -3185,11 +3169,7 @@ ENDBLOCK
if ($folder =~ /^supplemental$/ &&
(($env{'form.folderpath'} =~ /^default\&/) || ($env{'form.folderpath'} eq ''))) {
$env{'form.folderpath'} = 'supplemental&'.
- &escape($tabtitles{'supplemental'}{$crstype});
- }
- my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$crstype);
- if ($error) {
- $r->print('
'.$error.'
');
+ &escape(&mt('Supplemental '.$type.' Documents'));
}
if ($allowed) {
my $folderseq=
@@ -3197,77 +3177,108 @@ ENDBLOCK
'.sequence';
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
- $r->print(<
-$lt{'upls'}
-$lt{'spec'}
-
-
-
-
-
-
-
-
-
- $help{'Adding_Folders'}
-
-
-
-
-
-
- $help{'Adding_External_Resource'}
-
-
-
-
-
-
-
-$help{'Syllabus'}
-
-
-
-
-
-
-
-$help{'My Personal Info'}
-
-
-
-
-ENDSUPFORM
+
+ my $supupdocform=(<
+ $fileupload
+
+
+
+ $checkbox
+
+
+ $lt{'comment'}:
+
+
+
+
+
+
+
+ $help{'Uploading_From_Harddrive'}
+
+
+SUPDOCFORM
+
+ my $supnewfolderform=(<
+
+
+
+ $help{'Adding_Folders'}
+
+
+SNFFORM
+
+
+ my $supnewextform=(<
+
+
+
+ $help{'Adding_External_Resource'}
+
+
+SNEFORM
+
+ my $supnewsylform=(<
+
+
+
+
+ $help{'Syllabus'}
+
+
+SNSFORM
+
+ my $supnewaboutmeform=(<
+
+
+
+
+ $help{'My Personal Information Page'}
+
+
+SNAMFORM
+
+
+
+my %suporderhash = (
+ 'ee' => 'New Document',
+ 'ff' => 'Special Documents',
+ 'zz' => 'Hide all Options',
+ );
+
+my %supnamehash = (
+ 'New Document' => $supupdocform,
+ 'Special Documents' => $supnewfolderform.' '.$supnewextform.' '.$supnewsylform.' '.$supnewaboutmeform,
+ );
+
+my $tid='2';
+my $content='content';
+my $navigation='navigation';
+my $varscd = 'Supplemental Course Documents';
+
+$r->print(&generate_edit_table($tid,$content,$navigation,$varscd,\%supnamehash,\%suporderhash));
+my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
+ if ($error) {
+ $r->print(''.$error.'
');
}
- }
- $r->print('');
+$r->print('