[LON-CAPA-cvs] cvs: loncom /interface londocs.pm

ehlerst ehlerst@source.lon-capa.org
Sat, 14 Feb 2009 13:27:02 -0000


ehlerst		Sat Feb 14 13:27:02 2009 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  fixed composite page problem, now the document options are available again.
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.341 loncom/interface/londocs.pm:1.342
--- loncom/interface/londocs.pm:1.341	Thu Feb 12 15:45:38 2009
+++ loncom/interface/londocs.pm	Sat Feb 14 13:27:01 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.341 2009/02/12 15:45:38 ehlerst Exp $
+# $Id: londocs.pm,v 1.342 2009/02/14 13:27:01 ehlerst Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2929,16 +2929,6 @@
        } else {
            #$postexec='self.close();';
        }
-#       $hadchanges=0;
-#	my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
-#       if ($error) {
-#           $r->print('<p><span class="LC_error">'.$error.'</span></p>');
-#       }
-#       if ($hadchanges) {
-#	   &mark_hash_old();
-#       }
-#
-#       &changewarning($r,$postexec);
        my $folderseq='/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time.
                      '.sequence';
        my $pageseq = '/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time.
@@ -3069,6 +3059,8 @@
 	</form>
 NROSTFORM
 
+my $specialdocumentsform;
+
        unless ($env{'form.pagepath'}) {
 	   my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
 
@@ -3120,23 +3112,16 @@
 	</form>
 NGFFORM
 
-
-        my $specialdocumentsform=(<<SPDOFORM);
-	<br />$newfolderform
-	<br />$newpageform
-	<br />$newsylform
-	<br />$newnavform
-	<br />$newsmppageform
-	<br />$newsmpproblemform
-	<br />$newdropboxform
-	<br />$newexuploadform
-	<br />$newbulform
-	<br />$newaboutmeform
-	<br />$newaboutsomeoneform
-	<br />$newgroupfileform
-	<br />$newrosterform
-SPDOFORM
-
+	$specialdocumentsform="<br />$newfolderform<br />$newpageform<br />$newsylform<br />$newgroupfileform";
+      }
+	$specialdocumentsform.="<br />$newnavform<br />$newsmppageform
+				<br />$newsmpproblemform<br />$newdropboxform
+       				<br />$newexuploadform<br />$newbulform
+       				<br />$newaboutmeform<br />$newaboutsomeoneform
+       				<br />$newrosterform";
+if($env{'form.pagepath'}) {
+	$specialdocumentsform="<br />$newsmpproblemform<br />$newexuploadform";
+}
 
 my %orderhash = (
                 'aa' => 'New Document',
@@ -3155,7 +3140,7 @@
 my $content='content';
 my $navigation='navigation';
 my $varcd = 'Main Course Documents';
-$r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash)); 
+$r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash));
  $hadchanges=0;
         my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
        if ($error) {
@@ -3167,7 +3152,6 @@
 
        &changewarning($r,'');
 $r->print('</div>');
-      }
        if ($env{'form.pagepath'}) {
        }
     }
@@ -3362,11 +3346,9 @@
 
 sub generate_edit_table {
     my ($tid,$content,$navigation,$varcd,$namehash_ref,$orderhash_ref) = @_;
-    my %namehash = %{$namehash_ref};             #name verlinkt mit id
-    my %orderhash = %{$orderhash_ref};           #name mit kürzel verlinkt mit name
-    my $form;
-
-    
+    my %namehash = %{$namehash_ref};
+    my %orderhash = %{$orderhash_ref};
+    my $form;    
 
     $form = '<div class="LC_ContentBoxSpecial"><h4 class="LC_hcell">'.&mt($varcd).'</h4>';
     $form .= '<ul id="'.$navigation.$tid.'" class="LC_TabContent">';