Index: openacs-4/packages/dotlrn-learning-content/dotlrn-learning-content.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-learning-content/dotlrn-learning-content.info,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-learning-content/dotlrn-learning-content.info 5 Mar 2009 21:31:38 -0000 1.1 @@ -0,0 +1,25 @@ + + + + + dotLRN Learn Content Applet + dotLRN Learn Content Applet + f + t + + + Byron Linares (admin) + 0 + + + + + + + + + + + + + Index: openacs-4/packages/dotlrn-learning-content/sql/oracle/dotlrn-learning-content-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-learning-content/sql/oracle/dotlrn-learning-content-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-learning-content/sql/oracle/dotlrn-learning-content-create.sql 5 Mar 2009 21:31:38 -0000 1.1 @@ -0,0 +1,139 @@ +declare + foo integer; +begin + +-- create the implementation + foo := acs_sc_impl.new ( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_learning_content', + impl_pretty_name => 'dotlrn_learning_content', + impl_owner_name => 'dotlrn_learning_content' + ); + +-- add all the hooks + +-- GetPrettyName + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'GetPrettyName', + 'learning_content::get_pretty_name', + 'TCL' + ); + +-- AddApplet + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddApplet', + 'learning_content::add_applet', + 'TCL' + ); + +-- RemoveApplet + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveApplet', + 'learning_content::remove_applet', + 'TCL' + ); + +-- AddAppletToCommunity + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddAppletToCommunity', + 'learning_content::add_applet_to_community', + 'TCL' + ); + +-- RemoveAppletFromCommunity + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveAppletFromCommunity', + 'learning_content::remove_applet_from_community', + 'TCL' + ); + +-- AddUser + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddUser', + 'learning_content::add_user', + 'TCL' + ); + +-- RemoveUser + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveUser', + 'learning_content::remove_user', + 'TCL' + ); + +-- AddUserToCommunity + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddUserToCommunity', + 'learning_content::add_user_to_community', + 'TCL' + ); + +-- RemoveUserFromCommunity + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveUserFromCommunity', + 'learning_content::remove_user_from_community', + 'TCL' + ); + +-- AddPortlet + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddPortlet', + 'learning_content::add_portlet', + 'TCL' + ); + +-- RemovePortlet + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemovePortlet', + 'learning_content::remove_portlet', + 'TCL' +); + +-- Clone + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'Clone', + 'learning_content::clone', + 'TCL' +); + + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'ChangeEventHandler', + 'learning_content::change_event_handler', + 'TCL' +); + +-- Add the binding +acs_sc_binding.new ( + contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_learning_content' +); + +end; +/ +show errors Index: openacs-4/packages/dotlrn-learning-content/sql/oracle/dotlrn-learning-content-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-learning-content/sql/oracle/dotlrn-learning-content-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-learning-content/sql/oracle/dotlrn-learning-content-drop.sql 5 Mar 2009 21:31:38 -0000 1.1 @@ -0,0 +1,104 @@ +declare + foo integer; +begin + + foo := acs_sc_impl.del ( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_learning_content' + ); + +-- add all the hooks + +-- GetPrettyName + foo := acs_sc_impl.delete_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'GetPrettyName' + ); + +-- AddApplet +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddApplet' +); + +-- RemoveApplet + foo := acs_sc_impl.delete_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveApplet' +); + +-- AddAppletToCommunity + foo := acs_sc_impl.delete_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddAppletToCommunity' +); + +-- RemoveAppletFromCommunity + foo := acs_sc_impl.delete_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveAppletFromCommunity' +); + +-- AddUser + foo := acs_sc_impl.delete_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddUser' +); + +-- RemoveUser + foo := acs_sc_impl.delete_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveUser' +); + +-- AddUserToCommunity + foo := acs_sc_impl.delete_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddUserToCommunity' +); + +-- RemoveUserFromCommunity + foo := acs_sc_impl.delete_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveUserFromCommunity' +); + +-- AddPortlet + foo := acs_sc_impl.delete_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddPortlet' + ); + +-- RemovePortlet + foo := acs_sc_impl.delete_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemovePortlet' +); + +-- Clone + foo := acs_sc_impl.delete_alias ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'Clone' +); + + +-- Add the binding + foo := acs_sc_impl.del ( + 'dotlrn_applet', + 'dotlrn_learning_content' +); +end; +/ +show errors Index: openacs-4/packages/dotlrn-learning-content/sql/postgresql/dotlrn-learning-content-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-learning-content/sql/postgresql/dotlrn-learning-content-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-learning-content/sql/postgresql/dotlrn-learning-content-create.sql 5 Mar 2009 21:31:38 -0000 1.1 @@ -0,0 +1,131 @@ + +-- create the implementation +select acs_sc_impl__new ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'dotlrn_learning_content' +); + +-- add all the hooks + +-- GetPrettyName +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'GetPrettyName', + 'learning_content::get_pretty_name', + 'TCL' +); + +-- AddApplet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddApplet', + 'learning_content::add_applet', + 'TCL' +); + +-- RemoveApplet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveApplet', + 'learning_content::remove_applet', + 'TCL' +); + +-- AddAppletToCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddAppletToCommunity', + 'learning_content::add_applet_to_community', + 'TCL' +); + +-- RemoveAppletFromCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveAppletFromCommunity', + 'learning_content::remove_applet_from_community', + 'TCL' +); + +-- AddUser +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddUser', + 'learning_content::add_user', + 'TCL' +); + +-- RemoveUser +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveUser', + 'learning_content::remove_user', + 'TCL' +); + +-- AddUserToCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddUserToCommunity', + 'learning_content::add_user_to_community', + 'TCL' +); + +-- RemoveUserFromCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveUserFromCommunity', + 'learning_content::remove_user_from_community', + 'TCL' +); + +-- AddPortlet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddPortlet', + 'learning_content::add_portlet', + 'TCL' + ); + +-- RemovePortlet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemovePortlet', + 'learning_content::remove_portlet', + 'TCL' +); + +-- Clone +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'Clone', + 'learning_content::clone', + 'TCL' +); + +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'ChangeEventHandler', + 'learning_content::change_event_handler', + 'TCL' +); + +-- Add the binding +select acs_sc_binding__new ( + 'dotlrn_applet', + 'dotlrn_learning_content' +); Index: openacs-4/packages/dotlrn-learning-content/sql/postgresql/dotlrn-learning-content-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-learning-content/sql/postgresql/dotlrn-learning-content-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-learning-content/sql/postgresql/dotlrn-learning-content-drop.sql 5 Mar 2009 21:31:38 -0000 1.1 @@ -0,0 +1,99 @@ + +select acs_sc_impl__delete( + 'dotlrn_applet', -- impl_contract_name + 'dotlrn_learning_content' -- impl_name +); + + +-- add all the hooks + +-- GetPrettyName +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'GetPrettyName' +); + +-- AddApplet +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddApplet' +); + +-- RemoveApplet +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveApplet' +); + +-- AddAppletToCommunity +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddAppletToCommunity' +); + +-- RemoveAppletFromCommunity +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveAppletFromCommunity' +); + +-- AddUser +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddUser' +); + +-- RemoveUser +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveUser' +); + +-- AddUserToCommunity +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddUserToCommunity' +); + +-- RemoveUserFromCommunity +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemoveUserFromCommunity' +); + +-- AddPortlet +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'AddPortlet' + ); + +-- RemovePortlet +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'RemovePortlet' +); + +-- Clone +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_learning_content', + 'Clone' +); + + +-- Add the binding +select acs_sc_binding__delete ( + 'dotlrn_applet', + 'dotlrn_learning_content' +); Index: openacs-4/packages/dotlrn-learning-content/tcl/learning-content-applet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-learning-content/tcl/learning-content-applet-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-learning-content/tcl/learning-content-applet-procs.tcl 5 Mar 2009 21:31:38 -0000 1.1 @@ -0,0 +1,204 @@ +ad_library { + Procs to set up the content applet +} + +namespace eval learning_content { + + ad_proc -public applet_key { + } { + What's my applet key? + } { + return "dotlrn_learning_content" + } + + ad_proc -public my_package_key { + } { + What package do I deal with? + } { + return "dotlrn-learning-content" + } + + ad_proc -public package_key { + } { + What package do I deal with? + } { + return "learning-content" + } + + ad_proc -public get_pretty_name { + } { + returns the pretty name + } { + return "#learning-content-portlet.content#" + } + + ad_proc -public add_applet { + } { + One time init - must be repeatable! + } { + dotlrn_applet::add_applet_to_dotlrn -applet_key [applet_key] -package_key [my_package_key] + } + + ad_proc -public remove_applet { + } { + One time destroy + } { + ad_return_complaint 1 "[applet_key] remove_applet not implimented!" + } + + ad_proc -public add_applet_to_community { + community_id + } { + Add the learn content applet to a specifc dotlrn community + } { + # get the community portal id + set portal_id [dotlrn_community::get_portal_id -community_id $community_id] + + #create the content package instance + set package_id [dotlrn::instantiate_and_mount $community_id [package_key]] + + # set up the admin portlet + set admin_portal_id [dotlrn_community::get_admin_portal_id -community_id $community_id] + + learning_content_admin_portlet::add_self_to_page \ + -portal_id $admin_portal_id \ + -package_id $package_id + + # set up the content portlet for this community + set portal_id [dotlrn_community::get_portal_id -community_id $community_id] + + #add portlet to community portal + set args [ns_set create] + ns_set put $args package_id $package_id + ns_set put $args param_action "overwrite" + add_portlet_helper $portal_id $args + + return $package_id + } + + ad_proc -public remove_applet_from_community { + community_id + } { + remove the applet from the community + } { + ad_return_complaint 1 "[applet_key] remove_applet_from_community not implimented!" + } + + ad_proc -public add_user { + user_id + } { + one time user-specifuc init + } { + # noop + } + + ad_proc -public remove_user { + user_id + } { + } { + ad_return_complaint 1 "[applet_key] remove_user not implimented!" + } + + ad_proc -public add_user_to_community { + community_id + user_id + } { + Add a user to a specifc dotlrn community + } { +# set portal_id [dotlrn::get_portal_id -user_id $user_id] +# set package_id [dotlrn_community::get_applet_package_id -community_id $community_id -applet_key [applet_key]] + +# # use "append" here since we want to aggregate +# set args [ns_set create] +# ns_set put $args package_id $package_id +# ns_set put $args param_action append +# add_portlet_helper $portal_id $args +# # flush cache for this portal +# ::tlf_global flush_portal $portal_id + } + + ad_proc -public remove_user_from_community { + community_id + user_id + } { + Remove a user from a community + } { +# set package_id [dotlrn_community::get_applet_package_id -community_id $community_id -applet_key [applet_key]] +# set portal_id [dotlrn::get_portal_id -user_id $user_id] + +# set args [ns_set create] +# ns_set put $args package_id $package_id + +# remove_portlet $portal_id $args +# # flush cache for this portal +# ::tlf_global flush_portal $portal_id + } + + ad_proc -public add_portlet { + portal_id + } { + A helper proc to add the underlying portlet to the given portal + + @param portal_id + } { + # simple, no type specific stuff, just set some dummy values + set args [ns_set create] + ns_set put $args package_id 0 + add_portlet_helper $portal_id $args + } + + ad_proc -public add_portlet_helper { + portal_id + args + } { + A helper proc to add the underlying portlet to the given portal. + @param portal_id + } { + learning_content_portlet::add_self_to_page \ + -portal_id $portal_id \ + -package_id [ns_set get $args "package_id"] \ + -force_region [ns_set get $args "force_region"] \ + -page_name [get_pretty_name] \ + -param_action [ns_set get $args "param_action"] + } + + ad_proc -public remove_portlet { + portal_id + args + } { + A helper proc to remove the underlying portlet from the given portal. + + @param portal_id + @param args A list of key-value pairs (possibly user_id, community_id, and more) + } { + learning_content_portlet::remove_self_from_page \ + -portal_id $portal_id \ + -package_id [ns_set get $args "package_id"] + } + + ad_proc -public clone { + old_community_id + new_community_id + } { + Clone this applet's content from the old community to the new one + } { + set new_package_id [add_applet_to_community $new_community_id] + set old_package_id [dotlrn_community::get_applet_package_id \ + -community_id $old_community_id \ + -applet_key [applet_key] + ] + + db_exec_plsql clone_data {} + return $new_package_id + } + + ad_proc -public change_event_handler { + community_id:required + event:required + old_value:required + new_value:required + } { + listens for the following events: + } { + } +} \ No newline at end of file Index: openacs-4/packages/learning-content/learning-content.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content.info,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content.info 5 Mar 2009 21:28:56 -0000 1.1 @@ -0,0 +1,48 @@ + + + + + Learning Content + Learning Content + f + f + + + Alvaro Rodriguez + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/learning-content/catalog/learning-content.de_DE.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/catalog/learning-content.de_DE.ISO-8859-1.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/catalog/learning-content.de_DE.ISO-8859-1.xml 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,9 @@ + + + + Content Portlet + Content Portlets verwalten + Neues %element_pretty_name% + Name + Neu + Index: openacs-4/packages/learning-content/catalog/learning-content.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/catalog/learning-content.en_US.ISO-8859-1.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/catalog/learning-content.en_US.ISO-8859-1.xml 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,150 @@ + + + + Activity not available + Activity Type + To <a href="admin/category-view">add/edit sections</a>, go to the content admin link, then you will find an edit content index link. + Add Folder + Add new section + Add new unit + Admin + Admin Content + Admin pages of: + Content Portlet + Content Portlet Administration + All + Appearances + This Assessment is not available yet + Back + You Can delete this section + Cancel + Chat Room + Choose Activity + Choose Location + Confirm + Content + Content Admin + The <a href=%content_url%>Activity</a> has been added to the Content + Copy + Copy the content + Copy Content to: + There was an error during the copy of the content, you can try again or contact the system administrator. + The content was copied successfully + This action will overwrite the contents in the target course. \nThe activities are not copied.\nDo you want to continue? + Add a new activity + To <a href="activity-new">create a new activity</a>, go to the new activity link in the above links, the available activities are: evaluations, assessments, forums or chat rooms. + To <a href="page-instance-new">create a new page</a>, go to the new page link in the above links. + Add a new page + Decreasing + Definition + Definition of the word for the glossary + Delete + Delete Folder + Delete section + Welcome to the content section of your course. + There is no content created for this course yet. + Edit + Edit Activity + Edit Content Index + Edit contents index + Edit Header Page + Edit content index + Edit Name + Edit Header + Term Edition + This forum is not available + Messages are added to a forum but there are no forums.<br /> +<a href="%forums_url%">Add Forum</a> + Glossary + In each page or activity you can add a definition to a word to be shown in the content glossary by using the glossary option <img src="/resources/acs-templating/xinha-nightly/plugins/InsertGlossaryEntry/img/insert-glossary-entry.gif"> in the editor. + Glossary View + Go back + Go to pages of: + Go To Activity + Go to assessment "%object_name%" + Go to chat room "%object_name%" + Go to evaluation "%object_name%" + Go to forum "%object_name%" + Go to message "%object_name%" + Header + Header Page + Home + Increasing + Content Index page + Last Viewed + Location + This section have mapped object + My Classes + My Communities + Name + New + New Activity + New %element_pretty_name% + New Entry + New message in forum + New Page + New Seccion + Add New Unit + New Term + Next + No + There is no activity + You have no classes to admin + You have no communities to admin + No definition specified. + No word specified. + There are no pages + There are no users + No visits + This user has not visited any pages + Not Used + OK + Optional Description + Order + Other Entries + Move Up + Move Down + Page Views + Visits by page + Remove link + Save + You must select an activity + Select Type of Activity + Show Header: + Related Entries + Edit the text of a page + There are no activities of this type + There are no terms + Total of pages visited + Total Users + Total Views + Mini-Tutorials + Each Unit is divided in the following sections: <br /><ul> +<li> Introduction</li> +<li> Content</li> +<li> Activities</li> +<li> Glossary</li> +<li> Annexed</li> +</ul> +These sections can change once the Unit is created. And it is possible to create new sub-sections. + + Used %times_used% times + Username + User tracking + User Views + Visits by user + View Content + View Details + Visits details for Content + Visits details for page: %page_name% + Visits details for user: %user_name% + Students visits report + Welcome to aLF Web content editor + In this section you can create a web content for you courses. + Term + This term already exist! + Term cannot be blank + Word for the glossary + Yes + You don't have enough permissions to perform this action on this object + Index: openacs-4/packages/learning-content/catalog/learning-content.es_ES.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/catalog/learning-content.es_ES.ISO-8859-1.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/catalog/learning-content.es_ES.ISO-8859-1.xml 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,142 @@ + + + + La actividad no está disponible + Tipo de Actividad + Para <a href="admin/category-view">añadir/editar secciones</a>, ir al enlace de Administrar Contenido, luego encontrará un enlace hacia Editar el índice de contenido. + Agregar Folder + Açadir sección + Agregar una Unidad/Capitulo nuevo. + Administración + Administrar el Contenido + Administrar Páginas de: + Portlet Contenido + Administración de contenido + Todas + Apariciones + Este Cuestionario aún no está disponible + Anterior + Puede Eliminar esta sección si desea + Cancelar + Sala de Chat + Elija la Actividad + Escoger Ubicación + Confirmar + Contenido + Administrar Contenido + La <a href=%content_url%>Actividad</a> se ha añadido al Contenido + Copiar + Copiar el contenido + Copiar Contenido a: + Ha ocurrido un error durante el copiado del contenido, intente nuevamente o contacte al administrador del sistema. + Se ha realizado la copia correctamente + La acción de copiado sobreescribirá los contenidos del curso destino.\nLas actividades no serán copiadas.\n Desea continuar? + Añadir una nueva actividad + Para <a href="activity-new">añadir una actividad</a>, ir al enlace de Nueva Actividad, las actividades disponibles son: evaluaciones, foros de discusión, cuestionarios o salas de chat. + Para <a href="page-instance-new">añadir una nueva página</a>, ir al enlace de Nueva Página. + Añadir una nueva página + Desender + Definición + Definición del término para el glosario + Borrar + Eliminar Folder + Eliminar sección + Bienvenido a la sección de contenido de tu curso. + Aún no existe ningún contenido creado para este curso. + Editar + Editar Actividad + Editar Indice de Contenido + Editar índice de contenidos + Editar Página de Encabezado + Editar Indice de contenido + Editar Nombre + Editar Título de todas las páginas + Editar Término + Foro no disponible + Los mensajes se asocian a foros y no hay ninguno creado.<br /> +<a href="%forums_url%">Añadir un nuevo foro</a> + Glosario + En cada página o actividad podrá añadir una definición a una palabra para que se muestre en el glosario del curso usando la opción del glosario <img src="/resources/acs-templating/xinha-nightly/plugins/InsertGlossaryEntry/img/insert-glossary-entry.gif"> en el editor de las páginas. + Vista del Glosario + Volver + Ver Páginas de: + Ir a Actividad + Ir al cuestionario "%object_name%" + Ir a la sala de chat "%object_name%" + Ir a la evaluación "%object_name%" + Ir al foro "%object_name%" + Ir al mensaje "%object_name%" + Encabezado + Página del encabezado + Inicio + Incrementar + Indice de contenido + Última visita + Ubicación + Esta sección NO puede ser borrada, ya que tiene elementos. + Mis Clases + Mis Comunidades + Nombre + Nuevo + Nueva Actividad + Nuevo %element_pretty_name% + Nueva Entrada + Nuevo mensaje en el foro + Página nueva + Nueva Sección + Agregar Nueva Unidad + Nuevo Término + Siguiente + No + No hay actividad + No tiene ningún curso asignado + No tiene ninguna comunidad asignada + No se especific&oacute; la definici&oacute;n. + No se especificó el término. + No hay páginas + No hay usuarios + Sin visitas + El usuario no ha visitado ninguna página + Sin Utilizar + Enviar + Descripción Opcional + Ordenar + Otras Entradas + Mover Hacia Arriba + Mover Hacia Abajo + Visitas por página + Visitas por página + Quitar enlace + Guardar + Tiene que seleccionar una actividad + Seleccione el Tipo de Actividad + Mostrar Título en todas las páginas: + Entradas Relacionadas + Editar el texto de una página + No hay actividades de este tipo + No hay términos + Total de páginas visitadas + Total de Usuarios + Total de Visitas + Mini-Tutoriales + Cada Unidad o Capítulo se divide en las siguiente secciones:&lt;br /&gt;&lt;ul&gt; &lt;li&gt; Introducción&lt;/li&gt; &lt;li&gt; Contenido&lt;/li&gt; &lt;li&gt; Actividades&lt;/li&gt; &lt;li&gt; Glosario&lt;/li&gt; &lt;li&gt; Anexo&lt;/li&gt; &lt;/ul&gt; Dichas secciones pueden cambiarse una vez creada la Unidad / Capitulo. Y se puede crear adicionalmente nuevas sub-secciones. + Utilizada %times_used% veces + Nombre del Usuario + Estadísticas de los Usuarios + Visitas de los Usuarios + Visitas por usuario + Ver Contenido Copiado + Ver Detalles + Detalle de visitas al contenido + Detalle de visitas a la página: %page_name% + Detalle de visitas del usuario: %user_name% + Reporte de visitas de los usuarios + Bienvenido al editor de contenido web de aLF + En esta sección usted podrá crear contenido web para su curso. + Término + Ese término ya existe! + El término no puede estar vacío + Término para el glosario + Si + No tiene suficientes permisos para realizar esta acción sobre este objeto + Index: openacs-4/packages/learning-content/catalog/learning-content.es_GT.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/catalog/learning-content.es_GT.ISO-8859-1.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/catalog/learning-content.es_GT.ISO-8859-1.xml 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,60 @@ + + + +Agregar Sección +Agregar una Unidad/Capitulo nuevo. +Portlet Contenido +Administracion de contenido +Anterior +Puede Eliminar esta seccion si desea +Contenido +Desender +Eliminar Sección +Bienvenido a la sección de contenido de tu curso. +Aquí encontrarás el material de estudio que tu catedrático ha subido. + Si tienes dudas de como usar esta aplicación puedes consultar el manual +Editar Página de Encabezado +Editar Indice de contenido +Editar Nombre +Inicio +Incrementar +Indice de contenido +Esta sección NO puede ser borrada, ya que tiene elementos. +Nombre +Nuevo +Nuevo %element_pretty_name% +Nueva Sección +Siguiente +Cada Unidad o Capitulo se divide en las siguiente secciones:<br /><ul> + <li> Introducción</li> + <li> Contenido</li> + <li> Actividades</li> + <li> Glosario</li> + <li> Anexo</li> + </ul> + Dichas secciones pueden cambiarse una vez creada la Unidad / + Capitulo. Y se puede crear adicionalmente nuevas sub-secciones. + +Bienvenido al editor de contenido web de aLF +En esta sección usted podrá crear contenido web para su curso +Mover Hacia Abajo +Mover Hacia Arriba +Editar Indice de Contenido +Copiar Contenido A: +Mis Clases +Mis Comunidades +Copiar +Editar +Agregar Nueva Unidad +Agregar Folder +Eliminar Folder +Editar Titulo del Contenido +Si +No +Mostrar Encabezado: +Ver Páginas de: +Administrar Páginas de : +Ver Contenido Copiado +Administrar el Contenido + + Index: openacs-4/packages/learning-content/learning-content-patch/README =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/README,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/README 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,21 @@ +Run the script.sh to make content work with the new features, +this script will patch some packages and will also add a new +plugin for the xinha editor, if you use the chat package, run +the script-extras.sh as well. + +Details of the patch + +forums, evaluation, assessment, chat: +- Provide an extend and insert callback inside the add/edit page +of each package to link the resources to the learning-content package + +acs-subsite: +- Modify the o.vuh to work with search callbacks + +theme-zen: +- Alter the alert user message zone to allow messages to be shown +after an activity has been added to the content + +acs-templating: +- Add the new glossary plugin folder to the xinha editor plugins + Index: openacs-4/packages/learning-content/learning-content-patch/acs-subsite-diff.patch =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/acs-subsite-diff.patch,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/acs-subsite-diff.patch 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,20 @@ +diff -crBN acs-subsite-head/www/o.vuh acs-subsite/www/o.vuh +*** acs-subsite-head/www/o.vuh 2009-01-08 09:16:34.000000000 -0600 +--- acs-subsite/www/o.vuh 2009-01-08 10:23:39.000000000 -0600 +*************** +*** 62,68 **** + + # Try to retrieve the page url using a callback that makes use of upvar + +! set page_url [lindex [callback -catch -impl $object_type subsite::url -object_id $object_id -package_id $package_id -type "display"] 0] + + # If this did not work, try again with the Service contract + if {[empty_string_p $page_url]} { +--- 62,68 ---- + + # Try to retrieve the page url using a callback that makes use of upvar + +! set page_url [lindex [callback -catch -impl $object_type search::url -object_id $object_id] 0] + + # If this did not work, try again with the Service contract + if {[empty_string_p $page_url]} { Index: openacs-4/packages/learning-content/learning-content-patch/assessment-diff.patch =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/assessment-diff.patch,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/assessment-diff.patch 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,57 @@ +diff -crBN assessment-head/tcl/as-callback-procs.tcl assessment/tcl/as-callback-procs.tcl +*** assessment-head/tcl/as-callback-procs.tcl 2009-01-14 12:45:59.000000000 -0600 +--- assessment/tcl/as-callback-procs.tcl 2009-01-14 12:46:02.000000000 -0600 +*************** +*** 78,80 **** +--- 78,90 ---- + -object_id + } { + } ++ ++ ad_proc -public -callback search::url -impl as_assessments {} { ++ returns a url for an assessment to the search package ++ } { ++ set assessment_id [content::revision::item_id -revision_id $object_id] ++ set package_id [acs_object::package_id -object_id $assessment_id] ++ set package_url [apm_package_url_from_id $package_id] ++ ++ return "${package_url}instructions?assessment_id=$assessment_id" ++ } +diff -crBN assessment-head/www/asm-admin/assessment-form.tcl assessment/www/asm-admin/assessment-form.tcl +*** assessment-head/www/asm-admin/assessment-form.tcl 2009-01-14 12:38:46.000000000 -0600 +--- assessment/www/asm-admin/assessment-form.tcl 2009-01-14 12:44:07.000000000 -0600 +*************** +*** 9,14 **** +--- 9,15 ---- + {permission_p 0} + {type ""} + {after "0"} ++ {page_instance_id 0} + } -properties { + context:onevalue + page_title:onevalue +*************** +*** 254,259 **** +--- 255,264 ---- + } + } + ++ ## Learning Content: Extend the form to send the page_instance_id for content activities ++ callback -catch -impl content learning_content::extend_form -name "assessment_form" -page_instance_id $page_instance_id ++ ### ++ + ad_form -extend -name assessment_form -new_request { + set new "" + set title "" +*************** +*** 333,338 **** +--- 338,346 ---- + + set assessment_id [db_string assessment_id_from_revision {}] + ++ ## Learning Content: Insert the activity_id when the assessment is created ++ callback -catch -impl content learning_content::insert_object -name $title -item_id $page_instance_id -activity_id $assessment_id ++ ### + # grant permission for this assessment to the user + + permission::grant -party_id $user_id -object_id $assessment_id -privilege "admin" Index: openacs-4/packages/learning-content/learning-content-patch/chat-diff.patch =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/chat-diff.patch,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/chat-diff.patch 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,110 @@ +diff -crBN chat-head/tcl/chat-callback-procs.tcl chat/tcl/chat-callback-procs.tcl +*** chat-head/tcl/chat-callback-procs.tcl 1969-12-31 18:00:00.000000000 -0600 +--- chat/tcl/chat-callback-procs.tcl 2009-01-08 12:20:32.000000000 -0600 +*************** +*** 0 **** +--- 1,34 ---- ++ ad_library { ++ ++ Callback procs for chat ++ ++ @author Alvaro Rodriguez (alvaro@viaro.net) ++ @creation-date 2008-08-13 ++ } ++ ++ ad_proc -public -callback search::url -impl chat_room {} { ++ returns a url for a chat room to the search package ++ } { ++ set package_id [db_string get_package_id {} -default 0] ++ set package_url [apm_package_url_from_id $package_id] ++ ++ return "${package_url}room-enter?room_id=${object_id}&client=ajax" ++ } ++ ++ ad_proc -public -callback dotlrn::blocks::edit_url -impl chat_room {} { ++ returns a url for the edit action of a chat room to the dotlrn blocks ++ } { ++ set package_id [db_string get_package_id {} -default 0] ++ set package_url [apm_package_url_from_id $package_id] ++ ++ return "${package_url}room-edit?room_id=$object_id" ++ } ++ ++ ad_proc -public -callback dotlrn::blocks::delete_url -impl chat_room {} { ++ returns a url for the delete action of a chat room to the dotlrn blocks ++ } { ++ set package_id [db_string get_package_id {} -default 0] ++ set package_url [apm_package_url_from_id $package_id] ++ ++ return "${package_url}room-delete?room_id=${object_id}" ++ } +diff -crBN chat-head/tcl/chat-callback-procs.xql chat/tcl/chat-callback-procs.xql +*** chat-head/tcl/chat-callback-procs.xql 1969-12-31 18:00:00.000000000 -0600 +--- chat/tcl/chat-callback-procs.xql 2009-01-08 12:21:00.000000000 -0600 +*************** +*** 0 **** +--- 1,29 ---- ++ ++ ++ ++ ++ ++ ++ select context_id ++ from acs_objects ++ where object_id = :object_id ++ ++ ++ ++ ++ ++ select context_id ++ from acs_objects ++ where object_id = :object_id ++ ++ ++ ++ ++ ++ select context_id ++ from acs_objects ++ where object_id = :object_id ++ ++ ++ ++ +diff -crBN chat-head/www/room-edit.tcl chat/www/room-edit.tcl +*** chat-head/www/room-edit.tcl 2009-01-08 12:18:59.000000000 -0600 +--- chat/www/room-edit.tcl 2009-01-08 12:19:05.000000000 -0600 +*************** +*** 6,11 **** +--- 6,12 ---- + @creation-date March 26, 2006 + } { + room_id:integer,optional ++ {page_instance_id 0} + } + + permission::require_permission -object_id [ad_conn package_id] -privilege chat_room_edit +*************** +*** 79,84 **** +--- 80,89 ---- + #-1 The Public + chat_user_grant $room_id -2 + } ++ ## Learning Content: Insert the activity_id when the message is created ++ callback -catch -impl content learning_content::insert_object -name $pretty_name -item_id $page_instance_id -activity_id $room_id ++ ### ++ + } -edit_request { + if {[catch {db_1row room_info { + select pretty_name, description, moderated_p, archive_p, active_p, auto_flush_p, auto_transcript_p +*************** +*** 98,100 **** +--- 103,108 ---- + ad_script_abort + } + ++ ## Learning Content: Extend the form to send the page_instance_id for content activities ++ callback -catch -impl content learning_content::extend_form -name "edit-room" -page_instance_id $page_instance_id ++ ### Index: openacs-4/packages/learning-content/learning-content-patch/evaluation-diff.patch =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/evaluation-diff.patch,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/evaluation-diff.patch 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,93 @@ +diff -crBN evaluation-head/tcl/evaluation-callback-procs.tcl evaluation/tcl/evaluation-callback-procs.tcl +*** evaluation-head/tcl/evaluation-callback-procs.tcl 2009-01-08 07:28:54.000000000 -0600 +--- evaluation/tcl/evaluation-callback-procs.tcl 2009-01-08 09:09:20.000000000 -0600 +*************** +*** 71,74 **** + + + } +! } +\ No newline at end of file +--- 71,85 ---- + + + } +! } +! +! ad_proc -public -callback search::url -impl evaluation_tasks {} { +! returns a url for an evaluation to the search package +! } { +! set evaluation_id $object_id +! set package_id [acs_object::package_id -object_id $evaluation_id] +! set grade_id [lindex [db_list get_grade_id { *SQL* }] 0] +! set package_url [apm_package_url_from_id $package_id] +! +! return "${package_url}task-view?task_id=$evaluation_id&grade_id=$grade_id&return_url=${package_url}admin/?grade_id=$grade_id" +! } +diff -crBN evaluation-head/tcl/evaluation-callback-procs.xql evaluation/tcl/evaluation-callback-procs.xql +*** evaluation-head/tcl/evaluation-callback-procs.xql 2009-01-08 07:28:54.000000000 -0600 +--- evaluation/tcl/evaluation-callback-procs.xql 2009-01-08 09:11:15.000000000 -0600 +*************** +*** 34,37 **** +--- 34,49 ---- + + + ++ ++ ++ select grade_id ++ from evaluation_grades ++ where grade_item_id = ( ++ select grade_item_id ++ from evaluation_tasks ++ where task_id = :evaluation_id ++ ) ++ ++ ++ + +diff -crBN evaluation-head/www/admin/tasks/task-add-edit.tcl evaluation/www/admin/tasks/task-add-edit.tcl +*** evaluation-head/www/admin/tasks/task-add-edit.tcl 2009-01-08 07:28:54.000000000 -0600 +--- evaluation/www/admin/tasks/task-add-edit.tcl 2009-01-08 09:06:33.000000000 -0600 +*************** +*** 20,26 **** + {enable 1} + {return_p ""} + {simple_p ""} +! + } + + set package_id [ad_conn package_id] +--- 20,26 ---- + {enable 1} + {return_p ""} + {simple_p ""} +! {page_instance_id 0} + } + + set package_id [ad_conn package_id] +*************** +*** 314,319 **** +--- 314,323 ---- + } + } + ++ ## Learning Content: Extend the form to send the page_instance_id for content activities ++ callback -catch -impl content learning_content::extend_form -name "task" -page_instance_id $page_instance_id ++ ### ++ + ad_form -extend -name task -form { + + } -edit_request { +*************** +*** 461,466 **** +--- 465,473 ---- + set content_length 0 + db_dml lob_size { *SQL* } + ++ ## Learning Content: Insert the activity_id when the evaluation is created ++ callback -catch -impl content learning_content::insert_object -name $task_name -item_id $page_instance_id -activity_id $task_id ++ ### + + if { ![empty_string_p $upload_file] } { + set tmp_file [template::util::file::get_property tmp_filename $upload_file] Index: openacs-4/packages/learning-content/learning-content-patch/forums-diff.patch =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/forums-diff.patch,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/forums-diff.patch 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,55 @@ +diff -crBN forums-head/lib/message/post.tcl forums/lib/message/post.tcl +*** forums-head/lib/message/post.tcl 2009-01-14 12:51:25.000000000 -0600 +--- forums/lib/message/post.tcl 2009-01-14 12:51:32.000000000 -0600 +*************** +*** 173,178 **** +--- 173,181 ---- + -format $format \ + -user_id $displayed_user_id + ++ ## Learning Content: Insert the activity_id when the message is created ++ callback -catch -impl content learning_content::insert_object -name $subject -item_id $page_instance_id -activity_id $message_id ++ ### + # DRB: Black magic cache flush call which will disappear when list builder is + # rewritten to paginate internally rather than use the template paginator. + cache flush "messages,forum_id=$forum_id*" +*************** +*** 210,215 **** +--- 213,221 ---- + } + } + ++ ## Learning Content: Extend the form to send the page_instance_id for content activities ++ callback -catch -impl content learning_content::extend_form -name "message" -page_instance_id $page_instance_id ++ ### + + if {[exists_and_not_null alt_template]} { + ad_return_template $alt_template +diff -crBN forums-head/www/message-post.adp forums/www/message-post.adp +*** forums-head/www/message-post.adp 2009-01-14 12:51:25.000000000 -0600 +--- forums/www/message-post.adp 2009-01-14 12:51:27.000000000 -0600 +*************** +*** 6,9 **** + +--- 6,10 ---- + +diff -crBN forums-head/www/message-post.tcl forums/www/message-post.tcl +*** forums-head/www/message-post.tcl 2009-01-14 12:51:25.000000000 -0600 +--- forums/www/message-post.tcl 2009-01-14 12:51:29.000000000 -0600 +*************** +*** 9,14 **** +--- 9,15 ---- + } -query { + {forum_id ""} + {parent_id ""} ++ {page_instance_id 0} + } -validate { + forum_id_or_parent_id { + if {[empty_string_p $forum_id] && [empty_string_p $parent_id]} { Index: openacs-4/packages/learning-content/learning-content-patch/script-extras.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/script-extras.sh,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/script-extras.sh 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,4 @@ +#!/bin/bash + +cd ../../ +patch -p0 -i learning-content/learning-content-patch/chat-diff.patch Index: openacs-4/packages/learning-content/learning-content-patch/script.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/script.sh,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/script.sh 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,9 @@ +#!/bin/bash + +cd ../../ +patch -p0 -i learning-content/learning-content-patch/evaluation-diff.patch +patch -p0 -i learning-content/learning-content-patch/assessment-diff.patch +patch -p0 -i learning-content/learning-content-patch/forums-diff.patch +patch -p0 -i learning-content/learning-content-patch/acs-subsite-diff.patch +patch -p0 -i learning-content/learning-content-patch/theme-zen-diff.patch +cp -r learning-content/learning-content-patch/InsertGlossaryEntry/ acs-templating/www/resources/xinha-nightly/plugins/ Index: openacs-4/packages/learning-content/learning-content-patch/theme-zen-diff.patch =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/theme-zen-diff.patch,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/theme-zen-diff.patch 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,39 @@ +diff -crBN theme-zen-54/lib/lrn-master.adp theme-zen/lib/lrn-master.adp +*** theme-zen-54/lib/lrn-master.adp 2009-01-23 15:56:22.000000000 -0600 +--- theme-zen/lib/lrn-master.adp 2009-01-23 16:01:19.000000000 -0600 +*************** +*** 91,98 **** +
#theme-zen.begin_main_content#
+
+ +! +
+ +
@user_messages.message;noquote@
+
+--- 91,101 ---- +
#theme-zen.begin_main_content#
+
+ +! +
++ ++
@content_alert_message;noquote@
++
+ +
@user_messages.message;noquote@
+
+diff -crBN theme-zen-54/lib/lrn-master.tcl theme-zen/lib/lrn-master.tcl +*** theme-zen-54/lib/lrn-master.tcl 2009-01-23 15:56:22.000000000 -0600 +--- theme-zen/lib/lrn-master.tcl 2009-01-23 16:13:47.000000000 -0600 +*************** +*** 277,279 **** +--- 277,284 ---- + template::head::add_css -href "/resources/dotlrn/dotlrn-toolbar.css" + template::add_header -src "/packages/dotlrn/lib/toolbar" + } ++ ++ ## Learn Content: set an alert message after an activity has been created ++ set content_alert_message [ad_get_cookie content_alert_message ""] ++ ad_set_cookie content_alert_message "" ++ ### Index: openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/insert-glossary-entry.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/insert-glossary-entry.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/insert-glossary-entry.js 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,237 @@ +// Insert Glossary Content Plugin for xinha +// Developed in the Learn@WU Project of the +// Vienna University of Economics and Business Administration +// www.wu-wien.ac.at +// +// Authors: G�nter Ernst guenter.ernst@wu-wien.ac.at +// Modified by: Alvaro Rodríguez, alvaro@viaro.net +// +// Distributed under the same terms as HTMLArea itself. +// This notice MUST stay intact for use (see license.txt). +// + +InsertGlossaryEntry._pluginInfo = { + name : "InsertGlossaryEntry", + version : "0.1", + developer : "Alvaro Rodriguez", + developer_url : "http://www.viaro.net", + sponsor : "Viaro Networks", + sponsor_url : "http://www.viaro.net", + license : "htmlArea" +}; + +function InsertGlossaryEntry(editor) { + var args = arguments; + this.editor = editor; + var ArgsString = args[1].toString(); + var additionalArgs = ArgsString.split(","); + InsertGlossaryEntry.script_dir = this.editor.script_dir; + InsertGlossaryEntry.package_id = this.editor.config.package_id; + + if (typeof InsertGlossaryEntry.script_dir == "undefined") { + // InsertGlossaryEntry.script_dir = "."; + InsertGlossaryEntry.script_dir = "/learning-content"; + } + + var cfg = editor.config; + var tt = InsertGlossaryEntry.I18N; + var bl = InsertGlossaryEntry.btnList; + var self = this; + + // register the toolbar buttons provided by this plugin + for (var i = 0; i < bl.length; ++i) { + var btn = bl[i]; + var id = "LW-" + btn[0]; + + cfg.registerButton(id, HTMLArea._lc(btn[1], "InsertGlossaryEntry"), editor.imgURL(btn[0] + ".gif", "InsertGlossaryEntry"), false, + function(editor, id) { + // dispatch button press event + self.buttonPress(editor, id); + }); + + switch (id) { + case "LW-insert-glossary-entry": + cfg.addToolbarElement(id, "insertglossaryentry", +1); + break; + } + } + + cfg.hideSomeButtons(" insertimage "); + cfg.pageStyle = "@import url(" + _editor_url + + "plugins/InsertGlossaryEntry/insert-glossary-entry.css) screen; " +}; + +InsertGlossaryEntry.btnList = [ + ["insert-glossary-entry", "Insert Glossary Entry"] + ]; + +InsertGlossaryEntry.prototype.buttonPress = function(editor, id) { + InsertGlossaryEntry.editor = editor; + switch (id) { + case "LW-insert-glossary-entry": + this.insertEntry(); + break; + } +}; + +// Called when the user clicks on "InsertLink" button. If the link is already +// there, it will just modify it's properties. +InsertGlossaryEntry.prototype.insertEntry = function(link) { + var editor = InsertGlossaryEntry.editor; + var outparam = null; + +// Try to get the parent node of the selection + if (typeof link == "undefined") { + link = editor.getParentElement(); + if (link) { + while (link && !/^a$/i.test(link.tagName)) + link = link.parentNode; + } + } + if (!link) { +// If there is no link + var sel = editor._getSelection(); + var range = editor._createRange(sel); + var compare = 0; + if (HTMLArea.is_ie) { + if(sel.type == "Control") + { + compare = range.length; + } + else + { + compare = range.compareEndPoints("StartToEnd", range); + } + } else { + compare = range.compareBoundaryPoints(range.START_TO_END, range); + } + if (compare == 0) { + alert(HTMLArea._lc("You need to select some text before creating a link")); + return; + } + + var input_text = editor.getSelectedHTML(); + input_text = input_text.replace(' ',''); +// If there's a link tag in the selection throws an error + var link_exp = new RegExp('.*.*|.*.*'); + if (input_text.match(link_exp)){ + alert(HTMLArea._lc("Your text should not have link tags\nTip: Select only text without links.")); + return; + } +// Replace all html tags of the selection + var link_exp = new RegExp(']*>(.*)]*>'); + while (input_text.match(link_exp)){ + input_text = input_text.replace(link_exp,'$2'); + } +// Replace all special chars '<','>' + var tag = new RegExp('.*<.*>.*'); + if (input_text.match(tag)){ + input_text = ''; + } +// Send the word to the glossary interface + outparam = { + f_word : input_text, + f_href : '', + f_def : '', + edit_mode : '0' + }; + } else { +// If there is already a link + var att = HTMLArea.is_ie ? "className" : "class"; +//Check if it's a glossary link, if not return an error + if (link.getAttribute(att) != 'glossary__content__'){ + alert(HTMLArea._lc("You cannot add a link to another link")); + return; + } else { +// Send the information to the glossary interface + var id = HTMLArea.is_ie ? editor.stripBaseURL(link.id) : link.getAttribute("id"); + var re = new RegExp('__[0-9]+__'); + var new_word = id.replace(re,''); + outparam = { + f_word : new_word, + f_href : HTMLArea.is_ie ? editor.stripBaseURL(link.href) : link.getAttribute("href"), + f_def : '', + edit_mode : '1' + }; + } + } + var PopupUrl = InsertGlossaryEntry.script_dir + "/xinha/insert-glossary-entry"; + PopupUrl = PopupUrl + "?package_id=" + InsertGlossaryEntry.package_id; + + Dialog(PopupUrl, function(param) { + if (!param) { // user must have pressed Cancel + return false; + } +// Create a random number, to append it with the id of the link in case the same word is used more than once in the same page + var pos = Math.floor(Math.random()*1000001); + var a = link; + if (!a) try { + new Ajax.Request(param.url,{method: 'get', onSuccess: function (r) { + editor._doc.execCommand("createlink", false, 'glossary-list#glossary_'+escape(encode(r.responseText))); + a = editor.getParentElement(); + var sel = editor._getSelection(); + var range = editor._createRange(sel); + if (!HTMLArea.is_ie) { + a = range.startContainer; + if (!/^a$/i.test(a.tagName)) { + a = a.nextSibling; + if (a == null) + a = range.startContainer.parentNode; + } + } + while (a && !/^a$/i.test(a.tagName)) + a = a.parentNode; + editor.selectNodeContents(a); + a.className = 'glossary__content__'; + a.id = r.responseText+'__'+pos+'__'; + } }); + } catch(e) {} + else { +// If there was a link, check if the action is to take it off + if (param.unlink == 1) { + editor.selectNodeContents(a); + editor._doc.execCommand("unlink", false, null); + editor.updateToolbar(); + return false; + } else { +// Update the current glossary link + new Ajax.Request(param.url,{method: 'get', onSuccess: function (r) { + var href = 'glossary-list#glossary_'+escape(encode(r.responseText)); var id = r.responseText; + editor.selectNodeContents(a); + a.href = href; + a.id = r.responseText+'__'+pos+'__'; + }}); + } + } + if (!(a && /^a$/i.test(a.tagName))) + return false; + editor.selectNodeContents(a); + editor.updateToolbar(); + + }, outparam); +}; + + +function encode(string) { + string = string.replace(/\r\n/g,"\n"); + var utftext = ""; + + for (var n = 0; n < string.length; n++) { + + var c = string.charCodeAt(n); + + if (c < 128) { + utftext += String.fromCharCode(c); + } + else if((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } + else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + } + return utftext; +} Index: openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/img/insert-glossary-entry.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/img/insert-glossary-entry.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/img/insert-glossary-entry2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/img/insert-glossary-entry2.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/lang/de.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/lang/de.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/lang/de.js 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,4 @@ +// empty +{ +}; + Index: openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/lang/en.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/lang/en.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/lang/en.js 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,2 @@ +// empty +{}; Index: openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/lang/fr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/lang/fr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/lang/fr.js 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,22 @@ +// I18N constants +// LANG: "fr", ENCODING: UTF-8 +{ + "Insert Image": "Insérer une image", + "Image Preview:": "Prévisualisation", + "Image URL:": "URL", + "Preview": "Prévisualisation", + "Alternate text:": "Texte alternatif", + "Layout": "Layout", + "Alignment:": "Alignement", + "Border thickness:": "Epaisseur bordure", + "Spacing": "Espacement", + "Horizontal:": "Horizontal", + "Vertical:": "Vertical", + "The file you are uploading doesn't have the correct extension.": "Le fichier que vous téléchargez ne possède pas la bonne extension.", + "The file you are uploading already exists.": "Le fichier que vous téléchargez existe déjà.", + "The file you are uploading is to big. The max Filesize is": "Le fichier que vous uploadez est trop gros. La taille maximum est", + "Images on the Server:": "Images sur le serveur", + "Please select a file to upload.": "Veuillez sélectionner un fichier a télécharger", + "Upload file": "Télécharger", + "Open file in new window": "Ouvrir le fichier dans une nouvelle fenêtre" +}; \ No newline at end of file Index: openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/lang/no.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/lang/no.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/lang/no.js 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,23 @@ +// LANG: "de", ENCODING: UTF-8 | ISO-8859-1 +// Sponsored by http://www.schaffrath-neuemedien.de +// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com +{ + "Insert Image": "Sett inn bilde", + "Image Preview:": "Forhåndsvisning:", + "Image URL:": "Bildets URL:", + "Preview": "Forhåndsvisning", + "Alternate text:": "Alternativ tekst", + "Layout": "Oppsett", + "Alignment:": "Plassering", + "Border thickness:": "Rammetykkelse:", + "Spacing": "Luft rundt bildet", + "Horizontal:": "Horisontal:", + "Vertical:": "Vertikal:", + "The file you are uploading doesn't have the correct extension.": "Bildet du laster opp har et ugyldig format, opplastning avbrutt", + "The file you are uploading already exists.": "Bildet du prøver å laste opp eksisterer allerede på serveren", + "The file you are uploading is to big. The max Filesize is": "Bildet du laster opp er for stort, maks tillatt størrelse er", + "Images on the Server:": "Bilder på serveren:", + "Please select a file to upload.": "Velg bilde du skal laste opp", + "Upload file": "Last opp bilde", + "Open file in new window": "Åpne bilde i nytt vindu" +}; \ No newline at end of file Index: openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/popups/blank.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/popups/blank.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/learning-content-patch/InsertGlossaryEntry/popups/blank.html 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1 @@ \ No newline at end of file Index: openacs-4/packages/learning-content/lib/view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/lib/view.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/lib/view.adp 5 Mar 2009 21:28:56 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + + + + + +@html;noquote@ Index: openacs-4/packages/learning-content/lib/view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/lib/view.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/lib/view.tcl 5 Mar 2009 21:28:56 -0000 1.1 @@ -0,0 +1,22 @@ +set parameter [subst { + {-m view} + {-return_url "[ns_conn url]"} + {-template_file "view-links"} + {-folder_id 0} +}] + +# TODO the following should be done more elegantly +set actual_query [expr {[info exists template_file] ? "template_file=$template_file" : " "}] + +if {[info exists url]} { + # new style, the url is sufficient + ::xowiki::Package initialize -parameter $parameter -url $url -actual_query $actual_query +} else { + # old style, use item_id + set page [::xowiki::Package instantiate_page_from_id \ + -item_id $item_id -parameter $parameter] + ::xo::cc export_vars +} + +set html [::$package_id invoke -method $m] + Index: openacs-4/packages/learning-content/sql/oracle/learning-content-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/sql/oracle/learning-content-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/sql/oracle/learning-content-create.sql 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1,35 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- +-- +-- Oracle port samir@symphinity.com 11 July 2002 +-- + +-- table to differentiate between normal pages and activity pages inside content +create table content_activities +( + item_id number(38) constraint pk_content_activities primary key, + activity_id number(38) +); +-- table to track how many times a word of the glossary is being used in every content page +create table content_glossary_term_count +( + term varchar2(400) not null, + page varchar2(400) not null, + folder_id number(38) not null, + times_used number(38), + constraint pk_content_glossary_count primary key (term,page,folder_id) +); + Index: openacs-4/packages/learning-content/sql/oracle/learning-content-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/sql/oracle/learning-content-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/sql/oracle/learning-content-drop.sql 5 Mar 2009 21:28:57 -0000 1.1 @@ -0,0 +1,22 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- +-- +-- Oracle port samir@symphinity.com 11 July 2002 +-- + +drop table content_activities; +drop table content_glossary_term_count; + Index: openacs-4/packages/learning-content/sql/oracle/learning-content-tables-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/sql/oracle/learning-content-tables-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/sql/oracle/learning-content-tables-create.sql 5 Mar 2009 21:28:57 -0000 1.1 @@ -0,0 +1,35 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- +-- +-- Oracle port samir@symphinity.com 11 July 2002 +-- + +-- table to differentiate between normal pages and activity pages inside content +create table content_activities +( + item_id number(38) constraint pk_content_activities primary key, + activity_id number(38) +); +-- table to track how many times a word of the glossary is being used in every content page +create table content_glossary_term_count +( + term varchar2(400) not null, + page varchar2(400) not null, + folder_id number(38) not null, + times_used number(38), + constraint pk_content_glossary_count primary key (term,page,folder_id) +); + Index: openacs-4/packages/learning-content/sql/oracle/learning-content-tables-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/sql/oracle/learning-content-tables-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/sql/oracle/learning-content-tables-drop.sql 5 Mar 2009 21:28:57 -0000 1.1 @@ -0,0 +1,22 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- +-- +-- Oracle port samir@symphinity.com 11 July 2002 +-- + +drop table content_activities; +drop table content_glossary_term_count; + Index: openacs-4/packages/learning-content/sql/postgresql/learning-content-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/sql/postgresql/learning-content-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/sql/postgresql/learning-content-create.sql 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1,35 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- +-- +-- Oracle port samir@symphinity.com 11 July 2002 +-- + +-- table to differentiate between normal pages and activity pages inside content +create table content_activities +( + item_id integer constraint pk_content_activities primary key, + activity_id integer +); +-- table to track how many times a word of the glossary is being used in every content page +create table content_glossary_term_count +( + term varchar(400) not null, + page varchar(400) not null, + folder_id integer not null, + times_used integer, + constraint pk_content_glossary_count primary key (term,page,folder_id) +); + Index: openacs-4/packages/learning-content/sql/postgresql/learning-content-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/sql/postgresql/learning-content-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/sql/postgresql/learning-content-drop.sql 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1,22 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- +-- +-- Oracle port samir@symphinity.com 11 July 2002 +-- + +drop table content_activities; +drop table content_glossary_term_count; + Index: openacs-4/packages/learning-content/sql/postgresql/learning-content-tables-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/sql/postgresql/learning-content-tables-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/sql/postgresql/learning-content-tables-create.sql 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1,35 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- +-- +-- Oracle port samir@symphinity.com 11 July 2002 +-- + +-- table to differentiate between normal pages and activity pages inside content +create table content_activities +( + item_id integer constraint pk_content_activities primary key, + activity_id integer +); +-- table to track how many times a word of the glossary is being used in every content page +create table content_glossary_term_count +( + term varchar(400) not null, + page varchar(400) not null, + folder_id integer not null, + times_used integer, + constraint pk_content_glossary_count primary key (term,page,folder_id) +); + Index: openacs-4/packages/learning-content/sql/postgresql/learning-content-tables-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/sql/postgresql/learning-content-tables-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/sql/postgresql/learning-content-tables-drop.sql 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1,21 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- +-- +-- Oracle port samir@symphinity.com 11 July 2002 +-- +drop table content_activities; +drop table content_glossary_term_count; + Index: openacs-4/packages/learning-content/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/tcl/apm-callback-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/tcl/apm-callback-procs.tcl 5 Mar 2009 21:28:57 -0000 1.1 @@ -0,0 +1,68 @@ +ad_library { + + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-09-10 +} + +::xo::db::require package xowiki + +namespace eval learning_content::apm {} + +ad_proc -public learning_content::apm::package_mount { + {-package_id:required} + {-node_id:required} +} { + Check if packages needed are mounted, if not mount them! +} { + + set package_parent_id [site_node::get_parent_id -node_id $node_id] + set package_community_id [site_node::get_object_id \ + -node_id $package_parent_id] + set community_id [dotlrn_community::get_community_id \ + -package_id $package_community_id] + set community_url [dotlrn_community::get_community_url $community_id] + #check if assessment is mounted, if not mount it + if {$community_id > 0} { + set activity "assessment" + if {![site_node::exists_p -url "${community_url}${activity}" ]} { + dotlrn_community::add_applet_to_community \ + $community_id dotlrn_assessment + } + #check if evaluation is mounted, if not mount it + set activity "evaluation" + if {![site_node::exists_p -url "${community_url}${activity}"]} { + dotlrn_community::add_applet_to_community \ + $community_id dotlrn_evaluation + } + } + + learning_content::category::map_new_tree -object_id $package_id \ + -tree_name "\#learning-content.choose_location\#" + + ::xowiki::Package initialize -package_id $package_id + + set root_directory [get_server_root] + set prototypes_path "$root_directory/packages/learning-content/www/prototypes/" + foreach prototype_page [glob \ + $prototypes_path/*.page] { + regexp {.*/(.*).page} $prototype_page match prototype_page_name + + if {($prototype_page_name eq "glossary-list" \ + || $prototype_page_name eq "header_page" \ + || $prototype_page_name eq "editor")} { + if {$prototype_page_name eq "editor"} { + set folder_id [content::folder::get_folder_from_package \ + -package_id $package_id] + set folder_object_id [content::item::get_id_by_name \ + -name "::$folder_id"\ + -parent_id $folder_id] + set p [::xowiki::Package instantiate_page_from_id -item_id $folder_object_id] + set editor_page [source "${prototypes_path}editor.page"] + $p set text [$editor_page set text] + $p save + } + } else { + $package_id import_prototype_page $prototype_page_name + } + } +} Index: openacs-4/packages/learning-content/tcl/learning-content-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/tcl/learning-content-callback-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/tcl/learning-content-callback-procs.tcl 5 Mar 2009 21:28:57 -0000 1.1 @@ -0,0 +1,105 @@ +ad_library { + + Callback Procedures offered by the Content package + + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-10-01 +} + +ad_proc -callback learning_content::extend_form { + {-name:required} + {-page_instance_id:required} +} { + Do the extend to the ad_form for each activity package + (currently: assessment, evaluation, forum) +} - + +ad_proc -callback learning_content::insert_object { + {-name:required} + {-item_id:required} + {-activity_id:required} +} { + Insert an activity from the create interface of the external activity +} - + + +ad_proc -public -callback search::url -impl category {} { + + @author alvaro@viaro.net + @creation_date 2008-10-01 + + returns a url for a category of content to the search package + +} { + set category_id $object_id + set tree_id [category::get_tree $category_id] + set objects [db_list get_objects { *SQL* }] + foreach object_id $objects { + set object_type [acs_object_type $object_id] + if { [string equal $object_type "apm_package"] } { + set wiki_url [apm_package_url_from_id $object_id] + set wiki_folder_id \ + [content::folder::get_folder_from_package_not_cached \ + -package_id $object_id] + set name [learning_content::get_first_tree_item_from_category_id \ + -category_id $category_id \ + -folder_id $wiki_folder_id] + set nexturl "${wiki_url}${name}" + return $nexturl + } + } + return "" +} + +ad_proc -public -callback dotlrn::blocks::edit_url -impl category {} { + + @author alvaro@viaro.net + @creation_date 2008-10-01 + + returns a url for the edit action of a content category + +} { + set category_id $object_id + set tree_id [category::get_tree $category_id] + set objects [db_list get_objects { *SQL* }] + foreach object_id $objects { + set object_type [acs_object_type $object_id] + if { [string equal $object_type "apm_package"] } { + set package_url [apm_package_url_from_id $object_id] + return "${package_url}admin/category-view" + } + } + return "" +} + +ad_proc -public -callback learning_content::extend_form -impl content {} { + Do the extend to the ad_form for each activity package + (currently: assessment, evaluation, forum) +} { + if { [exists_and_not_null page_instance_id] && $page_instance_id != 0 } { + ad_form -extend -name $name \ + -form {{page_instance_id:text(hidden) {value $page_instance_id}}} + } +} + +ad_proc -public -callback learning_content::insert_object -impl content {} { + Insert an activity from the create interface of the external activity +} { + if { [exists_and_not_null item_id] && $item_id != 0 } { + set insert_p [learning_content::activity_exists_p -item_id $item_id] + if { $insert_p } { + learning_content::activity_edit -item_id $item_id -activity_id $activity_id + } else { + learning_content::activity_new -item_id $item_id -activity_id $activity_id + } + set page [::xowiki::Package instantiate_page_from_id -item_id $item_id] + $page destroy_on_cleanup + $page set title $name + $page save + + set content_url [apm_package_url_from_id [$page set package_id]] + append content_url [$page set name] + ad_set_cookie content_alert_message "[_ learning-content.content_new_object_alert_message]" + ns_cache flush xotcl_object_cache ::$item_id + } +} Index: openacs-4/packages/learning-content/tcl/learning-content-callback-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/tcl/learning-content-callback-procs.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/tcl/learning-content-callback-procs.xql 5 Mar 2009 21:28:57 -0000 1.1 @@ -0,0 +1,21 @@ + + + + + + select object_id + from category_tree_map + where tree_id = :tree_id + + + + + + + select object_id + from category_tree_map + where tree_id = :tree_id + + + Index: openacs-4/packages/learning-content/tcl/learning-content-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/tcl/learning-content-procs-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/tcl/learning-content-procs-oracle.xql 5 Mar 2009 21:28:57 -0000 1.1 @@ -0,0 +1,60 @@ + + + oracle8.1.6 + + + + select o.title as category_name + from categories c, + acs_objects o, + category_object_map m + where c.category_id = o.object_id + and m.category_id = c.category_id + and m.object_id = :item_id + and rownum <= 1 + + + + + + select name + from ( + select ci.name + from category_object_map c, + cr_items ci, + xowiki_page p + where c.object_id = ci.item_id + and ci.parent_id = :folder_id + and ci.content_type = '::xowiki::PageInstance' + and category_id = :category_id + and p.page_id = ci.live_revision + order by to_number(p.page_order) + ) where rownum <= 1 + + + + + + select case when count(*) = 0 then 0 else 1 end + from category_object_map + where category_id = :my_category_id + + + + + + select p.page_order + from cr_items ci, + xowiki_page p + where ci.parent_id = :folder_id + and ci.content_type = '::xowiki::PageInstance' + and p.page_id = ci.live_revision + and p.page_order is not null + order by to_number(p.page_order) desc + + + + + + + Index: openacs-4/packages/learning-content/tcl/learning-content-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/tcl/learning-content-procs-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/tcl/learning-content-procs-postgresql.xql 5 Mar 2009 21:28:57 -0000 1.1 @@ -0,0 +1,61 @@ + + + + + postgresql + 7.2 + + + + + select o.title as category_name + from categories c, + acs_objects o, + category_object_map m + where c.category_id = o.object_id + and m.category_id = c.category_id + and m.object_id = :item_id + limit 1 + + + + + + select ci.name + from category_object_map c, + cr_items ci, + xowiki_page p + where c.object_id = ci.item_id + and ci.parent_id = :folder_id + and ci.content_type = '::xowiki::PageInstance' + and category_id = :category_id + and p.page_id = ci.live_revision + order by p.page_order::integer + limit 1 + + + + + + select case when count(*) = 0 then 0 else 1 end + where exists ( + select 1 + from category_object_map + where category_id = :my_category_id) + + + + + + select p.page_order + from cr_items ci, + xowiki_page p + where ci.parent_id = :folder_id + and ci.content_type = '::xowiki::PageInstance' + and p.page_id = ci.live_revision + and p.page_order is not null + order by p.page_order::integer desc + + + + \ No newline at end of file Index: openacs-4/packages/learning-content/tcl/learning-content-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/tcl/learning-content-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/tcl/learning-content-procs.tcl 5 Mar 2009 21:28:57 -0000 1.1 @@ -0,0 +1,987 @@ +ad_library { + Content package procs + + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-09-04 +} + +namespace eval content {} +namespace eval learning_content::category {} +namespace eval learning_content::page {} + +ad_proc -public learning_content::create_page { + {-content ""} + {-page_title ""} +} { + set package_id [ad_conn package_id] + ::xowiki::Package initialize -package_id $package_id + set folder_id [::xowiki::Page require_folder -name xowiki \ + -package_id $package_id] + set page [::xowiki::PageInstance new ] + set page_index [db_string page_index {*SQL*} -default 0] + set page_name "en:page_[incr page_index]" + if {[db_string select_name {*SQL*} -default 0]} { + set page_name "en:page_[incr page_index]_[format "%0.0f" [expr [random] * 10]]_[format \ + %0.0f [expr [random] * 10]]" + } + $page configure -name $page_name -parent_id $folder_id \ + -package_id $package_id + + set max_page_order [learning_content::get_next_page_order] + + db_0or1row select_instance [::xowiki::PageTemplate instance_select_query \ + -folder_id $folder_id \ + -select_attributes {name} \ + -where_clause "name = 'en:content_template'"] + + set template_id $item_id + $page set page_template $template_id + $page set page_order $max_page_order + $page set nls_language "en_US" + $page set instance_attributes [list "contenido" $content] + if {![empty_string_p $page_title]} { + $page set title $page_title + } + $page destroy_on_cleanup + $page initialize_loaded_object + set page_id [$page save_new] + return [list $page_id $page_name] +} + +ad_proc -public learning_content::update_page { + {-content ""} + {-page_title ""} + {-page_item_id 0} +} { + set package_id [ad_conn package_id] + ::xowiki::Package initialize -package_id $package_id + if { $page_item_id != 0 } { + set page [::xowiki::Package instantiate_page_from_id -item_id $page_item_id] + set page_name [$page set name] + $page destroy_on_cleanup + + if { ![empty_string_p $content] } { + $page set instance_attributes [list "contenido" $content] + } + if { ![empty_string_p $page_title]} { + $page set title $page_title + } + set page_id [$page save] + set result [list $page_id $page_name] + } else { + set result [list] + } + return $result +} + +ad_proc -public learning_content::get_item_category_name { + {-item_id:required} +} { + set category_name [db_string get_cat_name {} -default "NOT_FOUND"] + return $category_name +} + +ad_proc -public learning_content::insert_item_into_category { + {-item_id:required} + {-category_name:required} + {-tree_id:required} +} { + set category_id_list [category::get_id $category_name] + set this_tree [category_tree::get_tree $tree_id] + set categories [list] + foreach category $this_tree { + set category_id [lindex $category 0] + lappend categories $category_id + } + set added 0 + foreach category_id $category_id_list { + if {[lsearch -exact $categories $category_id] != -1 } { + category::map_object -object_id $item_id $category_id + set added 1 + } + } +} + +ad_proc -public learning_content::insert_items_into_category_by_name { + {-object_category_list:required} + {-package_id:required} +} { + set tree_list [category_tree::get_mapped_trees $package_id] + set tree_id [lindex [lindex $tree_list 0] 0] + set folder_id [::$package_id folder_id] + foreach {item_name category_name } $object_category_list { + set item_id [db_string get_item_id {} -default "0"] + if { $item_id } { + learning_content::insert_item_into_category \ + -item_id $item_id \ + -category_name $category_name \ + -tree_id $tree_id + } + } +} + +ad_proc -public learning_content::create_target_category_tree_and_map_source_category_tree { + {-original_categories:required} + {-package_id:required} +} { + set tree_list [category_tree::get_mapped_trees $package_id] + set tree_id [lindex [lindex $tree_list 0] 0] + category_tree::unmap -tree_id $tree_id -object_id $package_id + set orig_new_category_map [list] + set new_tree_id [category_tree::add \ + -name "\#learning-content.choose_location\#" \ + -context_id $package_id ] + foreach orig_cat $original_categories { + set original_category_id [lindex $orig_cat 0] + set original_category_name [lindex $orig_cat 1] + set original_category_level [lindex $orig_cat 2] + set original_category_parent [lindex $orig_cat 3] + set new_category_id [category::add \ + -tree_id $new_tree_id\ + -parent_id [learning_content::get_mapped_category \ + -category_map $orig_new_category_map \ + -query_orig_category_id $original_category_parent]\ + -name $original_category_name] + lappend orig_new_category_map [list $original_category_id \ + $new_category_id] + } + category_tree::map -tree_id $new_tree_id -object_id $package_id -widget "" + return $orig_new_category_map +} + +ad_proc -public learning_content::get_mapped_category { + {-category_map:required} + {-query_orig_category_id:required} + } { + if {$query_orig_category_id == 0 } { + return "" + } + + foreach category_pair $category_map { + set original_category_id [lindex $category_pair 0] + set new_category_id [lindex $category_pair 1] + if {$original_category_id == $query_orig_category_id } { + return $new_category_id + } + } + return "" +} + +ad_proc -public learning_content::map_objects_to_categories { + {-categories_map:required} + {-object_category_map:required} + {-package_id:required} + {-folder_id:required} +} { + foreach object_category $object_category_map { + set object_name [lindex $object_category 0] + set orig_category_id [lindex $object_category 1] + if {![empty_string_p $orig_category_id]} { + set new_category_id [learning_content::get_mapped_category \ + -category_map $categories_map \ + -query_orig_category_id $orig_category_id] + + set object_id [db_string get_item_id_in_context {} -default "0"] + if {$object_id} { + category::map_object -remove_old \ + -object_id $object_id $new_category_id + } else { + set error_msg "object_id = $object_id for " + append error_msg "object_name = $object_name" + ns_log error $error_msg + } + } + } +} + +ad_proc -public learning_content::map_activity_objects { + {-src_folder_id:required} + {-dst_folder_id:required} +} { + + With the id of every page copied check if it's an activity, if so insert + a new entry with the new page_id and empty activity_id in the activities table + +} { + set objects_map [db_list_of_lists get_objects { *SQL* }] + foreach object $objects_map { + set item_id [lindex $object [expr [llength $object] - 1]] + set item_name [lindex $object 0] + if { [learning_content::activity_exists_p -item_id $item_id] } { + set new_item_id [db_string get_new_item_id { *SQL* } -default 0] + learning_content::activity_new -item_id $new_item_id -activity_id 0 + } + } +} + +ad_proc -public learning_content::copy_glossary_words_count { + {-src_folder_id:required} + {-dst_folder_id:required} +} { + Copy the words count from the source instance of content + to a target instance +} { + db_foreach get_words_count { *SQL* } { + if {[db_string check_word {} -default 0]} { + db_dml update_word { *SQL* } + } else { + db_dml insert_word { *SQL* } + } + } +} + +ad_proc -public learning_content::parse_all_instance { + {-original_package_id:required} + {-new_package_id:required} +} { + set wiki_folder_id [::xowiki::Page require_folder \ + -name xowiki -package_id $new_package_id] + foreach page [::xowiki::PageInstance allinstances] { + set new_content [learning_content::parse_for_fs \ + -page_content "[$page set instance_attributes] "\ + -original_package_id $original_package_id \ + -new_package_id $new_package_id] + $page set instance_attributes " $new_content " + } +} + +ad_proc -public learning_content::parse_for_fs { + {-page_content:required} + {-original_package_id:required} + {-new_package_id:required} +} { + set match_list [list] + set list_of_expressions [split $page_content ">"] + foreach expression $list_of_expressions { + if {[regexp \ + /dotlrn(.*)file-storage(.*)(\\.)(...|....)(\") \ + $expression one_match]} { + set one_match [string trimright $one_match "\""] + set this_match [list $one_match [learning_content::replace_path \ + -original_path $one_match \ + -original_package_id $original_package_id \ + -new_package_id $new_package_id ] ] + lappend match_list $this_match + } + } + foreach match_pair $match_list { + regsub [lindex $match_pair 0] $page_content [lindex $match_pair 1]\ + page_content + } + return $page_content +} + +ad_proc -public learning_content::replace_path { + {-original_path:required} + {-original_package_id:required} + {-new_package_id:required} +} { + set fs_view "file-storage/view" + set view_start [string last $fs_view $original_path] + if { $view_start == -1} { + return $original_path + } + set view_start [expr $view_start + [string length $fs_view]] + set fs_url [string range $original_path \ + [string first "/dotlrn" $original_path] \ + [expr $view_start - [string length "/view"]] ] + array set orig_fs_node_info [site_node::get_from_url -url $fs_url] + set orig_fs_package_id $orig_fs_node_info(package_id) + set new_node_id [site_node::get_node_id_from_object_id \ + -object_id $new_package_id] + set new_parent_id [site_node::get_parent_id -node_id $new_node_id] + set new_package_id [site_node::get_object_id -node_id $new_parent_id] + set new_fs_url [site_node::get_url_from_object_id \ + -object_id $new_package_id] + append new_fs_url "file-storage/" + array set new_fs_node_info [ site_node::get_from_url -url $new_fs_url ] + set new_fs_package_id $new_fs_node_info(package_id) + set orig_root_folder [fs_get_root_folder -package_id $orig_fs_package_id ] + set new_root_folder [fs_get_root_folder -package_id $new_fs_package_id ] + set fs_view_path [string range $original_path $view_start end] + set fs_view_path [ns_urldecode $fs_view_path] + set file_id [::content::item::get_id -item_path " $fs_view_path " \ + -root_folder_id $orig_root_folder \ + -resolve_index "t"] + if [empty_string_p $file_id] { + return $original_path + } + set final_fs_view_path $fs_view_path + set fs_view_path [string range $fs_view_path 1 \ + [string last "/" $fs_view_path]] + set fs_view_path [string trimright $fs_view_path "/" ] + set folder_list [split $fs_view_path "/"] + set root_folder $new_root_folder + foreach folder $folder_list { + set folder [ns_urldecode $folder] + set folder_id [fs::get_folder -name "$folder" -parent_id $root_folder] + if { [empty_string_p $folder_id ] } { + set root_folder [fs::new_folder -name "$folder" \ + -pretty_name "$folder" -parent_id $root_folder] + } else { + set root_folder $folder_id + } + } + set new_file_id [fs::file_copy -file_id $file_id \ + -target_folder_id $root_folder] + set new_file_path $new_fs_url + append new_file_path "view" + append new_file_path $final_fs_view_path + return $new_file_path +} + +ad_proc -public learning_content::get_categories { + {-tree_id:required} +} { + Get Categories from Tree Id +} { + set locale "en_US" + set result [list] + set result [db_list get_categories ""] + return $result +} + +ad_proc -public learning_content::get_category_name { + {-category_id:required} +} { + Get Category Name from Id +} { + set locale "en_US" + if { [catch { array set cat_lang \ + [lindex [nsv_get categories $category_id] 1] }] } { + return {} + } + if { ![catch { set name $cat_lang($locale) }] } { + # exact match: found name for this locale + return $name + } + if {![catch { set name $cat_lang( [ad_parameter DefaultLocale \ + acs-lang "en_US"] )}]} { + return $name + } + +} + +ad_proc -public learning_content::get_first_page { + {-package_id:required} +} { + Get the first visible page in the content tree, if any +} { + set trees [category_tree::get_mapped_trees $package_id] + set tree [lindex $trees 0] + set tree_id [lindex $tree 0] + set units [category_tree::get_categories -tree_id $tree_id] + set units [lsort -increasing $units] + if { [llength $units] > 0 } { + foreach unit $units { + set categories [category::get_children -category_id $unit] + set categories [lsort -increasing $categories] + if { [llength $categories] > 0 } { + foreach category $categories { + set subcategories [category::get_children \ + -category_id $category] + set subcategories [lsort -increasing $subcategories] + foreach subcategory $subcategories { + set objects [category::get_objects \ + -category_id $subcategory] + if {[llength $objects] > 0} { + set object_id [lindex $objects 0] + set page_name [db_string get_page_name {} \ + -default ""] + return $page_name + } + } + set objects [category::get_objects -category_id $category] + if {[llength $objects] > 0} { + set object_id [lindex $objects 0] + set page_name [db_string get_page_name {} -default ""] + return $page_name + } + } + } + set objects [category::get_objects -category_id $unit] + if {[llength $objects] > 0} { + set object_id [lindex $objects 0] + set page_name [db_string get_page_name {} -default ""] + return $page_name + } + } + } + return "" +} + +ad_proc -public learning_content::get_first_item_from_category_id { + {-category_id:required} + {-folder_id:required} +} { + Get the first item mapped to the category +} { + set name [db_string get_first_item {} -default ""] + return $name +} + +ad_proc -public learning_content::get_first_tree_item_from_category_id { + {-category_id:required} + {-folder_id:required} +} { + Get the first visible item in the tree below the category +} { + set categories [category::get_children -category_id $category_id] + set categories [lsort -increasing $categories] + foreach category $categories { + set subcategories [category::get_children -category_id $category] + set subcategories [lsort -increasing $subcategories] + foreach subcategory $subcategories { + set name [learning_content::get_first_item_from_category_id \ + -category_id $subcategory -folder_id $folder_id] + if { ![empty_string_p $name] } { + return $name + } + } + set name [learning_content::get_first_item_from_category_id \ + -category_id $category -folder_id $folder_id] + if { ![empty_string_p $name] } { + return $name + } + } + set name [learning_content::get_first_item_from_category_id \ + -category_id $category_id -folder_id $folder_id] + return $name +} + +ad_proc -public learning_content::get_unit_id { + {-category_id:required} +} { + Get the unit id of the category +} { + if {![empty_string_p $category_id]} { + set parent_id [category::get_parent -category_id $category_id] + while { $parent_id != 0 && $category_id != $parent_id} { + set category_id $parent_id + set parent_id [category::get_parent -category_id $parent_id] + } + } + return $category_id +} + +ad_proc -public learning_content::get_activity_id { + {-item_id:required} +} { + Get the activity_id related to the item_id +} { + set result [db_string activity_id { *SQL* } -default 0] + return $result +} + +ad_proc -public learning_content::activity_exists_p { + {-item_id:required} +} { + Check if there is an activity_id related to the item_id +} { + set result [db_string activity_exists { *SQL* } -default 0] + return $result +} + +ad_proc -public learning_content::activity_new { + {-item_id:required} + {-activity_id:required} +} { + Insert a new activity +} { + if { [exists_and_not_null item_id] && $item_id != 0 } { + if {![learning_content::activity_exists_p -item_id $item_id]} { + db_dml insert_activity { *SQL* } + } + } +} + +ad_proc -public learning_content::activity_edit { + {-item_id:required} + {-activity_id:required} +} { + Edit an existing activity +} { + db_dml update_activity { *SQL* } +} + +ad_proc -public learning_content::copy { + {-src_community_id:required} + {-dst_community_id:required} +} { + Copy Content information from current community into another community. +} { + + set src_package_id [db_string get_src_package_id "" -default 0] + set dst_package_id [db_string get_dst_package_id "" -default 0] + + if { $dst_package_id == 0 } { + dotlrn_community::add_applet_to_community \ + $dst_community_id dotlrn_learning_content + set dst_package_id [db_string get_dst_package_id "" -default 0] + $dst_package_id destroy + } + + ::xowiki::Package initialize -parameter { + {-object_type ::xowiki::Page} + {-objects ""} + } -package_id $src_package_id + + set folder_id [::$package_id folder_id] + + if {$objects eq ""} { + set sql [$object_type instance_select_query -folder_id $folder_id \ + -with_subtypes true] + db_foreach instance_select $sql { lappend item_ids $item_id } + } else { + foreach o $objects { + if {[set id [CrItem lookup -name $o -parent_id $folder_id]] != 0} { + lappend item_ids $id + } + } + } + + set content "" + + append content "set object_name_category_id_map \[list\] " \n + append content "set objects_list \[list\] " \n + append content "set original_package_id $src_package_id " \n + + foreach item_id $item_ids { + + ::xowiki::Package instantiate_page_from_id -item_id $item_id + # + # if the page belongs to an Form/PageTemplate, include it as well + # + if {[$item_id istype ::xowiki::PageInstance]} { + set template_id [$item_id page_template] + if {[lsearch $item_ids $template_id] == -1 \ + && ![info exists included($template_id)]} { + ::xowiki::Package instantiate_page_from_id -item_id $template_id + append content "[$template_id marshall]" \n + set included($template_id) 1 + } + } + + lappend item_category_list [list $item_id \ + [learning_content::get_item_category_name -item_id $item_id]] + append content "[$item_id marshall]" \n + append content "lappend object_name_category_id_map { \ + [$item_id set name] \ + [category::get_mapped_categories $item_id] }" \n + append content "lappend objects_list { \ + [$item_id set name] [$item_id item_id] }" \n + } + foreach item_id $item_ids { + $item_id destroy + } + + #getting the content categories + set categories [list] + set original_categories [list] + + foreach tree [category_tree::get_mapped_trees $package_id] { + foreach { tree_id tree_name } $tree { + if { [string equal $tree_name \ + "\#learning-content.choose_location\#"] } { + + foreach category_info [category_tree::get_tree $tree_id] { + foreach {cid category_label deprecated_p level} \ + $category_info {break} + lappend categories $cid + lappend categories [category::get_name $cid] + set category_parent [category::get_parent \ + -category_id $cid] + set one_category [list $cid $category_label $level \ + $category_parent] + lappend original_categories $one_category + } + } + } + } + append content "set this_package_id $dst_package_id" \n + append content "set this_folder_id \[\$this_package_id folder_id\]" \n + append content "set category_map \ + \[learning_content::create_target_category_tree_and_map_source_category_tree \ + -original_categories \[list $original_categories \] -package_id \ + $dst_package_id \]\n" + ## Check for activities and insert them into the new instance + append content "learning_content::parse_all_instance \ + -original_package_id \$original_package_id \ + -new_package_id \$this_package_id\n" + append content "ad_schedule_proc -once t 5 \ + learning_content::map_objects_to_categories \ + -categories_map \$category_map \ + -object_category_map \$object_name_category_id_map \ + -package_id $dst_package_id \ + -folder_id \$this_folder_id\n" + + set src_folder_id $folder_id + set package_url [apm_package_url_from_id $dst_package_id] + $package_id destroy + ::xowiki::Package initialize -package_id $dst_package_id + set dst_folder_id [::$package_id folder_id] + foreach o [::xowiki::Page allinstances] { + set preexists($o) 1 + } + + if {[catch {namespace eval ::xo::import $content} error]} { + set msg "Error: $error" + set result 0 + } else { + set objects [list] + foreach o [::xowiki::Page allinstances] { + if {![info exists preexists($o)]} {lappend objects $o} + } + set msg [$package_id import -objects $objects -replace 0] + # map all the new activity pages after creating them + learning_content::map_activity_objects -src_folder_id $src_folder_id \ + -dst_folder_id $dst_folder_id + learning_content::copy_glossary_words_count -src_folder_id $src_folder_id \ + -dst_folder_id $dst_folder_id + set result 1 + } + namespace delete ::xo::import + $package_id destroy + return $result +} + + +ad_proc -public learning_content::category::delete_p { + {-tree_id:required} + {-category_id:required} +} { + set tree_list [learning_content::category::get_tree_levels \ + -subtree_id $category_id -tree_id $tree_id] + set tree_list [linsert $tree_list 0 $category_id] + foreach category $tree_list { + set my_category_id [lindex $category 0] + if {[db_string check_mapped_objects {}] eq 1} { + return 0 + } + } + return 1 +} + +ad_proc -public learning_content::category::page_order { + {-tree_id:required} + {-category_id:required} + {-wiki_folder_id:required} +} { + set tree_list [learning_content::category::get_tree_levels \ + -subtree_id $category_id \ + -tree_id $tree_id] + set tree_list [linsert $tree_list 0 $category_id] + foreach cat_tree $tree_list { + set cat_id [lindex $cat_tree 0] + set page_list [db_list_of_lists select_content {}] + if {[llength $page_list] > 0} { + break + } + } + return $page_list +} + +ad_proc -public learning_content::get_next_page_order { +} { + set folder_id [content::folder::get_folder_from_package \ + -package_id [ad_conn package_id]] + set list_page_order [db_list select_order ""] + set max_page_order [lindex [lsort -decreasing \ + -command learning_content::simple_compare $list_page_order] 0] + if {[llength $list_page_order] < 1} { + set max_page_order 0 + } + incr max_page_order + return $max_page_order +} + +ad_proc -public learning_content::category::category_childs { + {-tree_id:required} + {-category_id:required} + {-wiki_folder_id:required} +} { + set tree_list [learning_content::category::get_tree_levels \ + -subtree_id $category_id -tree_id $tree_id] + set tree_list [linsert $tree_list 0 [list $category_id "n"]] + foreach category $tree_list { + set cat_id [lindex $category 0] + set count [db_string select_cat {*SQL*} -default 0] + if {$count > 0} { + return 1 + } + } + return 0 +} + +ad_proc -public learning_content::category::delete { + {-tree_id:required} + {-category_ids:required} + {-locale ""} +} { + set user_id [auth::get_user_id] + permission::require_permission \ + -object_id $tree_id \ + -privilege category_tree_write + set result 1 + db_transaction { + foreach category_id [db_list order_categories_for_delete ""] { + category::delete $category_id + } + category_tree::flush_cache $tree_id + } on_error { + set result 0 + } + return $result +} + +ad_proc -private learning_content::category::valid_level_and_count { + {-tree_id:required} + {-category_id:required} +} { + set tree_list [learning_content::category::get_tree_levels -tree_id $tree_id] + set my_level [lindex \ + [lindex $tree_list \ + [lsearch -regexp \ + $tree_list $category_id]] \ + 3] + if {$my_level > 2} { + return 0 + } + set sub_tree_list [learning_content::category::get_tree_levels -only_level 1 \ + -subtree_id $category_id -tree_id $tree_id] + + if {[llength $sub_tree_list] >= 5} { + return 0 + } + return 1 +} + + +ad_proc -private learning_content::category::map_new_tree { + {-object_id:required} + {-tree_name:required} + {-user_id ""} +} { + + if {[empty_string_p $user_id]} { + set user_id [ad_conn user_id] + } + + db_transaction { + set tree_id [category_tree::add -name $tree_name -user_id $user_id] + learning_content::category::new_subtree -tree_id $tree_id -user_id $user_id + category_tree::map -tree_id $tree_id \ + -object_id $object_id \ + -assign_single_p t \ + -require_category_p t \ + -widget "" + } + return $tree_id +} + +ad_proc -private learning_content::category::new_subtree { + {-tree_id:required} + {-language "en_US"} + {-user_id ""} +} { + + if {[empty_string_p $user_id]} { + set user_id [ad_conn user_id] + } + set description "New unit for content" + set parent_id [db_null] + set unit_id [category::add -tree_id $tree_id \ + -parent_id $parent_id \ + -locale $language \ + -name "Unidad N" \ + -user_id $user_id \ + -description $description] + + category::add -tree_id $tree_id \ + -parent_id $unit_id \ + -locale $language \ + -name "Introduccion" -description $description + + category::add -tree_id $tree_id \ + -parent_id $unit_id \ + -locale $language \ + -name "Contenido" \ + -user_id $user_id \ + -description $description + + category::add -tree_id $tree_id \ + -parent_id $unit_id \ + -locale $language \ + -name "Actividades" \ + -user_id $user_id \ + -description $description + + category::add -tree_id $tree_id \ + -parent_id $unit_id \ + -locale $language \ + -name "Anexo" \ + -user_id $user_id \ + -description $description + return $unit_id +} + +ad_proc -private learning_content::category::category_parent { + -category_id + -tree_id + {-level 0} +} { + if {[db_0or1row select_parent {*SQL*}]} { + if {![empty_string_p $parent_id] && $level eq 0} { + return [learning_content::category::category_parent -category_id $parent_id \ + -tree_id $tree_id] + } elseif {![empty_string_p $parent_id] && $level ne 0} { + return $parent_id + } else { + return $category + } + } +} + +ad_proc -public learning_content::value_compare { + {-def:required} + x + y +} { + set xp [string first . $x] + set yp [string first . $y] + if {$xp == -1 && $yp == -1} { + if {$x < $y} { + return -1 + } elseif {$x > $y} { + return 1 + } else { + return $def + } + } elseif {$xp == -1} { + set yh [string range $y 0 [expr {$yp-1}]] + return [value_compare -def -1 $x $yh] + } elseif {$yp == -1} { + set xh [string range $x 0 [expr {$xp-1}]] + return [value_compare -def 1 $xh $y] + } else { + set xh [string range $x 0 $xp] + set yh [string range $y 0 $yp] + if {$xh < $yh} { + return -1 + } elseif {$xh > $yh} { + return 1 + } else { + incr xp + incr yp + return [value_compare -def $def [string range $x $xp end] \ + [string range $y $yp end]] + } + } +} + +ad_proc -public learning_content::compare { + a + b +} { + set x [lindex $a 1] + set y [lindex $b 1] + return [learning_content::value_compare -def 0 $x $y] +} + +ad_proc -public learning_content::simple_compare { + a + b +} { + return [learning_content::value_compare -def 0 $a $b] +} + +ad_proc -public learning_content::category::get_tree_levels { + {-all:boolean} + {-subtree_id ""} + {-to_level 0} + {-only_level 0} + {-tree_id:required} + {-locale ""} +} { + Get all categories of a category tree from the cache. + + @option all Indicates that phased_out categories should be included. + @option subtree_id Return only categories of the given subtree. + @param tree_id category tree to get the categories of. + @param locale language in which to get the categories. [ad_conn locale] + used by default. + @return tcl list of lists: category_id category_name deprecated_p level +} { + if {[catch {set tree [nsv_get category_trees $tree_id]}]} { + return + } + if {$to_level ne 0 && $only_level ne 0} { + set only_level 0 + } + set result "" + if {[empty_string_p $subtree_id]} { + foreach category $tree { + util_unlist $category category_id deprecated_p level + if {$all_p || $deprecated_p == "f"} { + if {$to_level < $level && $to_level ne 0} { + continue + } + if {$only_level ne $level && $only_level ne 0} { + continue + } + lappend result [list $category_id \ + [category::get_name $category_id $locale] \ + $deprecated_p $level] + } + } + } else { + set in_subtree_p 0 + set subtree_level 0 + foreach category $tree { + util_unlist $category category_id deprecated_p level + if {$level == $subtree_level || $level < $subtree_level} { + set in_subtree_p 0 + } + if {$in_subtree_p && $deprecated_p == "f"} { + if {$to_level < [expr $level - $subtree_level] \ + && $to_level ne 0} { + continue + } + + if {$only_level ne [expr $level - $subtree_level] \ + && $only_level ne 0} { + continue + } + + lappend result [list $category_id [category::get_name \ + $category_id $locale] $deprecated_p \ + [expr $level - $subtree_level]] + } + if {$category_id == $subtree_id} { + set in_subtree_p 1 + set subtree_level $level + } + } + } + return $result +} + +ad_proc -public learning_content::category::get_under_categories { + {-category_id:required} + {-parent_id:required} +} { + Get the categories under the specified category +} { + set categories [db_list get_under_categories {*SQL*}] + return $categories +} + +ad_proc -public learning_content::category::get_over_categories { + {-category_id:required} + {-parent_id:required} +} { + Get the categories over the specified category +} { + set categories [db_list get_over_categories {*SQL*}] + return $categories +} Index: openacs-4/packages/learning-content/tcl/learning-content-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/tcl/learning-content-procs.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/tcl/learning-content-procs.xql 5 Mar 2009 21:28:57 -0000 1.1 @@ -0,0 +1,280 @@ + + + + + + + select item_id + from cr_items + where name = :item_name + and parent_id = :dst_folder_id + + + + + + select name, item_id + from cr_items + where parent_id = :src_folder_id + + + + + + select * + from content_glossary_term_count + where folder_id = :src_folder_id + + + + + + select 1 + from content_glossary_term_count + where term = :term + and page = :page + and folder_id = :dst_folder_id + + + + + + insert into + content_glossary_term_count + (term, page, folder_id, times_used) + values + (:term, :page, :dst_folder_id, :times_used) + + + + + + update content_glossary_term_count + set times_used = :times_used + where term = :term + and page = :page + and folder_id = :dst_folder_id + + + + + + select object_id from acs_objects + where title = :item_name + and context_id = :folder_id + + + + + + select object_id from acs_objects + where title = :object_name + and context_id = :folder_id + + + + + + select name + from cr_items + where item_id = :object_id + + + + + + select activity_id + from content_activities + where item_id = :item_id + + + + + + update content_activities + set activity_id = :activity_id + where item_id = :item_id + + + + + + insert into + content_activities (item_id, activity_id) + values (:item_id, :activity_id) + + + + + + select 1 + from content_activities + where item_id = :item_id + + + + + + select object_id + from site_nodes + where parent_id = ( + select node_id + from site_nodes + where object_id = ( + select package_id + from dotlrn_communities + where community_id = :src_community_id ) ) + and name = 'learning-content' + + + + + + select object_id + from site_nodes + where parent_id = ( + select node_id + from site_nodes + where object_id = ( + select package_id + from dotlrn_communities + where community_id = :dst_community_id ) + ) + and name = 'learning-content' + + + + + + select c.category_id as category_id + from categories c, + category_translations ct + where parent_id is null + and tree_id = :tree_id + and c.category_id = ct.category_id + and ct.locale = :locale + order by category_id + + + + + + select category_id + from categories + where tree_id = :tree_id + and category_id in ([join $category_ids ,]) + order by left_ind desc + + + + + + select count(ci.item_id) + from category_object_map c, cr_items ci, + cr_revisions r, xowiki_page p + where c.object_id = ci.item_id + and ci.parent_id = :wiki_folder_id + and ci.content_type not in ('::xowiki::PageTemplate') + and ci.name not in ('es:header_page','es:index','es:indexe') + and r.revision_id = ci.live_revision + and p.page_id = r.revision_id + and c.category_id = :cat_id + group by category_id + order by category_id desc + + + + + + select ci.item_id, + p.page_order, + ci.name, + ci.content_type, + category_id, + xpi.page_instance_id + from category_object_map c, + cr_items ci, + xowiki_page p, + xowiki_page_instance xpi + where c.object_id = ci.item_id + and ci.parent_id = :wiki_folder_id + and ci.content_type not in ('::xowiki::PageTemplate') + and p.page_id = xpi.page_instance_id + and category_id = :cat_id + and xpi.page_instance_id = ci.live_revision + order by p.page_order + + + + + + select ci.item_id, + p.page_order, + ci.name, + ci.content_type, + category_id, + xpi.page_instance_id + from category_object_map c, + cr_items ci, + xowiki_page p, + xowiki_page_instance xpi + where c.object_id = ci.item_id + and ci.parent_id = :wiki_folder_id + and ci.content_type = '::xowiki::PageInstance' + and p.page_id = xpi.page_instance_id + and category_id in ([join $cat_id ","]) + and xpi.page_instance_id = ci.live_revision + order by p.page_order + + + + + + select parent_id, + category_id as category + from categories + where category_id = :category_id + and tree_id = :tree_id + + + + + + select count(p.page_id) + from cr_items ci, + xowiki_page p + where ci.parent_id = :folder_id + and ci.content_type = '::xowiki::PageInstance' + and p.page_id = ci.live_revision + + + + + + select 1 from cr_items + where name = :page_name + and parent_id = :folder_id + + + + + + select category_id + from categories + where parent_id = :parent_id + and category_id < :category_id + order by category_id desc + + + + + + select category_id + from categories + where parent_id = :parent_id + and category_id > :category_id + order by category_id + + + + Index: openacs-4/packages/learning-content/tcl/learning-content-xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/tcl/learning-content-xowiki-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/tcl/learning-content-xowiki-procs.tcl 5 Mar 2009 21:28:56 -0000 1.1 @@ -0,0 +1,312 @@ +ad_library { + Content package procs + + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-09-17 +} + +namespace eval ::learning_content { + + ::xo::PackageMgr create ::learning_content::Package \ + -package_key "learning-content" -pretty_name "Learn Content" \ + -superclass ::xowiki::Package + + Package instproc initialize {} { + ::xowiki::WikiForm instmixin add ::learning_content::ContentForm + ::xowiki::PageInstanceEditForm instmixin add ::learning_content::ContentWikiForm + ::xowiki::PageTemplateForm instmixin add ::learning_content::ContentTemplateForm + ::xowiki::FormPage instmixin add ::learning_content::ContentFormPage + ::xowiki::Page instmixin add ::learning_content::ContentPage + next + } + + Package instproc destroy {} { + ::xowiki::WikiForm instmixin delete ::learning_content::ContentForm + ::xowiki::PageInstanceEditForm instmixin delete \ + ::learning_content::ContentWikiForm + ::xowiki::PageTemplateForm instmixin delete \ + ::learning_content::ContentTemplateForm + ::xowiki::FormPage instmixin delete ::learning_content::ContentFormPage + ::xowiki::Page instmixin delete ::learning_content::ContentPage + next + } + + Package instproc return_page { + {-adp:required} + {-variables:required} + {-form} + } { + foreach _var $variables { + if {[llength $_var] == 2} { + upvar [lindex $_var 0] [lindex $_var 0] + upvar [string trim [lindex $_var 1] $] \ + [string trim [lindex $_var 1] $] + } else { + upvar $_var [set _var] + } + } + if {[string eq $adp "/packages/xowiki/www/edit"]} { + set adp "/packages/learning-content/www/edit" + } + if {[exists_and_not_null item_id]} { + set category_id [category::get_mapped_categories $item_id] + set tree_id [category::get_tree $category_id] + set category_id [learning_content::category::category_parent \ + -category_id $category_id -level 1 -tree_id $tree_id] + set activity_id [learning_content::activity_exists_p -item_id $item_id] + if { !$activity_id } { + # AR: catch the case when a page has been deleted and will be imported + if {[catch { set page_name [$item_id name] } error]} { + set page_name "index" + set no_links_p 1 + } else { + set no_links_p 0 + } + if {([string first "glossary-list" $page_name] == -1 && \ + [string first "index" $page_name] == -1) || \ + [acs_user::site_wide_admin_p]} { + if { !$no_links_p } { + set edit_link [my make_link -privilege admin $item_id edit] + } + } + + if { $no_links_p } { + set edit_link "" + set rev_link "" + } + } else { + set edit_link [my make_link -privilege admin \ + -link "activity-new" [my id] edit item_id \ + {return_url "[ad_return_url]"}] + } + set new_link2 [my make_link -privilege admin \ + -link "page-instance-new" [my id] \ + edit-new object_type] + + set new_link3 [my make_link -privilege admin \ + -link "activity-new" [my id] edit-new \ + category_id {return_url "[ad_return_url]"}] + + lappend variables new_link2 new_link3 category_id + } + if {[exists_and_not_null form]} { + upvar form [set form] + } else { + set form "" + } + return [next -adp $adp -variables $variables -form $form] + } + + Class create ContentPage -superclass ::xowiki::Page + + ContentPage instproc edit {} { + my instvar package_id item_id revision_id + set page_name [$item_id name] + if {([string first "glossary-list" $page_name] == -1 && \ + [string first "index" $page_name] == -1) || \ + [acs_user::site_wide_admin_p]} { + next + } else { + set content [_ learning-content.you_dont_have_perm] + set html [$package_id return_page \ + -adp /packages/learning-content/www/view-plain \ + -variables {content}] + return $html + } + } + + ContentPage instproc delete {} { + my instvar package_id item_id name parent_id + catch { + db_dml [my qn delete_term_count] { + delete from content_glossary_term_count + where folder_id = :parent_id + and page = :name} + } error + next + } + + Class create ContentFormPage -superclass ::xowiki::FormPage + + ContentFormPage instproc footer {} { + if {![my exists __no_form_page_footer]} { + return "" + } + next + } + + Class create ContentForm -superclass ::xowiki::WikiForm \ + -parameter { + {field_list + {item_id name page_order title creator text description nls_language}} + {f.page_order + {page_order:text(hidden),optional} + } + {with_categories false} + {validate { + {name {\[::xowiki::validate_name\]} {Another item with this name exists \ + already in this folder}}} + } + } + + Class create ContentTemplateForm -superclass ::xowiki::PageTemplateForm \ + -parameter { + {field_list {item_id name text}} + {f.name + {name:text(hidden),optional} + } + } + + Class create ContentWikiForm -superclass ::xowiki::PageInstanceEditForm \ + -parameter { + {field_list {item_id name title page_order text creator description}} + {f.name + {name:text(hidden),optional} + } + {f.page_order + {page_order:text(hidden),optional} + } + {f.title + {title:text(text) + {label #learning-content.Name#}} + } + {with_categories true} + } + + ContentWikiForm instproc after_submit {item_id} { + #AR: overwrite the after submit_link + #to avoid redirecting to a language specific url + my instvar data + my submit_link "[[$data package_id] package_url][$data name]" + next + } + + ContentWikiForm instproc edit_data {} { + my instvar page_instance_form_atts data + foreach var $page_instance_form_atts { + if {[string equal $var "contenido"]} { + set contenido [my var $var] + set page_name "[$data set name]" + set folder_id [$data set parent_id] + # Delete old glossary entries for the page + db_dml [my qn remove_old_messages] { + delete from content_glossary_term_count + where folder_id = :folder_id + and page = :page_name} + # Find all glossary words + while { [regexp -nocase "\]*>" \ + $contenido match value1 value2 value3] } { + + regexp -nocase ".* id=\"(.+)__\[0-9\]+__\" .*" $match \ + match term + set cont [regsub -all -nocase \ + "\]*id=\"${term}__\[0-9\]+__\"\[^>\]*>" \ + $contenido "" result] + set contenido $result + if {[db_string [my qn check_if_exists] " + select 1 + from content_glossary_term_count + where folder_id = $folder_id + and page = '$page_name' + and term = '$term'" -default 0]} { + db_dml [my qn update_word_times] { + update content_glossary_term_count + set times_used = :cont + where folder_id = :folder_id + and page = :page_name + and term = :term} + } else { + db_dml [my qn insert_word_times] { + insert into content_glossary_term_count + ( term, page, folder_id, times_used ) + values + ( :term, :page_name, :folder_id, :cont )} + } + # If fails to replace the words, + # continue with the next one to avoid loops + if { $cont == 0 } break + } + } + } + set item_id [next] + return $item_id + } + + Class create Policy -superclass ::xo::Policy + + Policy policyb -contains { + Class Package -array set require_permission { + admin swa + reindex swa + rss swa + google-sitemap none + google-sitemapindex none + delete {{{has_class ::xowiki::PageTemplate} id swa} + {{has_class ::xowiki::Object} id swa} + {id admin}} + + edit-new {{{has_class ::xowiki::Object} id swa} + {{has_class ::xowiki::Page} id swa} + {{has_class ::xowiki::PageTemplate} id swa} + {id create}} + } + + Class Page -array set require_permission { + view none + revisions {{package_id admin}} + diff swa + edit swa + make-live-revision {{package_id admin}} + delete-revision swa + delete swa + save-tags login + popular-tags login + } + + Class PageInstance -array set require_permission { + view none + revisions {{package_id admin}} + diff {{package_id admin}} + edit {{package_id admin}} + make-live-revision {{package_id admin}} + delete-revision {{package_id admin}} + delete {{item_id admin}} + save-tags login + popular-tags login + } + + Class Form -array set require_permission { + view none + revisions {{package_id admin}} + edit {{package_id admin}} + make-live-revision {{package_id admin}} + delete-revision {{package_id admin}} + delete {{item_id admin}} + create-new {{package_id admin}} + } + + Class PageTemplate -array set require_permission { + edit swa + edit-new swa + revisions swa + diff swa + make-live-revision swa + delete-revision swa + delete swa + } + + Class Object -array set require_permission { + edit swa + revisions swa + make-live-revision swa + delete-revision swa + delete swa + save-tags swa + popular-tags swa + } + + Class File -array set require_permission { + download none + } + } +} \ No newline at end of file Index: openacs-4/packages/learning-content/tcl/learning-content-xowiki-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/tcl/learning-content-xowiki-procs.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/tcl/learning-content-xowiki-procs.xql 5 Mar 2009 21:28:57 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + select 1 + from content_activities + where item_id = :item_id + + + Index: openacs-4/packages/learning-content/www/activity-new.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/activity-new.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/activity-new.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,106 @@ + + @page_title;noquote@ + @context;noquote@ + + + + + + + +
+ + + + + + + + +
1. #learning-content.choose_activity#2. #learning-content.choose_location#
+ + + + + + +
+
+
+ 1. #learning-content.select_type_of_activity# +
+ +
+
#learning-content.cancel#
+
+ + + +
+
+ + + + + Index: openacs-4/packages/learning-content/www/activity-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/activity-new.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/activity-new.tcl 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,142 @@ +ad_page_contract { + Interface for creating a new activity for content + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-04-15 +} { + {item_id 0} + {category_id 0} + {activity_id 0} + {activity_name ""} + {redirect_url ""} + {activity_type ""} + {new_activity_id 0} + {return_url ""} +} + +if { $item_id == 0 } { + set page_title [_ learning-content.new_activity] + set context [list "[_ learning-content.new_activity]"] +} else { + set page_title [_ learning-content.edit_activity] + set context [list "[_ learning-content.edit_activity]"] +} + +set package_parent_id [site_node::get_parent_id -node_id [ad_conn node_id]] +set package_community_id [site_node::get_object_id \ + -node_id $package_parent_id] +set community_id [dotlrn_community::get_community_id \ + -package_id $package_community_id] +set community_url [dotlrn_community::get_community_url $community_id] +set url "${community_url}chat" + +if {[site_node::exists_p -url $url]} { + set chat_is_mounted 1 +} else { + set chat_is_mounted 0 +} + +set forward_url "" +if { $item_id != 0 || $activity_id != 0 } { + + if { $activity_id == 0 } { + set activity_id_o [learning_content::get_activity_id -item_id $item_id] + } else { + set activity_id_o $activity_id + } + if { $activity_id_o != 0 } { + set object_type [acs_object_type $activity_id_o] + } else { + set object_type "" + } + + if {![empty_string_p $object_type]} { + if {[string eq $object_type content_item]} { + set object_type [::xo::db::CrClass get_object_type \ + -item_id $activity_id_o] + } + set activity_type $object_type + if { $item_id != 0 } { + set revision_id [content::item::get_live_revision \ + -item_id $item_id] + set page [::xowiki::Package instantiate_page_from_id -item_id $item_id \ + -revision_id $revision_id] + set activity_name_o [$page set title] + } else { + set activity_name_o $activity_name + } + } else { + set activity_id_o 0 + set activity_name_o "" + } + +} else { + set object_type "" + set activity_id_o 0 + set activity_name_o "" +} + +set package_id [ad_conn package_id] +set parent_id [site_node::get_parent_id \ + -node_id [site_node::get_node_id_from_object_id \ + -object_id $package_id]] + +permission::require_permission -object_id $package_id -privilege admin + +ad_form -name activities \ + -has_submit { 1 } \ + -form { + {activity_id:text(text),optional {label ""} + {html + {id "activity_id" + value "$activity_id_o" + style "display: none;"}}} + {activity_name:text(hidden),optional + {html + {id "activity_name" + value "$activity_name_o"}}} + {redirect_url:text(hidden),optional + {html + {id "redirect_url" + value "$redirect_url"}}} + {page_item_id:text(hidden),optional + {html + {id "page_item_id" + value "$item_id"}}} + {category_id:text(hidden),optional + {html + {id "category_id" + value "$category_id"}}} + {activity_type:text(hidden),optional + {html + {id "activity_type" + value "$object_type"}}} + {new_activity_id:text(hidden),optional + {html + {id "new_activity_id" + value "$new_activity_id"}}} + {return_url:text(hidden),optional + {html + {id "return_url" + value "$return_url"}}} + {ok_submit:text(submit) {label "[_ learning-content.ok]"}} + } -on_submit { + if { ![empty_string_p $redirect_url] } { + ad_returnredirect [export_vars -base "activity-new2" \ + {activity_id + redirect_url + page_item_id + category_id + activity_type + new_activity_id + return_url}] + } else { + ad_returnredirect [export_vars -base "activity-new2" \ + {activity_id + activity_name + page_item_id + category_id + activity_type + new_activity_id + return_url}] + } + } Index: openacs-4/packages/learning-content/www/activity-new2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/activity-new2.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/activity-new2.adp 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1,62 @@ + + @page_title;noquote@ + @context;noquote@ + + + +
+ + + + + + + + +
1. #learning-content.choose_activity#2. #learning-content.choose_location#
+ + + + + + + + + +
#learning-content.activity_type#:@activity_type_name@
#learning-content.Name#: + @activity_name@#learning-content.New#
+ + + + +
+ + +
+
+ + + + + + \ No newline at end of file Index: openacs-4/packages/learning-content/www/activity-new2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/activity-new2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/activity-new2.tcl 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1,160 @@ +ad_page_contract { + Interface for creating a new activity for content + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-04-10 +} { + {item_id 0} + {page_item_id 0} + {activity_id 0} + {redirect_url ""} + {activity_name ""} + {category_id 0} + {activity_type ""} + {new_activity_id 0} + {return_url "./"} +} + +if { $page_item_id == 0 } { + set page_title [_ learning-content.new_activity] + set context [list "[_ learning-content.new_activity]"] +} else { + set page_title [_ learning-content.edit_activity] + set context [list "[_ learning-content.edit_activity]"] +} + +set package_id [ad_conn package_id] +set parent_id [site_node::get_parent_id \ + -node_id [site_node::get_node_id_from_object_id \ + -object_id $package_id]] + +set trees [category_tree::get_mapped_trees $package_id id] +set tree [lindex $trees 0] +set tree_id [lindex $tree 0] + +permission::require_permission -object_id $package_id -privilege admin + +set activities_category 0 +set back_url [export_vars -base "activity-new" { + {item_id $page_item_id} + activity_id + redirect_url + activity_name + category_id + activity_type + +}] + +set categories [category::get_children -category_id $category_id] +foreach category $categories { + if {[ string equal [category::get_name $category] "Actividades"]} { + set activities_category $category + } +} +switch $activity_type { + as_assessments { + set activity_type_name "[_ assessment.Assessment]" + } + forums_message { + set activity_type_name "[_ forums.Forum]" + } + evaluation_tasks { + set activity_type_name "[_ dotlrn-evaluation.Evaluation_]" + } + chat_room { + set activity_type_name "[_ chat.chat_rooms]" + } + default { + set activity_type_name "" + } +} + +if { $page_item_id != 0 } { + set revision_id [content::item::get_live_revision -item_id $page_item_id] + set page [::xowiki::Package instantiate_page_from_id \ + -item_id $page_item_id -revision_id $revision_id] + set optional_text [lindex [$page set instance_attributes] 1] +} else { + set optional_text "" + set category_trees [category_tree::get_mapped_trees $package_id] + foreach tree $category_trees { + set cat_name "__category__ad_form__category_[lindex $tree 0]" + } +} + +ad_form -name activities + +category::ad_form::add_widgets -container_object_id $package_id \ + -form_name activities \ + -element_name category \ + -categorized_object_id $page_item_id + +ad_form -extend -name activities \ + -has_submit { 1 } \ + -form { + {optional_text:richtext(richtext),optional + {label "#learning-content.optional_description#"} + {options { + editor xinha plugins + {GetHtml + ContextMenu FullScreen ListType EditTag + Stylist OacsFs InsertGlossaryEntry} + }} + {value "$optional_text"} + {html {id "optional_text" rows 20 cols 100}}} + {activity_id:text(text),optional {label ""} + {html {id "activity_id" value $activity_id style "display: none;"}}} + {activity_name:text(hidden),optional + {html {id "activity_name" value "$activity_name"}}} + {redirect_url:text(hidden),optional + {html {id "redirect_url" value "$redirect_url"}}} + {page_item_id:text(hidden),optional + {html {id "page_item_id" value $page_item_id}}} + {ok_submit:text(submit) {label "[_ learning-content.ok]"}} + {cancel_submit:text(submit) {label "[_ learning-content.cancel]"} + {html + {onclick "document.getElementById('action').value = 'cancel';"}}} + {action:text(hidden) {html {id "action"}} {value ""}} + } -on_submit { + if { [string equal $action "cancel"] } { + ad_returnredirect $return_url + } + set category_trees [category_tree::get_mapped_trees $package_id] + foreach tree $category_trees { + set cat_name "__category__ad_form__category_[lindex $tree 0]" + set category_id [ns_queryget "$cat_name"] + } + + if { $page_item_id == 0} { + set data [learning_content::create_page -content $optional_text \ + -page_title $activity_name] + set item_id [lindex $data 0] + } else { + set data [learning_content::update_page -content $optional_text -page_title \ + $activity_name -page_item_id $page_item_id] + set item_id $page_item_id + } + set page_name [lindex $data 1] + + if { $category_id != 0 } { + category::map_object -remove_old -object_id $item_id $category_id + } + + if { $activity_id != 0 } { + if { $page_item_id != 0 } { + learning_content::activity_edit -item_id $page_item_id -activity_id $activity_id + } else { + learning_content::activity_new -item_id $item_id -activity_id $activity_id + } + } elseif { ![empty_string_p $redirect_url] } { + if {![learning_content::activity_exists_p -item_id $item_id]} { + learning_content::activity_new \ + -item_id $item_id -activity_id 0 + } + set redirect_url [lindex $redirect_url 0] + ad_returnredirect [export_vars \ + -base $redirect_url {{page_instance_id $item_id}}] + } + set package_id [ad_conn package_id] + set package_url [apm_package_url_from_id $package_id] + ad_returnredirect "${package_url}$page_name" + } Index: openacs-4/packages/learning-content/www/content-categories.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-categories.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-categories.tcl 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,152 @@ +::xowiki::Page proc __render_html { + -package_id + {-tree_name ""} + -tree_style + -no_tree_name:boolean + -count:boolean + {-summary 0} + {-open_page ""} + {-category_ids ""} + {-except_category_ids ""} +} {} + +##### Generating YUI Dynamic Tree for index content ##### +set glossary_id [ns_queryget category_id] +set cont 1 +set package_id [$__including_page set package_id] +set package_url [$package_id package_url] +set tree_list [category_tree::get_mapped_trees $package_id] +set tree_id [lindex [lindex $tree_list 0] 0] +set tree_name [lindex [lindex $tree_list 0] 1] +set folder_id [$package_id folder_id] +set categories [learning_content::get_categories -tree_id $tree_id] + +set page_id [string trimleft $__including_page "::"] + +# Alvaro: url of the script that adds the content dynamically +# to the tree branches +set dynamic_tree_url "${package_url}dynamic-tree" + +set open_category_id 0 +set open_item_id [expr {$open_page ne "" ? [::xo::db::CrClass lookup -name $open_page \ + -parent_id $folder_id] : 0}] +set open_category_id [category::get_mapped_categories -tree_id $tree_id \ + $open_item_id] +set open_unit_id1 0 +set open_unit_id2 0 +set open_unit_id3 0 +db_0or1row get_unit_id1 {*SQL*} +db_0or1row get_unit_id2 {*SQL*} + +template::multirow create category_tree category_id category_name parent_id is_open_p +template::multirow create glossary glossary_url glossary_parent_id selected_p + +foreach category_id $categories { + + set total 0 + set category_name [learning_content::get_category_name -category_id $category_id ] +# Alvaro: for each branch we need to know if the open page is inside, so we +#set it open if the page is inside or close otherwise + if {$open_unit_id1 == $category_id || $open_unit_id2 == $category_id \ + || $open_category_id == $category_id || $glossary_id == $category_id} { + set is_open_unit true + } else { + set is_open_unit false + } + + set total [expr $total + [llength [category::get_objects \ + -category_id $category_id] ]] + set subcategories [db_list get_childrens {*SQL*}] + foreach subcategory_id $subcategories { + set total [expr $total + [llength [category::get_objects \ + -category_id $subcategory_id] ]] + set in_subcategories [category::get_children \ + -category_id $subcategory_id] + foreach in_subcategory_id $in_subcategories { + set total [expr $total + [llength [category::get_objects \ + -category_id $in_subcategory_id] ]] + } + } + + if { $total > 0 } { + # Alvaro: adding a category node to the tree root :Content + template::multirow append category_tree $category_id $category_name $package_id $is_open_unit + + if {![exists_and_not_null open_page] } { + set open_page "" + } + + set is_open false + + foreach subcategory_id $subcategories { + set subcategory_name [learning_content::get_category_name \ + -category_id $subcategory_id ] + set child_list \ + [expr [category::count_children \ + -category_id $subcategory_id] \ + + [llength [category::get_objects \ + -category_id $subcategory_id]]] + if { $child_list } { + + if {$open_category_id == $subcategory_id || \ + $open_unit_id1 == $subcategory_id } { + set is_open true + } else { + set is_open false + } + + set in_subcategories [category::get_children \ + -category_id $subcategory_id] + set subtotal 0 + set subtotal [expr $subtotal \ + + [llength [category::get_objects \ + -category_id $subcategory_id]]] + foreach in_subcategory_id $in_subcategories { + set subtotal [expr $subtotal \ + + [llength [category::get_objects \ + -category_id $in_subcategory_id]]] + } + + if { $subtotal > 0 } { + # Alvaro: adding a subcategory node to the category parent node + template::multirow append category_tree $subcategory_id $subcategory_name $category_id $is_open + + foreach in_subcategory_id $in_subcategories { + + set in_subcategory_name [learning_content::get_category_name \ + -category_id $in_subcategory_id] + set in_child_list [expr \ + [category::count_children \ + -category_id $in_subcategory_id] \ + + [llength [category::get_objects \ + -category_id $in_subcategory_id]]] + if { $in_child_list } { + if {$open_category_id == $in_subcategory_id } { + set is_sub_open true + } else { + set is_sub_open false + } + # Alvaro: adding a in_subcategory node to the category parent node + template::multirow append category_tree $in_subcategory_id $in_subcategory_name $subcategory_id $is_sub_open + } + } + } + } + } + # Alvaro: this is how we tell the tree which page is open + } + # Alvaro: this will add the Glosario as a category to the tree. + if { $glossary_id == $category_id } { + template::multirow append category_tree $cont [_ learning-content.glossary] $category_id true + template::multirow append glossary "${package_url}glossary-list?category_id=$category_id" $cont 1 + } else { + template::multirow append category_tree $cont [_ learning-content.glossary] $category_id false + template::multirow append glossary "${package_url}glossary-list?category_id=$category_id" $cont 0 + } + set cont [expr $cont + 1] +} + +if {![info exists skin]} {set skin portlet-skin} +if {![string match /* $skin]} {set skin [file dir $__adp_stub]/$skin} +template::set_file $skin + Index: openacs-4/packages/learning-content/www/content-categories.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-categories.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-categories.xql 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,26 @@ + + + + select parent_id as open_unit_id1 + from categories + where category_id = :open_category_id + + + + + + select parent_id as open_unit_id2 + from categories + where category_id = :open_unit_id1 + + + + + + select category_id + from categories + where parent_id = :category_id + order by category_id + + + Index: openacs-4/packages/learning-content/www/content-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-view.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-view.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,126 @@ + + @title;noquote@ + @context;noquote@ + @header_stuff;noquote@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ +
+
+
+
+
+
+
+
+
+
+
+
+ + + \ No newline at end of file Index: openacs-4/packages/learning-content/www/delete-glossary-word.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/delete-glossary-word.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/delete-glossary-word.adp 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1 @@ +no data \ No newline at end of file Index: openacs-4/packages/learning-content/www/delete-glossary-word.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/delete-glossary-word.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/delete-glossary-word.tcl 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1,51 @@ +ad_page_contract { + Delete Glossary Word(s) from CR and CONTENT_GLOSSARY + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-04-20 +} { + item_id:multiple,integer + return_url +} + +set words $item_id +set p_id [ad_conn package_id] +permission::require_permission -object_id $p_id -privilege admin +set changed_p 0 +db_transaction { + ::xowiki::Package initialize -package_id $p_id + set folder_id [content::folder::get_folder_from_package -package_id $p_id] + + db_foreach get_pages { *SQL* } { + + set revision_id [content::item::get_live_revision -item_id $page_id] + set page [xowiki::Package instantiate_page_from_id -item_id $page_id] + set instance_attributes [$page set instance_attributes] + set content [lindex $instance_attributes 1] + foreach item $words { + set item_name [db_string get_name { *SQL* } -default ""] + set reg_exp_var "(.*)()(.*)" + while {[regexp -nocase $reg_exp_var $content \ + match lside var2 var3 rside]} { + if { [regsub -nocase "(.*?)" $rside {\1} result] } { + set changed_p 1 + set content "${lside}${result}" + } + } + } + if { $changed_p } { + set new_page [list "contenido" $content] + $page set instance_attributes $new_page + $page save + } + } + foreach item $words { + set item_name [db_string get_name { *SQL* } -default ""] + $package_id delete -item_id $item -name $item_name + catch { + db_dml delete_word { *SQL* } + } error + } +} +ad_returnredirect "$return_url" Index: openacs-4/packages/learning-content/www/delete-glossary-word.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/delete-glossary-word.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/delete-glossary-word.xql 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1,28 @@ + + + + select distinct item_id as page_id + from xowiki_page_instancei + where item_id in (select item_id + from cr_items + where parent_id = :folder_id + and content_type = '::xowiki::PageInstance') + + + + + + select name + from cr_items + where item_id = :item + + + + + + delete from content_glossary_term_count + where folder_id = :folder_id + and term = :item_name + + + Index: openacs-4/packages/learning-content/www/diff.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/diff.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/diff.adp 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1,29 @@ + + @title;noquote@ + @context;noquote@ + + + + + + + +

Comparing +

    +
  • version @revision_id1@ modified by @user1@ at @time1@ with +
  • version @revision_id2@ modified by @user2@ at @time2@ +
+

+
+ +@content;noquote@ + Index: openacs-4/packages/learning-content/www/dynamic-tree-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/dynamic-tree-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/dynamic-tree-oracle.xql 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,16 @@ + + + + select ci.item_id + from category_object_map c, + cr_items ci, + xowiki_page p + where c.object_id = ci.item_id + and ci.parent_id = :folder_id + and ci.content_type = '::xowiki::PageInstance' + and category_id = :category_id + and p.page_id = ci.live_revision + order by to_number(page_order) + + + Index: openacs-4/packages/learning-content/www/dynamic-tree-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/dynamic-tree-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/dynamic-tree-postgresql.xql 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,16 @@ + + + + select ci.item_id + from category_object_map c, + cr_items ci, + xowiki_page p + where c.object_id = ci.item_id + and ci.parent_id = :folder_id + and ci.content_type = '::xowiki::PageInstance' + and category_id = :category_id + and p.page_id = ci.live_revision + order by page_order::integer + + + Index: openacs-4/packages/learning-content/www/dynamic-tree.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/dynamic-tree.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/dynamic-tree.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,4 @@ +no data + + @categories.category_id@,@categories.category_name@,@categories.is_category@,@categories.object_url@; + \ No newline at end of file Index: openacs-4/packages/learning-content/www/dynamic-tree.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/dynamic-tree.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/dynamic-tree.tcl 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,34 @@ +ad_page_contract { + gets all the objects from a category_id and adds the content + to the dynamic YUI tree + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-01-06 +} { + {category_id ""} + {folder_id 0} +} + +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] + +# Alvaro: query to find all the objects inside a category +set category_objects [db_list get_items_id {*SQL*} ] +set total [llength $category_objects] +template::multirow create categories \ + category_name category_id is_category object_url + +# Alvaro: adding each object to the parent category node +foreach object $category_objects { + set package_url [apm_package_url_from_id $package_id] + set page [::xowiki::Package instantiate_page_from_id -item_id $object] + set page_name [$page set name] + $page volatile + set object_url "${package_url}${page_name}" + regsub -all { } $object_url "%20" object_url + if { $object != 0} { + set object_title [db_string get_name {*SQL*} -default ""] + template::multirow append categories $object "$object_title" \ + false $object_url + } +} + Index: openacs-4/packages/learning-content/www/dynamic-tree.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/dynamic-tree.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/dynamic-tree.xql 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,12 @@ + + + + select title + from xowiki_page_instancei + where object_id = ( + select live_revision + from cr_items + where item_id = $object) + + + Index: openacs-4/packages/learning-content/www/edit-glossary-word.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/edit-glossary-word.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/edit-glossary-word.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,5 @@ + + @page_title;noquote@ + @context;noquote@ + + \ No newline at end of file Index: openacs-4/packages/learning-content/www/edit-glossary-word.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/edit-glossary-word.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/edit-glossary-word.tcl 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,65 @@ +ad_page_contract { + Edit a glossary word + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-04-20 +} { + {word_id 0} + {return_url ""} +} + +if { $word_id == 0 } { + set page_title [_ learning-content.new_word] + set context [list \ + [list "$return_url" [_ learning-content.glossary]] \ + "[_ learning-content.new_word]"] + set disabled "" +} else { + set page_title [_ learning-content.edit_word] + set context [list [list "$return_url" [_ learning-content.glossary]] \ + "[_ learning-content.edit_word]"] + set disabled "disabled disabled" +} + +set package_id [ad_conn package_id] +set folder_id [content::folder::get_folder_from_package \ + -package_id $package_id] +permission::require_permission -object_id $package_id -privilege admin + +set revision_id [content::item::get_live_revision -item_id $word_id] +set data [db_string get_data {} -default ""] +if { [llength $data] > 0 } { + set word [lindex $data 3] + set description [lindex $data 1] +} else { + set word "" + set description "" +} + + +ad_form -name glossary -export { {word_name $word} } \ +-form { + {word:text(text),optional {label "[_ learning-content.word]"} + {html {id "word" value "$word" size 44 $disabled}}} + {word_id:text(hidden),optional {html {id "word_id" value "$word_id"}}} + {description:text(textarea),optional + {label "[_ learning-content.definition]"} {value "$description"} + {html {id "description" rows 20 cols 50}}} + {return_url:text(hidden),optional + {html {id "return_url" value "$return_url"}}} +} -validate { + {word + {![db_string check_if_exists {} -default 0]} + "[_ learning-content.word_already_exist]" + } + {word + { ![empty_string_p $word] || $word_id != 0} + "[_ learning-content.word_not_blank]" + } +} -on_submit { + if { [empty_string_p $word] } { + set word $word_name + } + set exp_vars [export_vars -base "insert-glossary-entry" \ + {return_url word_id word description}] + ad_returnredirect $exp_vars +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/edit-glossary-word.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/edit-glossary-word.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/edit-glossary-word.xql 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,18 @@ + + + + select instance_attributes + from xowiki_form_pagei + where revision_id = :revision_id + + + + + + select 1 + from cr_items + where name = lower(:word) + and parent_id = :folder_id + + + Index: openacs-4/packages/learning-content/www/edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/edit.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/edit.adp 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1,17 @@ + + @edit_form_page_title;noquote@ + @context;noquote@ + note.title + + + + + + + Index: openacs-4/packages/learning-content/www/error-template.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/error-template.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/error-template.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,24 @@ + + @title;noquote@ + @context;noquote@ + @header_stuff;noquote@ + + + @header_stuff;noquote@ + + + +
+ +

 

+

Error:

+

+

+@error_msg;noquote@ +

 

+
+

+
Index: openacs-4/packages/learning-content/www/get-activities.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/get-activities.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/get-activities.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#learning-content.forums_admin_link#
(+)@forums.name@ + #learning-content.New#
@forums.subject@
(+)@empty_forums.name@ + new
#learning-content.New#
#learning-content.there_are_no_activities_for_type#
@assessments.as_title@
#learning-content.there_are_no_activities_for_type#
@evaluations.grade_plural_name@ #learning-content.New#
+ @evaluations.task_name@ +
(+)@empty_evaluations.grade_name@ + #learning-content.New#
#learning-content.New#
#learning-content.there_are_no_activities_for_type#
@chat_room.name@
Index: openacs-4/packages/learning-content/www/get-activities.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/get-activities.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/get-activities.tcl 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,75 @@ +ad_page_contract { + Get the existing applications for content activities + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-04-12 + } { + {activity ""} + {parent_id 0} +} + +set result "" +set prev_forum_id 0 +set prev_grade_item_id 0 +set cont 0 +set community_id [dotlrn_community::get_community_id] +set community_url [dotlrn_community::get_community_url $community_id] + +switch $activity { + "forums_message" { + set activity_type "forums" + set package_id [dotlrn_community::get_package_id_from_package_key \ + -package_key $activity_type -community_id $community_id] + set package_url [apm_package_url_from_id $package_id] + set forums_url "${package_url}admin" + db_multirow -extend { changed_p count } \ + forums get_forums_and_messages { *SQL* } { + if { $prev_forum_id == 0 } { + set changed_p 1 + } elseif { $prev_forum_id != $forum_id } { + set changed_p 1 + } else { + set changed_p 0 + } + set prev_forum_id $forum_id + set count $cont + incr cont + } + db_multirow empty_forums get_forums_with_no_messages { *SQL } {} + } + "as_assessments" { + set activity_type "assessment" + set package_id [dotlrn_community::get_package_id_from_package_key \ + -package_key $activity_type -community_id $community_id] + set folder_id [as::assessment::folder_id -package_id $package_id] + db_multirow -extend { as_title } assessments get_as_item { *SQL* } { + set as_title [db_string get_as_title {} -default ""] + } + } + "evaluation_tasks" { + set activity_type "evaluation" + set package_id [dotlrn_community::get_package_id_from_package_key \ + -package_key $activity_type -community_id $community_id] + db_multirow -extend { changed_p count } evaluations \ + get_grades_with_info { *SQL* } { + + if { $prev_grade_item_id == 0 } { + set changed_p 1 + } elseif { $prev_grade_item_id != $grade_item_id } { + set changed_p 1 + } else { + set changed_p 0 + } + set prev_grade_item_id $grade_item_id + set count $cont + incr cont + } + db_multirow empty_evaluations get_grades_without_info { *SQL* } {} + } + "chat_room" { + set activity_type "chat" + set package_id [dotlrn_community::get_package_id_from_package_key \ + -package_key $activity_type -community_id $community_id] + db_multirow chat_room get_chat_rooms { *SQL* } {} + } +} + Index: openacs-4/packages/learning-content/www/get-activities.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/get-activities.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/get-activities.xql 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,107 @@ + + + + select title + from cr_revisions + where revision_id = :as_revision_id + + + + + + select item_id, + latest_revision as as_revision_id + from cr_items + where parent_id = :folder_id + and content_type = :activity + and latest_revision is not null + + + + + + select forum_id, name + from forums_forums ff + where package_id = :package_id + and enabled_p = 't' + and not exists ( select forum_id + from forums_messages fm + where fm.forum_id = ff.forum_id) + order by forum_id + + + + + + select fm.message_id, + fm.subject, + ff.name, + ff.forum_id + from forums_messages fm, + (select forum_id, name + from forums_forums + where package_id = :package_id + and enabled_p = 't') ff + where fm.forum_id = ff.forum_id + and fm.parent_id is null + order by forum_id + + + + + + select et.task_name, + et.task_id, + et.task_item_id, + eg.grade_plural_name, + eg.grade_id, + eg.grade_item_id + from cr_revisions cr, + evaluation_tasksi et, + cr_items cri, + cr_mime_types crmt, + (select eg.grade_plural_name, + eg.grade_id, + eg.grade_item_id + from evaluation_grades eg, + acs_objects ao, + cr_items cri + where cri.live_revision = eg.grade_id + and eg.grade_item_id = ao.object_id + and ao.context_id = :package_id + order by grade_plural_name desc) eg + where cr.revision_id = et.revision_id + and et.grade_item_id = eg.grade_item_id + and cri.live_revision = et.task_id + and et.mime_type = crmt.mime_type + + + + + + select grade_plural_name as grade_name, + grade_id + from evaluation_grades eg, + acs_objects ao, + cr_items cri + where cri.live_revision = eg.grade_id + and eg.grade_item_id = ao.object_id + and ao.context_id = :package_id + and not exists (select grade_item_id + from evaluation_tasksi et + where eg.grade_item_id = et.grade_item_id) + order by grade_plural_name desc + + + + + + select object_id as room_id, + (select pretty_name + from chat_rooms + where room_id = ao.object_id) as name + from acs_objects ao + where context_id = :package_id + + + Index: openacs-4/packages/learning-content/www/get-glossary-word-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/get-glossary-word-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/get-glossary-word-oracle.xql 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,27 @@ + + + + select name, + item_id + from cr_items + where (instr(name,lower(:word)) > 0 + or instr(lower(:word),name) > 0) + and parent_id = :folder_id + and content_type = '::xowiki::FormPage' + order by name + + + + + + select name, + item_id + from cr_items + where (instr(name,lower(:word)) = 0 + and instr(lower(:word),name) = 0) + and parent_id = :folder_id + and content_type = '::xowiki::FormPage' + order by name + + + Index: openacs-4/packages/learning-content/www/get-glossary-word-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/get-glossary-word-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/get-glossary-word-postgresql.xql 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,25 @@ + + + + select name, + item_id + from cr_items + where name like '%'||:word||'%' + and parent_id = :folder_id + and content_type = '::xowiki::FormPage' + order by name + + + + + + select name, + item_id + from cr_items + where name not like '%'||:word||'%' + and parent_id = :folder_id + and content_type = '::xowiki::FormPage' + order by name + + + Index: openacs-4/packages/learning-content/www/get-glossary-word.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/get-glossary-word.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/get-glossary-word.adp 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1,25 @@ +@content;noquote@ + +
+ + #learning-content.similar_words#
+
+ + #learning-content.other_words# +
+
+
Index: openacs-4/packages/learning-content/www/get-glossary-word.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/get-glossary-word.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/get-glossary-word.tcl 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1,54 @@ +ad_page_contract { + Get a glossary word by name or id + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-04-25 +} { + {word_id 0} + {rels_p 0} + {word ""} + {def_p 0} + {selected_id 0} + {exists_p 0} +} + +set content " " +set new_content " " +set new_p 0 +set scolor "#AE9C9C" +set new_style "background: $scolor ;" +set package_id [ad_conn package_id] +set package_url [apm_package_url_from_id $package_id] +set folder_id [content::folder::get_folder_from_package -package_id $package_id] +if { $exists_p == 1 } { + set exists_p [db_string check_if_exists {} -default 0] + set content $exists_p +} elseif { $rels_p } { + set word [string tolower [string trim $word]] + db_multirow -extend { style } related_words get_rel_words { *SQL* } { + if { $selected_id != "" && [string tolower $word] == $name } { + set revision_id [content::item::get_live_revision \ + -item_id $item_id] + set atts [db_string get_attributes {} -default ""] + set desc [lindex $atts 1] + set style "background: $scolor ;" + set new_style "" + } else { + set style "" + } + } + db_multirow other_words get_other_words { *SQL* } { } +} else { + if { $word_id == 0 } { + set item_id [db_string get_item_id {} -default 0] + } else { + set item_id $word_id + } + set revision_id [content::item::get_live_revision -item_id $item_id] + set atts [db_string get_attributes {} -default ""] + if { $def_p } { + set content [lindex $atts 3] + } else { + set content [lindex $atts 1] + } +} + Index: openacs-4/packages/learning-content/www/get-glossary-word.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/get-glossary-word.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/get-glossary-word.xql 5 Mar 2009 21:28:58 -0000 1.1 @@ -0,0 +1,39 @@ + + + + select item_id + from cr_items + where name = lower(:word) + and parent_id = :folder_id + + + + + + select item_id + from cr_items + where name = lower(:word) + and parent_id = :folder_id + + + + + + select instance_attributes + from xowiki_form_pagei + where item_id = :item_id + and revision_id = :revision_id + + + + + + select name, + item_id + from cr_items + where parent_id = :folder_id + and content_type = '::xowiki::FormPage' + order by name + + + Index: openacs-4/packages/learning-content/www/get-tooltip.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/get-tooltip.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/get-tooltip.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,2 @@ +@word;noquote@: +

@desc;noquote@ Index: openacs-4/packages/learning-content/www/get-tooltip.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/get-tooltip.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/get-tooltip.tcl 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,15 @@ +ad_page_contract { + Get a glossary word for the tooltip + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-04-28 +} { + {word ""} +} + +set package_id [ad_conn package_id] +set folder_id [content::folder::get_folder_from_package -package_id $package_id] +set item_id [db_string get_item_id {} -default 0] +set revision_id [content::item::get_live_revision -item_id $item_id] +set atts [db_string get_attributes {} -default ""] +set word [lindex $atts 3] +set desc [lindex $atts 1] Index: openacs-4/packages/learning-content/www/get-tooltip.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/get-tooltip.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/get-tooltip.xql 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,19 @@ + + + + select item_id + from cr_items + where name = lower(:word) + and parent_id = :folder_id + + + + + + select instance_attributes + from xowiki_form_pagei + where item_id = :item_id + and revision_id = :revision_id + + + Index: openacs-4/packages/learning-content/www/glossary-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/glossary-view.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/glossary-view.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,8 @@ +
+
+

#learning-content.glossary#

#learning-content.new_entry# +

@filter;noquote@ +
+
+ + \ No newline at end of file Index: openacs-4/packages/learning-content/www/glossary-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/glossary-view.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/glossary-view.tcl 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,108 @@ +ad_page_contract { + Display all words from the glossary in alphabetical order + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-04-29 +} { + {letter ""} +} -properties { + context:onevalue + page_title:onevalue +} + +set page_title [_ learning-content.glossary] +set context [list $page_title] +set package_id [ad_conn package_id] +set admin_p [permission::permission_p -object_id $package_id \ + -privilege admin -party_id [ad_conn user_id]] +set folder_id [content::folder::get_folder_from_package \ + -package_id $package_id] +set return_url [ad_return_url] +set category_id [ns_queryget "category_id"] +set glossary_url "[ad_conn url]?category_id=$category_id" +set content "" + +if {[string equal $letter ""]} { + set filter "| [_ learning-content.All] |" +} else { + set letter [string tolower $letter] + set filter "| [_ learning-content.All] |" +} +set initials [db_list get_initials {}] +foreach initial $initials { + if {[string equal $initial $letter]} { + append filter " [string toupper $initial] |" + } else { + append filter " " + append filter "[string toupper $initial] |" + } +} +append letter "%" +set form_page_ids [db_list get_form_page_ids {}] + +set elements [list] +if { $admin_p } { + lappend elements edit { + label "[_ learning-content.edit]" + html {style "width: 15px; text-align: center;"} + link_url_col edit_url + link_html { title "[_ learning-content.edit]" } + display_template "" + } +} + +lappend elements word { + label "[_ learning-content.word] / [_ learning-content.definition]" + display_template "@get_words.name@
\ +
@get_words.definition@
" +} + +if { $admin_p } { + lappend elements count { + label "[_ learning-content.appearances]" + html {style "width: 25px; text-align: center;"} + display_template "@get_words.count@" + } + lappend elements delete { + label "[_ learning-content.delete]" + html {style "width: 15px; text-align: center;" + onclick "return(confirm('Are you sure?'));"} + link_url_col delete_url + link_html { title "[_ learning-content.delete]" } + display_template "" + } +} + +db_multirow -extend { definition edit_url delete_url count } \ + get_words get_words_info {} { + + set atts [db_list get_form_pages {}] + set definition [lindex [lindex $atts 0] 1] + set edit_url [export_vars -base "edit-glossary-word" {{word_id $item_id} \ + return_url}] + set delete_url [export_vars -base "delete-glossary-word" \ + {item_id return_url}] + set times_used [db_string get_term_count {} -default 0] + if { [empty_string_p $times_used] } { + set count 0 + } else { + set count $times_used + } +} + +set bulk_action_vars [list] +set bulk_actions [list] +if { $admin_p } { + lappend bulk_action_vars return_url + lappend bulk_actions "[_ learning-content.delete]" "delete-glossary-word"\ + "[_ learning-content.delete]" +} + +list::create -name glossary_words \ + -multirow get_words \ + -key item_id \ + -no_data "[_ learning-content.there_are_no_words]"\ + -bulk_action_export_vars $bulk_action_vars \ + -bulk_actions $bulk_actions \ + -html { style "width: 100%;" } \ + -elements $elements \ + -main_class { mylist } Index: openacs-4/packages/learning-content/www/glossary-view.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/glossary-view.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/glossary-view.xql 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,59 @@ + + + + select item_id + from cr_items + where parent_id = :folder_id + and content_type = '::xowiki::FormPage' + and name like :letter + order by name + + + + + + select name + from cr_items + where item_id = :item_id + + + + + + select distinct substr(name,1,1) + from cr_items + where parent_id = :folder_id + and content_type = '::xowiki::FormPage' + order by substr(name,1,1) + + + + + + select instance_attributes + from xowiki_form_pagei + where item_id = :item_id + + + + + + select item_id, + name + from cr_items + where parent_id = :folder_id + and content_type = '::xowiki::FormPage' + and name like :letter + order by name + + + + + + select sum(times_used) as count + from content_glossary_term_count + where folder_id = :folder_id + and term = :name + + + Index: openacs-4/packages/learning-content/www/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/index.vuh,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/index.vuh 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,18 @@ +::learning_content::Package initialize -ad_doc { + + This is the resolver for this package. It turns a request into + an object and executes the object with the computed method + + @author Gustaf Neumann (gustaf.neumann@wu-wien.ac.at) + @creation-date July, 2006 + @cvs-id $Id: index.vuh,v 1.1 2009/03/05 21:28:59 rocaelh Exp $ + +} -parameter { + {-m view} + {-folder_id:integer 0} +} + +::$package_id log "--starting... [ns_conn url] [ns_conn query]" +::$package_id reply_to_user [::$package_id invoke -method $m] +::$package_id log "--i ::$package_id DONE" +ad_script_abort Index: openacs-4/packages/learning-content/www/insert-glossary-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/insert-glossary-entry.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/insert-glossary-entry.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1 @@ +@result;noquote@ \ No newline at end of file Index: openacs-4/packages/learning-content/www/insert-glossary-entry.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/insert-glossary-entry.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/insert-glossary-entry.tcl 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,54 @@ +ad_page_contract { + Insert Word into Content Glossary + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-04-19 +} { + {word ""} + {description ""} + {word_id 0} + {return_url ""} +} + +set package_id [ad_conn package_id] +set folder_id [content::folder::get_folder_from_package \ + -package_id $package_id] + +permission::require_permission -object_id $package_id -privilege admin + +::xowiki::Package initialize -package_id $package_id +if { $word_id == 0 } { + set page_template [content::item::get_id_by_name \ + -name "en:glossary" -parent_id $folder_id] + set f [::xowiki::FormPage new -destroy_on_cleanup \ + -package_id $package_id \ + -parent_id $folder_id \ + -publish_status "production" \ + -page_template $page_template] + set word [string tolower [string trim $word]] + set description [string trim $description] + set atts [list "description" $description "word" $word] + $f set name $word + $f set instance_attributes $atts + set word_id [$f save_new] + set result $word +} else { + set word [string trim $word] + if { $word_id != 0 } { + set item_id $word_id + } else { + set item_id [db_string get_item_id {} -default 0] + } + set page [xowiki::Package instantiate_page_from_id \ + -item_id $item_id] + set word [string tolower [string trim $word]] + set description [string trim $description] + set atts [list "description" $description "word" $word] + $page set instance_attributes $atts + $page set name $word + $page save + ns_cache flush xotcl_object_cache ::$item_id + set result $word +} +if { ![empty_string_p $return_url] } { + ad_returnredirect $return_url +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/insert-glossary-entry.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/insert-glossary-entry.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/insert-glossary-entry.xql 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,10 @@ + + + + select item_id + from cr_items + where name = :word + and parent_id = :folder_id + + + Index: openacs-4/packages/learning-content/www/page-instance-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/page-instance-new.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/page-instance-new.tcl 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,24 @@ +ad_page_contract { + Automatically create a page instance with a standard name + and the default page template + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-01-10 +} { + {activity_id 0} + {activity_name ""} + {redirect_url ""} + {optional_text ""} + {category_id 0} + {page_item_id 0} +} + +set package_id [ad_conn package_id] +set package_url [apm_package_url_from_id $package_id] +permission::require_permission -object_id $package_id -privilege admin + +set data [learning_content::create_page] +set item_id [lindex $data 0] +set page_name [lindex $data 1] +set link "${package_url}$page_name" + +ad_returnredirect [export_vars -base $link {{m edit}}] Index: openacs-4/packages/learning-content/www/page-instance-new.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/page-instance-new.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/page-instance-new.xql 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,52 @@ + + + + update content_activities + set activity_id = :activity_id + where item_id = :page_item_id + + + + + + insert into content_activities + (item_id,activity_id) + values + (:item_id,:activity_id) + + + + + + select count(p.page_id) + from cr_items ci, + xowiki_page p + where ci.parent_id = :folder_id + and ci.content_type = '::xowiki::PageInstance' + and p.page_id = ci.live_revision + + + + + + select p.page_order + from cr_items ci, + cr_revisions r, + xowiki_page p + where ci.parent_id = :folder_id + and ci.content_type not in ('::xowiki::PageTemplate') + and r.revision_id = ci.live_revision + and p.page_id = r.revision_id + and p.page_order is not null + order by p.page_order desc + + + + + + select 1 from cr_items + where name = :page_name + and parent_id = :folder_id + + + \ No newline at end of file Index: openacs-4/packages/learning-content/www/plain-include.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/plain-include.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/plain-include.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,22 @@ + +
+ + + + \ No newline at end of file Index: openacs-4/packages/learning-content/www/portlet-ajax.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/portlet-ajax.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/portlet-ajax.tcl 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,9 @@ +# like portlet, except with background loading via ajax +# gustaf neumann, fecit may 2006 +::xowiki::Page requireJS "/resources/xowiki/get-http-object.js" +if {![string match "/*" $portlet]} { + set folder_id [$__including_page set parent_id] + set package_id [$folder_id set package_id] + set portlet [site_node::get_url_from_object_id \ + -object_id $package_id]portlets/$portlet +} Index: openacs-4/packages/learning-content/www/portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/portlet.tcl 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,3 @@ +if {![string match "/*" $portlet]} { + set portlet /packages/xowiki/www/portlets/$portlet +} Index: openacs-4/packages/learning-content/www/revisions.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/revisions.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/revisions.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,15 @@ + +@title;noquote@ +@title;noquote@ +@context;noquote@ +@page_id;noquote@ + +@content;noquote@ + + +

#file-storage.lt_Comments_on_this_file# +

    @gc_comments;noquote@

+
+ +

@gc_link;noquote@

+
Index: openacs-4/packages/learning-content/www/show-activity.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/show-activity.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/show-activity.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,12 @@ + + @msg;noquote@ + + + + + #learning-content.activity_not_available# + + #learning-content.go_to_activity# + + + \ No newline at end of file Index: openacs-4/packages/learning-content/www/show-activity.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/show-activity.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/show-activity.tcl 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,44 @@ +ad_page_contract { + Show activity link based on the object_id + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-04-24 + } { + {-object_id 0} +} + +if { $object_id > 0 } { + set activity_id [db_string get_object_id {} -default -1] + set object_id $activity_id +} + +set exists_p 1 +if {![db_0or1row object_data { *SQL* }]} { + set exists_p 0 +} + +if { $exists_p } { + if {[string eq $object_type content_item]} { + db_0or1row item_data { *SQL* } + set object_id $item_id + } + set activity_p 1 + switch $object_type { + as_assessments { + set activity_p [db_string get_assessment_status {} -default 0] + set msg [_ learning-content.assessment_not_available_yet] + } + forums_message { + set forum_id [db_string get_forum_id {} \ + -default 0] + if { [string eq [db_string get_forum_status {} -default "t"] "f"] } { + set activity_p 0 + set msg [_ learning-content.forum_not_available] + } + } + evaluation_tasks { + } + } +} else { + set activity_p 0 + set msg [_ learning-content.no_activity] +} Index: openacs-4/packages/learning-content/www/show-activity.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/show-activity.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/show-activity.xql 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,65 @@ + + + + + + select activity_id + from content_activities + where item_id = ( + select item_id + from cr_items + where live_revision = :object_id) + + + + + + select o.object_type, + o.title, + o.package_id + from acs_objects o + where o.object_id = :object_id + + + + + + select o.object_type, + o.object_id, + o.package_id, + i.item_id + from acs_objects o, + cr_items i + where i.item_id = :object_id + and o.object_id = coalesce ( + i.live_revision, + i.latest_revision, + i.item_id) + + + + + + select 1 + from cr_items + where item_id = :object_id + and publish_status is not null + + + + + + select forum_id + from forums_messages + where message_id = :object_id + + + + + + select enabled_p + from forums_forums + where forum_id = :forum_id + + + \ No newline at end of file Index: openacs-4/packages/learning-content/www/view-default.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/view-default.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/view-default.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,67 @@ + + + @title;noquote@ + @context;noquote@ + @header_stuff;noquote@ + + + + @header_stuff;noquote@ + + + + + +
+ +@top_portlets;noquote@ +@content;noquote@ +@footer;noquote@ +
Index: openacs-4/packages/learning-content/www/view-links-ges.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/view-links-ges.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/view-links-ges.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,19 @@ + Index: openacs-4/packages/learning-content/www/view-links.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/view-links.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/view-links.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,22 @@ + + + + Index: openacs-4/packages/learning-content/www/view-nolinks.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/view-nolinks.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/view-nolinks.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,4 @@ + +
+@content;noquote@ +
\ No newline at end of file Index: openacs-4/packages/learning-content/www/view-plain.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/view-plain.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/view-plain.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,3 @@ +
+@content;noquote@
+#learning-content.go_back# \ No newline at end of file Index: openacs-4/packages/learning-content/www/admin/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/admin/index.vuh,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/admin/index.vuh 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,9 @@ +if {[acs_user::site_wide_admin_p]} { + ::learning_content::Package initialize + set l [expr {[lsearch -exact [ns_conn urlv] admin] + 1 }] + set path [join [lrange [ns_conn urlv] $l end] /] + rp_internal_redirect /packages/xowiki/www/admin/$path +} else { + set package_url [ad_conn package_url] + ad_returnredirect "${package_url}content-admin" +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/content-admin/category-add-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/category-add-edit.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/category-add-edit.adp 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1 @@ +@new_cat@ \ No newline at end of file Index: openacs-4/packages/learning-content/www/content-admin/category-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/category-add-edit.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/category-add-edit.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,53 @@ +ad_page_contract { + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + @creation-date 2007-08-24 +} { + tree_id:integer + name:notnull + category_id:integer,optional + return_url:optional + {parent_id 0} + {language "en_US"} + {mode 1} +} + +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +permission::require_permission -object_id $package_id -privilege admin + +if { ![string equal [string trim [string tolower $name]] "glosario"] } { + set new_cat "1" + set description "User category for content package" + if {$mode eq 1 && [exists_and_not_null category_id]} { + ## edit mode#### + category::update -category_id $category_id \ + -locale $language \ + -name $name \ + -description $description + } elseif {$mode eq 2} { + if {[learning_content::category::valid_level_and_count -tree_id $tree_id \ + -category_id $parent_id]} { + set new_cat [category::add -tree_id $tree_id \ + -parent_id $parent_id \ + -locale $language \ + -name $name \ + -description $description] + set parent_cat [learning_content::category::category_parent \ + -category_id $new_cat -tree_id $tree_id] + } + } elseif {$mode eq 3} { + set new_cat [learning_content::category::new_subtree -tree_id $tree_id] + set parent_cat $new_cat + } + if {[exists_and_not_null return_url]} { + if {[exists_and_not_null new_cat]} { + set temp "$return_url&new_cat=$new_cat" + append temp "ad_returnredirect &parent_cat=$parent_cat" + ad_return_redirect $temp + } else { + ad_returnredirect $return_url + } + } +} else { + set new_cat "0" +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/content-admin/category-confirm.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/category-confirm.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/category-confirm.adp 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,10 @@ + + Confirmacion + +
+
+
+@body_msg;noquote@ +
+ + \ No newline at end of file Index: openacs-4/packages/learning-content/www/content-admin/category-confirm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/category-confirm.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/category-confirm.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,29 @@ +ad_page_contract { + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + @creation-date 2007-09-13 +} { + tree_id:integer + category_id:integer,notnull + {locale ""} + object_id:integer,optional + return_url:optional +} + +set user_id [ad_maybe_redirect_for_registration] +set body_msg "[_ learning-content.can_delete]" +set package_id [ad_conn package_id] +permission::require_permission -object_id $package_id -privilege admin + +set tree_list [learning_content::category::get_tree_levels \ + -subtree_id $category_id $tree_id] +set tree_list [linsert $tree_list 0 $category_id] +foreach category $tree_list { + set my_category_id [lindex $category 0] + if {[db_string \ + dbqd.xowiki.www.admin.category-delete.check_mapped_objects {}] \ + eq 1} { + set body_msg "[_ learning-content.mapped_objects]" + ad_return_template + } +} + Index: openacs-4/packages/learning-content/www/content-admin/category-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/category-delete-2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/category-delete-2.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,25 @@ +ad_page_contract { + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + @creation-date 2007-08-27 +} { + tree_id:integer + category_id:integer,notnull + {locale ""} + object_id:integer,optional + return_url:optional +} + +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +permission::require_permission -object_id $package_id -privilege admin + +db_transaction { + category::delete $category_id + category_tree::flush_cache $tree_id +} on_error { + ad_return_complaint 1 "[_ learning-content.still_contains_subcategories]" + ad_script_abort +} + +ad_returnredirect $return_url + Index: openacs-4/packages/learning-content/www/content-admin/category-delete-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/category-delete-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/category-delete-oracle.xql 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,19 @@ + + + + + + + + + +oracle8.1.6 + + + select case + when count(*) = 0 then 0 else 1 end + from category_object_map + where category_id = :my_category_id + + + \ No newline at end of file Index: openacs-4/packages/learning-content/www/content-admin/category-delete-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/category-delete-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/category-delete-postgresql.xql 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,15 @@ + + + + + + postgresql 7.2 + + + + select case when count(*) = 0 then 0 else 1 end + where exists (select 1 from category_object_map + where category_id = :my_category_id) + + + \ No newline at end of file Index: openacs-4/packages/learning-content/www/content-admin/category-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/category-delete.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/category-delete.adp 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1 @@ +no data \ No newline at end of file Index: openacs-4/packages/learning-content/www/content-admin/category-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/category-delete.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/category-delete.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,32 @@ +ad_page_contract { + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + @creation-date 2007-08-27 +} { + tree_id:integer + category_id:integer,notnull + {locale ""} + object_id:integer,optional + return_url:optional +} + +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +permission::require_permission -object_id $package_id -privilege admin + +set tree_list [learning_content::category::get_tree_levels -subtree_id $category_id \ + -tree_id $tree_id] +set tree_list [linsert $tree_list 0 $category_id] +foreach category $tree_list { + set my_category_id [lindex $category 0] + if {[db_string check_mapped_objects {*SQL*}] eq 1} { + ad_return_complaint 1 "[_ learning-content.mapped_objects]" + ad_script_abort + } + lappend category_ids $my_category_id +} + +set result [learning_content::category::delete -tree_id $tree_id \ + -category_ids $category_ids] +if {$result eq 0} { + ad_return_complaint 1 "[_ learning-content.still_contains_subcategories]" +} Index: openacs-4/packages/learning-content/www/content-admin/category-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/category-view.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/category-view.adp 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,43 @@ + + @title@ + @context;noquote@ + + +#learning-content.go_back#

+ + +
+ +
+ + + + + + +
+
Index: openacs-4/packages/learning-content/www/content-admin/category-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/category-view.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/category-view.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,76 @@ +ad_page_contract { + + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-08-24 + +} + +set package_id [ad_conn package_id] +permission::require_permission -object_id $package_id -privilege admin + +set ah_sources [ah::requires -sources "scriptaculous"] +set msg2_fade [ah::effects -element "msg_div2" \ + -effect "Fade" \ + -options "duration: 1.5"] + +set msg2_appear [ah::effects -element "msg_div2" \ + -effect "Appear" \ + -options "duration: 0.5"] + +##### Alvaro: Generating dynamic YUI tree for content index editor ##### + +set tree_list [category_tree::get_mapped_trees $package_id] +set tree_id [lindex [lindex $tree_list 0] 0] +set tree_name [lindex [lindex $tree_list 0] 1] +set categories [learning_content::get_categories -tree_id $tree_id] +set dynamic_tree_url "[ad_conn package_url]/dynamic-tree" + +template::multirow create category_tree category_id category_name parent_id level + +set title [_ learning-content.edit_content_index] +set context [list [list ./ [_ learning-content.admin]] $title] + +# Alvaro: Adding 1st level categories +foreach category_id $categories { + + set category_name [learning_content::get_category_name -category_id $category_id ] + template::multirow append category_tree $category_id $category_name $package_id 1 + set subcategories [db_list get_childrens {*SQL*}] + +# Alvaro: Adding 2nd level subcategories + foreach subcategory_id $subcategories { + if {$subcategory_id != 0 } { + set subcategory_name [learning_content::get_category_name \ + -category_id $subcategory_id ] + template::multirow append category_tree $subcategory_id $subcategory_name $category_id 2 + set in_subcategories [db_list get_subchildrens {*SQL*}] +# Alvaro: Adding 3rd level subcategories + foreach in_subcategory_id $in_subcategories { + if { $in_subcategory_id != 0 } { + set in_subcategory_name [learning_content::get_category_name \ + -category_id $in_subcategory_id] + template::multirow append category_tree $in_subcategory_id $in_subcategory_name $subcategory_id 3 + } + } + } + } +} + +template::head::add_javascript \ + -src "/resources/ajaxhelper/yui/yahoo/yahoo-min.js" \ + -order 1 +template::head::add_javascript \ + -src "/resources/ajaxhelper/yui/event/event-min.js" \ + -order 2 +template::head::add_javascript \ + -src "/resources/ajaxhelper/yui/connection/connection-min.js" \ + -order 3 +template::head::add_javascript \ + -src "/resources/ajaxhelper/yui/treeview/treeview-min.js" \ + -order 4 +template::head::add_javascript \ + -src "/resources/learning-content/dynamic-tree.js" +template::head::add_css \ + -href "/resources/ajaxhelper/yui/treeview/assets/folders/tree.css" +template::head::add_css \ + -href "/resources/learning-content/style-blue.css" \ No newline at end of file Index: openacs-4/packages/learning-content/www/content-admin/category-view.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/category-view.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/category-view.xql 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,23 @@ + + + + + + + select category_id + from categories + where parent_id = :category_id + order by category_id + + + + + + select category_id + from categories + where parent_id = :subcategory_id + order by category_id + + + + Index: openacs-4/packages/learning-content/www/content-admin/copy_content.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/copy_content.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/copy_content.adp 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1 @@ +@result;noquote@ \ No newline at end of file Index: openacs-4/packages/learning-content/www/content-admin/copy_content.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/copy_content.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/copy_content.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,13 @@ +ad_page_contract { + Copy Content Information +} { + {src_community_id} + {dst_community_id} +} + +set package_id [ad_conn package_id] +permission::require_permission -object_id $package_id -privilege admin + +set result [learning_content::copy \ + -src_community_id $src_community_id \ + -dst_community_id $dst_community_id] \ No newline at end of file Index: openacs-4/packages/learning-content/www/content-admin/edit-header.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/edit-header.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/edit-header.adp 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,6 @@ + + @page_title;noquote@ + @context;noquote@ + +
+ Index: openacs-4/packages/learning-content/www/content-admin/edit-header.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/edit-header.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/edit-header.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,40 @@ +ad_page_contract { + Edit the header for the course + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2009-01-07 +} { + {return_url "./"} +} + +set page_title [_ learning-content.edit_header] +set context [list $page_title] + +set package_id [ad_conn package_id] +set folder_id [content::folder::get_folder_from_package \ + -package_id $package_id] + +set page_id [content::item::get_id_by_name \ + -name "en:header_page" -parent_id $folder_id] +if {![empty_string_p $page_id]} { + set page [xowiki::Package instantiate_page_from_id \ + -item_id $page_id] +} else { + ::xowiki::Package initialize -package_id $package_id + set page [$package_id import_prototype_page "header_page"] +} +set header [lindex [$page set instance_attributes] 1] + +ad_form -name header -export {page_id} \ + -form { + {header:text(text) + {label "[_ learning-content.header]"} + {value $header} + } + } -on_submit { + set page [xowiki::Package instantiate_page_from_id \ + -item_id $page_id] + set atts [list "titulo" $header] + $page set instance_attributes $atts + $page save + ad_returnredirect $return_url + } \ No newline at end of file Index: openacs-4/packages/learning-content/www/content-admin/header-toggle.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/header-toggle.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/header-toggle.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,10 @@ +ad_page_contract { +} { + {package_id} + {return_url ""} + {value:integer} +} + +parameter::set_value -package_id $package_id -parameter show_header \ + -value $value +ad_returnredirect $return_url \ No newline at end of file Index: openacs-4/packages/learning-content/www/content-admin/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/index-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/index-oracle.xql 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,21 @@ + + + + oracle8.1.6 + + + + select dotlrn_communities_all.pretty_name as community_name, + dotlrn_communities_all.package_id as community_package_id, + dotlrn_communities_all.community_id as dst_community_id, + dotlrn_community.url(dotlrn_communities_all.community_id) as community_url + from dotlrn_communities_all, + dotlrn_member_rels_approved + where dotlrn_communities_all.community_id = dotlrn_member_rels_approved.community_id + and dotlrn_member_rels_approved.user_id = :user_id + and decode(dotlrn_community_admin_p(dotlrn_communities_all.community_id, dotlrn_member_rels_approved.user_id),'f',0,1) = 1 + order by community_name + + + + Index: openacs-4/packages/learning-content/www/content-admin/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/index-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/index-postgresql.xql 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,22 @@ + + + + + + + select dotlrn_communities_all.pretty_name as community_name, + dotlrn_communities_all.package_id as community_package_id, + dotlrn_communities_all.community_id as dst_community_id, + dotlrn_community__url(dotlrn_communities_all.community_id) + as community_url + from dotlrn_communities_all, + dotlrn_member_rels_approved + where dotlrn_communities_all.community_id = + dotlrn_member_rels_approved.community_id + and dotlrn_member_rels_approved.user_id = :user_id + $community_type_clause + order by community_name + + + + Index: openacs-4/packages/learning-content/www/content-admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/index.adp 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,69 @@ + + @page_title;noquote@ + @context;noquote@ + + + + +#learning-content.go_back#

+

#learning-content.content_admin#

+
+ +
+ +
+

#learning-content.copy_content_to#

+
+ +
+
    +
  • #learning-content.my_communities# ( ++ | -- )

    + +
  • +
  • #learning-content.my_classes# ( ++ | -- )

    + +
  • +
+
+
+ + +No community specified + Index: openacs-4/packages/learning-content/www/content-admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/index.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,33 @@ + +ad_page_contract { + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-03-01 +} + +set page_title [_ learning-content.admin] +set context [list $page_title] +set package_id [ad_conn package_id] +permission::require_permission -object_id $package_id -privilege admin + +set src_community_id [dotlrn_community::get_community_id] +set actual_package_id $package_id +set return_url [ad_conn url] +set show_header [parameter::get -package_id $package_id \ + -parameter show_header \ + -default -1] +set copy_msg [_ learning-content.view_content] +set error_msg [_ learning-content.copy_error_message] +set success_msg [_ learning-content.copy_success_message] +set content_url [apm_package_url_from_id $package_id] +set user_id [ad_conn user_id] +set copy_link [_ learning-content.copy] + +set community_type_clause \ + "and dotlrn_communities_all.community_type in \ +('dotlrn_club', 'dotlrn_pers_community')" +db_multirow communities get_communities { *SQL* } {} + +set community_type_clause \ + "and dotlrn_communities_all.community_type not in \ +('dotlrn_community', 'dotlrn_club', 'dotlrn_pers_community')" +db_multirow classes get_communities { *SQL* } {} Index: openacs-4/packages/learning-content/www/content-admin/order.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/order.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/order.adp 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,7 @@ + +
+ + #learning-content.order# + +
+
\ No newline at end of file Index: openacs-4/packages/learning-content/www/content-admin/order.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/order.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/order.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,33 @@ +ad_page_contract { + @author byron Haroldo Linares Roman + @creation-date 2007-07-04 +} { + page_id:optional + page_pos:optional + page_name:optional + content_id:optional + status:optional + dir:optional + show:optional + {action 0} +} + +if {![string match $page_pos "@page_order@"]} { + set wiki_folder_id [::xowiki::Page require_folder -name xowiki \ + -package_id $content_id] + set item_id [content::revision::item_id -revision_id $page_id] + if {![ permission::permission_p -object_id $item_id -privilege admin]} { + set show 0 + } else { + set my_cat_id [category::get_mapped_categories $item_id] + set count_page [db_string select_count { *SQL* } -default 0] + if {$count_page > 1} { + set show 1 + } else { + set show 0 + } + } +} else { + set show 0 +} + Index: openacs-4/packages/learning-content/www/content-admin/order.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/order.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/order.xql 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,19 @@ + + + + + + + select count(ci.item_id) + from category_object_map c, + cr_items ci, + xowiki_page p + where c.object_id = ci.item_id + and ci.parent_id = :wiki_folder_id + and ci.content_type = '::xowiki::PageInstance' + and p.page_id = ci.live_revision + and category_id = :my_cat_id + + + + Index: openacs-4/packages/learning-content/www/content-admin/toggle-page-order-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/toggle-page-order-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/toggle-page-order-oracle.xql 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,22 @@ + + + + oracle8.1.6 + + + + select ci.item_id as tmp_item_id, + ci.live_revision as revision_id, + ci.name, + p.page_order, + ci.publish_status + from cr_items ci, + xowiki_page p + where ci.parent_id = :wiki_folder_id + and ci.content_type = '::xowiki::PageInstance' + and p.page_id = ci.live_revision + order by to_number(p.page_order) + + + + Index: openacs-4/packages/learning-content/www/content-admin/toggle-page-order-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/toggle-page-order-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/toggle-page-order-postgresql.xql 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,24 @@ + + + + + + + select ci.item_id as tmp_item_id, + ci.live_revision as revision_id, + ci.name, + p.page_order, + ci.publish_status + from category_object_map c, + cr_items ci, + xowiki_page p + where c.object_id = ci.item_id + and ci.parent_id = :wiki_folder_id + and ci.content_type = '::xowiki::PageInstance' + and p.page_id = ci.live_revision + and category_id = :cat_id + order by p.page_order::integer + + + + Index: openacs-4/packages/learning-content/www/content-admin/toggle-page-order.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/toggle-page-order.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/toggle-page-order.adp 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,5 @@ + + + @alt@ + Index: openacs-4/packages/learning-content/www/content-admin/toggle-page-order.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/toggle-page-order.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/toggle-page-order.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,92 @@ +ad_page_contract { + @author byron Haroldo Linares Roman + @creation-date 2007-06-25 +} { + page_id:optional + page_pos:optional + page_name:optional + content_id:optional + status:optional + dir:optional + show:optional + {action 0} +} + +set page_list [list] +set next_list [list] +if {![string match $page_pos "@page_order@"]} { + set wiki_url "[ad_conn package_url]$page_name" + set wiki_folder_id [::xowiki::Page require_folder -name xowiki \ + -package_id $content_id] + set item_id [content::revision::item_id -revision_id $page_id] + set cat_id [category::get_mapped_categories $item_id] + + if {![ permission::permission_p -object_id $item_id -privilege admin]} { + set show 0 + } else { + db_foreach select_page {*SQL*} { + lappend page_list [list $tmp_item_id \ + $page_order \ + $name \ + $revision_id \ + $publish_status] + } + set order_page [lsort -$dir -command learning_content::compare $page_list] + set count 0 + foreach pages $order_page { + set current_pos [lsearch -exact $pages $page_id] + if {$current_pos >= 0} { + incr count + set next_list [lindex $order_page $count] + break + } + incr count + } + + if {[llength $next_list] > 0} { + if {$action == 0} { + set show 1 + switch $dir { + "decreasing" { + set img_name "order_up" + } + "increasing" { + set img_name "order_down" + } + } + set package_url [apm_package_url_from_id [ad_conn package_id]] + set nexturl [export_vars \ + -base ${package_url}content-admin/toggle-page-order \ + {page_id + page_pos + page_name + content_id + status + dir + {action 1} + {show 0}}] + set alt "[_ learning-content.page_${dir}]" + } elseif {$action == 1} { + set tmp_order [lindex $next_list 1] + set tmp_item_id [lindex $next_list 0] + set tmp_page_id [lindex $next_list 3] + set tmp_status [lindex $next_list 4] + db_dml update_page2 {*SQL*} + ns_cache flush xotcl_object_cache ::$item_id + ns_cache flush xotcl_object_cache ::$page_id + content::item::set_live_revision -revision_id $page_id -publish_status $status + db_dml update_page {*SQL*} + ns_cache flush xotcl_object_cache ::$tmp_item_id + ns_cache flush xotcl_object_cache ::$tmp_page_id + content::item::set_live_revision -revision_id $tmp_page_id -publish_status $tmp_status + ad_returnredirect "${wiki_url}\#cont1" + } + } else { + set show 0 + } + set content_template [parameter::get -package_id [ad_conn package_id] \ + -parameter "content_template" -default 0] + } +} else { + set show 0 +} Index: openacs-4/packages/learning-content/www/content-admin/toggle-page-order.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/toggle-page-order.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/toggle-page-order.xql 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,21 @@ + + + + + + + update xowiki_page + set page_order = :page_pos + where page_id = :tmp_page_id + + + + + + update xowiki_page + set page_order = :tmp_order where page_id = :page_id + + + + + Index: openacs-4/packages/learning-content/www/content-admin/tracking-users.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/tracking-users.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/tracking-users.adp 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,18 @@ + + @title;noquote@ + @context;noquote@ + + + +#learning-content.content_admin# +

#learning-content.visits_details_for_content#

+

#learning-content.pages_visits# | #learning-content.users_visits#

+ +@t1;noquote@ + +
+#learning-content.go_back# Index: openacs-4/packages/learning-content/www/content-admin/tracking-users.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/tracking-users.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/tracking-users.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,44 @@ +::xowiki::Package initialize -ad_doc { + Views details for all users in content + + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-10-10 +} -parameter { + {-return_url:optional ""} + {-orderby:optional "views"} +} + +set title [_ learning-content.users_visits] +set context [list [list ./ [_ learning-content.admin]] $title] +permission::require_permission -object_id $package_id -privilege admin + +set folder_id [::$package_id folder_id] +set community_id [dotlrn_community::get_community_id] +if {[empty_string_p return_url]} { + set return_url [ad_url] +} + +TableWidget t1 -volatile \ + -columns { + AnchorField user -label [_ learning-content.user_name] -orderby user + Field views -label [_ learning-content.total_of_pages_visited] -orderby views -html {align center style "padding: 2px;"} + AnchorField view_details -label [_ learning-content.view_details] -html {align center style "padding: 2px;"} + } + +foreach {att order} [split $orderby ,] break +t1 orderby -order [expr {$order eq "asc" ? "increasing" : "decreasing"}] $att +t1 no_data "[_ learning-content.no_users]" + +db_foreach users_info { *SQL* } { + + set view_links "[export_vars -base view-user-details {{user_id $user_id} return_url}] " + t1 add \ + -user $user_name \ + -views $views \ + -view_details \#learning-content.view_details\# \ + -view_details.href $view_links + +} + +set t1 [t1 asHTML] + Index: openacs-4/packages/learning-content/www/content-admin/tracking-users.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/tracking-users.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/tracking-users.xql 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,20 @@ + + + + + select dm.user_id, aa.first_names || ' ' || aa.last_name as user_name, + (select count(*) + from cr_items ci, cr_revisions cr, views_views vv + where ci.content_type = '::xowiki::PageInstance' and + coalesce(ci.live_revision,ci.latest_revision) = cr.revision_id and + ci.parent_id = :folder_id and vv.object_id = ci.item_id and + viewer_id = dm.user_id) as views + from acs_users_all aa, + dotlrn_member_rels_approved dm + where dm.community_id = :community_id + and dm.user_id = aa.user_id + and dm.role in ('member','student') + + + + Index: openacs-4/packages/learning-content/www/content-admin/tracking.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/tracking.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/tracking.adp 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,19 @@ + + @title;noquote@ + @context;noquote@ + + + + +#learning-content.content_admin# +

#learning-content.visits_details_for_content#

+

#learning-content.pages_visits# | #learning-content.users_visits#

+ +@t1;noquote@ + +
+#learning-content.go_back# Index: openacs-4/packages/learning-content/www/content-admin/tracking.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/tracking.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/tracking.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,120 @@ +::xowiki::Package initialize -ad_doc { + Views details for all pages of content + + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-10-10 +} -parameter { + {-object_type:optional} + {-orderby:optional "unique_views,title"} +} + +set title [_ learning-content.pages_visits] +set context [list [list ./ [_ learning-content.admin]] $title] +permission::require_permission -object_id $package_id -privilege admin + +set object_type "::xowiki::PageInstance" +set community_id [dotlrn_community::get_community_id] +# if object_type is specified, only list entries of this type; +# otherwise show types and subtypes of $supertype +if {![info exists object_type]} { + set per_type 0 + set supertype ::xowiki::PageInstance + set object_types [$supertype object_types] + set title "List of all kind of [$supertype set pretty_plural]" + set with_subtypes true + set object_type $supertype +} else { + set per_type 1 + set object_types [list $object_type] + set title "Index of [$object_type set pretty_plural]" + set with_subtypes false +} + +set return_url [expr {$per_type ? [export_vars -base [::$package_id url] object_type] : + [::$package_id url]}] +# set up categories +set category_map_url [export_vars -base \ + [site_node::get_package_url -package_key categories]cadmin/one-object \ + { { object_id $package_id } }] + +set actions "" + + +set ::individual_permissions [expr {[$package_id set policy] eq "::xowiki::policy3"}] +set ::with_publish_status 1 + +TableWidget t1 -volatile \ + -actions $actions \ + -columns { + AnchorField title -label [_ xowiki.Page-title] -orderby title + Field unique_views -label [_ learning-content.total_users] -orderby unique_views -html {align center style "padding: 2px;"} + AnchorField view_details -label [_ learning-content.view_details] -html {align center style "padding: 2px;"} + + } + +foreach {att order} [split $orderby ,] break +t1 orderby -order [expr {$order eq "asc" ? "increasing" : "decreasing"}] $att + +set attributes [list ci.item_id revision_id content_length creation_user title] + +if {[::xo::db::has_ltree]} { + lappend attributes page_order +} + +set folder_id [::$package_id folder_id] + +db_foreach instance_select \ + [$object_type instance_select_query \ + -folder_id $folder_id \ + -with_subtypes $with_subtypes \ + -from_clause ", xowiki_page p" \ + -where_clause "p.page_id = bt.revision_id" \ + -select_attributes $attributes \ + -orderby ci.name \ + ] { + + set page_link [::$package_id pretty_link $name] + #Here we get the total views per page + #views::get -object_id $item_id + set views 0 + set last_viewed "-" + set unique_views "-" + db_0or1row get_view { *SQL* } + + set view_links "[export_vars -base view-details {{object_id $item_id} return_url}] " + if { $views != 1 } { + set views [expr $views] + } + t1 add \ + -title $title \ + -title.href $page_link \ + -unique_views $unique_views \ + -view_details \#learning-content.view_details\# \ + -view_details.href $view_links \ + + if {$::individual_permissions} { + [t1 last_child] set permissions.href \ + [export_vars -base permissions {item_id return_url}] + } + if {$::with_publish_status} { + # TODO: this should get some architectural support + if {$publish_status eq "ready"} { + set image active.png + set state "production" + } else { + set image inactive.png + set state "ready" + } + [t1 last_child] set publish_status.src /resources/xowiki/$image + [t1 last_child] set publish_status.href \ + [export_vars -base [$package_id package_url]admin/set-publish-state \ + {state revision_id return_url}] + } + if {[::xo::db::has_ltree]} { + [t1 last_child] set page_order $page_order + } + } + +t1 no_data "[_ learning-content.no_pages]" +set t1 [t1 asHTML] + Index: openacs-4/packages/learning-content/www/content-admin/tracking.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/tracking.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/tracking.xql 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,16 @@ + + + + + select count(*) as unique_views + from acs_users_all aa, views_views vv, + dotlrn_member_rels_approved dm + where dm.community_id = :community_id + and dm.user_id = aa.user_id + and dm.role in ('member','student') + and vv.viewer_id = dm.user_id + and vv.object_id = :item_id + + + + Index: openacs-4/packages/learning-content/www/content-admin/view-details.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/view-details.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/view-details.adp 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,17 @@ + + @title;noquote@ + @context;noquote@ + + + +#learning-content.content_admin# +

#learning-content.visits_details_for_page#

+ +@t1;noquote@ + +
+#learning-content.go_back# Index: openacs-4/packages/learning-content/www/content-admin/view-details.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/view-details.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/view-details.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,43 @@ +::xowiki::Package initialize -ad_doc { + Views details for a page in content + + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-10-10 +} -parameter { + {-object_id} + {-return_url:optional ""} + {-orderby:optional "views"} +} + +set title [_ learning-content.page_views] +set context [list [list ./ [_ learning-content.admin]] $title] +permission::require_permission -object_id $package_id -privilege admin + +set revision_id [content::item::get_best_revision -item_id $object_id] +set page_name [db_string get_page_name {} -default ""] +set community_id [dotlrn_community::get_community_id] + +TableWidget t1 -volatile \ + -columns { + AnchorField user -label [_ learning-content.user_name] + Field views -label [_ learning-content.total_views] -orderby views -html {align center style "padding: 2px;"} + Field last_viewed -label [_ learning-content.last_viewed] -orderby last_viewed -html {align center style "padding: 2px;"} + } + +foreach {att order} [split $orderby ,] break +t1 orderby -order [expr {$order eq "asc" ? "increasing" : "decreasing"}] $att +t1 no_data "[_ learning-content.no_visits]" + +db_foreach views_info { *SQL* } { + + acs_user::get -user_id $viewer_id -array user + set user_name $user(name) + + t1 add \ + -user $user_name \ + -last_viewed $last_viewed \ + -views $views +} + +set t1 [t1 asHTML] + Index: openacs-4/packages/learning-content/www/content-admin/view-details.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/view-details.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/view-details.xql 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,25 @@ + + + + + select views_count as views, viewer_id, + to_char(last_viewed,'YYYY-MM-DD HH24:MI:SS') as last_viewed + from acs_users_all aa, views_views vv, + dotlrn_member_rels_approved dm + where dm.community_id = :community_id + and dm.user_id = aa.user_id + and dm.role in ('member','student') + and vv.viewer_id = dm.user_id + and vv.object_id = :object_id + + + + + + select title + from cr_revisions + where revision_id = :revision_id + + + + Index: openacs-4/packages/learning-content/www/content-admin/view-user-details.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/view-user-details.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/view-user-details.adp 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,17 @@ + + @title;noquote@ + @context;noquote@ + + + +#learning-content.content_admin# +

#learning-content.visits_details_for_user#

+ +@t1;noquote@ + +
+#learning-content.go_back# Index: openacs-4/packages/learning-content/www/content-admin/view-user-details.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/view-user-details.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/view-user-details.tcl 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,40 @@ +::xowiki::Package initialize -ad_doc { + Views details for a user in content + + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-10-10 +} -parameter { + {-user_id} + {-return_url:optional ""} + {-orderby:optional "views"} +} + +set title [_ learning-content.user_views] +set context [list [list ./ [_ learning-content.admin]] $title] +permission::require_permission -object_id $package_id -privilege admin + +set folder_id [::$package_id folder_id] +acs_user::get -user_id $user_id -array user +set user_name $user(name) + +TableWidget t1 -volatile \ + -columns { + AnchorField title -label [_ xowiki.Page-title] -orderby title + Field views -label [_ learning-content.total_views] -orderby views -html {align center style "padding: 2px;"} + Field last_viewed -label [_ learning-content.last_viewed] -orderby last_viewed -html {align center style "padding: 2px;"} + } + +foreach {att order} [split $orderby ,] break +t1 orderby -order [expr {$order eq "asc" ? "increasing" : "decreasing"}] $att +t1 no_data "[_ learning-content.no_visits_user]" + +db_foreach views_info { *SQL* } { + + t1 add \ + -title $title \ + -last_viewed $last_viewed \ + -views $views +} + +set t1 [t1 asHTML] + Index: openacs-4/packages/learning-content/www/content-admin/view-user-details.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/content-admin/view-user-details.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/content-admin/view-user-details.xql 5 Mar 2009 21:29:04 -0000 1.1 @@ -0,0 +1,16 @@ + + + + + select cr.title, views_count as views, + to_char(last_viewed,'YYYY-MM-DD HH24:MI:SS') as last_viewed + from cr_items ci, cr_revisions cr, views_views vv + where ci.content_type = '::xowiki::PageInstance' and + coalesce(ci.live_revision,ci.latest_revision) = cr.revision_id and + ci.parent_id = :folder_id and vv.object_id = ci.item_id and + viewer_id = :user_id + order by cr.title + + + + Index: openacs-4/packages/learning-content/www/prototypes/categories.page =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/prototypes/categories.page,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/prototypes/categories.page 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,6 @@ +::xowiki::Page new -title "categories" -text { +{{adp /packages/learning-content/www/content-categories {skin plain-include open_page 0} }} +} + + + Index: openacs-4/packages/learning-content/www/prototypes/content_template.page =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/prototypes/content_template.page,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/prototypes/content_template.page 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,24 @@ +::xowiki::PageTemplate new -title "Content Template" -text { +{{show_header -decoration none}} +{{adp /packages/learning-content/www/content-admin/order {page_pos @page_order@ page_id @revision_id@ content_id @package_id@ type @object_type@ dir "decreasing" action 0 page_name @name@ status @publish_status@} }} +
+
+ +
{{adp /packages/learning-content/www/template/complete-subnavbar {page_pos @page_order@ page_id @revision_id@ content_id @package_id@ type @object_type@} }} +
+
+
{{adp /packages/learning-content/www/template/complete-titlebar {page_pos @page_order@ page_id @revision_id@ content_id @package_id@ my_title "@title@"} }} +
+ +
+
@contenido@ +
{{adp /packages/learning-content/www/show-activity {object_id @revision_id@ } }} +
+
+
+
+
+} \ No newline at end of file Index: openacs-4/packages/learning-content/www/prototypes/editor.page =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/prototypes/editor.page,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/prototypes/editor.page 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,27 @@ +::xowiki::Object new -title "RichText Editor Config" -text { + + set xinha {richtext(richtext),nospell + {options {editor xinha plugins { + GetHtml ContextMenu FullScreen + ListType EditTag Stylist OacsFs InsertGlossaryEntry + } height 350px javascript { +xinha_config.toolbar = + [ + ["popupeditor"], + ["separator","formatblock","fontname","fontsize","bold","italic","underline","strikethrough"], + ["separator","forecolor","hilitecolor","textindicator"], + ["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"], + ["separator","insertorderedlist","insertunorderedlist","outdent","indent"], + ["separator","inserthorizontalrule","createlink","insertimage","inserttable"], + ["linebreak","separator","undo","redo"], + ["separator","killword","clearfonts","removeformat"], + ["htmlmode"] + ]; +xinha_config.pageStyleSheets = ["/resources/learning-content/simple-style-blue.css"]; +xinha_config.stylistLoadStylesheet('/resources/learning-content/simple-style-blue.css',{'.greybox':'Grey Box','.date':'Date'}); + }}} + {html {rows 15 cols 50 style {width: 100%}}} + {htmlarea_p 1}} + set tit {text {label \#xowiki.title\#} {html {size 40 maxlength 50}} {values ""}} + set widget_specs [list *,contenido $xinha *,title $tit] +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/prototypes/glossary-list.page =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/prototypes/glossary-list.page,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/prototypes/glossary-list.page 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,22 @@ +set folder_id [content::folder::get_folder_from_package \ + -package_id [ad_conn package_id]] +set content_template [content::item::get_id_by_name -name en:content_template \ + -parent_id $folder_id] +::xowiki::PageInstance create ::"GlossaryView" -noinit \ + -set object_type ::xowiki::PageInstance \ + -set page_template $content_template \ + -set page_order [learning_content::get_next_page_order] \ + -set lang en \ + -set instance_attributes {contenido {{{{adp /packages/learning-content/www/glossary-view}}} text/html}} \ + -set description {} \ + -set render_adp 1 \ + -set text {} \ + -set package_id [ad_conn package_id] \ + -set nls_language en_US \ + -set name "glossary_view" \ + -set mime_type text/plain \ + -set title "\#learning-content.glossary\#" \ + -set publish_status ready \ + -set item_id [db_nextval acs_object_id_seq] \ + -set contenido {{{adp /packages/learning-content/www/glossary-view}}} \ + -set parent_id $folder_id Index: openacs-4/packages/learning-content/www/prototypes/glossary.page =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/prototypes/glossary.page,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/prototypes/glossary.page 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,11 @@ +::xowiki::Form new \ +-set name glossary \ +-title "Glosario" \ +-set anon_instances t \ +-set form {{
@word@ @description@
} text/html} \ +-set text {
@word@:
@description@
} \ +-set form_constraints { + @cr_fields:hidden {_name:optional} + word:text,inline=true,label=Text + description:text,inline=true,label=Description +} Index: openacs-4/packages/learning-content/www/prototypes/header_page.page =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/prototypes/header_page.page,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/prototypes/header_page.page 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,22 @@ +set folder_id [content::folder::get_folder_from_package \ + -package_id [ad_conn package_id]] +set content_template [content::item::get_id_by_name -name en:header_template \ + -parent_id $folder_id] +::xowiki::PageInstance create ::"HeaderPage" -noinit \ + -set object_type ::xowiki::PageInstance \ + -set page_template $content_template \ + -set page_order [learning_content::get_next_page_order] \ + -set lang en \ + -set instance_attributes {} \ + -set description {} \ + -set render_adp 1 \ + -set text {} \ + -set package_id [ad_conn package_id] \ + -set nls_language en_US \ + -set name "header_page" \ + -set mime_type text/plain \ + -set title "\#learning-content.header_page\#" \ + -set publish_status ready \ + -set item_id [db_nextval acs_object_id_seq] \ + -set contenido {} \ + -set parent_id $folder_id \ No newline at end of file Index: openacs-4/packages/learning-content/www/prototypes/header_template.page =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/prototypes/header_template.page,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/prototypes/header_template.page 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,6 @@ +::xowiki::PageTemplate new -title "Header Template" -text { + +
+

@titulo@ +

+} \ No newline at end of file Index: openacs-4/packages/learning-content/www/prototypes/index.page =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/prototypes/index.page,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/prototypes/index.page 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,4 @@ +::xowiki::Page new -title "[_ learning-content.index_page]" -text { +{{es:o_index -decoration plain }} +} + Index: openacs-4/packages/learning-content/www/prototypes/o_index.page =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/prototypes/o_index.page,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/prototypes/o_index.page 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,26 @@ +::xowiki::Object new -title "Object index" -text { +proc content {} { + +set user_id [ad_conn user_id] +set admin_p [dotlrn::user_can_admin_community_p -user_id $user_id -community_id [dotlrn_community::get_community_id]] +if {$admin_p} { + return { +

+ #learning-content.welcome# +

+

+ #learning-content.welcome_body# +

+ } +} else { + return { +

+ #learning-content.e_welcome# +

+

+ #learning-content.e_welcome_body# +

+ } + } +} +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/prototypes/show_header.page =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/prototypes/show_header.page,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/prototypes/show_header.page 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,10 @@ +::xowiki::Object new -title "Show Header" -text { +proc content {} { +set param [parameter::get -package_id [ad_conn package_id] -parameter show_header -default 0] +if { $param == 1 } { + return { {{header_page -decoration none}} } +} else { + return {} +} +} +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/activities.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/activities.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/activities.css 5 Mar 2009 21:29:02 -0000 1.1 @@ -0,0 +1,18 @@ +a { + cursor: pointer; +} +.selected_a { + color: #E82C0C; +} +.activities th { + text-align: left; + padding-left: 5px; + height: 30px; +} +.activities td { + height: 30px; +} +.margin-form fieldset { + border: 0; + margin: 0; +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/calendar-full-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/calendar-full-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/calendar-full-portlet.tcl 5 Mar 2009 21:29:02 -0000 1.1 @@ -0,0 +1,27 @@ +�PNG + + +IHDR,�]� pHYs  �� +OiCCPPhotoshop ICC profilexڝSgTS�=���BK���KoR RB���&*! J�!��Q�EEȠ�����Q, � +��!���������{�kּ������>���� �H3Q5� �B�������.@� +$p�d!s�#�~<<+"��x� �M��0���B�\���t�8K�@z�B�@F���&S�`�cb�P-`'������{[�!�� e�Dh;��V�EX0fK�9�-0IWfH���� � 0Q��){`�##x��F�W<�+��*x��<�$9E�[-qWW.(�I+6aa�@.�y�2�4���������x����6��_-��"bb���ϫp@�t~��,/��;�m��%�h^ �u��f�@����W�p�~<�5�j>{�-�]c�K'Xt����o��(�h���w��?�G�%�fI�q^D$.Tʳ?�D��*�A��,���� �`6�B$��BB +d�r`)��B(�Ͱ*`/�@4�Qh��p.�U�=p�a��(�� A�a!ڈb�X#����!�H�$ ɈQ"K�5H1R�T UH�=r9�\F��;�2����G1���Q=� �C��7�F� �dt1�����r�=�6��Ыhڏ>C�0��3�l0.��B�8, �c˱"� ���V����cϱw�E� 6wB aAHXLXN�H� $4� 7 �Q�'"��K�&���b21�XH,#��/{�C�7$�C2'��I��T��F�nR#�,��4H#���dk�9�, +ȅ����3��!�[ +�b@q��S�(R�jJ��4�e�2AU��Rݨ�T5�ZB���R�Q��4u�9̓IK�����hh�i��t�ݕN��W���G���w +��Ljg(�gw��L�Ӌ�T071���oUX*�*|�� +�J�&�*/T����ު U�U�T��^S}�FU3S� Ԗ�U��P�SSg�;���g�oT?�~Y��Y�L�OC�Q��_�� c�x,!k +��u�5�&���|v*�����=���9C3J3W�R�f?�q��tN �(���~���)�)�4L�1e\k����X�H�Q�G�6����E�Y��A�J'\'Gg����S�Sݧ +�M=:��.�k���Dw�n��^��Lo��y���}/�T�m���G X� $� �<�5qo</���QC]�@C�a�a�ᄑ��<��F�F�i�\�$�m�mƣ&&!&KM�M�RM��)�;L;L���͢�֙5�=1�2��כ߷`ZxZ,����eI��Z�Yn�Z9Y�XUZ]�F���%ֻ�����N�N���gð�ɶ�����ۮ�m�}agbg�Ů��}�}��= +���Z~s�r:V:ޚΜ�?}����/gX���3��)�i�S��Ggg�s�󈋉K��.�>.���Ƚ�Jt�q]�z��������ۯ�6�i�ܟ�4�)�Y3s���C�Q��? ��0k߬~OCO�g��#/c/�W�װ��w��a�>�>r��>�<7�2�Y_�7��ȷ�O�o�_��C#�d�z����%g��A�[��z|!��?:�e����A���AA�������!h�쐭!��Α�i�P~���a�a��~ '���W�?�p�X�1�5w��Cs�D�D�Dޛg1O9�-J5*>�.j<�7�4�?�.fY��X�XIlK9.*�6nl������� �{�/�]py�����.,:�@L�N8��A*��%�w%� +y��g"/�6ш�C\*N�H*Mz�쑼5y$�3�,幄'���L +Lݛ:��v m2=:�1����qB�!M��g�g�fvˬe����n��/��k���Y- +�B��TZ(�*�geWf�͉�9���+��̳�ې7�����ᒶ��KW-X潬j9�������(�x��oʿ�ܔ���Ĺd�f�f���-�[����n +�ڴ +�V����E�/��(ۻ��C���<��e����;?T�T�T�T6��ݵa��n��{��4���[���>ɾ�UUM�f�e�I���?�������m]�Nmq����#�׹���=TR��+�G�����w- +6 +U����#pDy��� �� +:�v�{���vg/jB��F�S��[b[�O�>����z�G��499�?r����C�d�&����ˮ/~�����јѡ�򗓿m|������������x31^�V���w�w��O�| (�h���SЧ��������c3-�gAMA��|�Q� cHRMz%������u0�`:�o�_�FyIDATx�ܗ?HQǿ9�/�A�"G��!�Nql{S���8Y�[܊���U�l�ЩS3e�ԒͩK0P쥘����ɑ3���ޑ����%���{<��������,�:�T*�t]�c�X,��3���:�Y/��� ��*;7��@�g�u�_ތE�k x��H�-��/c����_�=lMS�Ώ�0;6���}��[K،��>������5�.�7�𙒟O�,�z!�O�����AF� �RcdP��"B�x��;�|��%��h�]h-�?|�J�Ł"�7����8�Q��'�>˲^��D����[�kDc�,IEND�B`� \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/content-activities.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/content-activities.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/content-activities.js 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,73 @@ + +var load_img = document.createElement('img'); +var temp = 0; +var temp2 = ''; +load_img.id = 'indicator'; +load_img.src = '/resources/learning-content/indicator.gif'; + +function findPosX(obj) + { + var curleft = 0; + if(obj.offsetParent) + while(1) + { + curleft += obj.offsetLeft; + if(!obj.offsetParent) + break; + obj = obj.offsetParent; + } + else if(obj.x) + curleft += obj.x; + return curleft; + } + + function findPosY(obj) + { + var curtop = 0; + if(obj.offsetParent) + while(1) + { + curtop += obj.offsetTop; + if(!obj.offsetParent) + break; + obj = obj.offsetParent; + } + else if(obj.y) + curtop += obj.y; + return curtop; + } + +function show_activities(url,tag) { + if ( temp == 0 ){ + temp = document.getElementById('activity_id').value; + } + var container = document.getElementById(tag); + if( temp2 != '') { + document.getElementById(temp2).style.background = ''; + } + temp2 = tag; + new Ajax.Request(url,{method: 'get', onLoading: function(){ container.style.background = '#D8E0E6'; container.appendChild(load_img); }, onComplete: function(){ container.removeChild(load_img); }, onSuccess: function(r) { document.getElementById('show_activities').innerHTML = r.responseText; Effect.Appear('show_activities'); if (temp > 0){ document.getElementById('activity_'+temp).style.background = '#D8E0E6'; } var arrow_img = document.getElementById('activity_arrow'); arrow_img.style.top = findPosY(document.getElementById('activity_'+temp))-8+'px'; arrow_img.style.left = findPosX(document.getElementById('show_activities'))+300+'px'; } }); +} + +function select_activity(redirect_url, activity_id, activity_name, new_p) { + try { + document.getElementById('activity_'+temp).style.background = ''; + } catch(err) { } + if ( new_p == 1 ) { + document.getElementById('activity_id').value = 0; + } else { + document.getElementById('activity_id').value = activity_id; + } + Effect.Pulsate('activity_'+activity_id,{ pulses: 1, duration: 0.3}); + temp = activity_id; + var tag = document.getElementById('activity_'+temp); + tag.style.background = '#D8E0E6'; + var tag2 = document.getElementById('show_activities'); + var arrow_img = document.getElementById('activity_arrow'); + arrow_img.style.top = findPosY(tag)-8+'px'; + arrow_img.style.left = findPosX(tag2)+300+'px'; + Effect.Appear('optional_text_editor'); + document.getElementById('redirect_url').value = redirect_url; + document.getElementById('activity_name').value = activity_name; +} + Index: openacs-4/packages/learning-content/www/resources/content-activities2.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/content-activities2.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/content-activities2.js 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,80 @@ + +var load_img = document.createElement('img'); +// Used to save the current selection of activity id before submit +var temp = 0; +// Used to save the current selection of activity type before submit +var temp2 = ''; +load_img.id = 'indicator'; +load_img.src = '/resources/learning-content/indicator.gif'; + +//Called when click on activity type +function show_activities(url,tag) { + if ( temp == 0 ){ + //This is the case when editing a page or coming back from step 2, temp is empty so temp = activity_id + temp = document.getElementById('activity_id').value; + if ( temp == 0 ){ + //If coming from step 2 and choice was a new activity we get the value from another variable + temp = document.getElementById('new_activity_id').value; + } + } + // container = selected option ; loading = space where we show the loading image ; ok = space where we show the ok image + var container = document.getElementById(tag); + var loading = document.getElementById(tag+'_loading'); + var ok = document.getElementById(tag+'_ok'); + try { + if( temp2 != '') { + // If we choose an activity type, clear the last selection + document.getElementById(temp2).style.background = ''; + document.getElementById(temp2+'_ok').style.background = ''; + } + } catch(e){} + temp2 = tag; + // Get the information about the selected activity type + new Ajax.Request(url,{method: 'get', onLoading: function() { + container.style.background = '#D8E0E6'; + ok.style.background = '#D8E0E6 url(/resources/learning-content/images/apply.gif) no-repeat scroll center'; + loading.appendChild(load_img); }, + onComplete: function(){ + loading.removeChild(load_img); }, + onSuccess: function(r) { + // Display the result + document.getElementById('show_activities').innerHTML = r.responseText; + Effect.Appear('select_activity'); + document.getElementById('activity_type').value = tag; + //If we had selected an activity_id from the choosen activity type, show it selected, if not remove the submit + if (temp > 0){ + try{ + document.getElementById('activity_'+temp).style.background = '#D8E0E6 url(/resources/learning-content/images/apply.gif) no-repeat scroll right'; + Effect.Appear('ok_submit'); + } catch (e) { + Effect.Fade('ok_submit', {duration: 0.3}); + } + } } + }); +} + +//Called when click on activity id +function select_activity(redirect_url, activity_id, activity_name, new_p) { + //If there was a selected activity remove the visual selection, inside a try for the case when activity selected is not in the choosed activity type + try { + document.getElementById('activity_'+temp).style.background = ''; + } catch(err) { } + if ( new_p == 1 ) { + //If there was a selection and the new selection is a new activity, clear the activity id + document.getElementById('activity_id').value = 0; + document.getElementById('new_activity_id').value = activity_id; + } else { + document.getElementById('activity_id').value = activity_id; + } + Effect.Pulsate('activity_'+activity_id,{ pulses: 1, duration: 0.3}); + //Save the current selection id + temp = activity_id; + var tag = document.getElementById('activity_'+temp); + //Apply the visual selection + tag.style.background = '#D8E0E6 url(/resources/learning-content/images/apply.gif) no-repeat scroll right'; + var tag2 = document.getElementById('show_activities'); + Effect.Appear('ok_submit'); + document.getElementById('redirect_url').value = redirect_url; + document.getElementById('activity_name').value = activity_name; +} + Index: openacs-4/packages/learning-content/www/resources/content-admin-portlet.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/content-admin-portlet.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/content-admin-portlet.js 5 Mar 2009 21:29:02 -0000 1.1 @@ -0,0 +1,20 @@ + +var load_img = document.createElement('img'); +load_img.id = 'indicator'; +load_img.src = '/resources/learning-content/indicator.gif'; + + +function copy_request(src_cid,dst_cid,dst_url,tag,copy_msg) { + + var container = document.getElementById(tag); + var new_link = document.createElement('a'); + new_link.innerHTML = copy_msg; + new_link.target = '_blank'; + new Ajax.Request('content/admin/copy_content?src_community_id='+src_cid+'&dst_community_id='+dst_cid, + {method: 'get', + onLoading: function(){ container.appendChild(load_img); }, + onComplete: function(){ container.removeChild(load_img); }, + onSuccess: function(){ new_link.href = dst_url+'content/'; container.removeChild(container.lastChild.previousSibling); container.appendChild(new_link); } + }); + +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/content-admin.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/content-admin.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/content-admin.js 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,36 @@ +var load_img = document.createElement('img'); +load_img.id = 'indicator'; +load_img.src = '/resources/learning-content/indicator.gif'; +var copy_content_tag; +var new_link; +var copy_success_msg; + +function copy_request(src_cid,dst_cid,dst_url,tag,copy_msg,error_msg,success_msg) { + copy_content_tag = tag; + copy_success_msg = success_msg; + var container = document.getElementById(tag); + new_link = document.createElement('a'); + new_link.innerHTML = copy_msg; + new_link.target = '_blank'; + new Ajax.Request('copy_content?src_community_id='+src_cid+'&dst_community_id='+dst_cid, + {method: 'get', + onLoading: function(){ container.removeChild(container.lastChild); container.appendChild(load_img); }, + onComplete: function(){ }, + onSuccess: function(r){ + if ( r.responseText == "1") { + new_link.href = dst_url+'learning-content/'; + setTimeout("handleSuccess()", 4000); + } else { + container.removeChild(load_img); + alert(error_msg); + }} + }); + +} + +function handleSuccess() { + var container = document.getElementById(copy_content_tag); + container.removeChild(load_img); + container.appendChild(new_link); + alert(copy_success_msg); +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/content-templates.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/content-templates.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/content-templates.js 5 Mar 2009 21:29:02 -0000 1.1 @@ -0,0 +1,24 @@ +var templates = document.getElementsByTagName('img'); +var myarray = new Array(); + +for (var i=0; i 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } + else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + } + return utftext; + } +var arVersion = navigator.appVersion.split("MSIE") +var version = parseFloat(arVersion[1]) + +function fixPNG(myImage) +{ + if ((version >= 5.5) && (version < 7) && (document.body.filters)) + { + var imgID = (myImage.id) ? "id='" + myImage.id + "' " : "" + var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : "" + var imgTitle = (myImage.title) ? + "title='" + myImage.title + "' " : "title='" + myImage.alt + "' " + var imgStyle = "display:inline-block;" + myImage.style.cssText + var strNewHTML = "" + myImage.outerHTML = strNewHTML + } +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/dynamic-tree.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/dynamic-tree.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/dynamic-tree.js 5 Mar 2009 21:29:02 -0000 1.1 @@ -0,0 +1,150 @@ +var tree; +var current_object_id = 0; +var dynamic_tree_url = "dynamic-tree"; +var load_img = document.createElement('img'); +load_img.id = 'indicator'; +load_img.src = '/resources/learning-content/indicator.gif'; + +function treeInit(root_name, root_id) { + tree = new YAHOO.widget.TreeView("dynamic_tree_div"); + tree.setDynamicLoad(loadDataForNode); + + var root = tree.getRoot(); + var myobj = { label: root_name, id:root_id } ; + var tmpNode = new YAHOO.widget.TextNode(myobj, root, true); + tree.draw(); + +} + +function newUnit(tree_id) { + new Ajax.Request('category-add-edit?tree_id='+tree_id+'&name=unit&mode=3',{method: 'get', onSuccess: function(){ document.location.reload(); } }); +} + +function addNode(tree_id, parent_id) { + new Ajax.Request('category-add-edit?tree_id='+tree_id+'&parent_id='+parent_id+'&mode=2&name=Nueva_Seccion',{method: 'get', onSuccess: function(response){ window.location.reload();}}); +} + +function removeMyNode(node_id, tree_id, category_id) { + var tag = document.getElementById('form_'+node_id); + new Ajax.Request('category-delete?tree_id=' + tree_id + '&category_id=' + category_id,{method: 'get', onLoading: function(){ tag.appendChild(load_img); }, onComplete: function () { tag.innerHTML = ''; }, onSuccess: function(){ tree.removeNode(tree.getNodeByProperty('id',node_id),true) }}); + +} +function addEditor(id, tree_id, category_id) { + var tag_id = 'input_'+id; + var tmp_input = document.createElement('input'); + tmp_input.id = tag_id; + var tag = document.getElementById('form_'+id); + tag.innerHTML = ''; + tag.appendChild(tmp_input); + tmp_input.focus(); + var save = document.createElement('input'); + save.setAttribute('type','submit'); + save.setAttribute('style','font-size: 10px;'); + save.onclick = function () { + var url = 'category-add-edit?tree_id='+tree_id+'&category_id='+category_id+'&name='+encodeURIComponent(tmp_input.value); + new Ajax.Request(url,{method: 'get', onLoading: function () { tag.appendChild(load_img); }, onComplete: function () { tag.removeChild(load_img); tag.innerHTML = ''; }, onSuccess: function(response){ + tree.getNodeByProperty('id',id).getLabelEl().innerHTML = tmp_input.value+' '; document.getElementById('form_'+id).innerHTML = ''} + } ); } + save.value = save_msg; + tag.appendChild(document.createTextNode(' ')); + tag.appendChild(save); + var cancel = document.createElement('input'); + cancel.setAttribute('type','submit'); + cancel.setAttribute('style','font-size: 10px;'); + cancel.value = cancel_msg; + cancel.onclick = function () { tag.innerHTML = ''; } + tag.appendChild(document.createTextNode(' ')); + tag.appendChild(cancel); +} + +function addRequest (url, name, id) { + new Ajax.Request( url+name, {method: 'get', onSuccess: function(){ + window.location.reload(); } }); +} + +var tree_folders_array = new Array(); + +function loadDataForNode(node, onCompleteCallback) { + + var id= node.data.id; + + if (typeof( window[ 'folder_id' ] ) != "undefined" ) { + tree_Url = dynamic_tree_url+"?category_id="+id+"&folder_id="+folder_id; + } else { + tree_Url = dynamic_tree_url+"?category_id="+id; + } + + var handleSuccess = function(o) { + if(o.responseText !== undefined) { + if (o.responseText.length == 0 ) { + document.writeln(""); + onCompleteCallback(); + } + var name_id_pairs = o.responseText.split(';'); + + if (name_id_pairs !== undefined ) { + for (var i =0; i < name_id_pairs.length ; i++) { + var fdata = name_id_pairs[i].split(','); + var fname = fdata[0]; + var fid = fdata[1]; + var is_cat = fdata[2]; + var existe = tree.getNodeByProperty('id',fid); + + if (fid !== undefined) { + if (existe == undefined) { + var myobj = { label: fname, id:fid } ; + if (is_cat == "true") { + var tmpNode = new YAHOO.widget.TextNode(myobj, node, false); + } else { + var object_url = fdata[3]; + if (current_object_id == fid) { + var link_text = " " + fname + ""; + } else { + var link_text = " " + fname + ""; + } + var tmpNode = new YAHOO.widget.HTMLNode(link_text, node, false, false); + } + } + } + } + } + // Be sure to notify the TreeView component when the data load is complete + onCompleteCallback(); + } + } + var handleFailure = function(o) { + if(o.responseText !== undefined) { + onCompleteCallback(); + } + } + + var callback = { + success:handleSuccess, + failure: handleFailure + }; + var transaction = YAHOO.util.Connect.asyncRequest('GET', tree_Url, callback, null); + +} + function encode(string) { + string = string.replace(/\r\n/g,"\n"); + var utftext = ""; + + for (var n = 0; n < string.length; n++) { + + var c = string.charCodeAt(n); + + if (c < 128) { + utftext += String.fromCharCode(c); + } + else if((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } + else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + } + return utftext; + } \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/fix-png-ie6.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/fix-png-ie6.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/fix-png-ie6.js 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,30 @@ +function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6. +{ + var arVersion = navigator.appVersion.split("MSIE") + var version = parseFloat(arVersion[1]) + if ((version >= 5.5) && (document.body.filters)) + { + for(var i=0; i" + img.outerHTML = strNewHTML + i = i-1 + } + } + } +} +window.attachEvent("onload", correctPNG); Index: openacs-4/packages/learning-content/www/resources/fix-xowiki-edit.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/fix-xowiki-edit.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/fix-xowiki-edit.css 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,15 @@ +.margin-form .form-item-wrapper .form-label { + display:inline; + float:none; + text-align:none; + width:0; +} + +.margin-form .form-item-wrapper .form-widget, .margin-form .form-button, .margin-form div.form-help-text { + display:block; + margin-left:0; +} + +#xowikicmds { +/* margin-top: 15px;*/ +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/get-glossary-word.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/get-glossary-word.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/get-glossary-word.js 5 Mar 2009 21:29:02 -0000 1.1 @@ -0,0 +1,29 @@ +function select_word(package_url, name, scolor, word_id) { + new Ajax.Request(package_url+'get-glossary-word?word='+name,{method: 'get', + onSuccess: function (r) { + var w_id = document.getElementById('word_name').value; + if ( w_id != '') document.getElementById('rel_'+w_id).style.background = ''; + document.getElementById('f_def').value = r.responseText; + document.getElementById('word_name').value = name; + document.getElementById('edit_mode').value = 1; + document.getElementById('word_id').value = word_id; + document.getElementById('f_word').value = name; + document.getElementById('rel_'+name).style.background = scolor; + document.getElementById('f_word').disabled = 'true'; + document.getElementById('new_entry').style.background = '';} }); +} + +function select_new_word (scolor) { + var w_id = document.getElementById('word_name').value; + var word = ''; + var def = ''; + document.getElementById('f_word').value = word; + document.getElementById('f_def').value = def; + try { document.getElementById('rel_'+w_id).style.background = '';} + catch (e) {} + document.getElementById('word_name').value = ''; + document.getElementById('word_id').value = 0; + document.getElementById('edit_mode').value = 0; + document.getElementById('f_word').disabled = ''; + document.getElementById('new_entry').style.background = scolor; +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/indicator.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/indicator.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/ordenar.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/ordenar.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/ordenar.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/ordenar.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/order.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/order.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/order.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/order.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/pestana.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/pestana.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/pestana1.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/pestana1.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/select-activity-ie6.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/select-activity-ie6.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/select-activity-ie6.css 5 Mar 2009 21:29:02 -0000 1.1 @@ -0,0 +1,15 @@ +/* select-activity IE6 */ + +.bportlet_head { + height: 67px; +} +.bportlet_head_confirm { + height: 47px; +} +.bportlet_head_text { + text-align: center; + font-weight: bold; + margin-top: 10px; +} + +/* !- select-activity IE6 */ \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/select-activity.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/select-activity.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/select-activity.css 5 Mar 2009 21:29:02 -0000 1.1 @@ -0,0 +1,75 @@ +/* select-activity */ +.activities th { + text-align: left; + padding-left: 5px; + height: 30px; +} +.activities td { + height: 30px; + text-align: left; +} +.icon-spot { + width: 15%; + text-align: center; +} +.activities-icon { + width: 35px; +} + +#activities-select-table { + margin-top: 10px; + width: 90%; + min-width: 750px; +} +#activities-div { + width: 100%; + border-collapse: collapse; +} +#activities-div a { + cursor: pointer; +} +#show_activities a { + cursor: pointer; +} +.arrow-td { + width: 60px; + padding-top: 60px; +} +#activities-left { + width: 30%; +} +#activities-center { + width: 45%; +} +#activities-right { + width: 25%; +} +.margin-form .form-item-wrapper .form-label { + display:inline; + float:none; + width:0; +} +.margin-form .form-item-wrapper .form-widget, .margin-form .form-button, .margin-form div.form-help-text { + display:block; + margin-left:0; +} +.portlet-wrapper{ + border: 1px solid; +} +.portlet_head{ + border-bottom: 1px solid; +} +.margin-form fieldset { + border: 0; + margin: 0; +} + +.bportlet_head .bportlet_head_confirm { + height: 52px; +} +.bportlet_head_text { + text-align: center; + font-weight: bold; + margin-top: 20px; +} +/* !- select-activity */ \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/simple-style-blue.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/simple-style-blue.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/simple-style-blue.css 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,58 @@ +a.glossary__content__ { + color: #7BB0BF; +} +a:hover { +color : #7a9833; +background : inherit; +text-decoration : underline; +} +p { +margin : 5px 0; +} +h1 { +font : bold 1.8em Arial, Sans-Serif; +padding : 8px 0 4px 0; +margin : 0; +letter-spacing : -1px; +} +h2 { +font : bold 1.6em Arial, Sans-Serif; +letter-spacing : -1px; +background : url(images/lrline.gif) no-repeat bottom left; +height : 20px; +padding : 0; +margin : 0 0 15px 0; +font : 0.9em verdana, Arial, Sans-Serif;} +h3 { +background : inherit; +padding : 0; +margin : 0; +font : bold 1.4em Arial, Sans-Serif; +} +ul { +margin : 0; +padding : 0; +list-style : none; +} +img { +border : 0; +} +hr { +height : 1px; +border-style : none; +color : #d0d0d0; +background-color : #c0c0c0; +margin : 10px 0; +} +.date { + border-top : 1px dotted #ccc; + padding : 5px 0; + margin : 10px 0 25px 0; + text-align : right; +} +.greybox { + border : 1px solid #ccc; + background : #f5f5f5; + width : 100%; + padding : 10px; +} Index: openacs-4/packages/learning-content/www/resources/style-blue-classes.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/style-blue-classes.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/style-blue-classes.css 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,15 @@ +.options { + font-family: Arial, sans-serif; + font-size: 15px; + font-weight: bold; + background-color: #FFFFFF; + float: right; + width: 15%; + text-align: center; +} +.greybox { + border : 1px solid #ccc; + background : #f5f5f5; + width : 100%; + padding : 10px; +} Index: openacs-4/packages/learning-content/www/resources/style-blue-ie.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/style-blue-ie.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/style-blue-ie.css 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,17 @@ +.margin-form fieldset #category { + margin-top: -15px; + clear: none; +} + +.order-nav { + float: left; + clear: both; +} + +#menu-blue ul { + float: left; +} + +#left_side .greybox { + width: 95%; +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/style-blue-ie6.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/style-blue-ie6.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/style-blue-ie6.css 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,24 @@ +.margin-form fieldset #category { + margin-top: -15px; + clear: none; +} + +.order-nav { + float: left; + clear: both; +} + +#menu-blue ul { + float: left; +} + +#menu-blue li a { + padding: 11px 15px 10px 15px; +} +#submenu-blue ul { + margin-top: 6px; +} + +#left_side .greybox { + width: 95%; +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/style-blue-initial.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/style-blue-initial.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/style-blue-initial.css 5 Mar 2009 21:29:02 -0000 1.1 @@ -0,0 +1,358 @@ +body { + +} +a { +color : ##003E6F; +background : inherit; +text-decoration : none; +} +a:hover { +color : #7a9833; +/* background : inherit; */ +text-decoration : none; +} +#main-blue p { +margin : 5px 0; +} +#main-blue h1 { +font : bold 1.8em Arial, Sans-Serif; +padding : 8px 0 4px 0; +margin : 0; +letter-spacing : -1px; +} +#main-blue h2 { +font : bold 1.6em Arial, Sans-Serif; +letter-spacing : -1px; +} +#main-blue h3 { +padding : 4px 0; +margin : 0; +} +ul { +margin : 0; +padding : 0; +list-style : none; +} +#main-blue img { +border : 0; +} +#main-blue hr { +height : 1px; +border-style : none; +color : #d0d0d0; +background-color : #c0c0c0; +margin : 10px 0; +} +.content-blue { +margin : 0 auto; +/*width : 95%;*/ +} +.mainsite-blue { + padding : 0; +/* margin-top : 25px;*/ + font : 0.74em Arial, sans-serif; + font-size: small; + line-height : 1.5em; +/* background : #fff url(images/bg2blue2.jpg) repeat-x top;*/ + color : #454545; + width: 99%; +} +#top-blue { + padding-top : 0; + background : transparent; + height : 80px; + list-style-type: circle; + padding-right: 3px; +} +#top-blue h1 { +font : bold 1.8em Arial, Sans-Serif; +padding : 20px 0 0 0; +margin : 0; +letter-spacing : 1px; +color : #616161; +border-bottom: 0px; +clear:none; + +} +#top-blue h2 { +font : 0.9em Arial, Sans-Serif; +letter-spacing : 0; +color : #868686; +margin : 0; +padding : 0; +} +#top-blue #icons { +float : right; +margin : 25px 15px 0; +padding : 0; +} +#top-blue #icons img { +padding-right : 2px; +border : 0; +} +#menu-blue { +margin : 0; +height : 34px; +padding : 0 2.5%; +background : #fff url(images/bg2blue2menu.jpg) repeat-x top; +} +#submenu-blue { +margin : 0; +height : 25px; +padding : 0 2.5%; +background : #fff url(images/bg2blue2submenu.jpg) repeat-x top; +font-size: x-small; +} + +#menu-blue li { +list-style : none; +display : inline; +line-height : 35px; +} +#menu-blue li a { +text-decoration : none; +margin : 0; +padding : 9px 15px 10px 15px; +font-weight : bold; +color : #fff; +} +#menu-blue li a:hover { +color : #fff; +background : #a7cc44; +margin : 0; +} +#menu-blue li a.current { +background : #616161 url(images/trcorner2.gif) no-repeat top right; +color : #fff; +} + +#submenu-blue li a:hover { + background: none; +} + +#submenu-blue li a.not_selected:hover { + font-size: 11px; + color: #fff; +} + +#main-blue li a.current { +background : #616161 url(images/trcorner2.gif) no-repeat top right; +color : #fff; +} + +#submenu-blue li{ +line-height: 25px; +} + +#submenu-blue li a.selected { + color: #ffffff; + font-size: 11px; +} +#submenu-blue li a.not_selected { + color: #003e6f; +} + +#main-blue { +/*width : 95%;*/ +margin : 0; +padding : 0; +} +#right_side { +float : right; +width : 230px; +background : #ffffff url(images/topr.jpg) no-repeat top right; +overflow : hidden; +} +#right_side .pad { +padding : 35px 10px 10px 17px; +} +#right_side ul { +padding : 3px 0 8px 0; +} +#right_side li { +line-height : 18px; +background : #fff; +list-style : square; +padding-left : 0; +margin-left : 15px; +color : #b4e04a; +} +#right_side a { +background : inherit; +text-decoration : none; +} +#right_side h3 { +color : #949494; +font : bold 1.2em Arial, Sans-Serif; +margin-top : 10px; +} +#left_side { +background : inherit; +margin-bottom : 10px; +width : 100%; +} +#left_side .intro-blue { + background : url('images/bg2blue2title2.jpg'); + color : #fff; + overflow : hidden; + height: 43px; + padding: 0; + width: 100%; +} +#left_side .intro-blue .pad { + padding : 13px 0 0 2.5%; + font-style: normal; + font-weight: bold; + font-size: 13px; + float: left; + } +#left_side .intro-blue .nav { + padding: 7px 10% 0 0; + float: right; +} +#left_side .intro-blue .nav a{ +/* padding-left: 5px; */ + text-decoration: none; +} + +#left_side .intro-blue a { +color : #b4e04a; +text-decoration : none; +} + +#left_side .intro-blue .nav a:hover { + color : #fff; + text-decoration : none; + background: none; +} + +#left_side .intro-blue img { +text-decoration : none; +border: 0; +} + +#left_side .mpart { +padding : 40px 2.5% 0 2.5%; +width: 95%; +} +#left_side h3 { +background : inherit; +padding : 0; +margin : 0; +font : bold 1.4em Arial, Sans-Serif; +} +#left_side .mpart h1 { +background : url(images/lrline.gif) no-repeat bottom left; +} +#left_side .mpart h2 { +background : url(images/lrline.gif) no-repeat bottom left; +height : 20px; +padding : 0; +margin : 0 0 15px 0; +font : 0.9em verdana, Arial, Sans-Serif; +} +#left_side p { +color : #454545; +padding : 0; +} +#left_side blockquote { +padding-left : 10px; +border-left : 3px solid #a7cc44; +margin : 10px 0 10px 25px; +} +.date { +border-top : 1px dotted #ccc; +padding : 5px 0; +margin : 10px 0 25px 0; +text-align : right; +} +#left_side .rs { +float : right; +margin : 0 10px; +border : 1px solid #ddd; +padding : 5px; +background : #f5f5f5; +} +#left_side ul { +list-style-position : inside; +margin-left : 2px; +} +#left_side ul li { +list-style-type : square; +margin-left : 15px; +} +#left_side ul ul li { +list-style : none; +margin-left : 10px; +list-style-type : lower-alpha; +list-style-position : inside; +} +#left_side .greybox { +border : 1px solid #ccc; +background : #f5f5f5; +width : 100%; +padding : 10px; +} +.footer { +clear : both; +width : 900px; +margin : 0 0 6em 0; +color : #777; +background : #fff url(images/rlline.gif) no-repeat top right; +} +.footer .right { +float : right; +text-align : right; +background : inherit; +padding-top : 10px; +width : 900px; +} +.footer a { +text-decoration : none; +background : #fff; +} +.option2 { + font-family: Arial, Helvetica, sans-serif; + background-color: #FFFFFF; + color: #666666; + border-color: #00CC00; + border-style: thin; + border-right-color: #00CC00; + border-bottom-color: #B6CDFB; +} + + +/* ADD */ + +.content-blue fieldset { + float: right; +} +.margin-form { +/* float: right;*/ +} +/*.order-nav { + float: left; + clear: both; +}*/ +.margin-form fieldset #category { + float: right; +} + +#learning-contentarea { + min-width: 500px; +} + +/* !ADD */ + +/* xowiki.css adds */ + +#wikicmds {position: relative; top: 0px; right: 0px; height: 0px; text-align: right; font-family: sans-serif; font-size: 85%;color: #7A7A78;} +div.portlet #wikicmds {float: inherit ! important; top: 0px ! important; height: inherit;} +#page-body #wikicmds {top: -30px;} + +#wikicmds a, #wikicmds a:visited, div.wiki-menu a { color: #7A7A78; text-decoration: none;} +#wikicmds a:hover {text-decoration: underline;} +#wikicmds a:active {color: rgb(255,153,51);} + + +/* end of xowiki.css */ \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/style-blue.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/style-blue.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/style-blue.css 5 Mar 2009 21:29:02 -0000 1.1 @@ -0,0 +1,381 @@ +body { + +} +a { +color : ##003E6F; +background : inherit; +text-decoration : none; +} +a:hover { +color : #7a9833; +/* background : inherit; */ +text-decoration : none; +} +#main-blue p { +margin : 5px 0; +} +#main-blue h1 { +font : bold 1.8em Arial, Sans-Serif; +padding : 8px 0 4px 0; +margin : 0; +letter-spacing : -1px; +} +#main-blue h2 { +font : bold 1.6em Arial, Sans-Serif; +letter-spacing : -1px; +} +#main-blue h3 { +padding : 4px 0; +margin : 0; +} +ul { +margin : 0; +} +#main-blue img { +border : 0; +} +#main-blue hr { +height : 1px; +border-style : none; +color : #d0d0d0; +background-color : #c0c0c0; +margin : 10px 0; +} +.content-blue { +margin : 0 auto; +} +.order-text { + color: #369; + font-weight: + bold; + padding-bottom: 4px; +} +.mainsite-blue { + padding : 0; +/* margin-top : 25px;*/ + font : 0.74em Arial, sans-serif; + font-size: small; + line-height : 1.5em; +/* background : #fff url(images/bg2blue2.jpg) repeat-x top;*/ + color : #454545; + width: 99%; +} +#top-blue { + padding-top : 0; + background : transparent; + height : 80px; + list-style-type: circle; + padding-right: 3px; +} +#top-blue h1 { +font : bold 1.8em Arial, Sans-Serif; +padding : 20px 0 0 0; +margin : 0; +letter-spacing : 1px; +color : #616161; +border-bottom: 0px; +clear:none; + +} +#top-blue h2 { +font : 0.9em Arial, Sans-Serif; +letter-spacing : 0; +color : #868686; +margin : 0; +padding : 0; +} +#top-blue #icons { +float : right; +margin : 25px 15px 0; +padding : 0; +} +#top-blue #icons img { +padding-right : 2px; +border : 0; +} +#menu-blue { +margin : 0; +height : 34px; +padding : 0 2.5%; +/* background : #fff url(images/bg2blue2menu.jpg) repeat-x top; */ +background-color:#336699; +} +#submenu-blue { +margin : 0; +height : 25px; +padding : 0 2.5%; +font-size: x-small; +background-color: #5588BB; +border-bottom: 1px; +border-color: #fff; +/* background : #fff url(images/bg2blue2submenu.jpg) repeat-x top; */ +} + +#menu-blue li { +list-style : none; +display : inline; +line-height : 35px; +} +#menu-blue li a { +text-decoration : none; +margin : 0; +padding : 9px 15px 8px 15px; +font-weight : bold; +color : #fff; +} +#menu-blue li a:hover { +color : #fff; +/* background : #a7cc44; */ + background-color: #44A7CC; +margin : 0; +} +#menu-blue li a.current { +/* background : #616161 url(images/trcorner2.gif) no-repeat top right; */ +background-color:#5588BB; +color : #fff; +} + +#submenu-blue li a:hover { + background: none; +} + +#submenu-blue li a.not_selected:hover { + font-size: 11px; + color: #fff; +} + +#main-blue li a.current { +background : #616161 url(images/trcorner2.gif) no-repeat top right; +color : #fff; +} + +#submenu-blue li{ +line-height: 25px; +display: inline; +margin-left: 7px; +} + +#submenu-blue li a.selected { + color: #ffffff; + font-size: 11px; +} +#submenu-blue li a.not_selected { + color: #003e6f; +} + +#main-blue { +/*width : 95%;*/ +margin : 0; +padding : 0; +} +#right_side { +float : right; +width : 230px; +background : #ffffff url(images/topr.jpg) no-repeat top right; +overflow : hidden; +} +#right_side .pad { +padding : 35px 10px 10px 17px; +} +#right_side ul { +padding : 3px 0 8px 0; +} +#right_side li { +line-height : 18px; +background : #fff; +list-style : square; +padding-left : 0; +margin-left : 15px; +color : #b4e04a; +} +#right_side a { +background : inherit; +text-decoration : none; +} +#right_side h3 { +color : #949494; +font : bold 1.2em Arial, Sans-Serif; +margin-top : 10px; +} +#left_side { +background : inherit; +margin-bottom : 10px; +width : 100%; +} +#left_side .intro-blue { +/* background : url('images/bg2blue2title2.jpg'); */ +background-color:#6699CC; + color : #fff; + overflow : hidden; + height: 43px; + padding: 0; + width: 100%; +} +#left_side .intro-blue .pad { + padding : 13px 0 0 2.5%; + font-style: normal; + font-weight: bold; + font-size: 13px; + float: left; + } +#left_side .intro-blue .nav { + padding: 7px 10% 0 0; + float: right; +} +#left_side .intro-blue .nav a{ +/* padding-left: 5px; */ + text-decoration: none; +} + +#left_side .intro-blue a { +color : #b4e04a; +text-decoration : none; +} + +#left_side .intro-blue .nav a:hover { + color : #fff; + text-decoration : none; + background: none; +} + +#left_side .intro-blue img { +text-decoration : none; +border: 0; +} + +#left_side .mpart { +padding : 40px 2.5% 0 2.5%; +width: 95%; +} +#left_side h3 { +background : inherit; +padding : 0; +margin : 0; +font : bold 1.4em Arial, Sans-Serif; +} +#left_side .mpart h1 { +background : url(images/lrline.gif) no-repeat bottom left; +} +#left_side .mpart h2 { +background : url(images/lrline.gif) no-repeat bottom left; +height : 20px; +padding : 0; +margin : 0 0 15px 0; +font : 0.9em verdana, Arial, Sans-Serif; +} +#left_side p { +color : #454545; +padding : 0; +} +#left_side blockquote { +padding-left : 10px; +border-left : 3px solid #a7cc44; +margin : 10px 0 10px 25px; +} +.date { +border-top : 1px dotted #ccc; +padding : 5px 0; +margin : 10px 0 25px 0; +text-align : right; +} +#left_side .rs { +float : right; +margin : 0 10px; +border : 1px solid #ddd; +padding : 5px; +background : #f5f5f5; +} +#left_side ul { +list-style-position : inside; +margin-left : 2px; +} +#left_side ul li { +list-style-type : square; +margin-left : 15px; +} +#left_side ul ul li { +list-style : none; +margin-left : 10px; +list-style-type : lower-alpha; +list-style-position : inside; +} +#left_side .greybox { +border : 1px solid #ccc; +background : #f5f5f5; +width : 100%; +padding : 10px; +} +.footer { +clear : both; +width : 900px; +margin : 0 0 6em 0; +color : #777; +background : #fff url(images/rlline.gif) no-repeat top right; +} +.footer .right { +float : right; +text-align : right; +background : inherit; +padding-top : 10px; +width : 900px; +} +.footer a { +text-decoration : none; +background : #fff; +} +.option2 { + font-family: Arial, Helvetica, sans-serif; + background-color: #FFFFFF; + color: #666666; + border-color: #00CC00; + border-style: thin; + border-right-color: #00CC00; + border-bottom-color: #B6CDFB; +} + + +/* ADD */ + +.content-blue fieldset { + float: right; +} +.margin-form { + float: right; + margin-top: 7px; +} +.order-nav { + float: left; + clear: both; + margin-top: -20px; +} +.margin-form fieldset #category { + float: right; +} + +.margin-form fieldset { + border: 0; +} + +#learning-contentarea { + min-width: 500px; +} + +/* !ADD */ + +/* xowiki.css adds */ + +#msg_div2 { + border: 1px solid; + width: 250px; + margin-left: 25px; + padding: 5px; +} +#wikicmds {float: right; text-align: right; font-family: sans-serif; font-size: 85%;color: #7A7A78;} +div.portlet #wikicmds {float: inherit ! important; top: 0px ! important; height: inherit;} +#page-body #wikicmds {top: -30px;} + +#wikicmds a, #wikicmds a:visited, div.wiki-menu a { color: #7A7A78; text-decoration: none;} +#wikicmds a:hover {text-decoration: underline;} +#wikicmds a:active {color: rgb(255,153,51);} + +/* end of xowiki.css */ \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/tooltip.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/tooltip.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/resources/tooltip.css 5 Mar 2009 21:29:02 -0000 1.1 @@ -0,0 +1,20 @@ +#myTooltip{ + background-color: #FFFFFF; + border: 2px solid #003E6F; +} +#myTooltip .hd{ + background-color: #616161; + color: #FFFFFF; +} +#myTooltip.bd{ + +} +#myTooltip.ft{ + +} +#myTooltip.hd{ + +} +#myTooltip.hd{ + +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/resources/images/accept.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/accept.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/apply.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/apply.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/arrow.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/arrow.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/arrow2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/arrow2.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/bg.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/bg.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/bg2.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/bg2.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/bg2blue.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/bg2blue.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/bg2blue2.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/bg2blue2.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/bg2blue2menu.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/bg2blue2menu.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/bg2blue2submenu.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/bg2blue2submenu.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/bg2blue2title.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/bg2blue2title.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/bg2blue2title2.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/bg2blue2title2.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/bg2blue2title2b.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/bg2blue2title2b.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/bg3.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/bg3.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/bkbar1.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/bkbar1.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/contact.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/contact.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/flecha.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/flecha.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/flecha2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/flecha2.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/grey_arrow.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/grey_arrow.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/home.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/home.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/home.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/home.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/home_new_28.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/home_new_28.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/house.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/house.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/left_new_28.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/left_new_28.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/logo.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/logo.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/lrline.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/lrline.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/next.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/next.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/order_down.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/order_down.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/order_up.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/order_up.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/prev.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/prev.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/right_blue.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/right_blue.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/right_new_28.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/right_new_28.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/rlline.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/rlline.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/sel_left.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/sel_left.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/sel_left2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/sel_left2.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/sel_middle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/sel_middle.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/sel_middle2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/sel_middle2.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/sel_right.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/sel_right.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/sel_right2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/sel_right2.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/sitemap.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/sitemap.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/topr.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/topr.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/trcorner.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/trcorner.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/resources/images/trcorner2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/resources/images/trcorner2.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content/www/template/complete-navbar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/complete-navbar.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/complete-navbar.adp 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,10 @@ + +
    + + + + + + +
+
\ No newline at end of file Index: openacs-4/packages/learning-content/www/template/complete-navbar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/complete-navbar.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/complete-navbar.tcl 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,77 @@ +ad_page_contract { + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2007-07-04 +} { + page_pos:optional + page_id:optional + content_id:optional + type:optional + index:optional + category_id:optional +} + +set title "navbar" +set cat_index [list] +set index1 100 +set index2 100 +set index3 100 +set index4 100 +set index5 100 +set index6 100 +set wiki_url "[ad_conn package_url]" +if {![string match $page_pos "@page_order@"]} { + set show 1 + set wiki_folder_id [::xowiki::Page require_folder -name xowiki \ + -package_id $content_id] + set item_id [content::revision::item_id -revision_id $page_id] + if {[exists_and_not_null category_id]} { + set my_cat_id $category_id + } else { + set my_cat_id [category::get_mapped_categories $item_id] + } + set tree_id [category::get_tree $my_cat_id] + set my_parent_id [learning_content::category::category_parent \ + -category_id $my_cat_id \ + -tree_id $tree_id] + set tree_list [learning_content::category::get_tree_levels \ + -subtree_id $my_parent_id -to_level 1 -tree_id $tree_id] + + if {[llength $tree_list] < 1} { + set show 0 + ad_return_template + } + + set my_cat_index [expr [lsearch -regexp $tree_list $my_cat_id] + 1] + + set categories_objects [db_list_of_lists select_cat {*SQL*}] + + for {set i [expr [llength $tree_list] -1]} {$i >= 0} {incr i -1} { + set category [lindex $tree_list $i] + if {[learning_content::category::category_childs \ + -tree_id $tree_id \ + -category_id [lindex $category 0] \ + -wiki_folder_id $wiki_folder_id]} { + lappend cat_index [lsearch -regexp $tree_list [lindex $category 1]] + } + } + + if {[llength $cat_index] < 1} { + set show 0 + } + + for {set i 0} {$i < 6} {incr i} { + set adp_index [expr $i + 1] + if {$i < [llength $cat_index]} { + set index$adp_index [expr [lindex $cat_index $i] + 1] + } elseif {$i eq [llength $cat_index]} { + set index$adp_index 0 + } else { + set index$adp_index 100 + } + } + +} else { + set show 0 +} + Index: openacs-4/packages/learning-content/www/template/complete-navbar.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/complete-navbar.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/complete-navbar.xql 5 Mar 2009 21:29:01 -0000 1.1 @@ -0,0 +1,17 @@ + + + + + + select count(ci.item_id), + c.category_id + from category_object_map c, + cr_items ci + where c.object_id = ci.item_id + and ci.parent_id = :wiki_folder_id + and ci.content_type = ('::xowiki::PageInstance') + group by category_id + order by category_id desc + + + Index: openacs-4/packages/learning-content/www/template/complete-navigation.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/complete-navigation.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/complete-navigation.adp 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,5 @@ + + + + + Index: openacs-4/packages/learning-content/www/template/complete-navigation.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/complete-navigation.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/complete-navigation.tcl 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,47 @@ +ad_page_contract { + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2007-07-18 +} { + page_pos:optional + page_id:optional + content_id:optional + type:optional + category_id:optional +} + +set title "title bar" +set wiki_url "[ad_conn package_url]" + +if {![string match $page_pos "@page_order@"]} { + set show 1 + set wiki_folder_id [::xowiki::Page require_folder -name xowiki \ + -package_id $content_id] + set item_id [content::revision::item_id -revision_id $page_id] + if {[exists_and_not_null category_id]} { + set my_cat_id $category_id + } else { + set my_cat_id [category::get_mapped_categories $item_id] + } + set cat_name [category::get_name $my_cat_id] + set tree_id [category::get_tree $my_cat_id] + set my_parent_id [learning_content::category::category_parent \ + -category_id $my_cat_id\ + -tree_id $tree_id] + set my_parent_id1 [learning_content::category::category_parent \ + -category_id $my_cat_id \ + -level 1 \ + -tree_id $tree_id] + set tree_list [learning_content::category::get_tree_levels \ + -subtree_id $my_parent_id \ + -to_level 1 \ + -tree_id $tree_id] + + if {[llength $tree_list] < 1} { + set show 0 + ad_return_template + } + +} else { + set show 0 +} Index: openacs-4/packages/learning-content/www/template/complete-subnavbar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/complete-subnavbar.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/complete-subnavbar.adp 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,11 @@ + + + Index: openacs-4/packages/learning-content/www/template/complete-subnavbar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/complete-subnavbar.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/complete-subnavbar.tcl 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,116 @@ +ad_page_contract { + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2007-09-03 +} { + page_pos:optional + page_id:optional + content_id:optional + type:optional + index:optional + category_id:optional +} + +set title "navbar" +set cat_index [list] +set index1 100 +set index2 100 +set index3 100 +set index4 100 +set index5 100 +set index6 100 +set wiki_url "[ad_conn package_url]" + +if {![string match $page_pos "@page_order@"]} { + set show 1 + set wiki_folder_id [::xowiki::Page require_folder -name xowiki \ + -package_id $content_id] + set item_id [content::revision::item_id -revision_id $page_id] + + if {[exists_and_not_null category_id]} { + set my_cat_id $category_id + } else { + set my_cat_id [category::get_mapped_categories $item_id] + } + set tree_id [category::get_tree $my_cat_id] + set my_parent_id [learning_content::category::category_parent \ + -category_id $my_cat_id \ + -tree_id $tree_id] + set my_parent_id1 [learning_content::category::category_parent \ + -category_id $my_cat_id \ + -level 1 \ + -tree_id $tree_id] + + set level_2_list [learning_content::category::get_tree_levels -only_level 2 \ + -tree_id $tree_id] + set level_3_list [learning_content::category::get_tree_levels -only_level 3 \ + -tree_id $tree_id] + + if {[llength $level_2_list] < 1 \ + || ([lsearch -regexp $level_2_list $my_cat_id] < 0 \ + && [lsearch -regexp $level_3_list $my_cat_id] < 0)} { + set show 0 + return +} + + set tree_list [learning_content::category::get_tree_levels \ + -subtree_id $my_cat_id \ + -to_level 1 \ + -tree_id $tree_id] + + if {[lsearch -regexp $level_3_list $my_cat_id] >= 0} { + set tree_list [learning_content::category::get_tree_levels \ + -subtree_id $my_parent_id1 \ + -to_level 1 \ + -tree_id $tree_id] + } + + if {[llength $tree_list] < 1} { + set show 0 + ad_return_template + } + + set parent_tree_list [learning_content::category::get_tree_levels \ + -subtree_id $my_parent_id \ + -to_level 1 \ + -tree_id $tree_id] + + if {[llength $parent_tree_list] < 1} { + set show 0 + ad_return_template + } + + set parent_cat_index [expr [lsearch -regexp $parent_tree_list $my_cat_id] \ + + 1] + if {$parent_cat_index eq 0} { + set parent_cat_index [expr \ + [lsearch -regexp $parent_tree_list $my_parent_id1] + 1] + } + + set categories_objects [db_list_of_lists select_cat {*SQL*}] + + foreach category $categories_objects { + if {[lsearch -regexp $tree_list [lindex $category 1]] >= 0} { + lappend cat_index [lsearch -regexp $tree_list [lindex $category 1]] + } + } + + if {[llength $cat_index] < 1} { + set show 0 + ad_return_template + } + + for {set i 0} {$i < 6} {incr i} { + set adp_index [expr $i + 1] + if {$i < [llength $cat_index]} { + set index$adp_index [expr [lindex $cat_index $i] + 1] + } elseif {$i eq [llength $cat_index]} { + set index$adp_index 0 + } else { + set index$adp_index 100 + } + } + +} else { + set show 0 +} Index: openacs-4/packages/learning-content/www/template/complete-subnavbar.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/complete-subnavbar.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/complete-subnavbar.xql 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,17 @@ + + + + + + select count(ci.item_id), + c.category_id + from category_object_map c, + cr_items ci + where c.object_id = ci.item_id + and ci.parent_id = :wiki_folder_id + and ci.content_type = ('::xowiki::PageInstance') + group by category_id + order by category_id desc + + + Index: openacs-4/packages/learning-content/www/template/complete-titlebar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/complete-titlebar.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/complete-titlebar.adp 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,3 @@ + + @my_title@ + Index: openacs-4/packages/learning-content/www/template/complete-titlebar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/complete-titlebar.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/complete-titlebar.tcl 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,18 @@ +ad_page_contract { + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2007-07-18 +} { + page_pos:optional + page_id:optional + content_id:optional + my_title:optional + type:optional + category_id:optional +} + +if {![string match $page_pos "@page_order@"]} { + set show 1 +} else { + set show 0 +} Index: openacs-4/packages/learning-content/www/template/home.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/home.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/home.adp 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,5 @@ + + + #learning-content.home# + + \ No newline at end of file Index: openacs-4/packages/learning-content/www/template/home.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/home.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/home.tcl 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,31 @@ +ad_page_contract { + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2007-06-20 +} { + page_pos:optional + page_id:optional + content_id:optional + category_id:optional +} + +if {![string match $page_pos "@page_order@"]} { + set wiki_url "[ad_conn package_url]" + set folder_id [::xowiki::Page require_folder -name xowiki \ + -package_id $content_id] + set item_id [content::revision::item_id -revision_id $page_id] + if {[exists_and_not_null category_id]} { + set category_id $category_id + } else { + set category_id [category::get_mapped_categories $item_id] + } + + set show 1 + set unit_id [learning_content::get_unit_id -category_id $category_id] + set name [learning_content::get_first_tree_item_from_category_id \ + -category_id $unit_id -folder_id $folder_id] + + set nexturl "${wiki_url}$name" +} else { + set show 0 +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/template/navbar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/navbar.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/navbar.adp 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,23 @@ + + + +
  • + + @cat_name@ + +
  • +
    + +
  • + @cat_name@ +
  • +
    +
    +
    + +
  • + + #learning-content.glossary# + +
  • +
    \ No newline at end of file Index: openacs-4/packages/learning-content/www/template/navbar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/navbar.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/navbar.tcl 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,80 @@ +ad_page_contract { + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2007-06-20 +} { + page_pos:optional + page_id:optional + content_id:optional + type:optional + index:optional + category_id:optional +} + +set page_list [list] +set next_list [list] +set show 0 +set width 76 +set styleb "" +set stylec "" +set cat_id 0 +set list_categories [list] + +set wiki_url "[ad_conn package_url]" +if {![string match $page_pos "@page_order@"]} { + set show 1 +set wiki_folder_id [::xowiki::Page require_folder -name xowiki \ + -package_id $content_id] + set item_id [content::revision::item_id -revision_id $page_id] + if {[exists_and_not_null category_id]} { + set my_cat_id $category_id + set stylec "class=\"current\"" + } else { + set my_cat_id [category::get_mapped_categories $item_id] + } + set tree_id [category::get_tree $my_cat_id] + set parent_id [learning_content::category::category_parent \ + -category_id $my_cat_id \ + -tree_id $tree_id] + set parent_id1 [learning_content::category::category_parent \ + -category_id $my_cat_id \ + -level 1 \ + -tree_id $tree_id] + set tree_list [learning_content::category::get_tree_levels \ + -subtree_id $parent_id \ + -to_level 1 \ + -tree_id $tree_id] + + if {[llength $tree_list] < 1} { + set show 0 + ad_return_template + } + + set bar_category [lindex $tree_list [expr $index - 1]] + set cat_name [lindex $bar_category 1] + + set cat_id [lindex $bar_category 0] + + if {[empty_string_p $cat_id]} { + set cat_id 0 + } + + set page_list [learning_content::category::page_order -tree_id $tree_id \ + -category_id $cat_id \ + -wiki_folder_id $wiki_folder_id] + if {[llength $page_list] > 0} { + set name [learning_content::get_first_tree_item_from_category_id \ + -category_id $cat_id -folder_id $wiki_folder_id] + set nexturl "${wiki_url}${name}\#cont1" + if {($cat_id eq $my_cat_id) \ + || ($parent_id1 eq $cat_id)} { + set styleb "class=\"current\"" + } + } else { + set show 0 + } +} else { + set show 0 +} + + Index: openacs-4/packages/learning-content/www/template/next-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/next-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/next-oracle.xql 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,20 @@ + + + + + + select * from ( + select ci.name + from category_object_map c, + cr_items ci, + xowiki_page p + where c.object_id = ci.item_id + and ci.parent_id = :wiki_folder_id + and ci.content_type = '::xowiki::PageInstance' + and category_id = :category_id + and p.page_id = ci.live_revision + order by to_number(page_order) $order) + where rownum <= 1 + + + Index: openacs-4/packages/learning-content/www/template/next-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/next-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/next-postgresql.xql 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,18 @@ + + + + + select ci.name + from category_object_map c, + cr_items ci, + xowiki_page p + where c.object_id = ci.item_id + and ci.parent_id = :wiki_folder_id + and ci.content_type = '::xowiki::PageInstance' + and category_id = :category_id + and p.page_id = ci.live_revision + order by page_order::integer $order + limit 1 + + + Index: openacs-4/packages/learning-content/www/template/next.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/next.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/next.adp 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,5 @@ + + + @alt@ + + Index: openacs-4/packages/learning-content/www/template/next.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/next.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/next.tcl 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,157 @@ +ad_page_contract { + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2007-06-20 +} { + page_pos:optional + page_id:optional + content_id:optional + wiki_folder_id:optional + dir:optional +} +set page_list [list] +set show 0 +set next_list [list] +set wiki_url "[ad_conn package_url]" +if {![string match $page_pos "@page_order@"]} { + set show 1 + set wiki_folder_id [::xowiki::Page require_folder -name xowiki \ + -package_id $content_id] + set item_id [content::revision::item_id -revision_id $page_id] + set cat_id [category::get_mapped_categories $item_id] + set tree_id [category::get_tree $cat_id] + set my_parent_id [learning_content::category::category_parent \ + -category_id $cat_id\ + -tree_id $tree_id] + set my_parent_id1 [learning_content::category::category_parent \ + -category_id $cat_id\ + -level 1 \ + -tree_id $tree_id] + set tree_list [learning_content::category::get_tree_levels \ + -subtree_id $my_parent_id \ + -to_level 1 \ + -tree_id $tree_id] + + if {[llength $tree_list] < 1} { + set show 0 + ad_return_template + } + + set cat_index [lsearch -regexp $tree_list $cat_id] + + if {$cat_index < 0} { + set cat_index [expr [lsearch -regexp $tree_list $my_parent_id1] + 0] + } + + db_foreach select_page { *SQL* } { + lappend page_list [list $item_id $page_order $name $revision_id] + } + + set order_page [lsort -$dir -command learning_content::compare $page_list] + + set count 0 + foreach pages $order_page { + set current_pos [lsearch -exact $pages $page_id] + if {$current_pos >= 0} { + incr count + set next_list [lindex $order_page $count] + break + } + incr count + } + + if {[llength $next_list] > 0} { + set nexturl "${wiki_url}[lindex $next_list 2]" + } else { +## If there's not an adjacent page make the navigation continue + set next_item 0 + switch $dir { + "decreasing" { + set order "desc" + if { $next_item == 0 } { + while { $cat_id != 0 } { + set parent_id [category::get_parent -category_id $cat_id] + set subcategories [learning_content::category::get_under_categories \ + -category_id $cat_id -parent_id $parent_id] + foreach subcategory $subcategories { + set category_id $subcategory + set next_item [db_string get_next_item {*SQL*} \ + -default 0] + if { $next_item == 0 } { + set in_subcategories \ + [category::get_children \ + -category_id $category_id] + set in_subcategories [lsort \ + -decreasing $in_subcategories] + foreach in_subcategory $in_subcategories { + set category_id $in_subcategory + set next_item \ + [db_string get_next_item {*SQL*} \ + -default 0] + if {$next_item > 0} { + break + } + } + } + if { $next_item != 0 } break + } + if { $next_item != 0 } break + set cat_id $parent_id + } + } + } + "increasing" { + set order "asc" + while {$cat_id != 0} { + set parent_id [category::get_parent -category_id $cat_id] + set subcategories [learning_content::category::get_over_categories -category_id $cat_id -parent_id $parent_id] + foreach subcategory $subcategories { + set in_subcategories [category::get_children \ + -category_id $subcategory] + set in_subcategories [lsort -increasing $in_subcategories] + foreach in_subcategory $in_subcategories { + set category_id $in_subcategory + set next_item [db_string get_next_item { *SQL* } \ + -default 0] + if { $next_item != 0 } { + break + } + } + if { $next_item == 0 } { + set category_id $subcategory + set next_item [db_string get_next_item {*SQL*} \ + -default 0] + } + if { $next_item != 0 } break + } + if { $next_item == 0 } { + set category_id $parent_id + set next_item [db_string get_next_item {*SQL*} \ + -default 0] + } + if { $next_item != 0 } break + set cat_id $parent_id + } + } + } + if { $next_item == 0 } { + set show 0 + } else { + set nexturl "${wiki_url}${next_item}" + } + } + switch $dir { + "decreasing" { + set img_name "prev" + set alt [_ learning-content.back] + } + "increasing" { + set img_name "next" + set alt [_ learning-content.next] + } + } +} else { + set show 0 +} + + Index: openacs-4/packages/learning-content/www/template/next.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/next.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/next.xql 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,74 @@ + + + + + select ci.item_id, + ci.name, + ci.live_revision as revision_id, + p.page_order + from category_object_map c, + cr_items ci, + xowiki_page p + where c.object_id = ci.item_id + and ci.parent_id = :wiki_folder_id + and ci.content_type = '::xowiki::PageInstance' + and p.page_id = ci.live_revision + and category_id = :cat_id + order by p.page_order + + + + + + select parent_id + from categories + where category_id = :cat_id + + + + + + select category_id + from categories + where parent_id = :cat_id + order by category_id desc + + + + + + select category_id + from categories + where parent_id = :parent_id + and category_id < :cat_id + order by category_id desc + + + + + + select parent_id + from categories + where category_id = :cat_id + + + + + + select category_id + from categories + where parent_id = :parent_id + and category_id > :cat_id + order by category_id + + + + + + select category_id + from categories + where parent_id = :subcategory + order by category_id + + + Index: openacs-4/packages/learning-content/www/template/subnavbar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/subnavbar.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/subnavbar.adp 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,8 @@ + + +
  • @cat_name@
  • +
    + +
  • @cat_name@
  • +
    +
    \ No newline at end of file Index: openacs-4/packages/learning-content/www/template/subnavbar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/subnavbar.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/subnavbar.tcl 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,113 @@ +ad_page_contract { + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2007-09-03 +} { + page_pos:optional + page_id:optional + content_id:optional + type:optional + index:optional + category_id:optional +} + + +set page_list [list] +set next_list [list] +set show 0 +set width 76 +set cat_id 0 +set styles "" +set list_categories [list] + +set wiki_url "[ad_conn package_url]" +if {![string match $page_pos "@page_order@"]} { + set show 1 + set wiki_folder_id [::xowiki::Page require_folder -name xowiki \ + -package_id $content_id] + set item_id [content::revision::item_id -revision_id $page_id] + if {[exists_and_not_null category_id]} { + set my_cat_id $category_id + } else { + set my_cat_id [category::get_mapped_categories $item_id] + } + set tree_id [category::get_tree $my_cat_id] + set my_parent_id [learning_content::category::category_parent \ + -category_id $my_cat_id \ + -tree_id $tree_id] + set my_parent_id1 [learning_content::category::category_parent \ + -category_id $my_cat_id \ + -level 1 \ + -tree_id $tree_id] + + set tree_list [learning_content::category::get_tree_levels -subtree_id $my_cat_id \ + -to_level 1 -tree_id $tree_id] + set level_2_list [learning_content::category::get_tree_levels -only_level 2 \ + -tree_id $tree_id] + set level_3_list [learning_content::category::get_tree_levels -only_level 3 \ + -tree_id $tree_id] + + if {[llength $level_3_list] < 1 \ + || ([lsearch -regexp $level_2_list $my_cat_id] < 0 \ + && [lsearch -regexp $level_3_list $my_cat_id] < 0)} { + set show 0 + ad_return_template + } elseif {[lsearch -regexp $level_3_list $my_cat_id] >= 0} { + set tree_list [learning_content::category::get_tree_levels \ + -subtree_id $my_parent_id1 \ + -to_level 1 -tree_id $tree_id] + } + + if {[llength $tree_list] < 1} { + set show 0 + ad_return_template + } + + set parent_tree_list [learning_content::category::get_tree_levels \ + -subtree_id $my_parent_id \ + -to_level 1 -tree_id $tree_id] + if {[llength $parent_tree_list] < 1} { + set show 0 + ad_return_template + } + + set parent_cat_index [expr [lsearch -regexp $parent_tree_list $my_cat_id] \ + + 1] + if {$parent_cat_index eq 0} { + set parent_cat_index [expr [lsearch -regexp $parent_tree_list \ + $my_parent_id1] + 1] + } + + set bar_category [lindex $tree_list [expr $index - 1]] + set cat_name [lindex $bar_category 1] + set cat_id [lindex $bar_category 0] + if {[empty_string_p $cat_id]} { + set cat_id 0 + } + + set page_list [db_list_of_lists select_content {*SQL*}] + + set order_page [lsort -increasing \ + -command learning_content::compare $page_list] + + if {[llength $order_page] > 0} { + set next_list [lindex $order_page 0] + set nexturl "${wiki_url}[lindex $next_list 2]\#cont1" + if {([lindex $next_list 5] eq $page_id) \ + || ($cat_id eq $my_cat_id) \ + || ($my_parent_id1 eq $my_cat_id)} { + + append parent_cat_index "_" + set styles "class=\"selected\"" + set img_name "arrow2.gif" + + } else { + set styles "class=\"not_selected\"" + set img_name "arrow.gif" + } + + } else { + set nexturl "0" + set show 0 + } +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/template/subnavbar.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/subnavbar.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/subnavbar.xql 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,19 @@ + + + + + select ci.item_id, + p.page_order, + ci.name + from category_object_map c, + cr_items ci, + xowiki_page p + where c.object_id = ci.item_id + and ci.parent_id = :wiki_folder_id + and ci.content_type = ('::xowiki::PageInstance') + and p.page_id = ci.live_revision + and category_id in ([join $cat_id ","]) + order by p.page_order + + + Index: openacs-4/packages/learning-content/www/template/unit-navbar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/unit-navbar.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/unit-navbar.adp 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,3 @@ + + + Index: openacs-4/packages/learning-content/www/template/unit-navbar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/unit-navbar.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/unit-navbar.tcl 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,65 @@ +ad_page_contract { + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2007-09-06 +} { + page_pos:optional + page_id:optional + content_id:optional + index:optional + category_id:optional +} + +set show 0 +set wiki_url "[ad_conn package_url]" +if {![string match $page_id "@revision_id@"]} { + set show 1 + set form_tree_list [list] + set wiki_folder_id [::xowiki::Page require_folder -name xowiki \ + -package_id $content_id] + set item_id [content::revision::item_id -revision_id $page_id] + if {[exists_and_not_null category_id]} { + set my_cat_id $category_id + } else { + set my_cat_id [category::get_mapped_categories $item_id] + } + set tree_id [category::get_tree $my_cat_id] + set my_parent_id [learning_content::category::category_parent \ + -category_id $my_cat_id \ + -tree_id $tree_id] + set my_parent_id1 [learning_content::category::category_parent \ + -category_id $my_cat_id \ + -level 1 \ + -tree_id $tree_id] + + set tree_list [learning_content::category::get_tree_levels -only_level 1 \ + -tree_id $tree_id] + set categories_objects [db_list_of_lists select_cat {*SQL*}] + foreach tree_level $categories_objects { + set unit_parent [learning_content::category::category_parent \ + -category_id [lindex $tree_level 1] \ + -tree_id $tree_id] + set unit_index [lsearch -regexp $tree_list $unit_parent] + + if {$unit_index >= 0 \ + && [lsearch -regexp $form_tree_list $unit_parent] < 0} { + + lappend form_tree_list \ + [list [lindex [lindex $tree_list $unit_index] 1] \ + [lindex [lindex $tree_list $unit_index] 0]] + } + } + + ad_form -name unidad -export { wiki_folder_id } -form { + {category:integer(select) + {label "Chapter"} + {options $form_tree_list} + {value $my_parent_id} + {html {onChange document.unidad.submit() class "options"}} + } + } -on_submit { + set first_page [learning_content::get_first_tree_item_from_category_id \ + -category_id $category -folder_id $wiki_folder_id] + ad_returnredirect ${wiki_url}${first_page} + } +} \ No newline at end of file Index: openacs-4/packages/learning-content/www/template/unit-navbar.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/template/unit-navbar.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/template/unit-navbar.xql 5 Mar 2009 21:29:00 -0000 1.1 @@ -0,0 +1,18 @@ + + + + + + select count(ci.item_id), + c.category_id + from category_object_map c, + cr_items ci + where c.object_id = ci.item_id + and ci.parent_id = :wiki_folder_id + and ci.content_type = '::xowiki::PageInstance' + group by category_id + order by category_id asc + + + + Index: openacs-4/packages/learning-content/www/xinha/insert-glossary-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/xinha/insert-glossary-entry.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/xinha/insert-glossary-entry.adp 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,250 @@ + + + #learning-content.glossary# + + + + + + + + + + + + + + + + +
    + +
    + + + +
    + + + + + + + +
    +
    + + + + +
    +
    +
    +
    + + + + + + + + +
    #learning-content.word#
    #learning-content.definition#
    +
    + + +
    + + + + + + +
    + + +
    + +
    +
    + + + Index: openacs-4/packages/learning-content/www/xinha/insert-glossary-entry.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content/www/xinha/insert-glossary-entry.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content/www/xinha/insert-glossary-entry.tcl 5 Mar 2009 21:28:59 -0000 1.1 @@ -0,0 +1,7 @@ +ad_page_contract { + @author Alvaro Rodriguez alvaro@viaro.net + @creation-date 2008-04-23 +} { + {package_id 0} +} + set package_url [apm_package_url_from_id $package_id] \ No newline at end of file Index: openacs-4/packages/learning-content-portlet/learning-content-portlet.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/learning-content-portlet.info,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/learning-content-portlet.info 5 Mar 2009 21:30:26 -0000 1.1 @@ -0,0 +1,30 @@ + + + + + Learning Content Portlet + Learning Content Portlet + f + t + + + Byron Linares (admin) + 0 + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/learning-content-portlet/catalog/learning-content-portlet.de_DE.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/catalog/learning-content-portlet.de_DE.ISO-8859-1.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/catalog/learning-content-portlet.de_DE.ISO-8859-1.xml 5 Mar 2009 21:30:29 -0000 1.1 @@ -0,0 +1,9 @@ + + + + Content Portlet + Content Portlets verwalten + Neues %element_pretty_name% + Name + Neu + Index: openacs-4/packages/learning-content-portlet/catalog/learning-content-portlet.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/catalog/learning-content-portlet.en_US.ISO-8859-1.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/catalog/learning-content-portlet.en_US.ISO-8859-1.xml 5 Mar 2009 21:30:29 -0000 1.1 @@ -0,0 +1,137 @@ + + + + Activity not available + Activity Type + To <a href="admin/category-view">add/edit sections</a>, go to the content admin link, then you will find an edit content index link. + Add Folder + Add new section + Add new unit + Admin Content + Admin pages of: + Content Portlet + Content Portlet Administration + All + Appearances + This Assessment is not available yet + Back + You Can delete this section + Cancel + Choose Activity + Choose Location + Confirm + Content + Content Admin + %object_type%: %object_name% - has been added to <a href=%content_url%>content</a> + Copy + Copy the content + Copy Content to: + There was an error during the copy of the content, you can try again or contact the system administrator. + The content was copied successfully + This action will overwrite the contents in the target course. \nThe activities are not copied.\nDo you want to continue? + Add a new activity + To <a href="activity-new2">create a new activity</a>, go to the new activity link in the above links, the available activities are: evaluations, assessments, forums or chat rooms. + To <a href="page-instance-new">create a new page</a>, go to the new page link in the above links. + Add a new page + Decreasing + Definition + Definition of the word for the glossary + Delete + Delete Folder + Delete section + Welcome to the content section of your course. + There is no content created for this course yet. + Edit + Edit Activity + Edit Content Index + Edit contents index + Edit Header Page + Edit content index + Edit Name + Edit Header + Term Edition + This forum is not available + Messages are added to a forum but there are no forums.<br /> +<a href="%forums_url%">Add Forum</a> + Glossary + In each page or activity you can add a definition to a word to be shown in the content glossary by using the glossary option <img src="/resources/acs-templating/xinha-nightly/plugins/InsertGlossaryEntry/img/insert-glossary-entry.gif"> in the editor. + Glossary View + Go back + Go to pages of: + Go To Activity + Go to assessment "%object_name%" + Go to chat room "%object_name%" + Go to evaluation "%object_name%" + Go to forum "%object_name%" + Go to message "%object_name%" + Home + Increasing + Content Index page + Location + This section have mapped object + My Classes + My Communities + Name + New + New Activity + New %element_pretty_name% + New Entry + New message in forum + New Seccion + Add New Unit + New Term + Next + No + There is no activity + You have no classes to admin + You have no communities to admin + No definition specified. + No word specified. + There are no pages + There are no users + No visits + This user has not visited any pages + Not Used + OK + Optional Description + Other Entries + Move Up + Move Down + Page Views + Visits by page + Save + You must select an activity + Select Type of Activity + Show Header: + Related Entries + Edit the text of a page + There are no activities of this type + There are no terms + Total of pages visited + Mini-Tutorials + Each Unit is divided in the following sections: <br /><ul> +<li> Introduction</li> +<li> Content</li> +<li> Activities</li> +<li> Glossary</li> +<li> Annexed</li> +</ul> +These sections can change once the Unit is created. And it is possible to create new sub-sections. + + Used %times_used% times + User tracking + User Views + Visits by user + View Content + Visits details for Content + Visits details for page: %page_name% + Visits details for user: %user_name% + Students visits report + Welcome to aLF Web content editor + In this section you can create a web content for you courses. + Term + This term already exist! + Term cannot be blank + Word for the glossary + Yes + Index: openacs-4/packages/learning-content-portlet/catalog/learning-content-portlet.es_ES.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/catalog/learning-content-portlet.es_ES.ISO-8859-1.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/catalog/learning-content-portlet.es_ES.ISO-8859-1.xml 5 Mar 2009 21:30:29 -0000 1.1 @@ -0,0 +1,137 @@ + + + + La actividad no est� disponible + Tipo de Actividad + Para <a href="admin/category-view">a�adir/editar secciones</a>, ir al enlace de Administrar Contenido, luego encontrar� un enlace hacia Editar el �ndice de contenido. + Agregar Folder + A�adir secci�n + Agregar una Unidad/Capitulo nuevo. + Administrar el Contenido + Administrar P�ginas de: + Portlet Contenido + Administraci�n de contenido + Todas + Apariciones + Este Cuestionario a�n no est� disponible + Anterior + Puede Eliminar esta secci�n si desea + Cancelar + Elija la Actividad + Escoger Ubicaci�n + Confirmar + Contenido + Administrar Contenido + %object_type%: %object_name% - se ha a�adido al <a href=%content_url%>contenido</a> + Copiar + Copiar el contenido + Copiar Contenido a: + Ha ocurrido un error durante el copiado del contenido, intente nuevamente o contacte al administrador del sistema. + Se ha realizado la copia correctamente + La acci�n de copiado sobreescribir� los contenidos del curso destino.\nLas actividades no ser�n copiadas.\n�Desea continuar? + A�adir una nueva actividad + Para <a href="activity-new2">a�adir una actividad</a>, ir al enlace de Nueva Actividad, las actividades disponibles son: evaluaciones, foros de discusi�n, cuestionarios o salas de chat. + Para <a href="page-instance-new">a�adir una nueva p�gina</a>, ir al enlace de Nueva P�gina. + A�adir una nueva p�gina + Desender + Definici�n + Definici�n del t�rmino para el glosario + Borrar + Eliminar Folder + Eliminar secci�n + Bienvenido a la secci�n de contenido de tu curso. + A�n no existe ning�n contenido creado para este curso. + Editar + Editar Actividad + Editar Indice de Contenido + Editar �ndice de contenidos + Editar P�gina de Encabezado + Editar Indice de contenido + Editar Nombre + Editar T�tulo de todas las p�ginas + Editar T�rmino + Foro no disponible + Los mensajes se asocian a foros y no hay ninguno creado.<br /> +<a href="%forums_url%">A�adir un nuevo foro</a> + Glosario + En cada p�gina o actividad podr� a�adir una definici�n a una palabra para que se muestre en el glosario del curso usando la opci�n del glosario <img src="/resources/acs-templating/xinha-nightly/plugins/InsertGlossaryEntry/img/insert-glossary-entry.gif"> en el editor de las p�ginas. + Vista del Glosario + Volver + Ver P�ginas de: + Ir a Actividad + Ir al cuestionario "%object_name%" + Ir a la sala de chat "%object_name%" + Ir a la evaluaci�n "%object_name%" + Ir al foro "%object_name%" + Ir al mensaje "%object_name%" + Inicio + Incrementar + Indice de contenido + Ubicaci�n + Esta secci�n NO puede ser borrada, ya que tiene elementos. + Mis Clases + Mis Comunidades + Nombre + Nuevo + Nueva Actividad + Nuevo %element_pretty_name% + Nueva Entrada + Nuevo mensaje en el foro + Nueva Secci�n + Agregar Nueva Unidad + Nuevo T�rmino + Siguiente + No + No hay actividad + No tiene ning�n curso asignado + No tiene ninguna comunidad asignada + No se especific&oacute; la definici&oacute;n. + No se especific� el t�rmino. + No hay p�ginas + No hay usuarios + Sin visitas + El usuario no ha visitado ninguna p�gina + Sin Utilizar + Enviar + Descripci�n Opcional + Otras Entradas + Mover Hacia Arriba + Mover Hacia Abajo + Visitas por p�gina + Visitas por p�gina + Guardar + Tiene que seleccionar una actividad + Seleccione el Tipo de Actividad + Mostrar T�tulo en todas las p�ginas: + Entradas Relacionadas + Editar el texto de una p�gina + No hay actividades de este tipo + No hay t�rminos + Total de p�ginas visitadas + Mini-Tutoriales + Cada Unidad o Cap�tulo se divide en las siguiente secciones:<br /><ul> + <li> Introducci�n</li> + <li> Contenido</li> + <li> Actividades</li> + <li> Glosario</li> + <li> Anexo</li> + </ul> + Dichas secciones pueden cambiarse una vez creada la Unidad / + Capitulo. Y se puede crear adicionalmente nuevas sub-secciones. + + Utilizada %times_used% veces + Visitas de los Usuarios + Visitas por usuario + Ver Contenido Copiado + Detalle de visitas al contenido + Detalle de visitas a la p�gina: %page_name% + Detalle de visitas del usuario: %user_name% + Reporte de visitas de los usuarios + Bienvenido al editor de contenido web de aLF + En esta secci�n usted podr� crear contenido web para su curso. + T�rmino + Ese t�rmino ya existe! + El t�rmino no puede estar vac�o + T�rmino para el glosario + Si + Index: openacs-4/packages/learning-content-portlet/catalog/learning-content-portlet.es_GT.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/catalog/learning-content-portlet.es_GT.ISO-8859-1.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/catalog/learning-content-portlet.es_GT.ISO-8859-1.xml 5 Mar 2009 21:30:29 -0000 1.1 @@ -0,0 +1,60 @@ + + + +Agregar Sección +Agregar una Unidad/Capitulo nuevo. +Portlet Contenido +Administracion de contenido +Anterior +Puede Eliminar esta seccion si desea +Contenido +Desender +Eliminar Sección +Bienvenido a la sección de contenido de tu curso. +Aquí encontrarás el material de estudio que tu catedrático ha subido. + Si tienes dudas de como usar esta aplicación puedes consultar el manual +Editar Página de Encabezado +Editar Indice de contenido +Editar Nombre +Inicio +Incrementar +Indice de contenido +Esta sección NO puede ser borrada, ya que tiene elementos. +Nombre +Nuevo +Nuevo %element_pretty_name% +Nueva Sección +Siguiente +Cada Unidad o Capitulo se divide en las siguiente secciones:<br /><ul> + <li> Introducción</li> + <li> Contenido</li> + <li> Actividades</li> + <li> Glosario</li> + <li> Anexo</li> + </ul> + Dichas secciones pueden cambiarse una vez creada la Unidad / + Capitulo. Y se puede crear adicionalmente nuevas sub-secciones. + +Bienvenido al editor de contenido web de aLF +En esta sección usted podrá crear contenido web para su curso +Mover Hacia Abajo +Mover Hacia Arriba +Editar Indice de Contenido +Copiar Contenido A: +Mis Clases +Mis Comunidades +Copiar +Editar +Agregar Nueva Unidad +Agregar Folder +Eliminar Folder +Editar Titulo del Contenido +Si +No +Mostrar Encabezado: +Ver Páginas de: +Administrar Páginas de : +Ver Contenido Copiado +Administrar el Contenido + + Index: openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-admin-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-admin-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-admin-drop.sql 5 Mar 2009 21:30:26 -0000 1.1 @@ -0,0 +1,117 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- learning-content-portlet-admin-drop.sql +-- + +-- Deletes a portal datasource for the static portlet factory +-- (admin interface) + +-- Copyright (C) 2001 MIT +-- @author Arjun Sanyal (arjun@openforce.net) + +-- $Id: learning-content-portlet-admin-drop.sql,v 1.1 2009/03/05 21:30:26 rocaelh Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html + +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + begin + select datasource_id into ds_id + from portal_datasources + where name = 'learning_content_admin_portlet'; + exception when no_data_found then + ds_id := null; + end ; + + if ds_id is NOT null then + portal_datasource.del(ds_id); + end if; + + -- drop the hooks + foo := acs_sc_impl.delete_alias ( + + 'portal_datasource', + 'learning_content_admin_portlet', + 'GetMyName' + ); + + foo := acs_sc_impl.delete_alias ( + + 'portal_datasource', + 'learning_content_admin_portlet', + 'GetPrettyName' + ); + + + foo := acs_sc_impl.delete_alias ( + + 'portal_datasource', + 'learning_content_admin_portlet', + 'Link' + ); + + foo := acs_sc_impl.delete_alias ( + + 'portal_datasource', + 'learning_content_admin_portlet', + 'AddSelfToPage' + ); + + foo := acs_sc_impl.delete_alias ( + + 'portal_datasource', + 'learning_content_admin_portlet', + 'Show' + ); + + foo := acs_sc_impl.delete_alias ( + + 'portal_datasource', + 'learning_content_admin_portlet', + 'Edit' + ); + + foo := acs_sc_impl.delete_alias ( + + 'portal_datasource', + 'learning_content_admin_portlet', + 'RemoveSelfFromPage' + ); + + -- Drop the binding + foo := acs_sc_impl.del ( + 'portal_datasource', + 'learning_content_admin_portlet' + ); + + -- drop the impl + foo := acs_sc_impl.del ( + 'portal_datasource', + 'learning_content_admin_portlet' + ); + + return 0; +end; +/ +show errors + + Index: openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-admin.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-admin.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-admin.sql 5 Mar 2009 21:30:26 -0000 1.1 @@ -0,0 +1,190 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- learning-content-admin-portlet.sql +-- + +-- Creates a portal datasource for the content portlet factory +-- (admin interface) + +-- Copyright (C) 2001 MIT +-- @author Arjun Sanyal (arjun@openforce.net) + +-- $Id: learning-content-portlet-admin.sql,v 1.1 2009/03/05 21:30:26 rocaelh Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- + +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource.new( + name => 'learning_content_admin_portlet', + description => 'Displays the admin interface for the content data portlets ' + ); + + -- 4 defaults procs + + -- shadeable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shadeable_p', + value => 'f' +); + + -- shaded_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shaded_p', + value => 'f' +); + + -- hideable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'hideable_p', + value => 't' +); + + -- user_editable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'user_editable_p', + value => 'f' +); + + -- link_hideable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'link_hideable_p', + value => 't' +); + + + -- content-admin-specific procs + + -- package_id must be configured + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 'f', + key => 'package_id', + value => '' +); + return 0; +end; +\ +show errors + +declare + foo integer; +begin + -- create the implementation + foo := acs_sc_impl.new ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'learning_content_admin_portlet' + ); + +end; +\ +show errors + +declare + foo integer; +begin + + -- add all the hooks + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'GetMyName', + 'learning_content_admin_portlet::get_my_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'GetPrettyName', + 'learning_content_admin_portlet::get_pretty_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'Link', + 'learning_content_admin_portlet::link', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'AddSelfToPage', + 'learning_content_admin_portlet::add_self_to_page', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'Show', + 'learning_content_admin_portlet::show', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'Edit', + 'learning_content_admin_portlet::edit', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'RemoveSelfFromPage', + 'learning_content_admin_portlet::remove_self_from_page', + 'TCL' + ); + + -- Add the binding + acs_sc_binding.new ( + contract_name => 'portal_datasource', + impl_name => 'learning_content_admin_portlet' + ); + +end; +/ +show errors \ No newline at end of file Index: openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-create.sql 5 Mar 2009 21:30:26 -0000 1.1 @@ -0,0 +1,352 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- +-- +-- Oracle port samir@symphinity.com 11 July 2002 +-- + +-- table to differentiate between normal pages and activity pages inside content +@ learning-content-tables-create.sql + +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource.new( + name => 'learning_content_portlet', + description => 'Displays the content page as a portlet' + ); + + -- 4 defaults procs + + -- shadeable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shadeable_p', + value => 't' + ); + + -- shaded_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shaded_p', + value => 'f' + ); + + -- hideable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'hideable_p', + value => 't' + ); + + -- user_editable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'user_editable_p', + value => 'f' +); + + -- link_hideable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'link_hideable_p', + value => 't' +); + + + -- content-specific procs + + -- package_id must be configured + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 'f', + key => 'package_id', + value => '' +); + + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 'f', + key => 'page_name', + value => '' +); + +end; +/ +show errors + +declare + foo integer; +begin + + -- create the implementation + foo := acs_sc_impl.new ( + impl_contract_name => 'portal_datasource', + impl_name => 'learning_content_portlet', + impl_pretty_name => 'Content Portlet', + impl_owner_name => 'learning_content_portlet' + ); +end; +/ +show errors + +declare + foo integer; +begin + + -- add all the hooks + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'GetMyName', + 'learning_content_portlet::get_my_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'GetPrettyName', + 'learning_content_portlet::get_pretty_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'Link', + 'learning_content_portlet::link', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'AddSelfToPage', + 'learning_content_portlet::add_self_to_page', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'Show', + 'learning_content_portlet::show', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'Edit', + 'learning_content_portlet::edit', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'RemoveSelfFromPage', + 'learning_content_portlet::remove_self_from_page', + 'TCL' + ); + +end; +/ +show errors + +declare + foo integer; +begin + + -- Add the binding + acs_sc_binding.new ( + contract_name => 'portal_datasource', + impl_name => 'learning_content_portlet' + ); + + +end; +/ +show errors + +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource.new( + name => 'learning_content_admin_portlet', + description => 'Displays the admin interface for the content data portlets ' + ); + + -- 4 defaults procs + + -- shadeable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shadeable_p', + value => 'f' +); + + -- shaded_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shaded_p', + value => 'f' +); + + -- hideable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'hideable_p', + value => 't' +); + + -- user_editable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'user_editable_p', + value => 'f' +); + + -- link_hideable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'link_hideable_p', + value => 't' +); + + + -- content-admin-specific procs + + -- package_id must be configured + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 'f', + key => 'package_id', + value => '' +); + +end; +/ +show errors + +declare + foo integer; +begin + -- create the implementation + foo := acs_sc_impl.new ( + impl_contract_name => 'portal_datasource', + impl_name => 'learning_content_admin_portlet', + impl_pretty_name => 'Content Admin Portlet', + impl_owner_name => 'learning_content_admin_portlet' + ); + +end; +/ +show errors + +declare + foo integer; +begin + + -- add all the hooks + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'GetMyName', + 'learning_content_admin_portlet::get_my_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'GetPrettyName', + 'learning_content_admin_portlet::get_pretty_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'Link', + 'learning_content_admin_portlet::link', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'AddSelfToPage', + 'learning_content_admin_portlet::add_self_to_page', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'Show', + 'learning_content_admin_portlet::show', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'Edit', + 'learning_content_admin_portlet::edit', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_admin_portlet', + 'RemoveSelfFromPage', + 'learning_content_admin_portlet::remove_self_from_page', + 'TCL' + ); + + -- Add the binding + acs_sc_binding.new ( + contract_name => 'portal_datasource', + impl_name => 'learning_content_admin_portlet' + ); + +end; +/ +show errors \ No newline at end of file Index: openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-drop.sql 5 Mar 2009 21:30:26 -0000 1.1 @@ -0,0 +1,190 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- +-- +-- Oracle port samir@symphinity.com 11 July 2002 +-- + +@ learning-content-tables-drop.sql + +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + begin + select datasource_id into ds_id + from portal_datasources + where name = 'learning_content_portlet'; + exception when no_data_found then + ds_id := null; + end; + + if ds_id is not null then + portal_datasource.del(ds_id); + end if; + +end; +/ +show errors + +declare + foo integer; +begin + + -- drop the hooks + foo := acs_sc_impl.delete_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'GetMyName' + ); + + foo := acs_sc_impl.delete_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'GetPrettyName' + ); + + + foo := acs_sc_impl.delete_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'Link' + ); + + foo := acs_sc_impl.delete_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'AddSelfToPage' + ); + + foo := acs_sc_impl.delete_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'Show' + ); + + foo := acs_sc_impl.delete_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'Edit' + ); + + foo := acs_sc_impl.delete_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'RemoveSelfFromPage' + ); + + -- Drop the binding + acs_sc_binding.del ( + 'portal_datasource', + 'learning_content_portlet' + ); + + -- drop the impl + foo := acs_sc_impl.del ( + 'portal_datasource', + 'learning_content_portlet' + ); + +end; +/ +show errors + +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + begin + select datasource_id into ds_id + from portal_datasources + where name = 'learning_content_admin_portlet'; + exception when no_data_found then + ds_id := null; + end ; + + if ds_id is NOT null then + portal_datasource.del(ds_id); + end if; + + -- drop the hooks + foo := acs_sc_impl.delete_alias ( + + 'portal_datasource', + 'learning_content_admin_portlet', + 'GetMyName' + ); + + foo := acs_sc_impl.delete_alias ( + + 'portal_datasource', + 'learning_content_admin_portlet', + 'GetPrettyName' + ); + + + foo := acs_sc_impl.delete_alias ( + + 'portal_datasource', + 'learning_content_admin_portlet', + 'Link' + ); + + foo := acs_sc_impl.delete_alias ( + + 'portal_datasource', + 'learning_content_admin_portlet', + 'AddSelfToPage' + ); + + foo := acs_sc_impl.delete_alias ( + + 'portal_datasource', + 'learning_content_admin_portlet', + 'Show' + ); + + foo := acs_sc_impl.delete_alias ( + + 'portal_datasource', + 'learning_content_admin_portlet', + 'Edit' + ); + + foo := acs_sc_impl.delete_alias ( + + 'portal_datasource', + 'learning_content_admin_portlet', + 'RemoveSelfFromPage' + ); + + -- Drop the binding + foo := acs_sc_impl.del ( + 'portal_datasource', + 'learning_content_admin_portlet' + ); + + -- drop the impl + foo := acs_sc_impl.del ( + 'portal_datasource', + 'learning_content_admin_portlet' + ); + + return 0; +end; +/ +show errors + + Index: openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-portlet-drop.sql 5 Mar 2009 21:30:26 -0000 1.1 @@ -0,0 +1,119 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- learning-content-portlet-portlet-drop.sql +-- + +-- Deletes a portal datasource for the content portlet factory + +-- Copyright (C) 2001 MIT +-- @author Arjun Sanyal (arjun@openforce.net) + +-- $Id: learning-content-portlet-portlet-drop.sql,v 1.1 2009/03/05 21:30:26 rocaelh Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html + +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + begin + select datasource_id into ds_id + from portal_datasources + where name = 'learning_content_portlet'; + exception when no_data_found then + ds_id := null; + end; + + if ds_id is not null then + portal_datasource.del(ds_id); + end if; + +end; +\ +show errors + +declare + foo integer; +begin + + -- drop the hooks + foo := acs_sc_impl.delete_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'GetMyName' + ); + + foo := acs_sc_impl.delete_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'GetPrettyName' + ); + + + foo := acs_sc_impl.delete_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'Link' + ); + + foo := acs_sc_impl.delete_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'AddSelfToPage' + ); + + foo := acs_sc_impl.delete_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'Show' + ); + + foo := acs_sc_impl.delete_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'Edit' + ); + + foo := acs_sc_impl.delete_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'RemoveSelfFromPage' + ); + + -- Drop the binding + acs_sc_binding.del ( + 'portal_datasource', + 'learning_content_portlet' + ); + + -- drop the impl + foo := acs_sc_impl.del ( + 'portal_datasource', + 'learning_content_portlet' + ); + +end; +\ +show errors + + + + + Index: openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-portlet.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-portlet.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/sql/oracle/learning-content-portlet-portlet.sql 5 Mar 2009 21:30:26 -0000 1.1 @@ -0,0 +1,204 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- learning-content-portlet-portlet.sql +-- + +-- Creates a portal datasource for the content portlet factory + +-- Copyright (C) 2001 MIT +-- @author Arjun Sanyal (arjun@openforce.net) + +-- $Id: learning-content-portlet-portlet.sql,v 1.1 2009/03/05 21:30:26 rocaelh Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html + +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource.new( + name => 'learning_content_portlet', + description => 'Displays the content page as a portlet' + ); + + -- 4 defaults procs + + -- shadeable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shadeable_p', + value => 't' + ); + + -- shaded_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shaded_p', + value => 'f' + ); + + -- hideable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'hideable_p', + value => 't' + ); + + -- user_editable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'user_editable_p', + value => 'f' +); + + -- link_hideable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'link_hideable_p', + value => 't' +); + + + -- content-specific procs + + -- package_id must be configured + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 'f', + key => 'package_id', + value => '' +); + + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 'f', + key => 'page_name', + value => '' +); + +end; +\ +show errors + +declare + foo integer; +begin + + -- create the implementation + foo := acs_sc_impl.new ( + impl_contract_name => 'portal_datasource', + impl_name => 'learning_content_portlet', + impl_pretty_name => 'Content Portlet', + impl_owner_name => 'learning_content_portlet' + ); +end; +\ +show errors + +declare + foo integer; +begin + + -- add all the hooks + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'GetMyName', + 'learning_content_portlet::get_my_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'GetPrettyName', + 'learning_content_portlet::get_pretty_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'Link', + 'learning_content_portlet::link', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'AddSelfToPage', + 'learning_content_portlet::add_self_to_page', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'Show', + 'learning_content_portlet::show', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'Edit', + 'learning_content_portlet::edit', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'learning_content_portlet', + 'RemoveSelfFromPage', + 'learning_content_portlet::remove_self_from_page', + 'TCL' + ); + +end; +\ +show errors + +declare + foo integer; +begin + + -- Add the binding + acs_sc_binding.new ( + contract_name => 'portal_datasource', + impl_name => 'learning_content_portlet' + ); + + +end; +\ +show errors \ No newline at end of file Index: openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-admin-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-admin-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-admin-drop.sql 5 Mar 2009 21:30:26 -0000 1.1 @@ -0,0 +1,118 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- learning-content-portlet-admin-drop.sql +-- + +-- Deletes a portal datasource for the static portlet factory +-- (admin interface) + +-- Copyright (C) 2001 MIT +-- @author Arjun Sanyal (arjun@openforce.net) + +-- $Id: learning-content-portlet-admin-drop.sql,v 1.1 2009/03/05 21:30:26 rocaelh Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- + + + +create function inline_1() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + select datasource_id into ds_id + from portal_datasources + where name = ''learning_content_admin_portlet''; + + if not found then + RAISE EXCEPTION '' No datasource id found '', ds_id; + ds_id := null; + end if; + + if ds_id is NOT null then + perform portal_datasource__delete(ds_id); + end if; + + -- drop the hooks + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''GetMyName'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''GetPrettyName'' + ); + + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''Link'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''AddSelfToPage'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''Show'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''Edit'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''RemoveSelfFromPage'' + ); + + -- Drop the binding + perform acs_sc_binding__delete ( + ''portal_datasource'', + ''learning_content_admin_portlet'' + ); + + -- drop the impl + perform acs_sc_impl__delete ( + ''portal_datasource'', + ''learning_content_admin_portlet'' + ); + + return 0; +end;' language 'plpgsql'; + +select inline_1(); +drop function inline_1(); + Index: openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-admin.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-admin.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-admin.sql 5 Mar 2009 21:30:26 -0000 1.1 @@ -0,0 +1,190 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- learning-content-admin-portlet.sql +-- + +-- Creates a portal datasource for the content portlet factory +-- (admin interface) + +-- Copyright (C) 2001 MIT +-- @author Arjun Sanyal (arjun@openforce.net) + +-- $Id: learning-content-portlet-admin.sql,v 1.1 2009/03/05 21:30:26 rocaelh Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- + +create function inline_0() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource__new( + ''learning_content_admin_portlet'', -- name + ''Displays the admin interface for the content data portlets'' -- Description + ); + + -- 4 defaults procs + + -- shadeable_p + perform portal_datasource__set_def_param ( + ds_id, -- datasource_id + ''t'', -- config_required_p + ''t'', -- configured_p + ''shadeable_p'', -- key + ''f'' -- value +); + + -- shaded_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' +); + + -- hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' +); + + -- user_editable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' +); + + -- link_hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' +); + + + -- content-admin-specific procs + + -- package_id must be configured + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''f'', + ''package_id'', + '''' +); + return 0; +end;' language 'plpgsql'; + +select inline_0(); + +drop function inline_0(); + + +create function inline_1() +returns integer as ' +begin + -- create the implementation + perform acs_sc_impl__new ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''learning_content_admin_portlet'' + ); + + -- add all the hooks + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''GetMyName'', + ''learning_content_admin_portlet::get_my_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''GetPrettyName'', + ''learning_content_admin_portlet::get_pretty_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''Link'', + ''learning_content_admin_portlet::link'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''AddSelfToPage'', + ''learning_content_admin_portlet::add_self_to_page'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''Show'', + ''learning_content_admin_portlet::show'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''Edit'', + ''learning_content_admin_portlet::edit'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''learning_content_admin_portlet'', + ''RemoveSelfFromPage'', + ''learning_content_admin_portlet::remove_self_from_page'', + ''TCL'' + ); + + -- Add the binding + perform acs_sc_binding__new ( + ''portal_datasource'', -- contract_name + ''learning_content_admin_portlet'' -- impl_name + ); + + return 0; +end;' language 'plpgsql'; + +select inline_1(); + +drop function inline_1(); Index: openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-create.sql 5 Mar 2009 21:30:27 -0000 1.1 @@ -0,0 +1,20 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- +\i learning-content-portlet-portlet.sql +\i learning-content-portlet-admin.sql Index: openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-drop.sql 5 Mar 2009 21:30:27 -0000 1.1 @@ -0,0 +1,20 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- +\i learning-content-portlet-portlet-drop.sql +\i learning-content-portlet-admin-drop.sql Index: openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-portlet-drop.sql 5 Mar 2009 21:30:26 -0000 1.1 @@ -0,0 +1,121 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- learning-content-portlet-portlet-drop.sql +-- + +-- Deletes a portal datasource for the content portlet factory + +-- Copyright (C) 2001 MIT +-- @author Arjun Sanyal (arjun@openforce.net) + +-- $Id: learning-content-portlet-portlet-drop.sql,v 1.1 2009/03/05 21:30:26 rocaelh Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- + + + +create function inline_1() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + select datasource_id into ds_id + from portal_datasources + where name = ''learning_content_portlet''; + + if not found then + RAISE EXCEPTION '' No datasource id found '', ds_id; + ds_id := null; + end if; + + if ds_id is NOT null then + perform portal_datasource__delete(ds_id); + end if; + + -- drop the hooks + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''learning_content_portlet'', + ''GetMyName'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''learning_content_portlet'', + ''GetPrettyName'' + ); + + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''learning_content_portlet'', + ''Link'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''learning_content_portlet'', + ''AddSelfToPage'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''learning_content_portlet'', + ''Show'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''learning_content_portlet'', + ''Edit'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''learning_content_portlet'', + ''RemoveSelfFromPage'' + ); + + -- Drop the binding + perform acs_sc_binding__delete ( + ''portal_datasource'', + ''learning_content_portlet'' + ); + + -- drop the impl + perform acs_sc_impl__delete ( + ''portal_datasource'', + ''learning_content_portlet'' + ); + + return 0; +end;' language 'plpgsql'; + +select inline_1(); +drop function inline_1(); + + + + + Index: openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-portlet.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-portlet.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/sql/postgresql/learning-content-portlet-portlet.sql 5 Mar 2009 21:30:26 -0000 1.1 @@ -0,0 +1,201 @@ +-- +-- Copyright (C) 2001, 2002 MIT +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- learning-content-portlet-portlet.sql +-- + +-- Creates a portal datasource for the content portlet factory + +-- Copyright (C) 2001 MIT +-- @author Arjun Sanyal (arjun@openforce.net) + +-- $Id: learning-content-portlet-portlet.sql,v 1.1 2009/03/05 21:30:26 rocaelh Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- + + +create function inline_0() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource__new( + ''learning_content_portlet'', -- name + ''Displays an content page as a portlet'' -- description + ); + + -- 4 defaults procs + + -- shadeable_p + perform portal_datasource__set_def_param ( + ds_id, -- datasource_id + ''t'', -- config_required_p + ''t'', -- configured_p + ''shadeable_p'', -- key + ''t'' -- value + ); + + -- shaded_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' + ); + + -- hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' + ); + + -- user_editable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' +); + + -- link_hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' +); + + + -- content-specific procs + + -- package_id must be configured + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''f'', + ''package_id'', + '''' +); + + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''f'', + ''page_name'', + '''' +); + + return 0; +end;' language 'plpgsql'; + +select inline_0(); + +drop function inline_0(); + + +create function inline_1() +returns integer as ' +begin + + -- create the implementation + perform acs_sc_impl__new ( + ''portal_datasource'', + ''learning_content_portlet'', + ''learning_content_portlet'' + ); + + -- add all the hooks + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''learning_content_portlet'', + ''GetMyName'', + ''learning_content_portlet::get_my_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''learning_content_portlet'', + ''GetPrettyName'', + ''learning_content_portlet::get_pretty_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''learning_content_portlet'', + ''Link'', + ''learning_content_portlet::link'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''learning_content_portlet'', + ''AddSelfToPage'', + ''learning_content_portlet::add_self_to_page'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''learning_content_portlet'', + ''Show'', + ''learning_content_portlet::show'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''learning_content_portlet'', + ''Edit'', + ''learning_content_portlet::edit'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''learning_content_portlet'', + ''RemoveSelfFromPage'', + ''learning_content_portlet::remove_self_from_page'', + ''TCL'' + ); + + -- Add the binding + perform acs_sc_binding__new ( + ''portal_datasource'', -- contract_name + ''learning_content_portlet'' -- impl_name + ); + + + return 0; +end;' language 'plpgsql'; + +select inline_1(); + +drop function inline_1(); Index: openacs-4/packages/learning-content-portlet/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/tcl/apm-callback-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/tcl/apm-callback-procs.tcl 5 Mar 2009 21:30:26 -0000 1.1 @@ -0,0 +1,30 @@ +ad_library { + + @author Alvaro Rodriguez (alvaro@viaro.net) + @creation-date 2008-08-08 +} + +namespace eval learning-content-portlet::apm {} + +ad_proc -public learning-content-portlet::apm::package_mount { + {-package_id:required} + {-node_id:required} +} { + Check if packages needed are mounted, if not mount them! +} { + set package_parent_id [site_node::get_parent_id -node_id $node_id] + set package_community_id [site_node::get_object_id -node_id $package_parent_id] + set community_id [dotlrn_community::get_community_id -package_id $package_community_id] + set community_url [dotlrn_community::get_community_url $community_id] + + #check if assessment is mounted, if not mount it + set activity "assessment" + if {![site_node::exists_p -url "${community_url}${activity}" ]} { + dotlrn_community::add_applet_to_community $community_id dotlrn_assessment + } + #check if evaluation is mounted, if not mount it + set activity "evaluation" + if {![site_node::exists_p -url "${community_url}${activity}"]} { + dotlrn_community::add_applet_to_community $community_id dotlrn_evaluation + } +} Index: openacs-4/packages/learning-content-portlet/tcl/learning-content-admin-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/tcl/learning-content-admin-portlet-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/tcl/learning-content-admin-portlet-procs.tcl 5 Mar 2009 21:30:26 -0000 1.1 @@ -0,0 +1,68 @@ +ad_library { + + Procedures to support the content ADMIN portlet + + @author bhlr@galileo.edu + +} + +namespace eval learning_content_admin_portlet { + + ad_proc -private get_my_name { + } { + return "learning_content_admin_portlet" + } + + ad_proc -public get_pretty_name { + } { + return [parameter::get_from_package_key \ + -package_key [my_package_key] \ + -parameter admin_portlet_pretty_name] + } + + ad_proc -private my_package_key { + } { + return "learning-content-portlet" + } + + ad_proc -public link { + } { + return "" + } + + ad_proc -public add_self_to_page { + {-portal_id:required} + {-package_id:required} + } { + Adds a content admin PE to the given portal + } { + return [portal::add_element_parameters \ + -portal_id $portal_id \ + -portlet_name [get_my_name] \ + -key package_id \ + -value $package_id + ] + } + + ad_proc -public remove_self_from_page { + {-portal_id:required} + } { + Removes content PE from the given page + } { + # This is easy since there's one and only one instace_id + portal::remove_element \ + -portal_id $portal_id \ + -portlet_name [get_my_name] + } + + ad_proc -public show { + cf + } { + Display the PE + } { + portal::show_proc_helper \ + -package_key [my_package_key] \ + -config_list $cf \ + -template_src "learning-content-admin-portlet" + } +} Index: openacs-4/packages/learning-content-portlet/tcl/learning-content-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/tcl/learning-content-portlet-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/tcl/learning-content-portlet-procs.tcl 5 Mar 2009 21:30:26 -0000 1.1 @@ -0,0 +1,78 @@ +ad_library { + + Procedures to supports content portlets. + + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + @creation-date 2007-07-04 + @arch-tag: 16A7A29A-271C-49B1-8787-935755BF5583 + @cvs-id $Id: learning-content-portlet-procs.tcl,v 1.1 2009/03/05 21:30:26 rocaelh Exp $ +} + +namespace eval learning_content_portlet { + + ad_proc -private get_my_name { + } { + return "learning_content_portlet" + } + + ad_proc -public get_pretty_name { + } { + return [parameter::get_from_package_key \ + -package_key [my_package_key] \ + -parameter learning_content_portlet_pretty_name] + } + + ad_proc -private my_package_key { + } { + return "learning-content-portlet" + } + + ad_proc -public link { + } { + return "" + } + + ad_proc -public add_self_to_page { + {-portal_id:required} + {-package_id:required} + {-param_action:required} + {-force_region ""} + {-page_name "" } + } { + Adds a static PE to the given page + } { + # Don't call me. Use static_portal_content:: instead" + return [portal::add_element_parameters \ + -portal_id $portal_id \ + -portlet_name [get_my_name] \ + -value $package_id \ + -force_region [parameter::get_from_package_key -package_key [my_package_key] -parameter content_portal_force_region] \ + -page_name [parameter::get_from_package_key -package_key [my_package_key] -parameter content_portal_page_name] \ + -pretty_name [get_pretty_name] \ + -param_action $param_action] + } + + ad_proc -public remove_self_from_page { + {-portal_id:required} + {-package_id:required} + } { + Removes static PE from the given page + } { + # This is easy since there's one and only one instace_id + portal::remove_element_parameters \ + -portal_id $portal_id \ + -portlet_name [get_my_name] \ + -value $package_id + } + + ad_proc -public show { + cf + } { + } { + portal::show_proc_helper \ + -package_key [my_package_key] \ + -config_list $cf \ + -template_src "learning-content-portlet" + } +} + Index: openacs-4/packages/learning-content-portlet/www/index-page.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/index-page.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/www/index-page.adp 5 Mar 2009 21:30:27 -0000 1.1 @@ -0,0 +1,17 @@ + +

    +#learning-content.welcome# +

    +

    +#learning-content.welcome_body# +

    +
    Editar pagina de Header
    +
    + +

    +#learning-content.e_welcome# +

    +

    +#learning-content.e_welcome_body# +

    +
    \ No newline at end of file Index: openacs-4/packages/learning-content-portlet/www/index-page.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/index-page.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/www/index-page.tcl 5 Mar 2009 21:30:27 -0000 1.1 @@ -0,0 +1,12 @@ +ad_page_contract { + page_id:optional + content_id:optional + @author byron Haroldo Linares Roman (bhlr@byronLs-Computer.local) + @creation-date 2007-07-25 +} +set wiki_url "[ad_conn package_url]" +set user_id [ad_conn user_id] +set admin_p [dotlrn::user_can_admin_community_p -user_id $user_id \ + -community_id [dotlrn_community::get_community_id]] +set headerurl "${wiki_url}header_page" + Index: openacs-4/packages/learning-content-portlet/www/learning-content-admin-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/learning-content-admin-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/www/learning-content-admin-portlet.adp 5 Mar 2009 21:30:27 -0000 1.1 @@ -0,0 +1,8 @@ + +
      +
    • #learning-content.go_to# #learning-content.content#
    • +
    • #learning-content.edit_content_index#
    • +
    • #learning-content.admin_content_options#

    • + + No community specified + Index: openacs-4/packages/learning-content-portlet/www/learning-content-admin-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/learning-content-admin-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/www/learning-content-admin-portlet.tcl 5 Mar 2009 21:30:27 -0000 1.1 @@ -0,0 +1,29 @@ +ad_page_contract { + The display logic for the content admin portlet + @author Byron Linares bhlr@galileo.edu +} { + package_id:optional + template_portal_id:optional + referer:optional + return_url:optional +} + +if {![exists_and_not_null package_id]} { + set package_id [dotlrn_community::get_community_id] +} + +if { $package_id ne "" } { + + if {![exists_and_not_null template_portal_id]} { + set template_portal_id [dotlrn_community::get_portal_id] + } + + set element_pretty_name [parameter::get \ + -parameter admin_portlet_element_pretty_name \ + -default [_ learning-content.admin_portlet_element_pretty_name]] + + array set config $cf + + set applet_url [apm_package_url_from_id $config(package_id)] + +} Index: openacs-4/packages/learning-content-portlet/www/learning-content-admin-portlet.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/learning-content-admin-portlet.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/www/learning-content-admin-portlet.xql 5 Mar 2009 21:30:27 -0000 1.1 @@ -0,0 +1,86 @@ + + + + + + + + + select instance_name, package_id from apm_packages where package_id in ( + select distinct ppm.object_id + from acs_object_party_privilege_map ppm, parties pr, site_nodes s + where ppm.object_id in ( + select object_id from site_nodes + where parent_id in ( + select node_id from site_nodes where name in ('clubs'))) + and pr.party_id = ppm.party_id + and pr.party_id = :user_id + and ppm.privilege = 'admin') + + + + + + + select instance_name, package_id from apm_packages where package_id in ( + select distinct ppm.object_id + from acs_object_party_privilege_map ppm, parties pr, site_nodes s + where ppm.object_id in ( + select object_id from site_nodes + where parent_id in ( + select node_id from site_nodes where name in ('classes'))) + and pr.party_id = ppm.party_id + and pr.party_id = :user_id + and ppm.privilege = 'admin') + + + + + + + select instance_name, package_id from apm_packages where package_id in ( + select distinct ppm.object_id + from acs_object_party_privilege_map ppm, parties pr, site_nodes s + where ppm.object_id in ( + select object_id from site_nodes + where parent_id in ( + select node_id from site_nodes where object_id = :dep_id )) + and pr.party_id = ppm.party_id + and pr.party_id = :user_id + and ppm.privilege = 'admin') + + + + + + + + select instance_name, package_id from apm_packages where package_id in ( + select distinct ppm.object_id + from acs_object_party_privilege_map ppm, parties pr, site_nodes s + where ppm.object_id in ( + select object_id from site_nodes + where parent_id in ( + select node_id from site_nodes where object_id = :cl_id )) + and pr.party_id = ppm.party_id + and pr.party_id = :user_id + and ppm.privilege = 'admin') + + + + + + + + select m.element_id, m.pretty_name, pep.value as name + from portal_element_map m, portal_pages p, portal_element_parameters pep + where m.page_id = p.page_id + and p.portal_id = $template_portal_id + and m.datasource_id = [portal::get_datasource_id [learning_content_portlet::get_my_name]] + and pep.element_id = m.element_id and pep.key = 'page_name' + + + + + + Index: openacs-4/packages/learning-content-portlet/www/learning-content-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/learning-content-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/www/learning-content-portlet.adp 5 Mar 2009 21:30:27 -0000 1.1 @@ -0,0 +1 @@ + Index: openacs-4/packages/learning-content-portlet/www/learning-content-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/learning-content-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/www/learning-content-portlet.tcl 5 Mar 2009 21:30:27 -0000 1.1 @@ -0,0 +1,9 @@ +array set config $cf +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set community_id [dotlrn_community::get_community_id] + +set content_url [site_node::get_url_from_object_id -object_id $config(package_id)] + +set url "${content_url}categories" + Index: openacs-4/packages/learning-content-portlet/www/resources/images/Thumbs.db =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/Thumbs.db,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/www/resources/images/Thumbs.db 5 Mar 2009 21:30:28 -0000 1.1 @@ -0,0 +1,259 @@ +��ࡱ�>�� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������  + +(" !#,$%&')����*+-������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Root Entry�������� `tM��^�G1�������������2���������3����� + +�������� !"#$%&'()����+,-./01234����6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV����XYZ[\]�_`abcdefghij�����mnopqrstuvw����yz{|}~� z����JFIF``��C + + + + +  ��C   + +��`D"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�����ޝ��M}����7������e��얕�W�����-��*<�������ɏ�y��G���_ʀ?������������&?�濕L��*�^������a�&�h|����Ty1��Q�P���q���~/^�����x�SO��AE}�����)�� ��I���˥�}W\�Ï +i��m4m6�K�{�)��0�X�-�� +?*��#.etEU�QER����~7|Y(~2�Iˁ�N����䢿E�>�;TԵ��� �wWS�גI4����Ē}���1N��tT�������qkN�X�ǹ��?��պ� +��(�(��))iz�t;PN�zgQ�?���m�j_`u��<��CEq�I����/��� +���a���ARW`Š(��(����@Z2b+�:�L��EX�#������EZA��Z} �-QEQEQHz��v�'�t��O��[���f��8���AKҀ�(��(��)��Ҁ5O���@�� �����JFIF``��C + + + + +  ��C   + +��`"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�N�G�K�������Q�}���������ǿƊ���h�3�����y?�,���ɥ��R���.�K�A�h� +(��L:ϳ?�߰���X����Ey>ޯrn\�h�^]��c�� z����JFIF``��C + + + + +  ��C   + +�� + +"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�Ί(���?�� �����JFIF``��C + + + + +  ��C   + +��`"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz����������������������������������������������������4������������*�5����5w6������������l�7����x������������������������ + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?��*�]������Qn.�r�Q^��v�z(�z�B�z���ڊ+�h"�=j�TQ_C@���V㢊�h�#�� k����JFIF``��C + + + + +  ��C   + +��M`"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?��񎝧�v�I�JD����+���3�v�X��y +��u�F�gy�b.�F{g��N�q�J~�#?�4�k�9\�d,s��q���?j�U>��i�cm�ݩ縭Z�+S�J� +B��%s���$�+����t�3Ny�O6��p~Q�m�\x_Ҁ2�1��L� +�� �w�Ȋ��Ң��$1���m�3O2����QQ����Ӱ��-��� lS���;��t�\�,E�s�J�Ѯ�a�\ WE|��lA5_E�%'���(�|D��� ���[�J�W��dЁ��9�@A�*����7˻?�qz�Ҽ� ՘m���������r�Y ���˝�A�r�#|�-�J|�����V�X�!71 +��@����o��(�m�s%��W�B3��П ���7j�t���A*����H܏\q���մm^F��%ie,#E�.VO-��8~>�9� {x"���&�/�6O�^��/��� (Ȉ�2�8�U� �x=5$� +�Cq|����R��R␣J�c +�����8��fM�2���q����Z�.|���<�6؅Y�%Gِ� +ĩ"D888`j /�����Dm�9S��r�E��0�����y�sw:��E����0H�5��^]-���c����Y��)#��Z]�@�����M.��%����vA+�GQ�+���K ]����Kg�@���3[�R(�Lq+� +E bs��/���9��juY��X'�dͬyf�����n}�/{;��\/�n NӌP��s������52d �3g��̣���:`���U�_Y��%{����1��#�Rs�y<���zOę<8T����z?��Il:�㡠B�m��2���$d��ё�>��?���Z��}4�ב�,�D��}���v�۟\�V���ێH� +R)'���:���γy�"�e�!h�cY# +�B�B_���9���#kw����3\+#y��I+)�{s� o�8��t��$g��i�.y^��[W���u@��<�T�U*K�͜�{�#�v�Ͳ��� +��y���z��ڇ��2rk���������8�h�� ��$yߝli~*��K ,1�+��f��ݷ������f�OfRs\�Ï�7~�O!��c����]1���-�n�N3@�? +n������ֆ��D/2k��a����J��X�f=3@�:��8�b����N5zxi��nW��^�� +�Ƹ��N+ +����WC�\�ũ +�R��!vȠ�ٖ���mM��``$d@� t�topr.jpg 0� + t�bg.jpg$�A(�s�gbox.gif(`�+ +t�lrline.gif"��)��pic.jpg(�Q� +t�rlline.gif,�4� t�trcorner.gif*d>� 2�sitemap.gif* ^�� 2�contact.gif$ +�!2�home.gif" {I�}�bg2.jpg" q���� ����JFIF``��C + + + + +  ��C   + +�� + "�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?��L�5�F�X2����ͼ��V� e�DKy ��b����( 7�N�ᆯ�j���u?�i-����Ʊ��� ��O��IdVʜ���j�����\xsI�y\�$�X���NKW$��kGJ�4�ݭ�� ]:s#Ei +ĥ���3�(��H����_�H��X'�<��یD?S\���j�y���I���c�  ����JFIF``��C + �����JFIF``��C + + + + +  ��C   + +��`"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�O~�VJ(�Z�e9z�=W�\͔'�k:~��+�1L͟�����E|� ř���w�����L�-W?��E��r��������������������������������������������������������������������������������������������������������������������������������������������������������������� �����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?w�ߏ����o���SV������(�/u�GL�L`����G�x���R�rz�Z�H�Ӌwh�� ����JFIF``��C + + + + +  ��C   + +�� +"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdef8�������������9 +����^01���� ����kCatalog������������W@ghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?���׏��������t�J[��k�bM�!]�\��]�w@��Ub=��1��S�P��^i�f���X�H�h9>[��$u�:��W� �7��>�f�\�i�{:叝� ?ʧ��W +|�ȭ]��n�{we�=�y$�w�C17K#a@c@�� + + + +  ��C   + +�� +"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?���s �kz����e�ٺi��I�5��h ��n���H]1%� (+�����t5=3YT��I�[W�`c��k"���k���ܟ��š��}�W7��R=����w�F��y%�$�rc� � �z���t ?�p�k7�D�|�qs$��S%�fo��:�����\xsI�y\�$�X���NKW$��kGJ�4�ݭ�� ]:s#E ����JFIF``��C + + + + +  ��C   + +��`"�� + ���}!1A11���������21����������31�������������41 +����������Qa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�O�~�U/4��\�� +o�TW���Լ�� ���W���>[�?���������M�5�C������𯔟�_ʊ��D���������q���E?�~z����֢�O:ϡ����k�y_Ί���@.y#Ҋ���(��d��� �����JFIF``��C + + + + +  ��C   + +��`"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�:�K��hQ_9�H�<�S��i?�Ey��4'����o�o� ���?����y��}��h����=c��wM�������U������ߝ&�j+��6.yb��`���/fQ��bg3.jpg$ +Ӿ9��logo.png*w ����JFIF``��C + + + + +  ��C   + +��!!"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�S���8��C�� k�?����T/���]ߟ��x�F&�)`0r�v����D��韲׎|q�ᔚ�� +6M+]mFx��K��۳�͎O'9�`���}��U>)��?�^&���� +«��r7���IU��P0���R>��W�x7�v^8𶗯iō��Ί�ܙ�c���>⹱Xy�*�J2�>϶�y�������9J=__4��4QEyǦ|�� �uƻ�SN��2a��rG�A*�E����f�����&�� ��ͽ����D��I�-|�I� G\:�pz|�Ё�z�a�m�H�-c��o�{k�i�RX��~�����o����]��#�My��7X��r�g��m�D���z�=}�3���}Rr�w�{?#�q�����~��%i%��������v�߉4Y���~1�.�%�������,琇���)�π=I����O�_�:��E���ߺT�Ĵ�s�;����~���a�Cᤚǎ4��u��&�kQe-�#@�I�B[��s�ڽz���N?W����{���%��e�J0�h��kEkY7w�op��+�=���(��(��(�� �����JFIF``��C + + + + +  ��C   + +��`"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�E��+S Ȣ�4?��2�� @����Š�?�q�������?�ϊ?�5?����'�(�o�}M���?����q�aR���� Q_����? ��/����j+叧>��[4V�FwbQE��� %����JFIF``��C + 51�����161�������������71�����'81������������H + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?��t��OԼEp�i�����*�<�1������|5�G��P�F�d]+P:v����1�0Ʋ/'�b8=���E�� +i�p�Xx�O��H���}���'`�L� �`pH�d�e����Z&�q���SU�ob1����E�C�U�:��ڵe�����_��.�}�K~?����  ����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?��.�� +& `!�co  +   +����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ntrol_play_blue.pngBVa`!�control_rewind_blue.png&M'`!�ho <����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�?�o�]O���~�d� ����S�?6���S����~_�O��g�o�O�C�y<�D\u �L��y—���1�H~��>���=N��ű�w��(�Ժ�Vn�v�}�;K�i��L!x�n�v�3�]�/�/~4*'��U|���m�������a��/'��5��_����use.png.��AL"�trcorner2.gif �����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���91 �����������������������������������������w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?��w�6z��ږV����(��>���tQEw�2�Ҋ�*h�2�Y��'9CW����� \ No newline at end of file Index: openacs-4/packages/learning-content-portlet/www/resources/images/accept.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/accept.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/apply.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/apply.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/apply.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/apply.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/arrow.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/arrow.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/bg.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/bg.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/bg2.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/bg2.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/bg2blue.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/bg2blue.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/bg2blue2.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/bg2blue2.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/bg2blue2menu.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/bg2blue2menu.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/bg2blue2submenu.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/bg2blue2submenu.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/bg2blue2title.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/bg2blue2title.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/bg2blue2title2.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/bg2blue2title2.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/bg2blue2title2b.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/bg2blue2title2b.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/bg3.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/bg3.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/bkbar1.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/bkbar1.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/contact.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/contact.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/control_down_blue.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/control_down_blue.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/control_fastforward_blue.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/control_fastforward_blue.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/control_play_blue.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/control_play_blue.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/control_rewind_blue.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/control_rewind_blue.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/control_up_blue.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/control_up_blue.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/flecha.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/flecha.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/flecha2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/flecha2.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/grey_arrow.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/grey_arrow.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/home.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/home.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/home_new_28.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/home_new_28.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/home_new_28.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/home_new_28.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/house.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/house.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/iserror.log =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/iserror.log,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/learning-content-portlet/www/resources/images/iserror.log 5 Mar 2009 21:30:29 -0000 1.1 @@ -0,0 +1,218 @@ + Initializing .... + +Total memory allocated = 5448052 + Begin Printing Seed information + +Seed point: 3 3 Path 0 0 User path -1 -1 -1 + +--------------------- + +Print path: + + + +[3 3] + + Begin Printing Seed information + +Seed point: 3 3 Path 0 1 User path 0 74 0 + +Seed point: 3 4 Path 2 2 User path 74 74 74 + +--------------------- + +Print path: + + + +[3 3] [3 4] [3 4] + + Begin Printing Seed information + +Seed point: 3 3 Path 0 1 User path 0 74 0 + +Seed point: 3 4 Path 2 3 User path 74 88 74 + +Seed point: 4 4 Path 4 4 User path 88 88 88 + +--------------------- + +Print path: + + + +[3 3] [3 4] [3 4] [4 4] [4 4] + + Begin Printing Seed information + +Seed point: 3 3 Path 0 1 User path 0 74 0 + +Seed point: 3 4 Path 2 3 User path 74 88 74 + +Seed point: 4 4 Path 4 5 User path 88 104 88 + +Seed point: 4 5 Path 6 6 User path 104 104 104 + +--------------------- + +Print path: + + + +[3 3] [3 4] [3 4] [4 4] [4 4] [4 5] [4 5] + + Begin Printing Seed information + +Seed point: 3 3 Path 0 1 User path 0 74 0 + +Seed point: 3 4 Path 2 3 User path 74 88 74 + +Seed point: 4 4 Path 4 5 User path 88 104 88 + +Seed point: 4 5 Path 6 7 User path 104 119 104 + +Seed point: 3 5 Path 8 8 User path 119 119 119 + +--------------------- + +Print path: + + + +[3 3] [3 4] [3 4] [4 4] [4 4] [4 5] [4 5] +[3 5] [3 5] + + Begin Printing Seed information + +Seed point: 3 3 Path 0 1 User path 0 74 0 + +Seed point: 3 4 Path 2 3 User path 74 88 74 + +Seed point: 4 4 Path 4 5 User path 88 104 88 + +Seed point: 4 5 Path 6 7 User path 104 119 104 + +Seed point: 3 5 Path 8 9 User path 119 125 119 + +Seed point: 3 4 Path 10 10 User path 125 125 125 + +--------------------- + +Print path: + + + +[3 3] [3 4] [3 4] [4 4] [4 4] [4 5] [4 5] +[3 5] [3 5] [3 4] [3 4] + + Begin Printing Seed information + +Seed point: 3 3 Path 0 1 User path 0 74 0 + +Seed point: 3 4 Path 2 3 User path 74 88 74 + +Seed point: 4 4 Path 4 5 User path 88 104 88 + +Seed point: 4 5 Path 6 7 User path 104 119 104 + +Seed point: 3 5 Path 8 9 User path 119 125 119 + +Seed point: 3 4 Path 10 10 User path 125 174 125 + +Seed point: 3 4 Path 11 11 User path 174 174 174 + +--------------------- + +Print path: + + + +[3 3] [3 4] [3 4] [4 4] [4 4] [4 5] [4 5] +[3 5] [3 5] [3 4] [3 4] [3 4] + + Begin Printing Seed information + +Seed point: 3 3 Path 0 1 User path 0 74 0 + +Seed point: 3 4 Path 2 3 User path 74 88 74 + +Seed point: 4 4 Path 4 5 User path 88 104 88 + +Seed point: 4 5 Path 6 7 User path 104 119 104 + +Seed point: 3 5 Path 8 9 User path 119 125 119 + +Seed point: 3 4 Path 10 10 User path 125 174 125 + +Seed point: 3 4 Path 11 11 User path 174 176 174 + +Seed point: 3 4 Path 12 12 User path 176 176 176 + +--------------------- + +Print path: + + + +[3 3] [3 4] [3 4] [4 4] [4 4] [4 5] [4 5] +[3 5] [3 5] [3 4] [3 4] [3 4] [3 4] + +User path + + +[3 3] [3 3] [3 4] [3 4] [3 4] [3 5] [3 5] +[3 5] [3 5] [3 5] [3 5] [3 5] [3 5] [3 5] +[3 5] [3 5] [3 5] [3 5] [3 5] [3 5] [3 5] +[3 5] [3 5] [3 5] [3 5] [3 5] [3 5] [3 5] +[3 5] [3 5] [3 5] [3 5] [3 5] [3 5] [3 5] +[3 5] [3 5] [3 5] [3 5] [3 5] [3 5] [3 5] +[3 5] [3 5] [3 5] [3 5] [3 4] [3 4] [3 4] +[3 4] [3 4] [3 4] [3 4] [3 4] [3 4] [3 4] +[3 4] [3 4] [3 4] [3 4] [3 4] [3 4] [3 4] +[3 4] [3 4] [3 4] [3 4] [3 4] [3 4] [3 4] +[3 4] [3 4] [3 4] [3 4] [3 4] [3 4] [3 4] +[3 4] [3 4] [3 4] [3 4] [3 4] [4 4] [4 4] +[4 4] [4 4] [4 4] [4 4] [4 4] [4 4] [3 4] +[3 4] [3 5] [3 5] [3 5] [3 5] [3 5] [3 5] +[3 5] [4 5] [4 5] [4 5] [4 5] [4 5] [4 5] +[4 5] [4 5] [4 5] [4 5] [4 5] [3 5] [3 5] +[3 5] [3 5] [3 5] [3 5] [3 5] [3 5] [3 5] +[3 5] [3 5] [3 5] [3 5] [3 5] [3 4] [3 4] +[3 4] [3 4] [3 4] [3 4] [3 4] [3 4] [3 4] +[3 4] [3 4] [3 4] [3 4] [3 4] [3 4] [3 4] +[3 4] [3 3] [3 3] [3 3] [3 3] [3 3] [3 3] +[3 3] [3 3] [3 3] [3 3] [3 3] [3 3] [3 3] +[3 3] [3 3] [3 3] [3 3] [3 3] [3 3] [3 3] +[3 3] [3 3] [3 3] [3 3] [3 3] [3 3] [3 3] +[3 3] [3 3] [3 3] [3 3] [3 4] [3 4] [3 4] +[3 4] [3 4] [3 4] + + Begin Printing Seed information + +Seed point: 3 3 Path 0 1 User path 0 74 0 + +Seed point: 3 4 Path 2 3 User path 74 88 74 + +Seed point: 4 4 Path 4 5 User path 88 104 88 + +Seed point: 4 5 Path 6 7 User path 104 119 104 + +Seed point: 3 5 Path 8 9 User path 119 125 119 + +Seed point: 3 4 Path 10 10 User path 125 174 125 + +Seed point: 3 4 Path 11 11 User path 174 176 174 + +Seed point: 3 4 Path 12 12 User path 176 178 176 + +Seed point: 3 4 Path 13 13 User path 178 178 178 + +--------------------- + +Print path: + + + +[3 3] [3 4] [3 4] [4 4] [4 4] [4 5] [4 5] +[3 5] [3 5] [3 4] [3 4] [3 4] [3 4] [3 4] + Index: openacs-4/packages/learning-content-portlet/www/resources/images/left_new_22.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/left_new_22.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/left_new_28.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/left_new_28.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/left_new_28.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/left_new_28.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/left_new_28_full.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/left_new_28_full.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/logo.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/logo.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/lrline.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/lrline.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/right_blue.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/right_blue.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/right_new_22.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/right_new_22.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/right_new_28.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/right_new_28.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/right_new_28.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/right_new_28.png,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/right_new_28_full.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/right_new_28_full.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/rlline.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/rlline.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/sel_left.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/sel_left.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/sel_left2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/sel_left2.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/sel_middle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/sel_middle.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/sel_middle2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/sel_middle2.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/sel_right.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/sel_right.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/sel_right2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/sel_right2.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/sitemap.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/sitemap.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/submenu-arrow.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/submenu-arrow.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/submenu-arrow2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/submenu-arrow2.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/topr.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/topr.jpg,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/trcorner.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/trcorner.gif,v diff -u Binary files differ Index: openacs-4/packages/learning-content-portlet/www/resources/images/trcorner2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/learning-content-portlet/www/resources/images/trcorner2.gif,v diff -u Binary files differ