Index: openacs-4/packages/xowiki/tcl/dotlrn-portal-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/dotlrn-portal-procs.tcl,v diff -u -N -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/xowiki/tcl/dotlrn-portal-procs.tcl 8 May 2019 19:59:56 -0000 1.1.2.2 +++ openacs-4/packages/xowiki/tcl/dotlrn-portal-procs.tcl 21 Sep 2019 19:03:21 -0000 1.1.2.3 @@ -9,7 +9,7 @@ # # We have no dotlrn installed # - return + return } @@ -33,7 +33,7 @@ {-community_id:integer} }} } - + dotlrn-portlet instproc initialize {} { :get_parameters # @@ -73,7 +73,7 @@ } } } - + if {![info exists :community_id]} { # # we have no community_id, try to get it from site map, case (3) @@ -88,13 +88,13 @@ # set user_id [::xo::cc user_id] set community_ids [db_list get_memberships { - select community_id + select community_id from dotlrn_member_rels_approved where user_id = :user_id }] set :community_id $community_ids } - + if {${:community_id} eq ""} { error "Cannot determine community_id(s);\nmaybe, you are not logged in?\n" } @@ -125,7 +125,10 @@ -parameter { {adp_file "/packages/dotlrn/www/dotlrn-main-portlet"} {title "#dotlrn.dotlrn_main_portlet_pretty_name#"} + } -ad_doc { + Include dotLRN main portlet } + dotlrn-main instproc initialize {} { :cf [list shaded_p [:shaded]] } @@ -136,22 +139,30 @@ {allow_multiple_community_ids false} {adp_file "/packages/dotlrn-portlet/www/dotlrn-portlet"} {title "#dotlrn.subcommunities_pretty_plural#"} + } -ad_doc { + Include dotLRN portlet } + # FORUMS ::xowiki::IncludeletClass create dotlrn-forums -superclass dotlrn-portlet \ -parameter { {package_key "forums"} {adp_file "/packages/forums-portlet/www/forums-portlet"} {title "#forums-portlet.pretty_name#"} + } -ad_doc { + Include dotLRN forums portlet } - + + # FAQ ::xowiki::IncludeletClass create dotlrn-faq -superclass dotlrn-portlet \ -parameter { {package_key "faq"} {adp_file "/packages/faq-portlet/www/faq-portlet"} {title "#faq-portlet.pretty_name#"} + } -ad_doc { + Include dotLRN FAQ portlet } # NEWS @@ -160,6 +171,8 @@ {package_key "news"} {adp_file "/packages/news-portlet/www/news-portlet"} {title "#news-portlet.pretty_name#"} + } -ad_doc { + Include dotLRN NEWS portlet } # CALENDAR @@ -168,6 +181,8 @@ {package_key "calendar"} {adp_file "/packages/calendar-portlet/www/calendar-portlet"} {title "#calendar-portlet.pretty_name#"} + } -ad_doc { + Include dotLRN calendar portlet } dotlrn-calendar instproc initialize {} { ::xo::Page requireCSS "/resources/calendar/calendar.css" @@ -184,13 +199,17 @@ {package_key "calendar"} {adp_file "/packages/calendar-portlet/www/calendar-list-portlet"} {title "#calendar-portlet.Schedule#"} + } -ad_doc { + Include dotLRN calendar list portlet } # Extra includelet (somewhat similar to static info portlet) ::xowiki::IncludeletClass create dotlrn-info -superclass dotlrn-portlet \ -parameter { {allow_multiple_community_ids false} {title} + } -ad_doc { + Include dotLRN info portlet } dotlrn-info instproc initialize {} { next