]> git.mjollnir.org Git - moodle.git/commitdiff
Attachments can now be completely disabled in forums
authormoodler <moodler>
Sat, 27 Mar 2004 14:32:57 +0000 (14:32 +0000)
committermoodler <moodler>
Sat, 27 Mar 2004 14:32:57 +0000 (14:32 +0000)
lang/en/moodle.php
mod/forum/mod.html
mod/forum/post.html

index edcdeab15f4ee4abbebc4d9ce3303ef41573e81b..e2f9bd317fa3c903133379550da76ce150473099 100644 (file)
@@ -867,6 +867,7 @@ $string['upload'] = 'Upload';
 $string['uploadafile'] = 'Upload a file';
 $string['uploadedfileto'] = 'Uploaded $a->file to $a->directory';
 $string['uploadnofilefound'] = 'No file was found - are you sure you selected one to upload?';
+$string['uploadnotallowed'] = 'Uploads are not allowed';
 $string['uploadproblem'] = 'An unknown problem occurred while uploading the file \'$a\' (perhaps it was too large?)';
 $string['uploadthisfile'] = 'Upload this file';
 $string['uploadusers'] = 'Upload users';
index 268109d096a2ba4b0fbc93b8bd112db7408244f3..191f84da092e15c4dbd712f2cea176e6a590556d 100644 (file)
        <td>
         <?php
             $choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes);
+            $choices[1] = get_string("uploadnotallowed");
             $choices[0] = get_string("courseuploadlimit") . " (".display_size($course->maxbytes).")";
             choose_from_menu ($choices, "maxbytes", $form->maxbytes, "");
             helpbutton("maxattachmentsize", get_string("maxattachmentsize", "forum"), "forum");
index 5a85c18c44ef3aa2fc4f555569e09279b2daa991..a83c09c82cff9cdcc0092ade8777835208df7ce1 100644 (file)
@@ -83,6 +83,8 @@
 </tr>
 
 
+<?php if ($forum->maxbytes != 1) {  //  1 = No attachments at all  ?>
+
 <tr valign=top>
     <td align=right><p><b><?php print_string("attachment", "forum") ?>:<br />(<?php print_string("optional") ?>)&nbsp;</b></p></td>
     <td>
        print_string("maxsize", "", display_size($maxbytes)); 
     ?>
     </td>
-
 </tr>
 
+<?php } ?>
+
 
 <tr>
     <td align=center colspan=2>