--- loncom/interface/londocs.pm 2009/04/07 20:12:55 1.362
+++ loncom/interface/londocs.pm 2009/04/07 20:48:40 1.363
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.362 2009/04/07 20:12:55 ehlerst Exp $
+# $Id: londocs.pm,v 1.363 2009/04/07 20:48:40 ehlerst Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3125,21 +3125,15 @@ if($env{'form.pagepath'}) {
}
my %orderhash = (
- 'aa' => 'New Document',
- 'bb' => 'Published Documents',
- 'cc' => 'Special Documents',
- 'dd' => 'Tools',
- 'zz' => 'Hide all Options',
- );
-my %namehash = (
- 'New Document' => $fileuploadform.'
'.$newfolderform,
- 'Published Documents' => $simpleeditdefaultform,
- 'Special Documents' => $specialdocumentsform,
- 'Tools' => $extresourcesform.'
'.$imspform.'
'.$recoverform.'
'.&generate_admin_options($containertag,$uploadtag,\%help,\%env),
+ 'aa' => ['New Document',$fileuploadform.'
'.$newfolderform],
+ 'bb' => ['Published Documents',$simpleeditdefaultform],
+ 'cc' => ['Special Documents',$specialdocumentsform],
+ 'dd' => ['Tools',$extresourcesform.'
'.$imspform.'
'.$recoverform.'
'.&generate_admin_options($containertag,$uploadtag,\%help,\%env)],
+ 'zz' => ['Hide all Options'],
);
my $tid='1';
my $varcd = 'Main Course Documents';
-$r->print(&generate_edit_table($tid,$varcd,\%namehash,\%orderhash));
+$r->print(&generate_edit_table($tid,$varcd,\%orderhash));
$hadchanges=0;
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
if ($error) {
@@ -3252,20 +3246,15 @@ SNAMFORM
my %suporderhash = (
- 'ee' => 'New Document',
- 'ff' => 'Special Documents',
- 'zz' => 'Hide all Options',
- );
-
-my %supnamehash = (
- 'New Document' => $supupdocform.'
'.$supnewfolderform,
- 'Special Documents' => $supnewextform.'
'.$supnewsylform.'
'.$supnewaboutmeform,
+ 'ee' => ['New Document',$supupdocform.'
'.$supnewfolderform],
+ 'ff' => ['Special Documents',$supnewextform.'
'.$supnewsylform.'
'.$supnewaboutmeform],
+ 'zz' => ['Hide all Options'],
);
my $tid='2';
my $varscd = 'Supplemental Course Documents';
-$r->print(&generate_edit_table($tid,$varscd,\%supnamehash,\%suporderhash));
+$r->print(&generate_edit_table($tid,$varscd,\%suporderhash));
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
if ($error) {
$r->print('
'.$error.'
'); @@ -3324,8 +3313,7 @@ ENDOPTIONFORM sub generate_edit_table { - my ($tid,$varcd,$namehash_ref,$orderhash_ref) = @_; - my %namehash = %{$namehash_ref}; + my ($tid,$varcd,$orderhash_ref) = @_; my %orderhash = %{$orderhash_ref}; my $form; @@ -3333,16 +3321,18 @@ sub generate_edit_table { $form .= ' '; $form .= '