--- loncom/interface/londocs.pm 2009/01/28 11:51:22 1.326 +++ loncom/interface/londocs.pm 2009/01/28 12:56:08 1.327 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.326 2009/01/28 11:51:22 muellerd Exp $ +# $Id: londocs.pm,v 1.327 2009/01/28 12:56:08 ehlerst Exp $ # # Copyright Michigan State University Board of Trustees # @@ -119,11 +119,9 @@ sub dumpbutton { my $type = &Apache::loncommon::course_type(); if ($home+$other==0) { return ''; } if ($home) { - return '
'. - ''. - &Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs'). - '
'; + &Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs'); } else { return '
'. &mt('Dump '.$type. @@ -264,10 +262,9 @@ sub dumpcourse { sub exportbutton { my $type = &Apache::loncommon::course_type(); - return '
'. - ''. - &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'
'; + &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs'); } @@ -2877,41 +2874,7 @@ ERFORM $containertag = ''; $uploadtag = ''; } - - $r->print(< - - - - - $containertag - -
- - $uploadtag -
-
-
- -
- $help{'Verify_Content'} -
-
- $help{'Check_Resource_Versions'} -
- $dumpbut - $exportbut -
- -
-
- - -
-
-
-
 
-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))); } @@ -3347,6 +3310,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 + +
+ + $uploadtag +
+
+
    +
  • + $help{'Verify_Content'} +
  • +
  • + $help{'Check_Resource_Versions'} +
  • +
  • + $dumpbut +
  • +
  • + $exportbut +
  • +
  • + +
  • +
  • + + +
  • +
+
+
 
+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) = @_;