diff -crNB dotlrn-2.4.1/packages/dotlrn/www/admin/planner-enable.tcl dotlrn/www/admin/planner-enable.tcl *** dotlrn-2.4.1/packages/dotlrn/www/admin/planner-enable.tcl 1969-12-31 19:00:00.000000000 -0500 --- dotlrn/www/admin/planner-enable.tcl 2009-07-05 22:16:44.000000000 -0400 *************** *** 0 **** --- 1,20 ---- + ad_page_contract { + Enable/Disable Block View in a community + + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date Jul-2008 + } { + {enable_p "f"} + {return_url ""} + } + + set user_id [ad_conn user_id] + set community_id [dotlrn_community::get_community_id] + # Permissions + dotlrn::require_user_admin_community -user_id $user_id -community_id $community_id + + planner::enable -community_id $community_id -enable_p $enable_p + + if {![empty_string_p $return_url]} { + ad_returnredirect $return_url + } \ No newline at end of file diff -crNB dotlrn-2.4.1/packages/dotlrn/www/index.tcl dotlrn/www/index.tcl *** dotlrn-2.4.1/packages/dotlrn/www/index.tcl 2009-07-05 21:03:16.000000000 -0400 --- dotlrn/www/index.tcl 2009-07-08 12:58:22.000000000 -0400 *************** *** 25,30 **** --- 25,40 ---- {page_num 0} } + ## Planner redirect + if { $page_num == 0 } { + if {[apm_package_installed_p "planner"]} { + set planner_view [planner::enabled_p -community_id [dotlrn_community::get_community_id]] + if {[string equal $planner_view "t"]} { + ad_returnredirect "planner/" + } + } + } + # Used to keep track of navigation links ad_set_client_property dotlrn page_num $page_num diff -crNB dotlrn-2.4.1/packages/dotlrn/www/view-portlet.adp dotlrn/www/view-portlet.adp *** dotlrn-2.4.1/packages/dotlrn/www/view-portlet.adp Mon Nov 9 13:09:35 2009 --- dotlrn/www/view-portlet.adp Mon Nov 9 13:09:13 2009 *************** *** 0 **** --- 1,30 ---- + + 1 + + + + + + + + + +
+
+ +
+
+
+ +
+
\ No newline at end of file diff -crNB dotlrn-2.4.1/packages/dotlrn/www/view-portlet.tcl dotlrn/www/view-portlet.tcl *** dotlrn-2.4.1/packages/dotlrn/www/view-portlet.tcl Mon Nov 9 13:09:35 2009 --- dotlrn/www/view-portlet.tcl Mon Nov 9 13:09:13 2009 *************** *** 0 **** --- 1,25 ---- + # + + ad_page_contract { + + show portlet + + @author Marco Rodriguez (mterodsan@galileo.edu) + @creation-date 2009-08-10 + @arch-tag: 88aac6ac-956b-4058-b213-bc435883bcc5 + @cvs-id $Id: dotlrn-diff.patch,v 1.3 2009/12/17 00:27:30 byronl Exp $ + } { + name + } -properties { + } -validate { + } -errors { + } + + set portal_id [dotlrn_community::get_portal_id] + set portlet_name $name + set element_id [db_string get_element_id {*SQL*}] + set element_src "/packages/new-portal/www/render_styles/individual/render-element" + set theme_id [portal::get_theme_id -portal_id $portal_id] + set edit_p 0 + set hide_links_p 1 + portal::layout_elements [list 1 element_id] \ No newline at end of file diff -crNB dotlrn-2.4.1/packages/dotlrn/www/view-portlet.xql dotlrn/www/view-portlet.xql *** dotlrn-2.4.1/packages/dotlrn/www/view-portlet.xql Mon Nov 9 13:09:35 2009 --- dotlrn/www/view-portlet.xql Mon Nov 9 13:09:13 2009 *************** *** 0 **** --- 1,21 ---- + + + + + + + + + + + + + select element_id + from portal_element_map pem, portal_pages pp, portal_datasources pd + where pem.page_id=pp.page_id + and pem.datasource_id = pd.datasource_id + and pp.portal_id=:portal_id + and pd.name = :portlet_name + + + \ No newline at end of file