Index: openacs-4/packages/curriculum-central/curriculum-central.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/curriculum-central.info,v diff -u -r1.12 -r1.13 --- openacs-4/packages/curriculum-central/curriculum-central.info 15 Mar 2006 11:32:14 -0000 1.12 +++ openacs-4/packages/curriculum-central/curriculum-central.info 2 Apr 2006 02:06:05 -0000 1.13 @@ -14,7 +14,7 @@ Curriculum Central is an application for managing subjects comprising a course of study in a School or University. The application will allow academic staff to collaborate on course syllabus and rubrics, which can then be conveyed to students using course maps. 0 - + @@ -23,15 +23,16 @@ - - + + + Index: openacs-4/packages/curriculum-central/catalog/curriculum-central.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/catalog/curriculum-central.en_US.ISO-8859-1.xml,v diff -u -r1.46 -r1.47 --- openacs-4/packages/curriculum-central/catalog/curriculum-central.en_US.ISO-8859-1.xml 23 Feb 2006 08:29:54 -0000 1.46 +++ openacs-4/packages/curriculum-central/catalog/curriculum-central.en_US.ISO-8859-1.xml 2 Apr 2006 02:06:06 -0000 1.47 @@ -2,6 +2,8 @@ UoS + Export + The export feature has been disabled. Week Research and Inquiry Information Literacy Index: openacs-4/packages/curriculum-central/www/stream-export-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/stream-export-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/curriculum-central/www/stream-export-postgresql.xql 2 Apr 2006 02:06:06 -0000 1.1 @@ -0,0 +1,59 @@ + + + + postgresql7.4 + + + + SELECT f.faculty_id, f.faculty_name, d.department_id, d.department_name, + s.stream_name + FROM cc_faculty f, cc_department d, cc_stream s + WHERE f.faculty_id = d.faculty_id + AND d.department_id = s.department_id + AND s.stream_id = :stream_id + AND s.package_id = :package_id + + + + + + SELECT map.map_id, n.uos_code, n.uos_name, uos.uos_id, + rev.year_id, y.name, rev.core_id, + map.live_revision_id, uosr.session_ids, uos.uos_name_id, + rel.name AS rel_name, dr.learning_outcomes, dr.objectives, + dr.syllabus + FROM cc_uos uos, cc_uos_revisions uosr, cc_stream_uos_map map, + cc_stream_uos_map_rev rev, cc_year y, cc_uos_name n, + cc_stream_uos_rel rel, cc_uos_detail_revisions dr, cc_uos_detail d + WHERE uos.uos_id = map.uos_id + AND map.stream_id = :stream_id + AND map.live_revision_id = rev.map_rev_id + AND rev.year_id = y.year_id + AND rev.year_id != 0 + AND uos.live_revision_id = uosr.uos_revision_id + AND n.name_id = uos.uos_name_id + AND rev.core_id = rel.stream_uos_rel_id + AND dr.detail_revision_id = d.live_revision_id + AND d.parent_uos_id = uos.uos_id + + + + + + SELECT cc_session__name(:session_id) + + + + + + SELECT DISTINCT gan.name, ga.level, ga.description + FROM cc_uos_gradattr_set gas, cc_uos_gradattr_map gam, + cc_uos_gradattr_name gan, cc_uos_gradattr ga + WHERE gas.parent_uos_id = :uos_id + AND gas.live_revision_id = gam.revision_id + AND gam.gradattr_id = ga.gradattr_id + AND ga.name_id = gan.name_id + + + + Index: openacs-4/packages/curriculum-central/www/stream-export.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/stream-export.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/curriculum-central/www/stream-export.tcl 2 Apr 2006 02:06:06 -0000 1.1 @@ -0,0 +1,118 @@ +ad_page_contract { + Displays the UoS map for the specified stream ID. + + @author Nick Carroll (nick.c@rroll.net) + @creation-date 2005-11-15 + @cvs-id $Id: stream-export.tcl,v 1.1 2006/04/02 02:06:06 ncarroll Exp $ +} { + stream_id:integer +} + +set package_id [ad_conn package_id] +set user_id [ad_conn user_id] + +set export_p [parameter::get -package_id $package_id -parameter ExportStreamAsXML -default 0] + +if { !$export_p } { + ad_returnredirect -message [_ curriculum-central.export_feature_has_been_disabled] index +} + +# Retrieve info about the faculty, department and stream. +db_1row faculty_info {} + +# Create the root node. +set doc [dom createDocument degree] +set root [$doc documentElement] + +set faculty_node [$root appendChild [$doc createElement faculty]] +$faculty_node appendChild [$doc createTextNode $faculty_name] + +set dept_node [$root appendChild [$doc createElement department]] +$dept_node appendChild [$doc createTextNode $department_name] + +set stream_node [$root appendChild [$doc createElement stream]] +$stream_node appendChild [$doc createTextNode $stream_name] + +# Retrieve a list of Units of Study. +set units_of_study [db_list_of_lists units_of_study {}] + +foreach uos $units_of_study { + set map_id [lindex $uos 0] + set uos_code [lindex $uos 1] + set uos_name [lindex $uos 2] + set uos_id [lindex $uos 3] + set year_id [lindex $uos 4] + set year_name [lang::util::localize [lindex $uos 5]] + set core_id [lindex $uos 6] + set live_revision_id [lindex $uos 7] + set session_ids [lindex $uos 8] + set uos_name_id [lindex $uos 9] + set rel_name [lang::util::localize [lindex $uos 10]] + set outcomes [lindex $uos 11] + set objectives [lindex $uos 12] + set syllabus [lindex $uos 13] + + foreach session_id $session_ids { + + # Get name of session_id + set session_name [lang::util::localize [db_string session_name {} -default ""]] + + # Root UoS node + set uos_node [$root appendChild [$doc createElement uos]] + $uos_node setAttribute requirement $rel_name + $uos_node setAttribute year $year_name + $uos_node setAttribute session $session_name + + # UoS Name + set uos_name_node [$uos_node appendChild [$doc createElement name]] + $uos_name_node appendChild [$doc createTextNode $uos_name] + + # UoS Code + set uos_code_node [$uos_node appendChild [$doc createElement code]] + $uos_code_node appendChild [$doc createTextNode $uos_code] + + # Objectives + set objectives_node [$uos_node appendChild \ + [$doc createElement objectives]] + set objectives [template::util::richtext::get_property text \ + $objectives] + $objectives_node appendChild [$doc createTextNode $objectives] + + # Outcomes + set outcomes_node [$uos_node appendChild \ + [$doc createElement outcomes]] + set outcomes [template::util::richtext::get_property text \ + $outcomes] + $outcomes_node appendChild [$doc createTextNode $outcomes] + + # Syllabus + set syllabus_node [$uos_node appendChild \ + [$doc createElement syllabus]] + set syllabus [template::util::richtext::get_property text \ + $syllabus] + $syllabus_node appendChild [$doc createTextNode $syllabus] + + set gas_node [$uos_node appendChild \ + [$doc createElement graduateAttributes]] + db_foreach graduate_attributes {} { + set attribute_node [$gas_node appendChild \ + [$doc createElement attribute]] + + set ga_name_node [$attribute_node appendChild \ + [$doc createElement name]] + set ga_name [lang::util::localize $name] + $ga_name_node appendChild [$doc createTextNode $ga_name] + + set ga_level_node [$attribute_node appendChild \ + [$doc createElement level]] + $ga_level_node appendChild [$doc createTextNode $level] + + set ga_desc_node [$attribute_node appendChild \ + [$doc createElement description]] + $ga_desc_node appendChild [$doc createTextNode $description] + } + } +} + +# render xml and return +ns_return 200 text/xml [$doc asXML] Index: openacs-4/packages/curriculum-central/www/stream-map.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/stream-map.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/curriculum-central/www/stream-map.adp 20 Feb 2006 09:40:38 -0000 1.6 +++ openacs-4/packages/curriculum-central/www/stream-map.adp 2 Apr 2006 02:06:06 -0000 1.7 @@ -4,7 +4,7 @@ -[#curriculum-central.graduate_attributes#] +[#curriculum-central.graduate_attributes#][#curriculum-central.export#]
Index: openacs-4/packages/curriculum-central/www/stream-map.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/stream-map.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/curriculum-central/www/stream-map.tcl 20 Feb 2006 09:40:38 -0000 1.8 +++ openacs-4/packages/curriculum-central/www/stream-map.tcl 2 Apr 2006 02:06:06 -0000 1.9 @@ -12,6 +12,11 @@ set package_id [ad_conn package_id] set user_id [ad_conn user_id] +set export_p [parameter::get -package_id $package_id -parameter ExportStreamAsXML -default 0] +if { $export_p } { + set export_url [export_vars -url -base stream-export {stream_id}] +} + # Retrieve info about the faculty, department and stream. db_1row context {} Index: openacs-4/packages/curriculum-central/www/stream-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/stream-view.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/curriculum-central/www/stream-view.adp 16 Feb 2006 10:44:17 -0000 1.2 +++ openacs-4/packages/curriculum-central/www/stream-view.adp 2 Apr 2006 02:06:06 -0000 1.3 @@ -4,8 +4,8 @@ +[#curriculum-central.export#] -
    Index: openacs-4/packages/curriculum-central/www/stream-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/stream-view.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/curriculum-central/www/stream-view.tcl 16 Feb 2006 10:44:17 -0000 1.4 +++ openacs-4/packages/curriculum-central/www/stream-view.tcl 2 Apr 2006 02:06:06 -0000 1.5 @@ -11,6 +11,11 @@ set package_id [ad_conn package_id] set user_id [ad_conn user_id] +set export_p [parameter::get -package_id $package_id -parameter ExportStreamAsXML -default 0] +if { $export_p } { + set export_url [export_vars -url -base stream-export {stream_id}] +} + # Retrieve info about the faculty, department and stream. db_1row context {}