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

wenzelju wenzelju@source.lon-capa.org
Tue, 08 Dec 2009 10:26:21 -0000


wenzelju		Tue Dec  8 10:26:21 2009 EDT

  Modified files:              
    /loncom/interface	lonbulletin.pm 
  Log:
  Seperated board text boxes from possibility to post with a simple horizontal row.
  Added required attributes for img- and form-tag.
  
  
Index: loncom/interface/lonbulletin.pm
diff -u loncom/interface/lonbulletin.pm:1.53 loncom/interface/lonbulletin.pm:1.54
--- loncom/interface/lonbulletin.pm:1.53	Mon Dec  7 14:23:43 2009
+++ loncom/interface/lonbulletin.pm	Tue Dec  8 10:26:21 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Bulletin Board Handler
 #
-# $Id: lonbulletin.pm,v 1.53 2009/12/07 14:23:43 wenzelju Exp $
+# $Id: lonbulletin.pm,v 1.54 2009/12/08 10:26:21 wenzelju Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -234,7 +234,7 @@
         &Apache::lonnet::put('bulletinpage_'.$marker,\%syllabus,$dom,$crs);
     }
 
-# ---------------------------------------------------------------- Get syllabus
+# ---------------------------------------------------------------- Get discussion board
     if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) {
         if ($syllabus{'uploaded.photourl'}) {
             &Apache::lonnet::allowuploaded('/adm/syllabus',
@@ -242,13 +242,13 @@
         }
         #Outputbox and Inputbox for Image upload
         if ($allowed) {
-            &Apache::lontemplate::print_template($r, &mt('Upload a Photo'), '<img src="'.$syllabus{'uploaded.photourl'}.'"/>',$allowed,'LC_Box');
+            &Apache::lontemplate::print_template($r, &mt('Upload a Photo'), '<img src="'.$syllabus{'uploaded.photourl'}.'" alt="'.&mt('Image').'"/>',$allowed,'LC_Box');
             $r->print(
-                '<form method="post" enctype="multipart/form-data">'.
+                '<form method="post" enctype="multipart/form-data" action="">'.
                 '<input type="hidden" name="forceedit" value="edit" />'.
                 '<input type="file" name="uploaddoc" size="50" />'.
                 '<input type="submit" name="storeupl" value="'.&mt('Upload').'" />'.
-                '</form><form method="post">'.
+                '</form><form method="post" action="">'.
                 '<input type="hidden" name="forceedit" value="edit" />');
         }
         #Image in Student view.
@@ -295,6 +295,12 @@
         if ($allowed) {
             $r->print('</form>');
         }
+        if ($target ne 'tex'){
+            $r->print('<br/><br/><hr/><br/>');
+        }
+        else {
+            $r->print(&Apache::lonxml::xmlparse($r,'tex','<br/><br/><hr/><br/>'));
+        }
     } else {
         $r->print('<p>'.&mt('No page information provided.').'</p>');
     }