Index: openacs-4/packages/assessment/tcl/callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/callback-procs.tcl,v diff -u -r1.1.2.5 -r1.1.2.6 --- openacs-4/packages/assessment/tcl/callback-procs.tcl 22 Aug 2005 02:49:54 -0000 1.1.2.5 +++ openacs-4/packages/assessment/tcl/callback-procs.tcl 10 Nov 2005 13:58:43 -0000 1.1.2.6 @@ -16,3 +16,80 @@ } } + +#Callbacks for application-track + +ad_proc -callback application-track::getApplicationName -impl assessments {} { + callback implementation + } { + return "assessments" + } + +ad_proc -callback application-track::getGeneralInfo -impl assessments {} { + callback implementation + } { + db_1row my_query { + select count(1) as result + FROM as_assessments a,dotlrn_communities_all com, acs_objects ac, acs_objects ac2,acs_objects ac3 + WHERE com.community_id = 2560 + and a.assessment_id = ac.object_id + and ac.context_id = ac2.object_id + and ac2.package_id = ac3.object_id + and ac3.context_id = com.package_id + } + + return "$result" + } + +ad_proc -callback application-track::getSpecificInfo -impl assessments {} { + callback implementation + } { + + upvar $query_name my_query + upvar $elements_name my_elements + + set my_query { + SELECT a.assessment_id as id,a.instructions as instructions,a.start_time as initial_date, + a.end_time as finish_date, + a.number_tries + FROM as_assessments a,dotlrn_communities_all com, acs_objects ac, acs_objects ac2,acs_objects ac3 + WHERE com.community_id = :class_instance_id + and a.assessment_id = ac.object_id + and ac.context_id = ac2.object_id + and ac2.package_id = ac3.object_id + and ac3.context_id = com.package_id + } + + set my_elements { + + id { + label "id" + display_col id + html {align center} + } + instructions { + label "instructions" + display_col instructions + html {align center} + } + creation_date { + label "creation_date" + display_col initial_date + html {align center} + } + finish_date { + label "finish_date" + display_col finish_time + html {align center} + } + number_tries { + label "number_tries" + display_col number_tries + html {align center} + } + + } + + return "OK" + } + \ No newline at end of file Index: openacs-4/packages/evaluation/tcl/evaluation-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/tcl/evaluation-callback-procs.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/evaluation/tcl/evaluation-callback-procs.tcl 19 Jul 2005 17:03:54 -0000 1.1.2.1 +++ openacs-4/packages/evaluation/tcl/evaluation-callback-procs.tcl 10 Nov 2005 13:53:56 -0000 1.1.2.2 @@ -42,4 +42,65 @@ lappend result "Evaluation merge is done" } +#Callbacks for application-track +ad_proc -callback application-track::getApplicationName -impl evaluation {} { + callback implementation + } { + return "evaluation" + } +ad_proc -callback application-track::getGeneralInfo -impl evaluation {} { + callback implementation + } { + + db_1row my_query { + select count(1) as result + from acs_objects a, acs_objects b + where b.object_id = :comm_id + and a.tree_sortkey between b.tree_sortkey + and tree_right(b.tree_sortkey) + and a.object_type = 'evaluation_tasks' + } + return "$result" + } + +ad_proc -callback application-track::getSpecificInfo -impl evaluation {} { + callback implementation + } { + + upvar $query_name my_query + upvar $elements_name my_elements + + set my_query { + select e.task_name as name,e.task_id as task_id,e.number_of_members as number_elements + from acs_objects a, acs_objects b,evaluation_tasks e + where b.object_id = :class_instance_id + and a.tree_sortkey between b.tree_sortkey + and tree_right(b.tree_sortkey) + and a.object_type = 'evaluation_tasks' + and e.task_id = a.object_id + + } + + set my_elements { + name { + label "Name" + display_col name + html {align center} + + } + id { + label "Id" + display_col task_id + html {align center} + } + number_elements { + label "Number of elements" + display_col number_elements + html {align center} + } + + + } + } + Index: openacs-4/packages/faq/tcl/faq-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq/tcl/faq-callback-procs.tcl,v diff -u -r1.1.2.4 -r1.1.2.5 --- openacs-4/packages/faq/tcl/faq-callback-procs.tcl 26 Oct 2005 10:46:55 -0000 1.1.2.4 +++ openacs-4/packages/faq/tcl/faq-callback-procs.tcl 10 Nov 2005 13:59:15 -0000 1.1.2.5 @@ -102,3 +102,65 @@ } } } + +#Callbacks for application-track + +ad_proc -callback application-track::getApplicationName -impl faqs {} { + callback implementation + } { + return "faqs" + } + +ad_proc -callback application-track::getGeneralInfo -impl faqs {} { + callback implementation + } { + db_1row my_query { + select count(f.faq_id) as result + from faqs f, acs_objects o, dotlrn_communities com + where o.object_id=f.faq_id + and com.community_id=:comm_id + and apm_package__parent_id(o.context_id) = com.package_id + } + + return "$result" + } + +ad_proc -callback application-track::getSpecificInfo -impl faqs {} { + callback implementation + } { + + upvar $query_name my_query + upvar $elements_name my_elements + + set my_query { + select f.faq_name as name,f1.question as question,f1.answer as answer + from faqs f, acs_objects o, dotlrn_communities com,faq_q_and_as f1 + where o.object_id=f.faq_id + and com.community_id=:class_instance_id + and apm_package__parent_id(o.context_id) = com.package_id + and f.faq_id = f1.faq_id + } + + set my_elements { + name { + label "Name" + display_col name + html {align center} + + } + questions { + label "Questions" + display_col question + html {align center} + } + questions { + label "Answers" + display_col answer + html {align center} + } + + } + + return "OK" + } + \ No newline at end of file Index: openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl,v diff -u -r1.1.2.9 -r1.1.2.10 --- openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl 24 Oct 2005 11:17:06 -0000 1.1.2.9 +++ openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl 10 Nov 2005 13:52:21 -0000 1.1.2.10 @@ -110,3 +110,92 @@ application_data_link::new -this_object_id $project_id -target_object_id $folder_id } } + +#Callbacks for application-track + +ad_proc -callback application-track::getApplicationName -impl file_storage {} { + callback implementation + } { + return "file_storage" + } + +ad_proc -callback application-track::getGeneralInfo -impl file_storage {} { + callback implementation + } { + + db_1row my_query { + select count(1) as result + from acs_objects a, acs_objects b + where b.object_id = :comm_id + and a.tree_sortkey between b.tree_sortkey + and tree_right(b.tree_sortkey) + and a.object_type = 'file_storage_object' + } + + + return "$result" + } + + +ad_proc -callback application-track::getSpecificInfo -impl file_storage {} { + callback implementation + } { + + upvar $query_name my_query + upvar $elements_name my_elements + + + set my_query { + + SELECT f.name as name, f.file_id, f.type as type, f.content_size as size, + to_char(f.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified, + to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date, + (select site_node__url(site_nodes.node_id) + from site_nodes, acs_objects + where site_nodes.object_id = file_storage__get_package_id(f.parent_id) and acs_objects.object_id = f.file_id) as url, + com.community_id as class_id + FROM fs_files f,dotlrn_communities_full com,acs_objects o, acs_objects o2 + WHERE f.file_id = o.object_id + and com.community_id=:class_instance_id + and o2.object_id= file_storage__get_package_id(f.parent_id) + and o2.context_id=com.package_id + + } + + + set my_elements { + name { + label "Name" + display_col name + html {align center} + + } + type { + label "Type" + display_col type + html {align center} + + } + size { + label "Size" + display_col size + html {align center} + + } + last_modification_date { + label "Last_Modification_Date" + display_col last_modified + html {align center} + } + post_date { + label "Post_Date" + display_col creation_date + html {align center} + + } + + } + + + } + Index: openacs-4/packages/forums/tcl/forums-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-callback-procs.tcl,v diff -u -r1.1.2.5 -r1.1.2.6 --- openacs-4/packages/forums/tcl/forums-callback-procs.tcl 28 Oct 2005 10:13:34 -0000 1.1.2.5 +++ openacs-4/packages/forums/tcl/forums-callback-procs.tcl 10 Nov 2005 13:54:38 -0000 1.1.2.6 @@ -218,3 +218,71 @@ } } } + +#Callbacks for application-track + +ad_proc -callback application-track::getApplicationName -impl forums {} { + callback implementation + } { + return "forums" + } + +ad_proc -callback application-track::getGeneralInfo -impl forums {} { + callback implementation + } { + db_1row my_query { + select count(f.forum_id) as result + FROM forums_forums f, dotlrn_communities_full com + WHERE com.community_id=:comm_id + and apm_package__parent_id(f.package_id) = com.package_id + } + + return "$result" + } + +ad_proc -callback application-track::getSpecificInfo -impl forums {} { + callback implementation + } { + + upvar $query_name my_query + upvar $elements_name my_elements + + set my_query { + SELECT f.name as name,f.thread_count as threads, + f.last_post, + to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date + FROM forums_forums f,dotlrn_communities_full com,acs_objects o + WHERE com.community_id=:class_instance_id + and f.forum_id = o.object_id + and apm_package__parent_id(f.package_id) = com.package_id + } + + set my_elements { + name { + label "Name" + display_col name + html {align center} + + } + threads { + label "Threads" + display_col threads + html {align center} + } + creation_date { + label "creation_date" + display_col creation_date + html {align center} + } + last_post { + label "last_post" + display_col last_post + html {align center} + } + + + } + + return "OK" + } + \ No newline at end of file Index: openacs-4/packages/lars-blogger/tcl/lars-blogger-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/lars-blogger-callback-procs.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/lars-blogger/tcl/lars-blogger-callback-procs.tcl 19 Jul 2005 22:08:28 -0000 1.1.2.1 +++ openacs-4/packages/lars-blogger/tcl/lars-blogger-callback-procs.tcl 10 Nov 2005 13:59:42 -0000 1.1.2.2 @@ -41,4 +41,52 @@ lappend result "Merge of lars_blogger is done" return $result -} \ No newline at end of file +} + +#Callbacks for application-track + +ad_proc -callback application-track::getApplicationName -impl weblogger {} { + callback implementation + } { + return "weblogger" + } + +ad_proc -callback application-track::getGeneralInfo -impl weblogger {} { + callback implementation + } { + db_1row my_query { + select count(1) as result + from pinds_blog_entries w, dotlrn_communities com + where com.community_id=:comm_id + and apm_package__parent_id(w.package_id) = com.package_id + } + + return "$result" + } +ad_proc -callback application-track::getSpecificInfo -impl weblogger {} { + callback implementation + } { + + upvar $query_name my_query + upvar $elements_name my_elements + + set my_query { + select count(c.comment_id) as result + from pinds_blog_entries w, dotlrn_communities com, general_comments c + where com.community_id=:class_instance_id + and apm_package__parent_id(w.package_id) = com.package_id + and c.object_id=w.entry_id + group by w.entry_id + } + + set my_elements { + comments { + label "Comments per weblogger" + display_col result + html {align center} + } + + } + + return "OK" + } \ No newline at end of file Index: openacs-4/packages/lors/tcl/lors-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lors/tcl/lors-callback-procs.tcl,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/lors/tcl/lors-callback-procs.tcl 13 Jun 2005 15:10:41 -0000 1.1.2.2 +++ openacs-4/packages/lors/tcl/lors-callback-procs.tcl 10 Nov 2005 14:00:22 -0000 1.1.2.3 @@ -18,3 +18,52 @@ @author Eduardo P�rez Ureta (eduardo.perez@uc3m.es) } - + + +#Callbacks for application-track + +ad_proc -callback application-track::getApplicationName -impl lorsm {} { + callback implementation + } { + return "lorsm" + } + +ad_proc -callback application-track::getGeneralInfo -impl lorsm {} { + callback implementation + } { + db_1row my_query { + select count(1) as result + from ( + select distinct l.course_id + from lorsm_student_track l + where l.community_id=:comm_id + group by l.course_id) as t + } + + return "$result" + } +ad_proc -callback application-track::getSpecificInfo -impl lorsm {} { + callback implementation + } { + + upvar $query_name my_query + upvar $elements_name my_elements + + set my_query { + select d.id,i.course_name,l.start_time,l.end_time + from lorsm_student_track l, dotlrn_users d, ims_cp_manifests i + where l.course_id IN + ( + select distinct l.course_id + from lorsm_student_track l + where l.community_id=:class_instance_id + group by l.course_id) + and l.user_id = d.user_id + and l.course_id = i.man_id + } + + set my_elements "" + + return "OK" + } + \ No newline at end of file Index: openacs-4/packages/news/tcl/news-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-callback-procs.tcl,v diff -u -r1.1.2.5 -r1.1.2.6 --- openacs-4/packages/news/tcl/news-callback-procs.tcl 10 Oct 2005 12:59:35 -0000 1.1.2.5 +++ openacs-4/packages/news/tcl/news-callback-procs.tcl 10 Nov 2005 13:53:19 -0000 1.1.2.6 @@ -120,3 +120,60 @@ db_dml del_update_news_acs_objects_2 {} } +#Callbacks for application-track + +ad_proc -callback application-track::getApplicationName -impl news {} { + callback implementation + } { + return "news" + } + +ad_proc -callback application-track::getGeneralInfo -impl news {} { + callback implementation + } { + db_1row my_query { + select count(n.item_id) as result + FROM news_items_approved n, dotlrn_class_instances_full com + WHERE class_instance_id=:comm_id + and apm_package__parent_id(n.package_id) = com.package_id + } + + return "$result" + } + + +ad_proc -callback application-track::getSpecificInfo -impl news {} { + callback implementation + } { + + upvar $query_name my_query + upvar $elements_name my_elements + + + + set my_query { + SELECT news.publish_title as name, news.pretty_publish_date as initial_date, news.publish_date as finish_date + FROM news_items_approved news,dotlrn_communities_full com + WHERE community_id=:class_instance_id + and apm_package__parent_id(news.package_id) = com.package_id } + + set my_elements { + name { + label "Name" + display_col name + html {align center} + + } + initial_date { + label "Initial Date" + display_col initial_date + html {align center} + } + finish_date { + label "Finish Date" + display_col finish_date + html {align center} + } + } + return "OK" + }