Index: dotlrn_packages/packages/forums/tcl/forums-lams-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/dotlrn_packages/packages/forums/tcl/forums-lams-procs.tcl,v
diff -u -r1.4 -r1.5
--- dotlrn_packages/packages/forums/tcl/forums-lams-procs.tcl 13 Aug 2008 00:36:17 -0000 1.4
+++ dotlrn_packages/packages/forums/tcl/forums-lams-procs.tcl 13 Aug 2008 02:23:49 -0000 1.5
@@ -206,5 +206,58 @@
ns_set put [ad_conn outputheaders] Content-Size "[file size $path_to_file]"
ns_returnfile 200 text/html $path_to_file
+}
+
+## Tool Ouputs
+
+ad_proc -public forum::lams::output_number_of_postings {
+ -forum_id:required
+ -user_id:required
+} {
+ Returns the number of postings per Forum per user
+
+} {
+
+ if {[db_0or1row number_of_postings {}]} {
+
+ return $count
+
+ } else {
+
+ return 0
+ }
+
}
+
+
+ad_proc -public forum::lams::output_number_of_words {
+ -forum_id:required
+ -user_id:required
+} {
+ Returns the number of words in all messages per user in a forum
+
+} {
+
+ set word_count ""
+ db_foreach number_of_words {} {
+
+ # if we catch that the content is HTML we turn it into plain
+ # text
+ if {[string equal $format "text/html"]} {
+
+ set content [ad_html_text_convert -from "text/html" -to "text/plain" $content]
+
+ }
+
+ set word_count [concat $word_count $content]
+
+ } if_no_rows {
+
+ set word_count ""
+
+ }
+
+ return [llength $word_count]
+
+}
\ No newline at end of file
Index: dotlrn_packages/packages/forums/tcl/forums-lams-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/dotlrn_packages/packages/forums/tcl/forums-lams-procs.xql,v
diff -u -r1.2 -r1.3
--- dotlrn_packages/packages/forums/tcl/forums-lams-procs.xql 12 Aug 2008 04:32:43 -0000 1.2
+++ dotlrn_packages/packages/forums/tcl/forums-lams-procs.xql 13 Aug 2008 02:23:49 -0000 1.3
@@ -37,4 +37,17 @@
ap.package_key='forums'
+
+
+
+ select count(user_id) from forums_messages where forum_id = :forum_id and user_id = :user_id
+
+
+
+
+
+ select format, content from forums_messages where forum_id = :forum_id and user_id = :user_id
+
+
+
\ No newline at end of file