? mod/forum/export ? mod/forum/styles.php Index: mod/forum/lib.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/forum/lib.php,v retrieving revision 1.609.2.70 diff -c -r1.609.2.70 lib.php *** mod/forum/lib.php 16 Oct 2008 20:45:28 -0000 1.609.2.70 --- mod/forum/lib.php 17 Oct 2008 18:52:46 -0000 *************** *** 3684,3689 **** --- 3684,3710 ---- } /** + * This function returns an array of attachments from the file directory + * @param $post Full post object + * @return array + **/ + function forum_get_attachments($post) { + + $returnarray = array(); + + if ($basedir = forum_file_area($post)) { + if ($files = get_directory_list($basedir)) { + foreach ($files as $file) { + if (is_file("$basedir/$file")) { + $returnarray[] = $file; + } + } + } + } + return $returnarray; + } + + /** * if return=html, then return a html string. * if return=text, then return a text-only string. * otherwise, print HTML for non-images, and return image HTML Index: mod/forum/view.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/forum/view.php,v retrieving revision 1.106.2.15 diff -c -r1.106.2.15 view.php *** mod/forum/view.php 19 Apr 2008 10:47:42 -0000 1.106.2.15 --- mod/forum/view.php 17 Oct 2008 18:52:46 -0000 *************** *** 186,191 **** --- 186,210 ---- // print_box_end(); // subscription echo ''; + $anydiscussions = get_records('forum_discussions', 'forum', $forum->id, '', 'id', 0, 1); + if ($anydiscussions) { + if ($forum->type != 'single') { + $actionoptions = array( + 'downloadlabel' => get_string('downloadlabel', 'forum'), + 'txt' => get_string('csv', 'forum'), + 'ods' => get_string('ods', 'forum'), + 'xls' => get_string('xls', 'forum'), + 'enddllabel' => '--', + 'printlabel' => get_string('printlabel', 'forum'), + 'print' => get_string('print', 'forum'), + 'endprintlabel' => '--' + ); + echo "
Your post was successfully added.
You have $a to edit it if you want to make any changes.
'; $string['postaddedsuccess'] = 'Your post was successfully added.'; $string['postaddedtimeleft'] = 'You have $a to edit it if you want to make any changes.'; + $string['postedby'] = 'Post Author'; + $string['postedon'] = 'Date Posted'; $string['postincontext'] = 'See this post in context'; $string['postmailinfo'] = 'This is a copy of a message posted on the $a website. *************** *** 199,204 **** --- 205,213 ---- $string['posttoforum'] = 'Post to forum'; $string['postupdated'] = 'Your post was updated'; $string['potentialsubscribers'] = 'Potential subscribers'; + $string['printforum'] = 'Print forum'; + $string['print'] = 'Print'; + $string['printlabel'] = '--Print'; $string['processingdigest'] = 'Processing email digest for user $a'; $string['processingpost'] = 'Processing post $a'; $string['prunedpost'] = 'A new discussion has been created from that post'; *************** *** 285,290 **** --- 294,300 ---- $string['unsubscribeshort'] = 'Unsubscribe'; $string['usermarksread'] = 'Manual message read marking'; $string['warnafter'] = 'Post threshold for warning'; + $string['xls'] = 'Excel spreadsheet'; $string['yesforever'] = 'Yes, forever'; $string['yesinitially'] = 'Yes, initially'; $string['youratedthis'] = 'You rated this';