Index: openacs-4/packages/curriculum/lib/admin-curriculums-tab.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/lib/admin-curriculums-tab.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/curriculum/lib/admin-curriculums-tab.adp 13 Jun 2003 11:44:33 -0000 1.1
@@ -0,0 +1,9 @@
+
+
+
Index: openacs-4/packages/curriculum/lib/admin-curriculums-tab.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/lib/admin-curriculums-tab.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/curriculum/lib/admin-curriculums-tab.tcl 13 Jun 2003 11:44:33 -0000 1.1
@@ -0,0 +1,32 @@
+ad_page_contract {
+
+ Curriculum admin page tabbed.
+
+ @author Ola Hansson (ola@polyxena.net)
+ @creation-date 2003-06-11
+ @cvs-id $Id: admin-curriculums-tab.tcl,v 1.1 2003/06/13 11:44:33 olah Exp $
+
+} {
+} -properties {
+ title:onevalue
+ context:onevalue
+}
+
+set title "Curriculum"
+set context {}
+
+# Create the tab strip that filters curriculums by workflow state.
+template::tabstrip create states -base_url [ad_conn url]
+
+# Workflow.
+set workflow_id [curriculum::get_instance_workflow_id]
+
+array set state_data [workflow::state::fsm::get_all_info -workflow_id $workflow_id]
+
+foreach state_id $state_data(state_ids) {
+ array set state $state_data($state_id)
+ template::tabstrip add_tab states $state(state_id) $state(pretty_name) $state(short_name)
+}
+template::tabstrip add_tab states any "Any" any
+
+ad_return_template
Index: openacs-4/packages/curriculum/lib/admin-curriculums.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/lib/admin-curriculums.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/curriculum/lib/admin-curriculums.adp 10 Jun 2003 09:28:29 -0000 1.3
+++ openacs-4/packages/curriculum/lib/admin-curriculums.adp 13 Jun 2003 11:44:33 -0000 1.4
@@ -39,7 +39,7 @@
[WF Actions]
-
+
|
@@ -84,7 +84,7 @@
|
Enable
-
+
|
Index: openacs-4/packages/curriculum/lib/admin-curriculums.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/lib/admin-curriculums.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/curriculum/lib/admin-curriculums.tcl 3 Jun 2003 10:21:50 -0000 1.1
+++ openacs-4/packages/curriculum/lib/admin-curriculums.tcl 13 Jun 2003 11:44:33 -0000 1.2
@@ -9,17 +9,16 @@
} {
} -properties {
state_id:onevalue
+ workflow_id:onevalue
}
# state_id is an integer or the string "any", provided as an property.
+# workflow_id. Get this from an property, also.
# Scoping.
set package_id [curriculum::conn package_id]
permission::require_permission -object_id $package_id -privilege admin
-# Workflow.
-set workflow_id [curriculum::get_instance_workflow_id]
-
# We might need this if we want to present statistics, see bug-tracker (we need it for this page, too).
set initial_state_id [workflow::fsm::get_initial_state -workflow_id $workflow_id]
Index: openacs-4/packages/curriculum/lib/user-curriculums.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/lib/user-curriculums.adp,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/curriculum/lib/user-curriculums.adp 10 Jun 2003 09:28:29 -0000 1.5
+++ openacs-4/packages/curriculum/lib/user-curriculums.adp 13 Jun 2003 11:44:33 -0000 1.6
@@ -1,10 +1,10 @@
[
- Refresh all curriculums
+ Refresh all curriculums
|
- Remove all curriculums
+ Remove all curriculums
]
@@ -16,12 +16,12 @@
Options |
-
+
- @elements.curriculum_name@
+ @elements.curriculum_name@
|
@elements.curriculum_desc@ |
@@ -31,19 +31,19 @@
|
- Retake
+ Retake
- Resume
+ Resume
CompletedOngoing
|
- Refresh
+ Refresh
|
-
+
RemoveDrop
@@ -52,7 +52,7 @@
CompletedOngoing
|
- Refresh
+ Refresh
|
@@ -65,7 +65,7 @@
- @elements.element_name@
+ @elements.element_name@
|
@elements.element_desc;noquote@ |
@@ -75,7 +75,7 @@
-
+
Revisit
@@ -84,7 +84,7 @@
|
-
+
Visit
@@ -102,11 +102,10 @@
|
-
-
+
No published curriculums
-
+
Index: openacs-4/packages/curriculum/lib/user-curriculums.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/lib/user-curriculums.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/curriculum/lib/user-curriculums.tcl 10 Jun 2003 09:28:29 -0000 1.2
+++ openacs-4/packages/curriculum/lib/user-curriculums.tcl 13 Jun 2003 11:44:33 -0000 1.3
@@ -11,16 +11,18 @@
logged_in_p:onevalue
}
+set package_id [curriculum::conn package_id]
+
set logged_in_p [ad_conn user_id]
-#set curriculum_count [curriculum::conn -nocache curriculum_count]
-
# Upvar the "elements" multirow datasource for the curriculum bar.
-curriculum::get_bar -bar_p 0
+curriculum::get_bar -bar_p 0 -package_id $package_id
-set package_id [curriculum::conn package_id]
-
# Top, bottom, left, right.
set position [parameter::get -package_id $package_id -parameter ExternalSiteBarPosition -default bottom]
+# Prefix relevant urls with @url@ and they'll work when d
+# into the dotLRN portlet.
+set url [lindex [site_node::get_url_from_object_id -object_id $package_id] 0]
+
ad_return_template
Index: openacs-4/packages/curriculum/tcl/misc-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/tcl/misc-procs.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/curriculum/tcl/misc-procs.tcl 10 Jun 2003 09:29:49 -0000 1.4
+++ openacs-4/packages/curriculum/tcl/misc-procs.tcl 13 Jun 2003 11:44:33 -0000 1.5
@@ -49,7 +49,7 @@
# "ad_conn subsite_id" does not work when called from within a filter
# (which we do for the curriculum bar), so we use the following instead.
- return [site_node_closest_ancestor_package acs-subsite]
+ return [site_node_closest_ancestor_package [list dotlrn acs-subsite]]
}
package_id -
package_url -
@@ -350,11 +350,14 @@
# FIXME. Integrate with "enabled_elements" above?
ad_proc -private curriculum::user_elements {
+ {-package_id ""}
} {
Not meant to be cached.
} {
- set package_id [conn package_id]
-
+ if { [empty_string_p $package_id] } {
+ set package_id [conn package_id]
+ }
+
set workflow_id [curriculum::get_instance_workflow_id -package_id $package_id]
# We need to get elements of published curriculums.
@@ -453,18 +456,18 @@
ad_proc -private curriculum::get_bar_internal {
-bar_p:required
- {-package_id ""}
+ -package_id:required
cookie_value
} {
if { $bar_p } {
# Get the cached curriculum list for the bar.
- set rows [enabled_elements_memoized]
+ set rows [enabled_elements_memoized -package_id $package_id]
} else {
# Get the NOT cached curriculum list for index page use.
- set rows [user_elements]
+ set rows [user_elements -package_id $package_id]
}
Index: openacs-4/packages/curriculum/www/add-to-bar.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/www/add-to-bar.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/curriculum/www/add-to-bar.tcl 6 Jun 2003 13:58:35 -0000 1.2
+++ openacs-4/packages/curriculum/www/add-to-bar.tcl 13 Jun 2003 11:44:33 -0000 1.3
@@ -13,7 +13,7 @@
}
if { [info exists refresh_p] } {
- set return_url "start-over?[ad_conn extra_url]"
+ set return_url "start-over?[export_vars -url curriculum_id]"
}
set package_id [curriculum::conn package_id]
Index: openacs-4/packages/curriculum/www/start-over.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/www/start-over.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/curriculum/www/start-over.tcl 3 Jun 2003 10:40:53 -0000 1.1
+++ openacs-4/packages/curriculum/www/start-over.tcl 13 Jun 2003 11:44:33 -0000 1.2
@@ -16,10 +16,14 @@
if { [info exists curriculum_id] } {
set new_cookie [curriculum::curriculum_progress_cookie_value \
-package_id $package_id reset_one_curriculum $curriculum_id]
+
set extra_where_clause { and curriculum_id = :curriculum_id }
+
} else {
+
set new_cookie [curriculum::curriculum_progress_cookie_value \
-package_id $package_id]
+
set extra_where_clause {}
}
Index: openacs-4/packages/curriculum/www/admin/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/www/admin/index.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/curriculum/www/admin/index.adp 4 Jun 2003 16:43:24 -0000 1.2
+++ openacs-4/packages/curriculum/www/admin/index.adp 13 Jun 2003 11:44:34 -0000 1.3
@@ -2,12 +2,4 @@
@title@
@context@
-
-
-
+
Index: openacs-4/packages/curriculum/www/admin/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/www/admin/index.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/curriculum/www/admin/index.tcl 3 Jun 2003 10:32:38 -0000 1.1
+++ openacs-4/packages/curriculum/www/admin/index.tcl 13 Jun 2003 11:44:34 -0000 1.2
@@ -15,19 +15,4 @@
set title "Curriculum"
set context {}
-# Create the tab strip that filters curriculums by workflow state.
-set url [ad_conn url]
-
-template::tabstrip create states -base_url $url
-
-set workflow_id [curriculum::get_instance_workflow_id]
-array set state_data [workflow::state::fsm::get_all_info -workflow_id $workflow_id]
-
-foreach state_id $state_data(state_ids) {
- array set state $state_data($state_id)
- template::tabstrip add_tab states $state(state_id) $state(pretty_name) $state(short_name)
-}
-
-template::tabstrip add_tab states any "Any" any
-
ad_return_template