$form_start
-
+
$form_end
$form_start
-
+
$form_end
|
$form_start $rand_order_text $form_end |
@@ -2142,7 +2093,7 @@ sub checkonthis {
if (($errorcount) ||
($warningcount)) {
if ($errorcount) {
- $r->print('
'.
+ $r->print('
'.
&mt('[quant,_1,error]',$errorcount).'');
}
if ($warningcount) {
@@ -2167,7 +2118,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').'');
@@ -2532,19 +2483,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");
}
@@ -2552,7 +2498,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'});
@@ -2572,6 +2518,7 @@ sub handler {
return OK if $r->header_only;
my $type = &Apache::loncommon::course_type();
+
# --------------------------------------------- Initialize help topics for this
foreach my $topic ('Adding_Course_Doc','Main_Course_Documents',
'Adding_External_Resource','Navigate_Content',
@@ -2613,7 +2560,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?
@@ -2625,6 +2572,8 @@ sub handler {
my $showdoc=0;
my $containertag;
my $uploadtag;
+
+
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
['folderpath','pagepath',
'pagesymb']);
@@ -2697,11 +2646,7 @@ sub handler {
$script .= &editing_js($udom,$uname);
}
# -------------------------------------------------------------------- Body tag
- $script = ''."\n";
+ $script = '';
my $brcrum = [{href=>"/adm/createuser",text=>"$type Documents"}];
$r->print(&Apache::loncommon::start_page("$type Documents", $script,
{'force_register' => $showdoc,
@@ -2801,9 +2746,8 @@ sub handler {
'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',
@@ -2816,37 +2760,99 @@ sub handler {
'extr' => 'External Resource',
'syll' => 'Syllabus',
'navc' => 'Navigate Contents',
- 'sipa' => 'Simple Course Page',
+ 'sipa' => 'Simple Page',
'sipr' => 'Simple Problem',
'drbx' => 'Drop Box',
'scuf' => 'Score Upload Form',
- 'bull' => 'Discussion Board',
- 'mypi' => 'My Personal Information Page',
- 'grpo' => 'Group Portfolios',
+ 'bull' => 'Bulletin Board',
+ 'mypi' => 'My Personal Info',
+ 'grpo' => 'Group Files',
'rost' => 'Course Roster',
'abou' => 'About User',
- 'imsf' => 'IMS Import',
- 'imsl' => 'Import IMS package',
+ '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'}?
+
+ -->
+
+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',
@@ -2858,48 +2864,15 @@ sub handler {
if (!$folderpath) {
if ($env{'form.folder'} eq '' ||
$env{'form.folder'} eq 'supplemental') {
- $folderpath='default&'.&escape($tabtitles{'main'}{$type});
+ $folderpath='default&'.
+ &escape(&mt('Main '.$type.' Documents'));
}
}
unless ($env{'form.pagepath'}) {
$containertag = '';
$uploadtag = '';
}
-
- $r->print(<
-
-
-
-
- $containertag
-
-
-
-
-ENDCOURSEVERIFY
+ $r->print(&generate_admin_options($containertag,$uploadtag,\%lt,\%help,\%env));
$r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',
&mt('Editing the Table of Contents for your '.$type)));
}
@@ -2919,12 +2892,7 @@ ENDCOURSEVERIFY
}
my $postexec='';
if ($folder eq 'default') {
- $r->print(''."\n"
- );
+ $r->print('');
} else {
#$postexec='self.close();';
}
@@ -2947,219 +2915,250 @@ ENDCOURSEVERIFY
$container='page';
}
my $readfile='/uploaded/'.$coursedom.'/'.$coursenum.'/'.$folder.'.'.$container;
+
+
+
+ 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 Info'}
+
+
+NAMFORM
+
+ my $newaboutsomeoneform=(<
+ $uploadtag
+
+
+
+
+
+NASOFORM
+
+
+ my $newrosterform=(<
+ $uploadtag
+
+
+
+ $help{'Course Roster'}
+
+
+NROSTFORM
+
$r->print(<
+$lt{'nd'}
+$lt{'pm'}
+$lt{'pubd'}
+$lt{'sd'}
+$lt{'mo'}
+$lt{'hao'}
+
+
-
+
-$lt{'file'}:
-
+$fileuploadform
|
-
-
-
+$recoverform
ENDFORM
unless ($env{'form.pagepath'}) {
$r->print(<
-
-
+$extresourcesform
+
+$imspform
ENDFORM
}
$r->print(' | ');
unless ($env{'form.pagepath'}) {
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
+
+
+
+ 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
+
+
$r->print(<
-
-
-
-
-
-
-
-
-
-
-
-
+
+$newfolderform
+
+$newpageform
+
+$newsylform
+
+$newnavform
+
+$newsmppageform
+
+$newsmpproblemform
+
+$newdropboxform
+
+$newexuploadform
+
+$newbulform
+
+$newaboutmeform
+
+$newaboutsomeoneform
+
+$newgroupfileform
+
+$newrosterform
ENDFORM
}
if ($env{'form.pagepath'}) {
$r->print(<
-$uploadtag
-
-
-$help{'Simple Problem'}
-
-
-
+$newsmpproblemform
+
+$newexuploadform
ENDBLOCK
}
$r->print(' |
'."\n".
@@ -3178,7 +3177,7 @@ ENDBLOCK
if ($folder =~ /^supplemental$/ &&
(($env{'form.folderpath'} =~ /^default\&/) || ($env{'form.folderpath'} eq ''))) {
$env{'form.folderpath'} = 'supplemental&'.
- &escape($tabtitles{'supplemental'}{$type});
+ &escape(&mt('Supplemental '.$type.' Documents'));
}
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
if ($error) {
@@ -3190,71 +3189,96 @@ ENDBLOCK
'.sequence';
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
+
+ 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 Info'}
+
+
+SNAMFORM
+
$r->print(<
-$lt{'upls'} |
-$lt{'spec'} |
-
+
+- $lt{'nd'}
+- $lt{'sd'}
+- $lt{'hao'}
+
+
ENDSUPFORM
@@ -3284,6 +3308,73 @@ ENDSUPFORM
return OK;
}
+sub generate_admin_options {
+ my ($containertag,$uploadtag,$lt_ref,$help_ref,$env_ref) = @_;
+ my %lt = %{$lt_ref};
+ my %help = %{$help_ref};
+ my %env = %{$env_ref};
+ my $dumpbut=&dumpbutton();
+ my $exportbut=&exportbutton();
+ return (<
+
+
+
+
+ $containertag
+
+
+
+
+ENDOPTIONFORM
+}
+
+sub generate_edit_table {
+ my ($optionhash_ref,$namehash_ref,$orderhash_ref) = @_;
+ my %optionhash = %{$optionhash_ref}; #id verlinkt mit inhalt
+ my %namehash = %{$namehash_ref}; #name verlinkt mit id
+ my %orderhash = %{$orderhash_ref}; #name mit kürzel verlinkt mit name
+ my $form;
+ $form = ''.&mt('Upload Course Documents').'';
+ $form .= '';
+ foreach my $name (sort(keys(%orderhash))){
+ if($name eq 'zz_hide'){
+ $form .= '- '.&mt($orderhash{$name}).'
';
+ }else{
+ $form .= '- '.&mt($orderhash{$name}).'
';
+ }
+ }
+ foreach my $field (keys(%optionhash)){
+ $form .= ''.$optionhash{$field}.'
';
+ }
+ $form .= '
';
+ return $form;
+}
sub editing_js {
my ($udom,$uname) = @_;
@@ -3294,10 +3385,10 @@ sub editing_js {
p_mnp => 'Name of New Page',
t_mnp => 'New Page',
p_mxu => 'Title for the Uploaded Score',
- p_msp => 'Name of the Simple Course Page',
+ p_msp => 'Title for the Page',
p_msb => 'Title for the Problem',
p_mdb => 'Title for the Drop Box',
- p_mbb => 'Title for the Discussion Board',
+ p_mbb => 'Title for the Bulletin Board',
p_mab => "Enter user:domain for User's 'About Me' Page",
p_mab2 => "About [_99]",
p_mab_alrt1 => 'Not a valid user:domain',
@@ -3486,6 +3577,7 @@ function markcopy(folderpath,index,oldti
this.document.forms.renameform.submit();
}
+
ENDNEWSCRIPT
}
1;