');
-# ''.&mt('Supplemental Course Documents').
-# ($allowed?' '.$help{'Supplemental'}:'').'');
+
+
+
+ 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;
+my @specialdocumentsforma;
+my $gradingform;
+my @gradingforma;
+my $communityform;
+my @communityforma;
+my $newfolderform;
+my $newfolderb;
+
+ my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
+
+ my $newpageform=(<
+
+
+
+
+ $help{'Adding_Pages'}
+
+NPFORM
+
+
+ $newfolderform=(<
+
+
+
+ $lt{'newf'}$help{'Adding_Folders'}
+
+NFFORM
+
+ my $newsylform=(<
+
+ $uploadtag
+
+
+ $help{'Syllabus'}
+
+
+NSYLFORM
+
+ my $newgroupfileform=(<
+
+ $uploadtag
+
+
+ $help{'Group Portfolio'}
+
+NGFFORM
+ @specialdocumentsforma=(
+ {''=>$newpageform},
+ {''=>$newsylform},
+ {''=>$newnavform},
+ {''=>$newsmppageform},
+ );
+ $specialdocumentsform = &create_form_ul(&create_list_elements(@specialdocumentsforma));
+
+
+ my @importdoc = (
+ {''=>$extresourcesform},
+ {''=>$imspform},);
+ $fileuploadform = &create_form_ul(&create_list_elements(@importdoc)) . ' ' . $fileuploadform;
+
+ @gradingforma=(
+ {''=>$newsmpproblemform},
+ {''=>$newdropboxform},
+ {''=>$newexuploadform},
+
+ );
+ $gradingform = &create_form_ul(&create_list_elements(@gradingforma));
+
+ @communityforma=(
+ {''=>$newbulform},
+ {''=>$newaboutmeform},
+ {''=>$newaboutsomeoneform},
+ {''=>$newrosterform},
+ {''=>$newgroupfileform},
+ );
+ $communityform = &create_form_ul(&create_list_elements(@communityforma));
+
+
+
+my @tools = (
+# {''=>$extresourcesform},
+# {''=>$imspform},
+ {''=>$recoverform},
+ );
+
+my %orderhash = (
+ 'aa' => ['Import Documents',$fileuploadform],
+ 'bb' => ['Published Resources',$simpleeditdefaultform],
+ 'cc' => ['Grading Resources',$gradingform],
+ 'ff' => ['Tools', &create_form_ul(&create_list_elements(@tools)).&generate_admin_options(\%help,\%env)],
+ );
+unless ($env{'form.pagepath'}) {
+ $orderhash{'00'} = ['Newfolder',$newfolderform];
+ $orderhash{'dd'} = ['Community Resources',$communityform];
+ $orderhash{'ee'} = ['Special Documents',$specialdocumentsform];
+}
+
+ $hadchanges=0;
+ unless ($supplementalflag) {
+ my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$crstype,
+ $supplementalflag,\%orderhash,$iconpath);
+ if ($error) {
+ $r->print(''.$error.' ');
+ }
+ if ($hadchanges) {
+ &mark_hash_old();
+ }
+
+ &changewarning($r,'');
+ }
+ }
+
+# Supplemental documents start here
+
my $folder=$env{'form.folder'};
- unless ($folder=~/^supplemental/) {
+ unless ($supplementalflag) {
$folder='supplemental';
}
if ($folder =~ /^supplemental$/ &&
(($env{'form.folderpath'} =~ /^default\&/) || ($env{'form.folderpath'} eq ''))) {
- $env{'form.folderpath'} = 'supplemental&'.
- &escape(&mt('Supplemental '.$type.' Documents'));
- }
- my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
- if ($error) {
- $r->print(''.$error.' ');
+ $env{'form.folderpath'} = &supplemental_base();
+ } elsif ($allowed) {
+ $env{'form.folderpath'} = $savefolderpath;
}
+ $env{'form.pagepath'} = '';
if ($allowed) {
my $folderseq=
'/uploaded/'.$coursedom.'/'.$coursenum.'/supplemental_'.time.
'.sequence';
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
- $r->print(<
-$lt{'upls'} |
-$lt{'spec'} |
-
-
-
- |
-
-
-
-
-
- |
- |
-ENDSUPFORM
- }
+
+ my $supupdocformbtn = "