+@context;noquote@
+
+
+
+
#lorsm.lt_Preliminary_informati#
+
+
+
+
+
+
+ #lorsm.lt_The_uploaded_file_is_# #lorsm.lt_SCORM_complaint_packa#
+
+
+
+
+
+#lorsm.SCORM_Package_Info#
+
+
+
+
+
+
+#lorsm.IMS_Package_Info#
+
+ #lorsm.lt_The_uploaded_file_is_# #lorsm.lt_Blackboard_6_complain# .
+
+
+
+
+
+
+#lorsm.Note# #lorsm._the_package_has# #lorsm.not_yet# #lorsm.lt_being_added_to_the_Le#
+
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/course-add-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-add-2.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-add-2.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,378 @@
+ad_page_contract {
+ Upload an IMS Content Package
+
+ Scope:
+
+ 1.- Uploads file
+ 2.- Unzip file
+ 3.- Finds imsmanifest.xml
+ 4.- Displays basic imsmanifest.xml information
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 19 March 2003
+ @cvs-id $Id: course-add-2.tcl,v 1.1 2005/05/17 16:21:19 miguelm Exp $
+} {
+ upload_file:trim,optional
+ upload_file.tmpfile:optional,tmpfile
+ course_id:integer,notnull
+ indb_p:integer,notnull
+ man_id:optional
+
+} -validate {
+ non_empty -requires {upload_file.tmpfile:notnull} {
+ if {![empty_string_p $upload_file] && (![file exists ${upload_file.tmpfile}] || [file size ${upload_file.tmpfile}] < 4)} {
+ ad_complain "[_ lorsm.lt_The_upload_failed_or_]"
+ }
+ }
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+# To support versions
+if { ![info exist man_id] } {
+ set man_id ""
+}
+
+# Permissions
+set user_id [ad_conn user_id]
+# dotlrn::require_user_admin_community -user_id $user_id -community_id [dotlrn_community::get_community_id]
+
+# unzips the file
+if { ![empty_string_p $upload_file] &&
+ [ catch {set tmp_dir [lors::imscp::expand_file $upload_file ${upload_file.tmpfile} lors-imscp-$course_id] } errMsg] } {
+ ad_return_complaint 1 "[_ lorsm.lt_The_uploaded_file_doe]"
+ ad_script_abort
+}
+
+# if it is not blank...
+if {![empty_string_p $upload_file]} {
+ ns_log Debug "LORS Package: made directory $tmp_dir to extract from ${upload_file.tmpfile} ($upload_file)\n"
+ set allfiles [lors::imscp::dir_walk $tmp_dir]
+
+} else {
+ set allfiles [lors::imscp::dir_walk $directory]
+
+}
+
+# Get LORSM Root folder_id
+set folder_id [lors_central::get_root_folder_id]
+
+
+# search for manifest file
+set file imsmanifest.xml
+
+set manifest [lors::imscp::findmanifest $tmp_dir $file]
+
+# see if the file actually is where it suppose to be. Othewise abort
+if {$manifest == 0} {
+ lors::imscp::deltmpdir $tmp_dir
+ ad_return_complaint 1 "[_ lorsm.lt_There_is_no_file_with_1]"
+}
+
+
+# Is this a Blackboard6 package?
+set isBB [lors::imscp::bb6::isBlackboard6 -tmp_dir $tmp_dir]
+
+if {$isBB == 1} {
+ # we generate metadata for the file
+ ns_log Notice "Generating MD record from Blackboard6 package $tmp_dir --"
+ lors::imscp::bb6::create_MD -tmp_dir $tmp_dir -file $file
+ ns_log Notice "Done!"
+
+}
+
+## adds folder to the CR
+set parent_id $folder_id
+set fs_dir $tmp_dir
+
+# checks for write permission on the parent folder
+ad_require_permission $parent_id write
+
+# get their IP
+set creation_ip [ad_conn peeraddr]
+
+# checks whether the directory given actually exists
+if {[file exists $fs_dir]} {
+ set all_files [list]
+ # now that exists, let's create it on the CR
+
+ ## Create lists and multirows
+ multirow create element_nodes element attributes
+
+ template::list::create \
+ -name d_info \
+ -multirow d_info \
+ -no_data "[_ lorsm.No_Information]" \
+ -elements {
+ col1 {
+ label ""
+ html {valign top style "background-color: #e0e0e0; font-weight: bold;"}
+ }
+ col2 {
+ label ""
+ html {valign top style "background-color: #f0f0f0; font-weight: bold;"}
+ }
+ }
+
+ multirow create d_info col1 col2
+
+
+ template::list::create \
+ -name d_IMS_package_info \
+ -multirow d_IMS_package_info \
+ -no_data "[_ lorsm.lt_No_IMS_Package_struct]" \
+ -elements {
+ organizations {
+ label "[_ lorsm.Organizations]"
+ html {valign top align center}
+ }
+ items {
+ label "[_ lorsm.Items]"
+ html {valign top align center}
+ }
+ resources {
+ label "[_ lorsm.Resources]"
+ html {valign top align center}
+ }
+ files {
+ label "[_ lorsm.Files]"
+ html {valign top align center}
+ }
+ }
+
+ multirow create d_IMS_package_info organizations items resources files
+
+ template::list::create \
+ -name d_SCORM_package_info \
+ -multirow d_SCORM_package_info \
+ -no_data "[_ lorsm.No_Items]" \
+ -elements {
+ scos {
+ label "[_ lorsm.SCOs]"
+ html {valign top}
+ }
+ assets {
+ label "[_ lorsm.Assets]"
+ html {valign top}
+ }
+ sharableresources {
+ label "[_ lorsm.Sharable_Resources]"
+ html {valign top}
+ }
+ files {
+ label "[_ lorsm.files]"
+ html {valign top}
+ }
+ }
+
+ multirow create d_SCORM_package_info scos assets sharableresources files
+
+ ## Opens imsmanifest.xml
+
+ # open manifest file with tDOM
+ set doc [dom parse [read [open $manifest]]]
+ # gets the manifest tree
+ set manifest [$doc documentElement]
+
+ # gets metadata node
+ set metadata [$manifest child all metadata]
+
+ # DETECT SCORM OR IMS CP
+ set isSCORM [lors::imscp::isSCORM -node $manifest]
+
+ ## Gets manifest title
+
+ if { ![empty_string_p $metadata] } {
+
+ # gets metadataschema
+ set MetadataSchema [lindex [lindex [lors::imsmd::getMDSchema $metadata] 0] 0]
+ set MetadataSchemaVersion [lindex [lors::imsmd::getMDSchema $metadata] 1]
+ set lom [lindex [lors::imsmd::getLOM $metadata $tmp_dir] 0]
+ set prefix [lindex [lors::imsmd::getLOM $metadata $tmp_dir] 1]
+
+ if { $lom != 0 } {
+ # Get title
+ set manifest_title_lang [lindex [lindex [lors::imsmd::mdGeneral -element title -node $lom -prefix $prefix] 0] 0]
+ set manifest_title [lindex [lindex [lors::imsmd::mdGeneral -element title -node $lom -prefix $prefix] 0] 1]
+ # set context
+ set context "[_ lorsm.lt_Importing_manifest_ti]"
+
+ ## Gets manifest description
+
+ set manifest_descrip_lang [lindex [lindex [lors::imsmd::mdGeneral -element description -node $lom -prefix $prefix] 0] 0]
+ set manifest_descrip [lindex [lindex [lors::imsmd::mdGeneral -element description -node $lom -prefix $prefix] 0] 1]
+
+ # adds course information for display
+ multirow append d_info "Manifest Title: " "\[$manifest_title_lang\] $manifest_title "
+ multirow append d_info "Metadata Type: " [concat $MetadataSchema $MetadataSchemaVersion]
+ if {![empty_string_p $manifest_descrip]} {
+ multirow append d_info "Description: " "\[$manifest_descrip_lang\] $manifest_descrip"
+ }
+ # Gets Rights info
+ set copyright [lors::imsmd::mdRights -element copyrightandotherrestrictions -node $lom -prefix $prefix]
+ if { $copyright != 0 } {
+ set copyright_s [lindex [lindex [lindex $copyright 0] 0] 1]
+ set copyright_v [lindex [lindex [lindex $copyright 0] 1] 1]
+ set cr_descrip [lors::imsmd::mdRights -element description -node $lom -prefix $prefix]
+ set cr_descrip_s [lindex [lindex $cr_descrip 0] 1]
+
+ multirow append d_info "Copyrighted?: " "\[$copyright_s\] $copyright_v"
+ multirow append d_info "Copyrighted Description: " "$cr_descrip_s"
+
+ } else {
+ multirow append d_info "Copyrighted?: " "Information not available"
+ }
+ } else {
+ # Didn't find LOM although it did find the Metadata schema and
+ # version
+ regexp {([^/\\]+)$} $tmp_dir match manifest_title
+ set context "[_ lorsm.lt_Importing_No_Metadata]"
+ }
+ } else {
+ # manifest title doesn't exist, so we create one for it.
+ regexp {([^/\\]+)$} $tmp_dir match manifest_title
+ set context "[_ lorsm.lt_Importing_No_Metadata]"
+ }
+
+
+ # Gets the organizations
+
+ set organizations [$manifest child all organizations]
+
+ if { ![empty_string_p $organizations] } {
+
+ set num_organizations [$organizations child all organization]
+
+ multirow append d_info "Number of Organizations: " [llength $num_organizations]
+
+ set items 0
+
+ foreach organization $num_organizations {
+
+ set items [expr $items + [lors::imscp::countItems $organization]]
+
+ }
+ multirow append d_info "Number of Items: " $items
+ }
+
+ # gets the resources
+ set resources [$manifest child all resources]
+
+ # Complain if there's no resources
+ if {[empty_string_p $resources]} {
+ ad_return_complaint 1 "[_ lorsm.lt_The_package_you_are_t_1]"
+ ad_script_abort
+ }
+
+ set resourcex [$resources child all resource]
+
+ if { $isSCORM == 1 } {
+ # The imsmanifest.xml file contains a SCORM course
+
+ # extract all the resources and files
+ set scos 0
+ set assets 0
+ set sharableresources 0
+ set files 0
+
+ if { ![empty_string_p $resources] } {
+
+ foreach resourcex [$resources child all resource] {
+
+ # gets the type of resource
+ set resource_scormtype [string tolower [lors::imsmd::getAtt $resourcex adlcp:scormtype]]
+
+ switch $resource_scormtype {
+ sco {
+ incr scos
+ }
+ asset {
+ incr assets
+ }
+ sharableresource {
+ incr sharableresources
+ }
+ }
+
+ set files [expr $files + [llength [lors::imsmd::getResource -node $resourcex -att files]]]
+
+ }
+ }
+
+ multirow append d_SCORM_package_info $scos $assets $sharableresources $files
+
+
+
+ # end isSCORM if
+ } else {
+ # The imsmanifest.xml file corresponds to a IMS CP (but not SCORM)
+
+ set files 0
+ if { ![empty_string_p $resourcex] } {
+
+ foreach resource $resourcex {
+ set files [expr $files + [llength [lors::imsmd::getResource -node $resource -att files]]]
+ }
+ }
+ multirow append d_IMS_package_info [llength $num_organizations] $items [llength $resourcex] $files
+
+ }
+
+
+} else {
+ # Error MSG here
+ ad_return_complaint 1 "[_ lorsm.lt_There_has_been_a_prob]"
+ ad_script_abort
+
+}
+
+template::form create course_upload -action course-add-3 \
+ -display_buttons { {"[_ lorsm.Upload_Course]" upload_course} } \
+ -html {enctype multipart/form-data} \
+ -mode edit \
+ -cancel_url "[_ lorsm.index]"
+
+
+template::element create course_upload course_name \
+ -label "[_ lorsm.Course_Name]" -datatype text -widget text -help_text "[_ lorsm.lt_This_is_the_name_the_]" \
+ -maxlength 200
+
+template::element create course_upload course_id \
+ -label "[_ lorsm.course_id]" -datatype integer -widget hidden
+
+template::element create course_upload indb_p \
+ -label "[_ lorsm.indb_p]" -datatype integer -widget hidden
+
+template::element create course_upload tmp_dir \
+ -label "[_ lorsm.tmp_dir]" -datatype text -widget hidden -optional
+
+template::element create course_upload folder_id \
+ -label "[_ lorsm.folder_id]" -datatype integer -widget hidden -optional
+
+template::element create course_upload isSCORM \
+ -label "[_ lorsm.isSCORM]" -datatype integer -widget hidden -optional
+
+
+if { ![empty_string_p $man_id] } {
+ set version_id [db_string get_version_id "select item_id from cr_revisions where revision_id = :man_id"]
+ template::element create course_upload version_id -datatype integer -widget hidden -optional
+ template::element set_properties course_upload version_id -value $version_id
+}
+
+template::element set_properties course_upload course_id -value $course_id
+
+template::element set_properties course_upload indb_p -value $indb_p
+
+template::element set_properties course_upload tmp_dir -value $tmp_dir
+
+template::element set_properties course_upload folder_id -value $folder_id
+
+template::element set_properties course_upload isSCORM -value $isSCORM
+
+template::element set_properties course_upload course_name -value $manifest_title
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/course-add-3.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-add-3.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-add-3.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,57 @@
+
+@context;noquote@
+
+
+
+
#lorsm.lt_Preliminary_informati#
+
+
+
+
+
+
+ #lorsm.lt_The_uploaded_file_is_# #lorsm.lt_SCORM_complaint_packa#
+
+
+#lorsm.Note# #lorsm._the_package_has# #lorsm.not_yet# #lorsm.lt_being_added_to_the_Le#
+
+
+
#lorsm.Organizations#
+
+
+
+
+#lorsm.Items#
+
+
+
+
+
+
+#lorsm.SCOs#
+
+
+
+
#lorsm.Assets#
+
+
+
+
+
+
+#lorsm.Resources#
+
+
+
+
+
+
+
+
+@l_files@
+
+
+
+@all_files@
+
+
Index: openacs-4/packages/lors-central/www/course-add-3.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-add-3.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-add-3.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,692 @@
+ad_page_contract {
+ Upload an IMS Content Package 3
+
+ Scope:
+
+ Add files to the CR
+ Process imsmanifest.xml
+ Determines this is a Blackboard course and if it is process it accordingly.
+ Inserts all ims_items, resources and all IMS CP entities into the DB.
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 19 March 2003
+ @cvs-id $Id: course-add-3.tcl,v 1.1 2005/05/17 16:21:19 miguelm Exp $
+} {
+ folder_id:integer,notnull
+ tmp_dir:optional,notnull
+ course_id:integer,notnull
+ course_name:notnull
+ indb_p:integer,notnull
+ {version_id:integer ""}
+
+} -validate {
+ non_empty -requires {upload_file.tmpfile:notnull} {
+ if {![empty_string_p $upload_file] && (![file exists ${upload_file.tmpfile}] || [file size ${upload_file.tmpfile}] < 4)} {
+ ad_complain "[_ lorsm.lt_The_upload_failed_or_]"
+ }
+ }
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+#check permission
+set user_id [ad_conn user_id]
+# ad_require_permission $folder_id admin
+
+# Display progress bar
+ad_progress_bar_begin \
+ -title "[_ lorsm.Uploading_course]" \
+ -message_1 "[_ lorsm.lt_Uploading_and_process]" \
+ -message_2 "[_ lorsm.lt_We_will_continue_auto]"
+
+
+ns_write "
[_ lorsm.lt_Initiating_Updating_l] "
+
+# Is this a Blackboard6 package?
+set isBB [lors::imscp::bb6::isBlackboard6 -tmp_dir $tmp_dir]
+
+if {$isBB == 1} {
+ ns_write "[_ lorsm.lt_Blackboard6_Content_P] . [_ lorsm.lt_Modifying_package_to_]"
+ ns_write "
[_ lorsm.lt_Cleaning_up_unused_ap]"
+ lors::imscp::bb6::clean_items -tmp_dir $tmp_dir -file "imsmanifest.xml"
+ ns_write "[_ lorsm.Done] "
+ ns_write " [_ lorsm.lt_Renaming_content_type]"
+ lors::imscp::bb6::extract_html -tmp_dir $tmp_dir -file "imsmanifest.xml"
+ ns_write "[_ lorsm.Done] "
+
+}
+
+
+ns_write " [_ lorsm.lt_Starting_File_Process] "
+
+db_transaction {
+
+ ## adds folder to the CR
+ set parent_id $folder_id
+ set fs_dir $tmp_dir
+
+ # checks for write permission on the parent folder
+ ad_require_permission $parent_id write
+
+ # get their IP
+ set creation_ip [ad_conn peeraddr]
+
+ # checks whether the directory given actually exists
+ if {[file exists $fs_dir]} {
+ set all_files [list]
+ # now that exists, let's create it on the CR
+
+ # gets rid of the path and leaves the name of the directory
+ # if course_name is changed, then use that name. Otherwise it will use the default folder name given
+ if {![empty_string_p $course_name]} {
+ regexp {([^/\\]+)$} $course_name match cr_dir
+ } else {
+ regexp {([^/\\]+)$} $fs_dir match cr_dir
+ }
+
+ #set new_parent_id [lors::cr::add_folder -parent_id $parent_id -folder_name $cr_dir]
+
+ ############################################################################
+ # Add all the folders that will store all the webcontent (files) in th CR
+
+ # Add new folder to store the webcontent (Same as it was with file-storage)
+ set new_parent_id [content::folder::new -name $cr_dir -label $cr_dir -parent_id $parent_id]
+ content::folder::register_content_type -folder_id $new_parent_id -content_type "content_revision" \
+ -include_subtypes "t"
+ content::folder::register_content_type -folder_id $new_parent_id -content_type "content_folder" \
+ -include_subtypes "t"
+ content::folder::register_content_type -folder_id $new_parent_id -content_type "content_symlink" \
+ -include_subtypes "t"
+ content::folder::register_content_type -folder_id $new_parent_id -content_type "content_extlink" \
+ -include_subtypes "t"
+
+ # Add new folders to store the manifest, organizations, items, resources items (replacing acs_objects)
+ # Manifest
+ set man_parent_id [lors_central::get_folder_id -name "LORSM Manifest Folder"]
+ set man_folder_id [content::folder::new -name $cr_dir -label $cr_dir -parent_id $man_parent_id]
+ content::folder::register_content_type -folder_id $man_folder_id -content_type "ims_manifest_object" \
+ -include_subtypes "t"
+ content::folder::register_content_type -folder_id $man_folder_id -content_type "content_revision" \
+ -include_subtypes "t"
+
+ # Organizations
+ set org_parent_id [lors_central::get_folder_id -name "LORSM Organizations Folder"]
+ set org_folder_id [content::folder::new -name $cr_dir -label $cr_dir -parent_id $org_parent_id]
+ content::folder::register_content_type -folder_id $org_folder_id -content_type "ims_organization_object" \
+ -include_subtypes "t"
+ content::folder::register_content_type -folder_id $org_folder_id -content_type "content_revision" \
+ -include_subtypes "t"
+
+ set itm_parent_id [lors_central::get_folder_id -name "LORSM Items Folder"]
+ set itm_folder_id [content::folder::new -name $cr_dir -label $cr_dir -parent_id $itm_parent_id]
+ content::folder::register_content_type -folder_id $itm_folder_id -content_type "ims_item_object" \
+ -include_subtypes "t"
+ content::folder::register_content_type -folder_id $itm_folder_id -content_type "content_revision" \
+ -include_subtypes "t"
+
+ set res_parent_id [lors_central::get_folder_id -name "LORSM Resources Folder"]
+ set res_folder_id [content::folder::new -name $cr_dir -label $cr_dir -parent_id $res_parent_id]
+ content::folder::register_content_type -folder_id $res_folder_id -content_type "ims_resource_object" \
+ -include_subtypes "t"
+ content::folder::register_content_type -folder_id $res_folder_id -content_type "content_revision" \
+ -include_subtypes "t"
+
+ ############################
+ # Store the files in the CR
+
+ set filesx [lors_central::cr::add_files -parent_id $new_parent_id -indb_p $indb_p \
+ -files [lors::cr::has_files -fs_dir $fs_dir]]
+
+
+ set all_files [concat $all_files $filesx]
+
+ # get all the directories and files under those dirs
+
+ set dirs [lors::cr::has_dirs -fs_dir $fs_dir]
+
+ set base_parent_id $new_parent_id
+
+ # dirx = directory loop
+ set dirx [list "$base_parent_id [list $dirs]"]
+
+ # for each directory found..
+ while {[llength $dirx] != 0} {
+ set collector [list]
+ foreach dir $dirx {
+ # if the dirx loop is 0...
+ set base_parent_id [lindex $dir 0]
+
+ foreach subdir [lindex $dir 1] {
+
+ # remove all path
+ regexp {([^/\\]+)$} $subdir match cr_dir
+
+ # add the folder to the CR
+ ns_write "[_ lorsm.Processing_folder] : $cr_dir "
+
+ ################################
+ # Add new sub-folder to the CR
+
+ set new_cr_folder_id [content::folder::new -name $cr_dir -parent_id $base_parent_id -label $cr_dir]
+ content::folder::register_content_type -folder_id $new_cr_folder_id -content_type "content_revision"\
+ -include_subtypes "t"
+ content::folder::register_content_type -folder_id $new_cr_folder_id -content_type "content_folder" \
+ -include_subtypes "t"
+ content::folder::register_content_type -folder_id $new_cr_folder_id -content_type "content_symlink" \
+ -include_subtypes "t"
+ content::folder::register_content_type -folder_id $new_cr_folder_id -content_type "content_extlink" \
+ -include_subtypes "t"
+
+
+ lappend collector "$new_cr_folder_id [list [lors::cr::has_dirs -fs_dir $subdir]]"
+
+ # add files (if any)
+ set files [lors::cr::has_files -fs_dir $subdir]
+
+ #For display purposes
+ ns_write "[_ lorsm.Processing_files]"
+ foreach file $files {
+ set tempval [regsub $tmp_dir $file {}]
+ ns_write " $tempval[_ acs-kernel.common_OK] "
+ }
+ ns_write " "
+ #
+
+ if ![empty_string_p $files] {
+
+ #######################
+ # Add files to the CR
+
+ set filesx [lors_central::cr::add_files -parent_id $new_cr_folder_id -files $files -indb_p $indb_p]
+ set all_files [concat $all_files $filesx]
+ }
+
+ }
+ }
+ if {[llength $collector] == 0} {
+ # then just add the name of the directories
+ set dirx $collector
+ } else {
+ # otherwise, then just add the new directories to the queue
+ set dirx
+ set dirx $collector
+ }
+ }
+
+ ## Finish adding files to the CR.
+ ## Now we start processing the imsmanifest.xml file
+
+ ns_write "[_ lorsm.Now_processing]imsmanifest.xml
[_ lorsm.file]"
+ ## Opens imsmanifest.xml
+
+ # open manifest file with tDOM
+ set doc [dom parse [read [open $tmp_dir/imsmanifest.xml]]]
+ # gets the manifest tree
+ set manifest [$doc documentElement]
+
+ # Gets manifest characteristics
+ set man_identifier [lors::imsmd::getAtt $manifest identifier]
+ set man_version [lors::imsmd::getAtt $manifest version]
+
+ # DETECT SCORM OR IMS CP
+ # NOTE: it requires that the manifest contains a metadata record (which is not always the case) :-(
+ ##
+
+ # gets metadata node
+ set metadata [$manifest child all metadata]
+
+ if { ![empty_string_p $metadata] } {
+ # gets metadataschema
+ set MetadataSchema [lindex [lindex [lors::imsmd::getMDSchema $metadata] 0] 0]
+ set MetadataSchemaVersion [lindex [lors::imsmd::getMDSchema $metadata] 1]
+ if {![empty_string_p $MetadataSchema]} {
+ set isSCORM [regexp -nocase scorm $MetadataSchema]
+ }
+ if {$isSCORM == 1} {
+ set man_isscorm 1
+ } else {
+ set man_isscorm 0
+ }
+ } else {
+ set man_isscorm 0
+ }
+
+ if { ![empty_string_p $metadata] } {
+ set man_hasmetadata 1
+ } else {
+ set man_hasmetadata 0
+ }
+
+
+ ## Gets manifest title
+
+ if { ![empty_string_p $metadata] } {
+ set lom [lindex [lors::imsmd::getLOM $metadata $tmp_dir] 0]
+ set prefix [lindex [lors::imsmd::getLOM $metadata $tmp_dir] 1]
+ if { $lom != 0 } {
+ # Get title
+ set manifest_title_lang [lindex [lindex [lors::imsmd::mdGeneral -element title -node $lom -prefix $prefix] 0] 0]
+ set manifest_title [lindex [lindex [lors::imsmd::mdGeneral -element title -node $lom -prefix $prefix] 0] 1]
+ # set context
+ set context "[_ lorsm.lt_Importing_manifest_ti]"
+
+ ## Gets manifest description
+
+ set manifest_descrip_lang [lindex [lindex [lors::imsmd::mdGeneral -element description -node $lom -prefix $prefix] 0] 0]
+ set manifest_descrip [lindex [lindex [lors::imsmd::mdGeneral -element description -node $lom -prefix $prefix] 0] 1]
+
+ # adds course information for display
+
+ # Gets Rights info
+ set copyright [lors::imsmd::mdRights -element copyrightandotherrestrictions -node $lom -prefix $prefix]
+ if { ![empty_string_p $copyright] } {
+ set copyright_s [lindex [lindex [lindex $copyright 0] 0] 1]
+ set copyright_v [lindex [lindex [lindex $copyright 0] 1] 1]
+ set cr_descrip [lors::imsmd::mdRights -element description -node $lom -prefix $prefix]
+ set cr_descrip_s [lindex [lindex $cr_descrip 0] 1]
+
+ }
+
+ } else {
+ set context "[_ lorsm.lt_Importing_No_Metadata]"
+ }
+
+ }
+
+
+
+ # Gets the organizations
+
+ set organizations [$manifest child all organizations]
+ set man_orgs_default [lors::imsmd::getAtt $organizations default]
+
+ set man_id [lors_central::imscp::manifest_add \
+ -course_name $course_name \
+ -identifier $man_identifier \
+ -version $man_version \
+ -orgs_default $man_orgs_default \
+ -hasmetadata $man_hasmetadata \
+ -isscorm $man_isscorm \
+ -folder_id $new_parent_id \
+ -community_id "" \
+ -man_folder_id $man_folder_id \
+ -version_id $version_id ]
+
+ ns_write "[_ lorsm.lt_Granting_permissions__1 [list course_name $course_name]] "
+
+ # PERMISSIONS FOR MANIFEST and learning objects
+
+ # set up in the same way as permissions for the file storage
+ # objects. As we want to maintain consistency btw the
+ # learnining objects and their content
+
+ # Disable folder permissions inheritance
+ permission::toggle_inherit -object_id $man_id
+
+ # Set read permissions for community/class dotlrn_member_rel
+
+ # set community_id [dotlrn_community::get_community_id]
+
+ # set party_id_member [db_string party_id {select segment_id from rel_segments \
+ where group_id = :community_id \
+ and rel_type = 'dotlrn_member_rel'}]
+
+ # permission::grant -party_id $party_id_member -object_id $man_id -privilege read
+
+ # Set read permissions for community/class dotlrn_admin_rel
+
+ # set party_id_admin [db_string party_id {select segment_id from rel_segments \
+ where group_id = :community_id \
+ and rel_type = 'dotlrn_admin_rel'}]
+
+ # permission::grant -party_id $party_id_admin -object_id $man_id -privilege read
+
+ # Set read permissions for *all* other professors within .LRN
+ # (so they can see the content)
+
+ set party_id_professor [db_string party_id {select segment_id from rel_segments \
+ where rel_type = 'dotlrn_professor_profile_rel'}]
+
+ permission::grant -party_id $party_id_professor -object_id $man_id -privilege read
+
+ # Set read permissions for *all* other admins within .LRN
+ # (so they can see the content)
+
+ set party_id_admins [db_string party_id {select segment_id from rel_segments \
+ where rel_type = 'dotlrn_admin_profile_rel'}]
+
+ permission::grant -party_id $party_id_admins -object_id $man_id -privilege read
+
+
+ # Done with Manifest and learning object Permissions
+
+
+ ns_write "[_ lorsm.lt_Adding_course_name_Ma [list course_name $course_name]] "
+
+ if {$man_hasmetadata == 1} {
+ # adds manifest metadata
+ set aa [lors::imsmd::addMetadata \
+ -acs_object $man_id \
+ -node $metadata \
+ -dir $tmp_dir]
+
+ ns_write "[_ lorsm.lt_Adding_Manifest_Metad] "
+
+ }
+
+
+ if { ![empty_string_p $organizations] } {
+
+ # for multiple organizations
+ set add [list]
+ foreach organization [$organizations child all organization] {
+
+ set org_identifier [lors::imsmd::getResource -node $organization -att identifier]
+
+ set org_identifier [lors::imsmd::getResource -node $organization -att identifier]
+ set org_structure [lors::imsmd::getResource -node $organization -att structure]
+ if {![empty_string_p [$organization child all title]]} {
+ set org_title [lors::imsmd::getElement [$organization child all title]]
+ } else {
+ set org_title ""
+ }
+ set org_hasmetadata [lors::imsmd::hasMetadata $organization]
+
+ set org_id [lors_central::imscp::organization_add \
+ -man_id $man_id \
+ -identifier $org_identifier \
+ -structure $org_structure \
+ -title $org_title \
+ -hasmetadata $org_hasmetadata \
+ -org_folder_id $org_folder_id]
+
+ ns_write "[_ lorsm.lt_Adding_Organization_o [list org_title $org_title]] "
+
+
+ if {$org_hasmetadata == 1} {
+ # adds manifest metadata
+ set aa [lors::imsmd::addMetadata \
+ -acs_object $org_id \
+ -node [lors::imsmd::getMDNode $organization] \
+ -dir $tmp_dir]
+ }
+
+ set list_items [lors::imscp::getItems $organization]
+
+ # ns_write "[_ lorsm.lt_here_is_list_items_li [list list_items $list_items]]"
+
+
+ set add [concat $add [lors_central::imscp::addItems -itm_folder_id $itm_folder_id \
+ -org_id $org_id $list_items 0 $tmp_dir]]
+
+ set tempval [llength $add]
+ ns_write "[_ lorsm.lt_Adding_tempval_items_] "
+
+ }
+
+
+ }
+
+ set l_files [list]
+
+ set resources [$manifest child all resources]
+
+ set resourcex [$resources child all resource]
+
+ if { ![empty_string_p $resourcex] } {
+
+ set res_list [list]
+ foreach resource $resourcex {
+ set res_identifier [lors::imsmd::getResource -node $resource -att identifier]
+ set res_type [lors::imsmd::getResource -node $resource -att type]
+ set res_href [lors::imsmd::getResource -node $resource -att href]
+ set res_dependencies [lors::imsmd::getResource -node $resource -att dependencies]
+ set res_hasmetadata [lors::imsmd::hasMetadata $resource]
+ set res_files [lors::imsmd::getResource -node $resource -att files]
+ set res_scormtype [lors::imsmd::getAtt $resource adlcp:scormtype]
+
+### Addition provided by e-lane people to integrate on deployment with
+# assessment package.
+
+# In the future we need to come up with a nicier way to do this as
+# this is rather a dirty hack for now.
+
+# if {$res_type == "imsqti_xmlv1p0" || $res_type == "imsqti_xmlv1p1" || $res_type =="imsqti_item_xmlv2p0"} {
+# set res_href [lors::assessment::ims_qti_register_assessment \
+# -tmp_dir $tmp_dir/$res_href \
+# -community_id $community_id]
+# }
+
+## End integration showcase
+
+ set resource_id [lors_central::imscp::resource_add \
+ -man_id $man_id \
+ -identifier $res_identifier \
+ -type $res_type \
+ -href $res_href \
+ -scorm_type $res_scormtype \
+ -hasmetadata $res_hasmetadata \
+ -res_folder_id $res_folder_id ]
+
+ ns_write "[_ lorsm.lt_Adding_resource_res_i_2 [list res_identifier $res_identifier]] "
+
+ lappend res_list [concat "$resource_id $res_identifier"]
+
+
+
+
+ if {$res_hasmetadata == 1} {
+ set res_md_add [lors::imsmd::addMetadata \
+ -acs_object $resource_id \
+ -node [lors::imsmd::getMDNode $resource] \
+ -dir $tmp_dir]
+
+ ns_write "[_ lorsm.lt_Adding_resource_res_i_3 [list res_identifier $res_identifier]] "
+
+ }
+
+
+ foreach dependency $res_dependencies {
+
+ set dep_id [lors::imscp::dependency_add \
+ -res_id $resource_id \
+ -identifierref $dependency]
+
+ ns_write "[_ lorsm.lt_Adding_resource_depen] "
+
+ }
+
+
+ foreach file $res_files {
+ lappend l_files [list [lindex $file 0] $resource_id [lindex $file 1]]
+
+ # ns_write "$resource_id $res_identifier \n"
+ # ns_write "\t$file \n"
+ }
+ }
+ }
+
+ # gets the resources
+ set resources [$manifest child all resources]
+
+ } else {
+ # Error MSG here
+ #ns_write "[_ lorsm.no_page]"
+ }
+
+
+ # Here's where we link items and resources. Take into
+ # account that a resources can have 1 to many items
+
+
+ # So first, let's create a list of only item_identifierrefs
+ # [lindex $add 1]. Therefore we can do a lsearch -exact instead of
+ # a -regexp
+
+ foreach ref $add {
+ lappend i_identref [lindex $ref 1]
+ }
+
+ foreach resource $res_list {
+
+ set find_item_id [lsearch -all -exact $i_identref [lindex $resource 1]]
+
+ if {$find_item_id != -1} {
+
+ foreach item_to_res $find_item_id {
+
+ set item_to_resource [lors::imscp::item_to_resource_add \
+ -item_id [lindex [lindex $add $item_to_res] 0] \
+ -res_id [lindex $resource 0]
+ ]
+ }
+
+ }
+
+ }
+
+ ns_write "[_ lorsm.lt_Now_we_are_almost_don] "
+
+
+ foreach file $l_files {
+
+ set filename [lindex $file 0]
+
+ set found_file [lsearch -all -regexp $all_files $filename]
+ if {[llength $found_file] > 1} {
+ # we are suppose to get only one element back, so we have
+ # to refine the search a bit more.
+ set found_file [lsearch -all -regexp $all_files $tmp_dir/$filename]
+
+ # ad_return_complaint 1 "$found_file $tmp_dir $filename $all_files "
+ # ad_script_abort
+ }
+
+ if {![empty_string_p $found_file]} {
+ set file_id [lindex [lindex $all_files $found_file] 3]
+ set file_rev_id [content::item::get_live_revision -item_id $file_id]
+ set res_id [lindex $file 1]
+ set file_hasmetadata [lindex $file 2]
+
+ regexp {([^/\\]+)$} $filename match filex
+
+ if {$file_hasmetadata != 0} {
+ set hasmetadata 1
+ } else {
+ set hasmetadata 0
+ }
+
+
+ set fileadd [lors::imscp::file_add \
+ -file_id $file_rev_id \
+ -res_id $res_id \
+ -pathtofile $filename \
+ -filename $filex \
+ -hasmetadata $hasmetadata]
+
+ ns_write "[_ lorsm.Adding_file_filex [list filex $filex]] "
+
+
+ if {$file_hasmetadata != 0} {
+ set add_file_metadata [lors::imsmd::addMetadata \
+ -acs_object $file_id \
+ -node $file_hasmetadata \
+ -dir $tmp_dir]
+
+ ns_write "[_ lorsm.lt_Adding_file_filex_met_1 [list filex $filex]] "
+ }
+ }
+
+ }
+
+
+ # Delete temporary directory
+ ns_write "[_ lorsm.lt_Deleting_temporary_fo] "
+ ns_log Debug "Delete temporary folder $tmp_dir"
+ lors::imscp::deltmpdir $tmp_dir
+
+ ns_write "[_ lorsm.Done]
"
+
+}
+
+# Get all organizations associated to this man_id
+set org_list [db_list_of_lists get_organizations {
+ select org_id
+ from ims_cp_organizations
+ where man_id = :man_id
+}]
+
+
+# We make this outside the db_transaction because we need man_id present in ims_cp_manifests
+if { ![empty_string_p $version_id] } {
+ set item_id [lors_central::get_item_id -revision_id $man_id]
+
+ # We are making a new version of a course. We need to make inserts in ims_cp_manifest_class
+ # so the changes will be reflected in all classes that use this course
+ # We get all classes that use this course
+
+ db_foreach get_all_communities { } {
+ # We update the rows with the new revision_id ( man_id ) so every class that use this course
+ # will have the same course version
+ db_dml update_course { }
+ db_dml delete_temporary_row { }
+ }
+
+ # We need to update the ims_cp_items_map table to have same man_id for all clases
+ # First we are going to get all the communities id that are associated to this man_id
+
+ set com_list [db_list_of_lists get_communities {
+ select distinct community_id from ims_cp_manifest_class
+ where man_id in ( select revision_id from cr_revisions where item_id = :item_id )
+ }]
+
+ # Now we are going to delete all from ims_cp_items related to this man_id
+ db_dml delete_from_items_map {
+ delete from ims_cp_items_map
+ where man_id in ( select revision_id from cr_revisions where item_id = :item_id )
+ }
+
+
+ # Now we are going to insert the same course for all dotlrn classes
+ foreach com_id $com_list {
+ if { ![empty_string_p [lindex $com_id 0]] } {
+ foreach org_id $org_list {
+ set items_list [db_list_of_lists get_items {
+ select ims_item_id
+ from ims_cp_items
+ where org_id = :org_id
+ and ims_item_id in ( select live_revision
+ from cr_items
+ )
+ }]
+ foreach ims_item_id $items_list {
+ db_dml insert_items {
+ insert into ims_cp_items_map
+ (man_id, org_id, community_id, ims_item_id)
+ values
+ (:man_id, :org_id, :com_id, :ims_item_id)
+ }
+ }
+ }
+ }
+ }
+}
+
+# We also need to set the sort_order field in the ims_cp_items table, so we are going to do it here
+foreach org_id $org_list {
+ set items_list [db_list_of_lists get_items {
+ select ims_item_id
+ from ims_cp_items
+ where org_id = :org_id
+ order by ims_item_id asc
+ }]
+ set i 1
+ foreach ims_item_id $items_list {
+ lors_central::set_sort_order -sort_order $i -ims_item_id $ims_item_id
+ incr i
+ }
+}
+
+# jump to the front page
+ad_progress_bar_end -url [apm_package_url_from_id [ad_conn package_id]]
Index: openacs-4/packages/lors-central/www/course-add-3.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-add-3.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-add-3.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,45 @@
+
+
+
+
+
+ select
+ icmc.community_id as com_id,
+ icmc.lorsm_instance_id as lors_ins_id,
+ icmc.class_key as cl_key,
+ icmc.isenabled as ie,
+ icmc.istrackable as it
+ from
+ ims_cp_manifest_class icmc
+ where
+ icmc.man_id in ( select revision_id
+ from cr_revisions
+ where item_id = :version_id )
+
+
+
+
+
+ update ims_cp_manifest_class
+ set
+ man_id = :man_id,
+ lorsm_instance_id = :lors_ins_id,
+ class_key = :cl_key,
+ isenabled = :ie,
+ istrackable = :it
+ where
+ community_id = :com_id
+
+
+
+
+
+ delete from ims_cp_manifest_class
+ where
+ community_id is null and
+ class_key is null and
+ man_id = :man_id
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/course-add.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-add.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-add.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,20 @@
+
+#lorsm.lt_Upload_an_IMSSCORM_Co#
+@context;noquote@
+
+
+
+
+ #lorsm.Add_your_own_course#
+
+
+
+
+ #lorsm.lt_We_have_detected_the_# @folder_name;noquote@
+ #lorsm.lt_and_we_will_import_yo#
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/course-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-add.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-add.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,91 @@
+ad_page_contract {
+ Upload and imports an IMS Content Package file
+ Initial form data
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 19 March 2003
+ @cvs-id $Id: course-add.tcl,v 1.1 2005/05/17 16:21:19 miguelm Exp $
+
+} {
+ man_id:optional
+}
+
+set user_id [ad_conn user_id]
+set community_id [dotlrn_community::get_community_id]
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+if { ![info exists man_id] } {
+ set man_id ""
+}
+
+# Permissions
+# dotlrn::require_user_admin_community -user_id $user_id -community_id $community_id
+
+
+# Gets file-storage root folder_id
+# eventually, we should provide an option so it can be imported in
+# different subfolders
+# set fs_package_id [site_node_apm_integration::get_child_package_id \
+ -package_id [dotlrn_community::get_package_id $community_id] \
+ -package_key "file-storage"\
+ ]
+
+#set fs_package_id [apm_package_id_from_key "file-storage"] -- if used
+# with OpenACS
+
+# Gets root folder and root folder name
+#set folder_id [fs::get_root_folder -package_id $fs_package_id]
+#set folder_name [fs::get_object_name -object_id $folder_id]
+
+set folder_id [lors_central::get_root_folder_id]
+set folder_name [lors_central::get_folder_name -folder_id $folder_id]
+
+# Gets whether the file-storage instance is a indb_p or file system
+# (StoreFilesInDatabaseP) one not that we use it now -since we are
+# currently putting everything on the file system, but eventually we
+# will have the option to put it on the db.
+
+#set indb_p [parameter::get -parameter "StoreFilesInDatabaseP" -package_id $fs_package_id]
+set indb_p 1
+
+# Gets URL for file-storage package
+# set fs_url [apm_package_url_from_id $fs_package_id]
+
+set user_id [ad_conn user_id]
+set package_id [ad_conn package_id]
+# check for admin permission on folder
+set admin_p [permission::permission_p -party_id $user_id -object_id $package_id -privilege admin]
+
+# set course id
+set course_id 1
+
+# set context
+set context [list "[_ lorsm.lt_Upload_IMS_Content_Pa]"]
+
+template::form create course_upload -action course-add-2 -html {enctype multipart/form-data}
+
+template::element create course_upload course_id -label "[_ lorsm.course_id]" -datatype integer -widget hidden
+
+template::element create course_upload indb_p -label "[_ lorsm.indb_p]" -datatype integer -widget hidden
+
+#template::element create course_upload fs_package_id -label "[_ lorsm.fs_package_id]" -datatype integer -widget hidden
+
+# template::element create course_upload folder_id -label "[_ lorsm.folder_id]" -datatype integer -widget hidden
+
+template::element create course_upload upload_file -label "[_ lorsm.lt_Choose_the_course_zip]" -help_text "[_ lorsm.lt_Use_the_Browse_button]" -datatype text -widget file
+
+# To support course versions
+template::element create course_upload man_id -datatype integer -widget hidden
+
+template::element set_properties course_upload course_id -value $course_id
+# template::element set_properties course_upload folder_id -value $folder_id
+template::element set_properties course_upload indb_p -value $indb_p
+# template::element set_properties course_upload fs_package_id -value $fs_package_id
+template::element set_properties course_upload man_id -value $man_id
+
+
+ad_return_template
+
+
Index: openacs-4/packages/lors-central/www/course-admin.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-admin.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-admin.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,16 @@
+
+ @title@
+ @context@
+
+
+
+
+ #lorsm.lt_Courses_in_your_Repos#
+
+
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/course-admin.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-admin.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-admin.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,147 @@
+# packages/lors-central/www/index.tcl
+
+ad_page_contract {
+ Learning Object Repository Management Index page
+
+} {
+ man_id:integer,notnull
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+
+set title "[_ lorsm.lt_Manage_Courses_in_Rep]"
+set context [list "[_ lorsm.Manage_Courses]"]
+
+
+set package_id [ad_conn package_id]
+set user_id [ad_conn user_id]
+# set community_id [dotlrn_community::get_community_id]
+
+
+# set admin_p [dotlrn::user_can_admin_community_p \
+ -user_id [ad_conn user_id] \
+ -community_id $community_id ]
+
+# set admin_p [dotlrn::user_can_admin_community_p \
+ -user_id $user_id \
+ -community_id $community_id ]
+
+# Permissions
+# dotlrn::require_user_admin_community -user_id $user_id -community_id $community_id
+
+set actions [list]
+
+lappend actions "[_ lorsm.Add_Course]" [export_vars -base "course-add"] "[_ lorsm.lt_Add_a_IMSSCORM_Compli]"
+lappend actions "[_ lorsm.lt_Search_Learning_Objec]" [export_vars -base "/search"] "[_ lorsm.lt_Search_for_Learninng_]"
+lappend actions "[_ lorsm.Available_Courses]" [export_vars -base "shared/"] "[_ lorsm.lt_View_Available_Course]"
+
+
+template::list::create \
+ -name d_courses \
+ -multirow d_courses \
+ -html {width 50%} \
+ -actions $actions \
+ -key man_id \
+ -no_data "[_ lorsm.No_Courses]" \
+ -elements {
+ course_name {
+ label "[_ lorsm.Available_Courses]"
+ display_col course_name
+ link_url_eval {delivery/?[export_vars man_id]}
+ link_html {title "[_ lorsm.Access_Course]"}
+
+ }
+ class_name {
+ label "[_ lors-central.class_name]"
+ }
+ hasmetadata {
+ label "[_ lorsm.Metadata_1]"
+ link_url_eval {md/?[export_vars ims_md_id]}
+ link_html {title "[_ lorsm.See_metadata]" }
+ html { align center }
+ }
+ isscorm {
+ label "[_ lorsm.SCORM]"
+ html { align center }
+ }
+ isenabled {
+ label "[_ lorsm.Status_1]"
+ html { align center }
+ }
+ istrackable {
+ label "[_ lorsm.Tracking]"
+ link_url_eval {tracking/?[export_vars {man_id lorsm_instance_id community_id}]}
+ link_html {title "[_ lorsm.lt_Track_Students_Progre]" class button}
+ html { align center }
+ }
+ creation_user {
+ label "[_ lorsm.Owner]"
+ display_eval {[person::name -person_id $creation_user]}
+ link_url_eval {[acs_community_member_url -user_id $creation_user]}
+ }
+ creation_date {
+ label "[_ lorsm.Creation_Date]"
+ display_eval {[lc_time_fmt $creation_date "%x %X"]}
+ }
+ export {
+ label "[_ lorsm.Export]"
+ display_eval {\[zip\]}
+ link_url_eval {[export_vars -base export folder_id]}
+ link_html {title "[_ lorsm.lt_Export_as_IMS_Content]"}
+ html { align center }
+ }
+ admin {
+ label "[_ lorsm.Admin_Course]"
+ display_eval {Admin}
+ link_url_eval {[export_vars -base course-structure {man_id lorsm_instance_id}]}
+ link_html {title "[_ lorsm.Admin_Course]" class button}
+ html { align center }
+ }
+ }
+
+
+db_multirow -extend { ims_md_id class_name } d_courses select_d_courses {
+ select
+ cp.man_id,
+ cp.course_name,
+ cp.identifier,
+ cp.version,
+ cpmc.lorsm_instance_id,
+ cpmc.community_id,
+ case
+ when hasmetadata = 't' then 'Yes'
+ else 'No'
+ end as hasmetadata,
+ case
+ when isscorm = 't' then 'Yes'
+ else 'No'
+ end as isscorm,
+ cp.fs_package_id,
+ cp.folder_id,
+ acs.creation_user,
+ acs.creation_date,
+ acs.context_id,
+ case
+ when cpmc.isenabled = 't' then 'Enabled'
+ else 'Disabled'
+ end as isenabled,
+ case
+ when cpmc.istrackable = 't' then 'Yes'
+ else 'No'
+ end as istrackable
+ from
+ ims_cp_manifests cp, acs_objects acs, ims_cp_manifest_class cpmc
+ where
+ cp.man_id = acs.object_id
+ and
+ cp.man_id = :man_id
+ and
+ cp.man_id = cpmc.man_id
+ order by acs.creation_date desc
+} {
+ set ims_md_id $man_id
+ set class_name [lors_central::get_class_name -community_id $community_id]
+}
+
Index: openacs-4/packages/lors-central/www/course-associate.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-associate.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-associate.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,41 @@
+ad_page_contract {
+ Associates a item_id with dotlrn's class_instance_id or community
+
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+} {
+ item_id:notnull
+ type:notnull
+ object_id:multiple
+ { return_url "" }
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+set man_id [content::item::get_live_revision -item_id $item_id]
+
+foreach community_id $object_id {
+ # Here we associate the course with every community_id that was checked
+ lors_central::add_relation -item_id $item_id -community_id $community_id -class_key $type
+
+ # Now we have to make insert in the ims_cp_items_map in orther to tell which version
+ # of which course will be shown to an especific dotlrn class.
+ set org_list [db_list_of_lists get_organizations { }]
+ foreach org_id $org_list {
+ # We need to insert every single ims_item_id to ims_cp_items_map (only the live_revision)
+ set items_list [db_list_of_lists get_ims_items { }]
+ foreach ims_item_id $items_list {
+ db_dml insert_items { }
+ }
+ }
+ }
+
+
+
+if { [empty_string_p $return_url] } {
+ ad_returnredirect "course-dotlrn-assoc?item_id=$item_id"
+} else {
+ ad_returnredirect $return_url
+}
+
Index: openacs-4/packages/lors-central/www/course-associate.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-associate.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-associate.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,46 @@
+
+
+
+
+
+ select
+ org_id
+ from
+ ims_cp_organizations
+ where
+ man_id = :man_id
+
+
+
+
+
+ select
+ ims_item_id
+ from
+ ims_cp_items
+ where
+ org_id = :org_id
+ and
+ ims_item_id = (
+ select live_revision
+ from cr_items
+ where item_id = (
+ select item_id
+ from cr_revisions
+ where revision_id = ims_item_id
+ )
+ )
+
+
+
+
+
+
+ insert into ims_cp_items_map
+ (man_id,org_id,community_id,ims_item_id)
+ values
+ (:man_id,:org_id,:community_id,:ims_item_id)
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/course-association-drop.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-association-drop.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-association-drop.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,32 @@
+ad_page_contract {
+ Drop associations of item_id's with dotlrn's classes or communities
+
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+} {
+ item_id:notnull
+ object_id:multiple
+ { return_url "" }
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+
+set man_list [db_list_of_lists get_man_ids { }]
+foreach community_id $object_id {
+ lors_central::drop_relation -item_id $item_id -community_id $community_id
+ foreach man_id $man_list {
+ set org_list [db_list_of_lists get_organizations { }]
+ foreach org_id $org_list {
+ db_dml delete_items { }
+ }
+ }
+}
+
+if { [empty_string_p $return_url] } {
+ ad_returnredirect "course-dotlrn-assoc?item_id=$item_id"
+} else {
+ ad_returnredirect $return_url
+}
+
Index: openacs-4/packages/lors-central/www/course-association-drop.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-association-drop.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-association-drop.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,37 @@
+
+
+
+
+
+ select
+ revision_id
+ from
+ cr_revisions
+ where
+ item_id = :item_id
+
+
+
+
+
+
+ select
+ org_id
+ from
+ ims_cp_organizations
+ where
+ man_id = :man_id
+
+
+
+
+
+ delete from ims_cp_items_map
+ where
+ man_id = :man_id and
+ org_id = :org_id and
+ community_id = :community_id
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/course-dotlrn-assoc.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-dotlrn-assoc.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-dotlrn-assoc.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,7 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
Index: openacs-4/packages/lors-central/www/course-dotlrn-assoc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-dotlrn-assoc.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-dotlrn-assoc.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,157 @@
+ad_page_contract {
+ @author Miguel Marin (migeulmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+
+ This page associate this course to one class or community of dotlrn
+} {
+ man_id:integer,optional
+ item_id:integer,optional
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+set title [_ lors-central.associate_to]
+
+# Get the item_id that the manifest_id has associated
+if { ![info exist item_id] } {
+ set item_id [lors_central::get_item_id -revision_id $man_id]
+ set context [list [list "one-course-associations?man_id=$man_id" [_ lors-central.one_course_assoc]] \
+ [_ lors-central.associate_to]]
+} else {
+ set context [list [list "one-course-associations?item_id=$item_id" [_ lors-central.one_course_assoc]] \
+ [_ lors-central.associate_to]]
+}
+
+set user_id [ad_conn user_id]
+
+
+##################################### TO ASSOCIATE ##########################################################
+
+db_multirow -extend { rel type } classes_list get_dotlrn_classes { } {
+ set rel [lors_central::relation_between -item_id $item_id -community_id $com_id]
+ set type dotlrn_class_instance
+}
+
+template::list::create \
+ -name dotlrn_classes \
+ -multirow classes_list \
+ -key community_id \
+ -has_checkboxes\
+ -bulk_actions {
+ "\#lors-central.associate\#" "course-associate" "\#lors-central.associate_to_class\#" \
+ } \
+ -bulk_action_method post \
+ -bulk_action_export_vars {
+ item_id
+ type
+ }\
+ -row_pretty_plural "[_ lors-central.dotlrn_classes]" \
+ -elements {
+ check_box {
+ class "list-narrow"
+ label " "
+ display_template {
+
+ }
+ }
+ class {
+ label "[_ lors-central.class_name]"
+ display_template {
+ @classes_list.pretty_name@
+ }
+ }
+ dep_name {
+ label "[_ lors-central.dep_name]"
+ display_template {
+ @classes_list.department_name@
+ }
+ }
+ term_name {
+ label "[_ lors-central.term_name]"
+ display_template {
+ @classes_list.term_name@
+ }
+ }
+ subject {
+ label "[_ lors-central.subject_name]"
+ display_template {
+ @classes_list.class_name@
+ }
+ }
+ associate {
+ display_template {
+
+ #lors-central.associated#
+
+ }
+ }
+ }
+
+
+############################## TO DROP ASSOCIATION ######################################
+
+db_multirow -extend { rel } drop_classes_list get_dotlrn_classes_drop { } {
+ set rel [lors_central::relation_between -item_id $item_id -community_id $com_id]
+}
+
+template::list::create \
+ -name drop_dotlrn_classes \
+ -multirow drop_classes_list \
+ -key community_id \
+ -has_checkboxes\
+ -bulk_actions {
+ "\#lors-central.drop\#" "course-association-drop" "\#lors-central.drop_association\#" \
+ } \
+ -bulk_action_method post \
+ -bulk_action_export_vars {
+ item_id
+ }\
+ -row_pretty_plural "[_ lors-central.dotlrn_classes]" \
+ -elements {
+ check_box {
+ class "list-narrow"
+ label " "
+ display_template {
+
+ }
+ }
+ class {
+ label "[_ lors-central.class_name]"
+ display_template {
+ @drop_classes_list.pretty_name@
+ }
+ }
+ dep_name {
+ label "[_ lors-central.dep_name]"
+ display_template {
+ @drop_classes_list.department_name@
+ }
+ }
+ term_name {
+ label "[_ lors-central.term_name]"
+ display_template {
+ @drop_classes_list.term_name@
+ }
+ }
+ subject {
+ label "[_ lors-central.subject_name]"
+ display_template {
+ @drop_classes_list.class_name@
+ }
+ }
+ associate {
+ display_template {
+
+ #lors-central.associated#
+
+ }
+ }
+ }
+
Index: openacs-4/packages/lors-central/www/course-dotlrn-assoc.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-dotlrn-assoc.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-dotlrn-assoc.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,68 @@
+
+
+
+
+
+ select
+ dc.class_instance_id as com_id,
+ dc.department_name,
+ dc.term_name,
+ dc.class_name,
+ dc.pretty_name,
+ dc.url
+ from
+ dotlrn_class_instances_full dc
+ where
+ dc.class_instance_id not in
+ (
+ select
+ icmc.community_id
+ from
+ ims_cp_manifest_class icmc
+ where
+ icmc.community_id is not null and
+ man_id in
+ (
+ select revision_id
+ from cr_revisions
+ where item_id = :item_id
+ )
+ )
+ order by department_name, term_name, class_name, pretty_name
+
+
+
+
+
+ select
+ dc.class_instance_id as com_id,
+ dc.department_name,
+ dc.term_name,
+ dc.class_name,
+ dc.pretty_name,
+ dc.url
+ from
+ dotlrn_class_instances_full dc
+ where
+ dc.class_instance_id in
+ (
+ select
+ icmc.community_id
+ from
+ ims_cp_manifest_class icmc
+ where
+ icmc.man_id in
+ (
+ select revision_id
+ from cr_revisions
+ where item_id = :item_id
+ )
+ )
+ order by department_name,
+ term_name,
+ class_name,
+ pretty_name
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/course-live-in.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-live-in.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-live-in.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,5 @@
+
+@title;noquote@
+@context;noquote@
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/course-live-in.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-live-in.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-live-in.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,67 @@
+ad_page_contract {
+ Display a list of dotlrn classes where the course is in use
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+} {
+ man_id:integer,optional
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+set title "[_ lors-central.Classes_using]"
+set context [list [list "one-course-associations?man_id=$man_id" [_ lors-central.one_course_assoc]] \
+ [_ lors-central.Classes_using]]
+
+# Get the item_id of man_id
+set item_id [lors_central::get_item_id -revision_id $man_id]
+
+db_multirow -extend { ver_num ver_count manifest_id options } cl_list get_dotlrn_classes { } {
+ set manifest_id [lors_central::get_man_id -community_id $com_id -item_id $item_id]
+ set ver_count [lors_central::count_versions -man_id $manifest_id]
+ set ver_num [lors_central::get_version_num -revision_id $manifest_id]
+ # Create the options for the select menu
+ set options ""
+ for { set i 1 } { $i < [expr $ver_count + 1] } { incr i } {
+ if { [string equal $i $ver_num] } {
+ append options "$i"
+ } else {
+ append options " $i"
+ }
+ }
+}
+
+
+template::list::create \
+ -name dotlrn_classes \
+ -multirow cl_list \
+ -key com_id \
+ -has_checkboxes \
+ -row_pretty_plural "[_ lors-central.dotlrn_classes]" \
+ -elements {
+ class {
+ label "[_ lors-central.class_name]"
+ display_template {
+ @cl_list.pretty_name@
+ }
+ }
+ subject {
+ label "[_ lors-central.subject_name]"
+ display_template {
+ @cl_list.class_name@
+ }
+ }
+ term_name {
+ label "[_ lors-central.term_name]"
+ display_template {
+ @cl_list.term_name@
+ }
+ }
+ current {
+ label "[_ lors-central.current]"
+ display_template {
+ @cl_list.ver_num@ [_ lors-central.of] @cl_list.ver_count@
+ }
+ }
+ }
+
Index: openacs-4/packages/lors-central/www/course-live-in.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-live-in.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-live-in.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,29 @@
+
+
+
+
+
+ select
+ dc.class_instance_id as com_id,
+ dc.department_name,
+ dc.term_name,
+ dc.class_name,
+ dc.pretty_name
+ from
+ dotlrn_class_instances_full dc
+ where
+ dc.class_instance_id in
+ (
+ select
+ icmc.community_id
+ from
+ ims_cp_manifest_class icmc
+ where
+ icmc.man_id = :man_id
+ )
+ order by
+ dc.department_name, dc.term_name, dc.class_name, dc.pretty_name
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/course-version-change.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-version-change.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-version-change.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,69 @@
+ad_page_contract {
+ author Miguel Marin (miguelmarin@viaro.net)
+ author Viaro Networks www.viaro.net
+} {
+ man_id:notnull
+}
+
+set user_id [ad_conn user_id]
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+set item_id [lors_central::get_item_id -revision_id $man_id]
+
+# Check for admin permissions over the course
+set permission_p [lors_central::check_privilege -item_id $item_id -user_id $user_id]
+
+if { !$permission_p } {
+ ad_return_complaint 1 "You don't have permission to change versions on this course"
+ ad_script_abort
+}
+
+# Update the man_id field on all classes that use this man_id
+lors_central::change_version_all_courses -man_id $man_id -item_id $item_id
+
+# We need to update the ims_cp_items_map table to have same man_id for all clases
+# First we are going to get all the communities id that are associated to this man_id
+
+set com_list [db_list_of_lists get_communities {
+ select distinct community_id from ims_cp_manifest_class
+ where man_id in ( select revision_id from cr_revisions where item_id = :item_id )
+}]
+
+# Now we ae going to delete all from ims_cp_items related to this man_id
+db_dml delete_from_items_map {
+ delete from ims_cp_items_map
+ where man_id in ( select revision_id from cr_revisions where item_id = :item_id )
+}
+
+
+# Now we are going to insert the same course for all dotlrn classes
+set org_list [db_list_of_lists get_organizations {
+ select org_id
+ from ims_cp_organizations
+ where man_id = :man_id
+}]
+foreach community_id $com_list {
+ foreach org_id $org_list {
+ set items_list [db_list_of_lists get_items {
+ select ims_item_id
+ from ims_cp_items
+ where org_id = :org_id
+ and ims_item_id in ( select live_revision
+ from cr_items
+ )
+ }]
+ foreach ims_item_id $items_list {
+ db_dml insert_items {
+ insert into ims_cp_items_map
+ (man_id,org_id,community_id,ims_item_id)
+ values
+ (:man_id,:org_id,:community_id,:ims_item_id)
+ }
+ }
+ }
+
+}
+
+ad_returnredirect "one-course-associations?man_id=$man_id"
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/course-versions.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-versions.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-versions.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,11 @@
+
+#lorsm.lt_one_course_versions#
+@context;noquote@
+
+
+
+
+
+ New Course Version
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/course-versions.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-versions.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-versions.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,87 @@
+ad_page_contract {
+ author Miguel Marin (miguelmarin@viaro.net)
+ author Viaro Networks www.viaro.net
+} {
+ man_id:integer,optional
+ item_id:integer,optional
+ {index_p 0}
+}
+
+set user_id [ad_conn user_id]
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+
+if { ![info exist item_id ] } {
+ set item_id [lors_central::get_item_id -revision_id $man_id]
+ set context [list [list "one-course?man_id=$man_id" \
+ [_ lors-central.one_course]] [_ lorsm.lt_one_course_versions]]
+} else {
+ if { $index_p } {
+ set context [list [_ lorsm.lt_one_course_versions]]
+ } else {
+ set context [list [list "one-course?item_id=$item_id" [_ lors-central.one_course]] \
+ [_ lorsm.lt_one_course_versions]]
+ }
+}
+
+################################################
+# Check for admin permissions over the course
+
+if { ![acs_user::site_wide_admin_p -user_id $user_id ]} {
+ set permission_p [db_string check_permission "select 1 from acs_permissions where object_id = :item_id
+ and grantee_id = :user_id and privilege = 'admin'" -default 0]
+} else {
+ set permission_p 1
+}
+
+set last_version [db_string get_live_revision "select live_revision from cr_items where item_id = :item_id"]
+
+db_multirow -extend { ver_num } course_versions get_versions { } {
+ set ver_num [lors_central::get_version_num -revision_id $man_id]
+}
+
+template::list::create \
+ -name course_versions \
+ -multirow course_versions \
+ -key course_name \
+ -bulk_action_method post \
+ -has_checkboxes \
+ -bulk_action_export_vars {
+ } \
+ -row_pretty_plural "[_ lors-central.course_versions]" \
+ -elements {
+ version_number {
+ label "[_ lors-central.version_number]"
+ display_template {
+ @course_versions.ver_num@
+ }
+ }
+ course_name {
+ label "[_ lors-central.course_name]"
+ display_template {
+ @course_versions.course_name@
+ }
+ }
+ man_id {
+ label "[_ lors-central.man_id]"
+ display_template {
+ @course_versions.man_id@
+ }
+ }
+ latest_version {
+ display_template {
+
+
+
+
+
+
+
+ }
+ }
+ }
+
+
+
Index: openacs-4/packages/lors-central/www/course-versions.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/course-versions.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/course-versions.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+
+
+ select
+ r.title as course_name,
+ r.revision_id as man_id
+ from
+ cr_revisions r
+ where
+ :item_id = r.item_id
+ order by
+ revision_id asc
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/edit-content.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/edit-content.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/edit-content.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,51 @@
+# packages/lorsm/www/edit-content.tcl
+
+ad_page_contract {
+
+ Online content editor for LORSm
+
+ Uses htmlarea to edit html/txt file-storage
+ content
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 2004-07-06
+ @arch-tag: 6f57a7d1-7032-44e4-b333-6a7fb74ae30b
+ @cvs-id $Id: edit-content.tcl,v 1.1 2005/05/17 16:21:19 miguelm Exp $
+} {
+ folder_id:integer
+ fs_package_id:integer
+ identifierref
+ return_url
+} -properties {
+} -validate {
+} -errors {
+}
+
+set user_id [ad_conn user_id]
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+set folder [db_string select_folder_key {select key from fs_folders where folder_id = :folder_id}]
+set fs_root_folder [db_string sql {select file_storage__get_root_folder(:fs_package_id)}]
+set identifierref [lorsm::fix_url -url $identifierref]
+set pather $folder/$identifierref
+
+# in some case, the resource is defined with a / that conflicts with
+# our existing / creating a double //. Therefore we use a regsub to
+# get rid of it
+regsub -all {//} $pather {/} pather
+
+
+set file_id [db_string sql {select content_item__get_id(:pather, :fs_root_folder, 'f')}]
+
+# check for permissions
+# By default, only the creator has admin access to content
+
+permission::require_write_permission -object_id $file_id -creation_user $user_id
+
+#ns_write "[_ lorsm.lt_folder_foldern_pather]"
+#ad_script_abort
+
+ad_returnredirect [export_vars -base [apm_package_url_from_id $fs_package_id]file-content-edit {file_id return_url}]
+
Index: openacs-4/packages/lors-central/www/file-content-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/file-content-edit.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/file-content-edit.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,6 @@
+
+
+ This file can be accessed via WebDAV at @webdav_url@
+
+
+
Index: openacs-4/packages/lors-central/www/file-content-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/file-content-edit.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/file-content-edit.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,51 @@
+# packages/file-storage/www/file-content-edit.tcl
+
+ad_page_contract {
+
+ Edit contents of a file
+
+ @author Deds Castillo (deds@i-manila.com.ph)
+ @creation-date 2004-07-03
+ @arch-tag: 05a2f0b7-6780-4385-bb62-37d959c315cd
+ @cvs-id $Id: file-content-edit.tcl,v 1.1 2005/05/17 16:21:19 miguelm Exp $
+} {
+ file_id:notnull
+ res_id:notnull
+ man_id:notnull
+ {return_url ""}
+} -properties {
+ title:onevalue
+ context:onevalue
+} -validate {
+} -errors {
+}
+
+
+# We set here the nsv_variables to send to index.vuh to display de images
+# inside the area, we only need the ims_item_id
+
+set ims_item_id [lors_central::get_ims_item_id_or_res_id -res_id $res_id]
+if {[nsv_exists delivery_vars [ad_conn session_id]]} {
+ nsv_unset delivery_vars [ad_conn session_id]
+}
+nsv_set delivery_vars [ad_conn session_id] [list]
+nsv_lappend delivery_vars [ad_conn session_id] $ims_item_id
+
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+# check they have read permission on this file
+
+ad_require_permission $file_id read
+
+#set templating datasources
+
+set user_id [ad_conn user_id]
+set title "Edit File Contents"
+
+
+set file_item_id [lors_central::get_item_id -revision_id $file_id]
+set webdav_url [fs::webdav_url -item_id $file_item_id]
+
+
Index: openacs-4/packages/lors-central/www/folder-description.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/folder-description.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/folder-description.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,7 @@
+
+
+ @back_button;noquote@
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/folder-description.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/folder-description.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/folder-description.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,101 @@
+ad_page_contract {
+ User Interafe to show all files that one course has
+ @author Miguel Marin (migulmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+} {
+ folder_id:integer,optional
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+if { ![info exists folder_id] } {
+ # Get lorsm root folder_id
+ set folder_id [lors_central::get_root_folder_id]
+} else {
+ # Get parent folder_id and label
+ db_1row get_parent_id_label {select name, parent_id from cr_items where content_type = 'content_folder'
+ and item_id = :folder_id
+ }
+ set back_button "Back to $name "
+ if { [string equal $parent_id "-100"] } {
+ set parent_root_p 0
+ } else {
+ set parent_root_p 1
+ }
+}
+
+
+template::list::create \
+ -name folder_elements \
+ -multirow get_elements \
+ -bulk_action_method post \
+ -bulk_action_export_vars { } \
+ -row_pretty_plural "elements to show" \
+ -elements {
+ name {
+ label "Name"
+ display_template {
+
+
+ @get_elements.name@
+
+
+
+ @get_elements.name@
+
+
+ }
+ }
+ size {
+ label "Size"
+ display_template {
+
+ @get_elements.size@ items
+
+
+ @get_elements.length@
+
+ }
+ }
+ type {
+ label "Type"
+ display_template {
+
+ Folder
+
+
+ @get_elements.mime_type@
+
+ }
+ }
+ last_modified {
+ label "Last Modified"
+ display_template {
+ @get_elements.last_modified@
+ }
+ }
+ }
+
+db_multirow -extend { is_folder size mime_type last_modified length } get_elements get_folder_elements {
+ select * from cr_items where parent_id = :folder_id
+} {
+ set is_folder [db_string is_folder { select 1 from cr_folders where folder_id = :item_id } -default "0"]
+ set size [db_string get_size { select count(item_id) from cr_items where parent_id = :item_id } -default "0"]
+ db_0or1row get_extra_information { select content_length as length, mime_type, publish_date as last_modified
+ from cr_revisions where revision_id = :live_revision }
+
+ set last_modified_ansi [lc_time_system_to_conn $last_modified]
+
+ set last_modified [lc_time_fmt $last_modified_ansi "%x %X"]
+
+ if { ![string equal $is_folder 1]} {
+ if {$length < 1024} {
+ set length "[lc_numeric $length ] bytes"
+ } else {
+ set length "[lc_numeric [expr $length / 1024 ]] Kb"
+ }
+
+ }
+
+}
Index: openacs-4/packages/lors-central/www/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/index.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/index.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,24 @@
+
+ @title@
+ @context@
+
+#lorsm.lt_Courses_in_your_Repos#
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/index.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/index.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,104 @@
+# packages/lors-central/www/index.tcl
+
+ad_page_contract {
+ Lors Central Index page ( display al courses )
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+} {
+ keyword:optional
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+set title "[_ lorsm.lt_Manage_Courses_in_Rep]"
+set context [list "[_ lorsm.Manage_Courses]"]
+
+
+# To search courses
+if { [info exist keyword] } {
+ if { [string equal $keyword [_ lors-central.please_type]] } {
+ set extra_query ""
+ } else {
+ set items "(0"
+ set keyword "%$keyword%"
+ db_foreach get_items_like { } {
+ append items ",$item_id"
+ }
+ append items ")"
+ set extra_query "and cr.item_id in $items"
+ }
+} else {
+ set extra_query ""
+}
+
+set package_id [ad_conn package_id]
+set user_id [ad_conn user_id]
+set community_id [dotlrn_community::get_community_id]
+
+set admin_p [dotlrn::user_can_admin_community_p \
+ -user_id [ad_conn user_id] \
+ -community_id $community_id ]
+
+set admin_p [dotlrn::user_can_admin_community_p \
+ -user_id $user_id \
+ -community_id $community_id ]
+
+# Permissions
+# dotlrn::require_user_admin_community -user_id $user_id -community_id $community_id
+
+set actions [list]
+
+lappend actions "[_ lorsm.Add_Course]" [export_vars -base "course-add"] "[_ lorsm.lt_Add_a_IMSSCORM_Compli]"
+lappend actions "[_ lorsm.lt_Search_Learning_Objec]" [export_vars -base "search"] "[_ lorsm.lt_Search_for_Learninng_]"
+
+
+template::list::create \
+ -name get_courses \
+ -multirow get_courses \
+ -html {width 50%} \
+ -actions $actions \
+ -key item_id \
+ -no_data "[_ lorsm.No_Courses]" \
+ -elements {
+ course_name {
+ label "[_ lorsm.Available_Courses]"
+ display_col course_name
+ link_url_eval {[export_vars -base one-course { item_id } ]}
+ }
+ versions {
+ label "[_ lors-central.versions]"
+ display_template {
+
+ @get_courses.versions@
+
+ }
+ }
+ creation_user {
+ label "[_ lorsm.Owner]"
+ display_eval {[person::name -person_id $creation_user]}
+ link_url_eval {[acs_community_member_url -user_id $creation_user]}
+ }
+ creation_date {
+ label "[_ lorsm.Creation_Date]"
+ display_eval {[lc_time_fmt $creation_date "%x %X"]}
+ }
+
+ }
+
+# Get the root folder where the manifests will be stored uploading from lors-central
+set manifest_root [lors_central::get_root_manifest_folder_id]
+
+# Get all folders inside manifest_root, to check that man_id is in one of this folders
+set folders "("
+db_foreach get_subfolders { } {
+ append folders "${item_id},"
+}
+append folders "0)"
+
+db_multirow -extend { course_name versions } get_courses select_courses { } {
+ set course_name [db_string get_item_name "select name from cr_items where item_id = :item_id"]
+ set versions [lors_central::count_versions -item_id $item_id]
+}
+
+
Index: openacs-4/packages/lors-central/www/index.vuh
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/index.vuh,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/index.vuh 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,102 @@
+ad_page_contract {
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+ @creation date 06-05-2005
+
+ Get the right file to display in preview pages, expect ims_item_id
+ from nsv variables
+} {
+
+}
+
+# We get the url of the image or link
+set the_url [ad_conn path_info]
+
+# We get the ims_item_id of nsv variable
+set ims_item_id [lindex [nsv_get delivery_vars [ad_conn session_id]] 0]
+
+# We need the man_id of the ims_item_id to get the folder that holds the content
+set res_id [lors_central::get_ims_item_id_or_res_id -ims_item_id $ims_item_id]
+set man_id [db_string get_man_id { select man_id from ims_cp_resources where res_id = :res_id }]
+set root_folder [lors_central::get_root_folder_id]
+set name [lors_central::get_course_name -man_id $man_id]
+
+set folder [db_string get_folder {
+ select
+ item_id
+ from
+ cr_items
+ where
+ name = :name and
+ parent_id = :root_folder
+
+ }]
+
+# Now that we have the folder we get the href of that the ims_item_id has associated to move to the right folder
+set href [lors_central::get_href -ims_item_id $ims_item_id]
+
+set path_list [split $href "/"]
+ set char [string range $href 0 0]
+ if { [string equal $char "/"] } {
+ set subfolder_name [lindex $path_list 1]
+ set url_name [lindex $path_list 2]
+ } else {
+ set subfolder_name [lindex $path_list 0]
+ set url_name [lindex $path_list 1]
+ }
+
+# Get the folder_id from the href and figure it out if we have to move another
+# folder down
+if { ![empty_string_p $subfolder_name] } {
+ set folder_id [db_string get_folder_id {
+ select
+ item_id
+ from
+ cr_items
+ where
+ name = :subfolder_name and
+ parent_id = :folder
+ }]
+} else {
+ set folder_id $folder
+}
+
+# Now that we have the folder we check out the url to see if we have to go
+# down again
+
+set split_url [split $the_url "/"]
+
+set list_length [llength $split_url]
+set file_name [lindex $split_url [expr $list_length - 1]]
+set folder_list [lrange $split_url 0 [expr $list_length - 2]]
+
+# Moving down folder by folder to get the last folder_id
+foreach folder_name $folder_list {
+ set folder_id [db_string get_folder_id {
+ select
+ item_id
+ from
+ cr_items
+ where
+ name = :folder_name and
+ parent_id = :folder_id
+ }]
+}
+
+# Get the item_id of the file to show
+set item_id [db_string get_item_id {
+ select
+ item_id
+ from
+ cr_items
+ where
+ parent_id = :folder_id and
+ name = :file_name
+ }]
+
+# Get the live revision
+set revision_id [item::get_live_revision $item_id]
+
+# Show the content
+cr_write_content -revision_id $revision_id
+
Index: openacs-4/packages/lors-central/www/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/index.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/index.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,46 @@
+
+
+
+
+
+ select
+ item_id
+ from
+ cr_items
+ where
+ parent_id = :manifest_root
+
+
+
+
+
+ select distinct
+ cr.item_id,
+ acs.creation_user,
+ acs.creation_date
+ from
+ cr_revisions cr, acs_objects acs, cr_items ci
+ where
+ acs.object_id = cr.item_id and
+ ci.item_id = cr.item_id and
+ ci.parent_id in $folders and
+ cr.revision_id in
+ (
+ select man_id from ims_cp_manifests
+ )
+ $extra_query
+
+
+
+
+
+ select
+ item_id
+ from
+ cr_items
+ where
+ lower(name) like lower(:keyword)
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/new-clipboard-files.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/new-clipboard-files.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/new-clipboard-files.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,117 @@
+ad_page_contract {
+ Add all checked files to the specific resource
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+} {
+ man_id:notnull
+ ims_item_id:notnull
+ {name ""}
+ object_id:multiple
+ sort_order:optional
+}
+
+set user_id [ad_conn user_id]
+
+foreach object $object_id {
+ #The same file can not be added to the same res_id twice so we are going to check that
+ set ims_res_id [db_string get_res_id { } ]
+ if { [db_string check_file { } -default 0] } {
+ ad_return_complaint 1 "[_ lors-central.this_file_is] "
+ ad_script_abort
+ }
+}
+
+db_transaction {
+ # We get the resource_id to get the href of the item that is the default
+ # since this is the default file the ims_item has
+ db_0or1row get_resource_info { }
+
+ # We need the info about the ims_item_id
+ db_0or1row get_item_info { }
+
+ set cr_revision [lors_central::get_content_revision_id -ims_item_id $ims_item_id]
+ set cr_item_id [lors_central::get_item_id -revision_id $cr_revision]
+ if { [string equal $cr_item_id 0] } {
+ # It's probably an URL so we are going to treat it as one
+ set cr_item_id [lors_central::get_item_url -ims_item_id $ims_item_id -man_id $man_id]
+ }
+ # We get the folder_id to know where to store the new cr_item
+ set folder_id [lors_central::get_parent_id -item_id $cr_item_id]
+
+ set res_root_folder_id [lors_central::get_root_resources_folder_id]
+ set res_folder_id [lors_central::folder_id_from_man_parent -man_id $man_id -parent_id $res_root_folder_id]
+
+ set title [lors_central::check_item_name -parent_id $res_folder_id -name $identifierref]
+ set new_res_item_id [content::item::new -name $title -creation_user $user_id \
+ -parent_id $res_folder_id -content_type "ims_resource_object"]
+
+ set new_res_rev_id [content::revision::new -item_id $new_res_item_id -title $title \
+ -creation_user $user_id -is_live "t"]
+
+
+ db_dml update_new_res {
+ update
+ ims_cp_resources
+ set
+ man_id = :man_id,
+ identifier = :identifierref,
+ type = 'webcontent',
+ href = :res_href,
+ hasmetadata = 'f'
+ where
+ res_id = :new_res_rev_id
+ }
+
+
+ # We need to create a new row in the ims_cp_files for each file that was sen here from clipboard
+ foreach object $object_id {
+ db_0or1row get_file_info { }
+ db_dml insert_new_file {
+ insert into ims_cp_files (file_id, res_id, pathtofile, filename, hasmetadata)
+ values (:object, :new_res_rev_id, :pathtofile, :filename, 'f')
+ }
+ }
+
+ set item_id [lors_central::get_item_id -revision_id $ims_item_id]
+ set new_ims_rev_id [content::revision::new -item_id $item_id -title $item_title \
+ -creation_user $user_id -is_live "t"]
+
+ db_dml update_ims_cp_items {
+ update ims_cp_items
+ set
+ org_id = :org_id,
+ identifier = :identifier,
+ identifierref = :identifierref,
+ item_title = :item_title,
+ parent_item = :parent_item,
+ sort_order = :sort_order
+ where ims_item_id = :new_ims_rev_id
+
+ }
+
+ # Now this new revision_id is the one that holds the content of the new resource
+ # We have to make a row in ims_cp_items_to_resources table
+ db_dml insert_new_item_to_res {
+ insert into ims_cp_items_to_resources (ims_item_id, res_id )
+ values (:new_ims_rev_id, :new_res_rev_id)
+ }
+
+ set old_res_id [db_string get_old_res_id { } -default ""]
+ db_dml carry_forward_files {
+ insert into ims_cp_files (
+ select
+ file_id,
+ :new_res_rev_id,
+ pathtofile,
+ filename,
+ hasmetadata
+ from
+ ims_cp_files
+ where
+ res_id = :old_res_id)
+ }
+}
+
+ad_returnredirect [export_vars -base "one-learning-object" {man_id {ims_item_id $new_ims_rev_id}}]
+
+
Index: openacs-4/packages/lors-central/www/new-clipboard-files.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/new-clipboard-files.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/new-clipboard-files.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,99 @@
+
+
+
+
+
+ select
+ res_id
+ from
+ ims_cp_items_to_resources
+ where
+ ims_item_id = :ims_item_id
+
+
+
+
+
+ select
+ 1
+ from
+ ims_cp_files
+ where
+ file_id = :object
+ and res_id = :ims_res_id
+
+
+
+
+
+ select
+ href as res_href,
+ identifier as identiferref
+ from
+ ims_cp_resources
+ where
+ res_id = :ims_res_id
+
+
+
+
+
+ select
+ distinct pathtofile, filename
+ from
+ ims_cp_files
+ where
+ file_id = :object
+
+
+
+
+
+ select
+ identifier,
+ item_title,
+ parent_item,
+ org_id,
+ sort_order,
+ identifierref
+ from
+ ims_cp_items
+ where
+ ims_item_id = :ims_item_id
+
+
+
+
+
+ select
+ distinct filename
+ from
+ ims_cp_files
+ where
+ file_id = :new_file_id
+
+
+
+
+
+ select
+ res_id
+ from
+ ims_cp_items_to_resources
+ where
+ ims_item_id = :ims_item_id
+
+
+
+
+
+ select
+ parent_item
+ from
+ ims_cp_items
+ where
+ ims_item_id = :ims_item_id
+
+
+
+
Index: openacs-4/packages/lors-central/www/new-file.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/new-file.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/new-file.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,10 @@
+
+@page_title;noquote@
+@context;noquote@
+
+#lors-central.upload_a_new#
+
+
+#lors-central.create_your_new#
+
+
Index: openacs-4/packages/lors-central/www/new-file.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/new-file.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/new-file.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,107 @@
+ad_page_contract {
+ Adds a new file to one resource
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+} {
+ res_id:integer,notnull
+ {man_id ""}
+ {name ""}
+ file_upload:trim,optional
+ file_upload.tmpfile:optional,tmpfile
+ {mime_type ""}
+}
+
+
+set user_id [ad_conn user_id]
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+set page_title "[_ lors-central.new_file]"
+set context "[list [list [export_vars -base one-resource {res_id}] \
+ [_ lors-central.One_learning]] \
+ [_ lors-central.new_file]]"
+
+set man_id [db_string get_man_id "select man_id from ims_cp_resources where res_id=:res_id"]
+ad_form -name file_upload -html {enctype multipart/form-data} \
+ -export {res_id man_id} \
+ -form {
+ {file_title:text(text)
+ {label "[_ lors-central.item_title]"}
+ }
+ {file_upload:text(file)
+ {label "[_ lors-central.choose_the_file]"}
+ {help_text "[_ lors-central.help_text]"}
+ }
+} -on_submit {
+
+ set res_href [lors_central::get_res_href -res_id $res_id]
+
+ set tmp_filename [ns_queryget file_upload.tmpfile]
+ set mime_type [cr_filename_to_mime_type -create $file_upload]
+ set tmp_size [file size $tmp_filename]
+
+ set new_res_rev_id [lors_central::add_file \
+ -filename $file_upload \
+ -title $file_title \
+ -tmp_filename $tmp_filename \
+ -res_id $res_id \
+ -mime_type $mime_type \
+ -man_id $man_id ]
+
+} -after_submit {
+
+ad_returnredirect [export_vars -base "one-resource" {{res_id $new_res_rev_id}}]
+ ad_script_abort
+}
+
+ad_form -name file_write -form {
+ {file_title:text(text)
+ {label "[_ lors-central.item_title]"}
+ }
+ {content:richtext(richtext),optional
+ {label "Content"}
+ {html {rows 20 cols 60}}
+ }
+ {man_id:text(hidden)
+ {value $man_id}
+ }
+ {res_id:text(hidden)
+ {value $res_id}
+ }
+} -on_submit {
+ set content_body [template::util::richtext::get_property contents $content]
+ # Rebuild HTML if necessary
+ if { [regexp -nocase {^(.*<\s*?body[^>]*?>).*(\s*?body\s*?>.*)$} $content match header footer] } {
+ set content_body "${header}${content_body}${footer}"
+ }
+
+ foreach {link id} [regexp -inline -all {.*? } $content_body] {
+ # ns_log notice "DAVEB link '${link}' id '${id}"
+ # find out if its an image
+ if {[db_0or1row mime "select mime_type as this_mime_type, title as this_title
+ from cr_revisions, cr_items
+ where cr_items.item_id=:id and revision_id=live_revision"] } {
+ # ns_log notice "DAVEB mime_type '${this_mime_type}'"
+ if {[string match "image/*" $this_mime_type]} {
+ regsub -all $link $content_body " " content_body
+ } else {
+ # FIXME for now just throw away non image links until we can do something intelligent with them!
+ regsub -all $link $content_body {} content_body
+ }
+ }
+ }
+ set mime_type [template::util::richtext::get_property format $content]
+ set new_res_rev_id [lors_central::add_file \
+ -filename $file_title \
+ -title $file_title \
+ -file_content $content_body \
+ -res_id $res_id \
+ -mime_type $mime_type \
+ -man_id $man_id ]
+
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "one-resource" {{res_id $new_res_rev_id}}]
+ ad_script_abort
+}
+
Index: openacs-4/packages/lors-central/www/new-file.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/new-file.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/new-file.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,94 @@
+
+
+
+
+
+ select
+ res_id
+ from
+ ims_cp_items_to_resources
+ where
+ ims_item_id = :ims_item_id
+
+
+
+
+
+ select
+ 1
+ from
+ ims_cp_files
+ where
+ file_id = :clipboard_object_id
+ and res_id = :ims_res_id
+
+
+
+
+
+ select
+ href as res_href
+ from
+ ims_cp_resources
+ where
+ res_id = :ims_res_id
+
+
+
+
+
+ select
+ parent_item
+ from
+ ims_cp_items
+ where
+ ims_item_id = :ims_item_id
+
+
+
+
+
+ select
+ distinct filename
+ from
+ ims_cp_files
+ where
+ file_id = :new_file_id
+
+
+
+
+
+ select
+ distinct pathtofile
+ from
+ ims_cp_files
+ where
+ file_id = :new_file_id
+
+
+
+
+
+
+ select
+ res_id
+ from
+ ims_cp_items_to_resources
+ where
+ ims_item_id = :ims_item_id
+
+
+
+
+
+ select
+ parent_item
+ from
+ ims_cp_items
+ where
+ ims_item_id = :ims_item_id
+
+
+
+
Index: openacs-4/packages/lors-central/www/new-learning-object.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/new-learning-object.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/new-learning-object.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,13 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
Index: openacs-4/packages/lors-central/www/new-learning-object.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/new-learning-object.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/new-learning-object.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,363 @@
+ad_page_contract {
+ Creates a one new learning object (ims_item_id)
+
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+ @creation_date 2005-03-28
+} {
+ man_id:integer,notnull
+ org_id:notnull
+ parent:integer,optional
+ file_upload:trim,optional
+ file_upload.tmpfile:optional,tmpfile
+ clipboard_object_id:integer,optional
+ ims_item_id:integer,optional
+ {sort_order ""}
+}
+
+set user_id [ad_conn user_id]
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+
+set title "[_ lors-central.new_object]"
+set context "[list [list "one-course?man_id=$man_id" \
+ [_ lors-central.one_course]] [_ lors-central.new_object]]"
+
+if {![exists_and_not_null parent]} {
+ set parent $org_id
+}
+
+set add_link "add-lo?man_id=$man_id&org_id=$org_id&parent_item=$parent&sort_order=$sort_order"
+
+ad_form -name upload_file -html {enctype multipart/form-data} -form {
+ {item_title:text(text)
+ {label "[_ lors-central.item_title]"}
+ }
+ {file_upload:text(file)
+ {label "[_ lors-central.choose_the_file]"}
+ {help_text "[_ lors-central.help_text]"}
+ }
+ {zip_p:text(checkbox),optional
+ {label "[_ lors-central.zip_file]"}
+ {options {{"" 1}}}
+ {help_text "[_ lors-central.this_is_a]"}
+ }
+ {man_id:text(hidden)
+ {value $man_id}
+ }
+ {org_id:text(hidden)
+ {value $org_id}
+ }
+ {sort_order:text(hidden)
+ {value $sort_order}
+ }
+ {parent:text(hidden)
+ {value $parent}
+ }
+} -on_submit {
+ if { ![empty_string_p $zip_p] } {
+ # It's a zip file so we need to make some things
+ # unzips the file
+ if { ![empty_string_p $file_upload] &&
+ [ catch {set tmp_dir [lors::imscp::expand_file $file_upload ${file_upload.tmpfile} expand_$file_upload] } \
+ errMsg] } {
+ ad_return_complaint 1 "[_ lorsm.lt_The_uploaded_file_doe]"
+ ad_script_abort
+ }
+ # Now that we have the zip expanded we will process the files
+ set allfiles [lors::imscp::dir_walk $tmp_dir]
+
+ db_transaction {
+ if { [empty_string_p $sort_order] } {
+ set max_sort_order [db_string get_max_sort_order { } ]
+ set sort_order [expr $max_sort_order + 1]
+ } else {
+ incr sort_order
+ }
+
+ # First we need to create a new resource
+ # We need to know where the new resource should be
+ set res_root_folder_id [lors_central::get_root_resources_folder_id]
+ set res_folder_id [lors_central::folder_id_from_man_parent -man_id $man_id -parent_id $res_root_folder_id]
+
+ # We are going to make the first file that is in the tmp folder the default one
+ set first_file [lindex $allfiles 0]
+ set first_file_split [split $first_file "/"]
+ set first_filename [lindex $first_file_split [expr [llength $first_file_split] - 1]]
+
+ # We are going to check if the file_name already exists
+ set first_filename [lors_central::check_item_name -parent_id $res_folder_id -name $first_filename]
+ set new_res_item_id [content::item::new -name $first_filename -creation_user $user_id \
+ -parent_id $res_folder_id -content_type "ims_resource_object"]
+
+ set new_res_rev_id [content::revision::new -item_id $new_res_item_id -title $first_filename \
+ -creation_user $user_id -is_live "t"]
+
+ # Now we have to update the new row in the ims_cp_resources using this new resource (new_res_id)
+ # we need a new href
+ set new_href "$first_filename"
+
+ db_dml update_new_res {
+ update
+ ims_cp_resources
+ set
+ man_id = :man_id,
+ identifier = :first_filename,
+ type = 'webcontent',
+ href = :new_href,
+ hasmetadata = 'f'
+ where
+ res_id = :new_res_rev_id
+ }
+
+
+ # First we are going to create a new cr_item (file) for the new resource
+ # We need the folder_id of the course to store the new item
+ set course_name [lors_central::get_course_name -man_id $man_id]
+ set root_folder [lors_central::get_root_folder_id]
+ set folder_id [db_string get_folder_id { }]
+
+ # Now we are going to store all files in the Content Repository and insert the rows on ims_cp_files
+ # Here we are going to create a new cr_item and revision for the files that exist on
+ # the zip
+ foreach tmp_filename $allfiles {
+ set split_file [split $tmp_filename "/"]
+ set filename [lindex $split_file [expr [llength $split_file] - 1]]
+ set mime_type [cr_filename_to_mime_type -create $filename]
+ set tmp_size [file size $tmp_filename]
+
+ # We are going to create a new item. First we are going to check
+ # if the name already exists to generate a new one
+ set filename [lors_central::check_item_name -parent_id $folder_id -name $filename]
+ set new_file_item_id [content::item::new -name $filename -creation_user $user_id \
+ -parent_id $folder_id]
+ set new_file_id [content::revision::new -item_id $new_file_item_id -title $filename \
+ -creation_user $user_id -mime_type $mime_type -is_live "t"]
+
+ # Now we store the content in the CR
+ set cr_file [cr_create_content_file $new_file_item_id $new_file_id $tmp_filename]
+
+ # get the size
+ set file_size [cr_file_size $cr_file]
+
+ # update the file path in the CR and the size on cr_revisions
+ db_dml update_revision {
+ update
+ cr_revisions
+ set
+ content = :cr_file,
+ content_length = :file_size
+ where
+ revision_id = :new_file_id
+ }
+
+ # Now that we have the new item store in the CR, we have to make
+ # some insert to some tables to adjust to the new cr_item.
+ # First we have to reflect the new file in the resources table.
+ # We need to create a new row in the ims_cp_files to associate the new resource to the new file
+
+ db_dml insert_new_file {
+ insert into ims_cp_files (file_id, res_id, pathtofile, filename, hasmetadata)
+ values (:new_file_id, :new_res_rev_id, :filename, :filename, 'f')
+ }
+ }
+
+ # Now are going to create a new item (ims_cp_item)
+ # We need the folder_id of the course to store the new item
+ set root_ims_folder [lors_central::get_root_items_folder_id]
+ set items_folder_id [db_string get_items_folder_id { }]
+
+ # set new_ims_item_id [content::item::new -name $first_filename -creation_user $user_id \
+ -parent_id $items_folder_id -content_type "ims_item_object"]
+ # set new_ims_rev_id [content::revision::new -item_id $new_ims_item_id -title $first_filename \
+ -creation_user $user_id -is_live "t"]
+ set new_ims_item_id [content::item::new -name $item_title -creation_user $user_id \
+ -parent_id $items_folder_id -content_type "ims_item_object"]
+ set new_ims_rev_id [content::revision::new -item_id $new_ims_item_id -title $item_title \
+ -creation_user $user_id -is_live "t"]
+
+ # We need to insert in the ims_cp_items at the proper sort_order so we are going
+ # to rearrenge the items sort_order and then fill the information for the item
+ db_foreach get_items_to_reorder { } {
+ set new_sort [expr $order + 1]
+ db_dml reorder_items { }
+ }
+
+ db_dml update_ims_cp_items {
+ update ims_cp_items set
+ org_id = :org_id,
+ identifier = :first_filename,
+ identifierref = :first_filename,
+ item_title = :item_title,
+ sort_order = :sort_order,
+ parent_item = :parent
+ where ims_item_id = :new_ims_rev_id
+ }
+ # Now this new revision_id is the one that holds the content of the new resource
+ # We have to make a row in ims_cp_items_to_resources table
+
+ db_dml insert_new_item_to_res {
+ insert into ims_cp_items_to_resources (ims_item_id, res_id )
+ values (:new_ims_rev_id, :new_res_rev_id)
+ }
+
+ # We also need to map this item to (ims_cp_items_map)
+ # We need to do it for every community that is associated to this course (man_id)
+ set com_list [db_list_of_lists get_community_id {
+ select distinct community_id from ims_cp_items_map
+ where man_id = :man_id
+ }]
+ foreach community_id $com_list {
+ db_dml insert_item {
+ insert into ims_cp_items_map
+ (man_id,org_id,community_id,ims_item_id)
+ values
+ (:man_id,:org_id,:community_id,:new_ims_rev_id)
+ }
+ }
+ }
+
+ # We delete the temporary directory created when unzipping the file
+ exec rm -fr $tmp_dir
+ } else {
+ db_transaction {
+ if { [empty_string_p $sort_order] } {
+ set max_sort_order [db_string get_max_sort_order { } ]
+ set sort_order [expr $max_sort_order + 1]
+ } else {
+ incr sort_order
+ }
+ set tmp_filename [ns_queryget file_upload.tmpfile]
+ set mime_type [cr_filename_to_mime_type -create $file_upload]
+ set tmp_size [file size $tmp_filename]
+
+ # First we are going to create a new cr_item (file) for the new resource
+ # We need the folder_id of the course to store the new item
+ set course_name [lors_central::get_course_name -man_id $man_id]
+ set root_folder [lors_central::get_root_folder_id]
+ set folder_id [db_string get_folder_id { }]
+
+
+ # We are going to create a new item. First we are going to check
+ # if the name already exists to generate a new one
+ set file_upload [lors_central::check_item_name -parent_id $folder_id -name $file_upload]
+ set new_file_item_id [content::item::new -name $file_upload -creation_user $user_id \
+ -parent_id $folder_id]
+ set new_file_id [content::revision::new -item_id $new_file_item_id -title $file_upload -creation_user $user_id \
+ -mime_type $mime_type -is_live "t"]
+
+ # Now we store the content in the CR
+ set cr_file [cr_create_content_file $new_file_item_id $new_file_id $tmp_filename]
+
+ # get the size
+ set file_size [cr_file_size $cr_file]
+
+ # update the file path in the CR and the size on cr_revisions
+ db_dml update_revision {
+ update
+ cr_revisions
+ set
+ content = :cr_file,
+ content_length = :file_size
+ where
+ revision_id = :new_file_id
+ }
+
+ # Now that we have the new item store in the CR, we have to make
+ # some insert to some tables to adjust to the new cr_item.
+ # First we have to reflect the new file in the resources table, so we have to make
+ # a new cr_item and revision for the resource and insert it on the ims_cp_resources table
+
+ # We need to know where the new resource should be
+ set res_root_folder_id [lors_central::get_root_resources_folder_id]
+ set res_folder_id [lors_central::folder_id_from_man_parent -man_id $man_id -parent_id $res_root_folder_id]
+
+ set new_res_item_id [content::item::new -name $file_upload -creation_user $user_id \
+ -parent_id $res_folder_id -content_type "ims_resource_object"]
+
+ set new_res_rev_id [content::revision::new -item_id $new_res_item_id -title $file_upload \
+ -creation_user $user_id -is_live "t"]
+
+
+ # Now we have to update the new row in the ims_cp_resources using this new resource (new_res_id)
+ # we need a new href
+ set new_href "$file_upload"
+
+ db_dml update_new_res {
+ update
+ ims_cp_resources
+ set
+ man_id = :man_id,
+ identifier = :file_upload,
+ type = 'webcontent',
+ href = :new_href,
+ hasmetadata = 'f'
+ where
+ res_id = :new_res_rev_id
+ }
+ # We need to create a new row in the ims_cp_files to associate the new resource to the new file
+ db_dml insert_new_file {
+ insert into ims_cp_files (file_id, res_id, pathtofile, filename, hasmetadata)
+ values (:new_file_id, :new_res_rev_id, :new_href, :file_upload, 'f')
+ }
+
+ # Now are going to create a new item (ims_cp_item)
+ # We need the folder_id of the course to store the new item
+ set root_ims_folder [lors_central::get_root_items_folder_id]
+ set items_folder_id [db_string get_items_folder_id { }]
+
+ #set new_ims_item_id [content::item::new -name $file_upload -creation_user $user_id -parent_id $items_folder_id \
+ -content_type "ims_item_object"]
+ #set new_ims_rev_id [content::revision::new -item_id $new_ims_item_id -title $file_upload \
+ -creation_user $user_id -is_live "t"]
+ set new_ims_item_id [content::item::new -name $item_title -creation_user $user_id -parent_id $items_folder_id \
+ -content_type "ims_item_object"]
+ set new_ims_rev_id [content::revision::new -item_id $new_ims_item_id -title $item_title \
+ -creation_user $user_id -is_live "t"]
+
+ # We need to insert in the ims_cp_items at the proper sort_order so we are going
+ # to rearrenge the items sort_order and then fill the information for the item
+ db_foreach get_items_to_reorder { } {
+ set new_sort [expr $order + 1]
+ db_dml reorder_items { }
+ }
+
+ db_dml update_ims_cp_items {
+ update ims_cp_items set
+ org_id = :org_id,
+ identifier = :file_upload,
+ identifierref = :file_upload,
+ item_title = :item_title,
+ sort_order = :sort_order,
+ parent_item = :parent
+ where ims_item_id = :new_ims_rev_id
+ }
+ # Now this new revision_id is the one that holds the content of the new resource
+ # We have to make a row in ims_cp_items_to_resources table
+
+ db_dml insert_new_item_to_res {
+ insert into ims_cp_items_to_resources (ims_item_id, res_id )
+ values (:new_ims_rev_id, :new_res_rev_id)
+ }
+
+ # We also need to map this item to (ims_cp_items_map)
+ # We need to do it for every community that is associated to this course (man_id)
+ set com_list [db_list_of_lists get_community_id {
+ select distinct community_id from ims_cp_items_map
+ where man_id = :man_id
+ }]
+ foreach community_id $com_list {
+ db_dml insert_item {
+ insert into ims_cp_items_map
+ (man_id,org_id,community_id,ims_item_id)
+ values
+ (:man_id,:org_id,:community_id,:new_ims_rev_id)
+ }
+ }
+ }
+ }
+} -after_submit {
+ ad_returnredirect "one-learning-object?man_id=$man_id&ims_item_id=$new_ims_rev_id"
+}
+
Index: openacs-4/packages/lors-central/www/new-learning-object.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/new-learning-object.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/new-learning-object.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,62 @@
+
+
+
+
+
+ select
+ max (sort_order)
+ from
+ ims_cp_items
+ where
+ org_id = :org_id
+
+
+
+
+
+ select
+ sort_order as order, ims_item_id as reorder_item_id
+ from
+ ims_cp_items
+ where
+ org_id = :org_id
+ and sort_order >= :sort_order
+
+
+
+
+
+ update
+ ims_cp_items
+ set
+ sort_order = :new_sort
+ where
+ ims_item_id = :reorder_item_id
+
+
+
+
+
+ select
+ item_id
+ from
+ cr_items
+ where
+ name = :course_name and
+ parent_id = :root_folder
+
+
+
+
+
+ select
+ item_id
+ from
+ cr_items
+ where
+ name = :course_name and
+ parent_id = :root_ims_folder
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/not-allowed.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/not-allowed.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/not-allowed.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,5 @@
+
+#lors-central.action_not#
+@context;noquote@
+
+#lors-central.we_are_sorry#
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/not-allowed.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/not-allowed.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/not-allowed.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,10 @@
+ad_page_contract {
+
+ Action not allowed.
+
+ @author Lars Pind (lars@pinds.com)
+ @creation-date 2002-10-14
+ @cvs-id $Id: not-allowed.tcl,v 1.1 2005/05/17 16:21:19 miguelm Exp $
+}
+
+set context [list "[_ lorsm.Not_Allowed]"]
Index: openacs-4/packages/lors-central/www/one-course-associations.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-course-associations.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-course-associations.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,19 @@
+
+@title;noquote@
+@context;noquote@
+
+
+#lors-central.course_versions#:
+
+
+#lors-central.This_course_is#
+
+
+
+
+
+ #lors-central.associate_drop#
+
+
+ #lors-central.associate_drop#
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/one-course-associations.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-course-associations.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-course-associations.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,204 @@
+ad_page_contract {
+ Displays all the information about one course (man_id)
+
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+ @creation-date 2005-03-17
+} {
+ man_id:integer,optional
+ item_id:integer,optional
+ {orderby "class,asc"}
+}
+
+
+
+
+# Get the item_id that the manifest_id has associated
+if { ![info exist item_id] } {
+ set item_id [lors_central::get_item_id -revision_id $man_id]
+}
+
+set title "[_ lors-central.one_course_assoc]"
+set context "[list [list "one-course?item_id=$item_id" [_ lors-central.one_course]] [_ lors-central.one_course_assoc]]"
+
+############################### Versions Template #################################################
+
+set last_version [db_string get_live_revision "select live_revision from cr_items where item_id = :item_id"]
+db_multirow -extend { assoc_count ver_num date author live_classes } course_versions get_versions { } {
+ set ver_num [lors_central::get_version_num -revision_id $man_id]
+ set date [lindex $last_modified 0]
+ append date " [lindex [split [lindex $last_modified 1] "."] 0]"
+ set author [lors_central::get_username -user_id $user_id]
+ set live_classes [lors_central::get_live_classes -man_id $man_id]
+ set assoc_count [db_string get_assoc_count { } -default 0]
+}
+
+template::list::create \
+ -name course_versions \
+ -multirow course_versions \
+ -key course_name \
+ -bulk_action_method post \
+ -has_checkboxes \
+ -bulk_action_export_vars {
+ } \
+ -row_pretty_plural "[_ lors-central.course_versions]" \
+ -elements {
+ version_number {
+ label "[_ lors-central.version_number]"
+ display_template {
+
+ @course_versions.ver_num@
+
+
+ @course_versions.ver_num@
+
+ }
+ }
+ course_name {
+ label "[_ lors-central.course_name]"
+ display_template {
+
+ @course_versions.course_name@
+
+
+ @course_versions.course_name@
+
+ }
+ }
+ author {
+ label "[_ lors-central.author]"
+ display_template {
+ @course_versions.author@
+ }
+ }
+ last_modified {
+ label "[_ lors-central.last_modified]"
+ display_template {
+ @course_versions.date@
+ }
+ }
+ live_classes {
+ label "[_ lors-central.live_classes]"
+ display_template {
+
+
+ @course_versions.live_classes@
+
+
+
+ @course_versions.live_classes@
+
+ }
+ }
+ make_live {
+ display_template {
+
+ [_ lors-central.make_live]
+
+ }
+ }
+ }
+
+################################### Associations Template #################################################
+
+template::list::create \
+ -name dotlrn_classes \
+ -multirow cl_list \
+ -key com_id \
+ -has_checkboxes \
+ -bulk_actions { #lors-central.update_versions# "change-one-version" #lors-central.update_course_ver# }\
+ -bulk_action_method post \
+ -bulk_action_export_vars {
+ item_id
+ } \
+ -row_pretty_plural "[_ lors-central.dotlrn_classes]" \
+ -elements {
+ class {
+ label "[_ lors-central.class_name]"
+ display_template {
+ @cl_list.pretty_name@
+
+ [_ lors-central.views]
+
+ }
+ }
+ subject {
+ label "[_ lors-central.subject_name]"
+ display_template {
+ @cl_list.class_name@
+ }
+ }
+ term_name {
+ label "[_ lors-central.term_name]"
+ display_template {
+ @cl_list.term_name@
+ }
+ }
+ current {
+ label "[_ lors-central.current]"
+ display_template {
+ @cl_list.ver_num@ [_ lors-central.of] @cl_list.ver_count@
+ }
+ }
+ set_to {
+ label "[_ lors-central.set_to]"
+ display_template {
+
+
+
+ @cl_list.options;noquote@
+
+ }
+ }
+ tracking {
+ label "[_ lors-central.tracking]"
+ display_template {
+
+
+
+ [_ lors-central.enabled]
+
+
+ [_ lors-central.disabled]
+
+
+
+ }
+ }
+ } -filters {
+ man_id {}
+ } -orderby {
+ class {
+ orderby_asc {pretty_name asc}
+ orderby_desc {pretty_name desc}
+ }
+ subject {
+ orderby_asc {class_name asc}
+ orderby_desc {class_name desc}
+ }
+ term_name {
+ orderby_asc {term_name asc}
+ orderby_desc {term_name desc}
+ }
+
+ }
+
+set orderby_clause [template::list::orderby_clause -orderby -name "dotlrn_classes"]
+
+db_multirow -extend { ver_num ver_count manifest_id options tracking } cl_list get_dotlrn_classes { } {
+ set manifest_id [lors_central::get_man_id -community_id $com_id -item_id $item_id]
+ set ver_count [lors_central::count_versions -man_id $manifest_id]
+ set ver_num [lors_central::get_version_num -revision_id $manifest_id]
+ set tracking [db_string get_tracking { }]
+ # Create the options for the select menu
+ set options ""
+ for { set i 1 } { $i < [expr $ver_count + 1] } { incr i } {
+ if { [string equal $i $ver_num] } {
+ append options "$i"
+ } else {
+ append options " $i"
+ }
+ }
+}
+
+
Index: openacs-4/packages/lors-central/www/one-course-associations.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-course-associations.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-course-associations.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,94 @@
+
+
+
+
+
+ select
+ dc.class_instance_id as com_id,
+ dc.department_name,
+ dc.term_name,
+ dc.class_name,
+ dc.pretty_name
+ from
+ dotlrn_class_instances_full dc
+ where
+ dc.class_instance_id in
+ (
+ select
+ icmc.community_id
+ from
+ ims_cp_manifest_class icmc
+ where
+ icmc.man_id in
+ (
+ select
+ revision_id
+ from
+ cr_revisions
+ where
+ item_id = :item_id
+ )
+ )
+ $orderby_clause
+
+
+
+
+
+
+ select
+ r.title as course_name,
+ r.revision_id as man_id,
+ r.publish_date as last_modified,
+ ao.creation_user as user_id
+ from
+ cr_revisions r, acs_objects ao
+ where
+ :item_id = r.item_id and
+ r.revision_id = ao.object_id
+ order by
+ revision_id asc
+
+
+
+
+
+ select
+ istrackable
+ from
+ ims_cp_manifest_class
+ where
+ community_id = :com_id
+ and man_id = :manifest_id
+
+
+
+
+
+
+ select
+ count(dc.class_instance_id)
+ from
+ dotlrn_class_instances_full dc
+ where
+ dc.class_instance_id in
+ (
+ select
+ icmc.community_id
+ from
+ ims_cp_manifest_class icmc
+ where
+ icmc.man_id in
+ (
+ select
+ revision_id
+ from
+ cr_revisions
+ where
+ item_id = :item_id
+ )
+ )
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/one-course-item.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-course-item.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-course-item.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,32 @@
+
+@title;noquote@
+@context;noquote@
+@displayed_object_id@
+
+@name@
+
+#lors-central.All_views#
+
+Edit Metadata
+
+Versions of this learning object:
+
+
+#lors-central.This_learning_obj#
+
+
+
+
+
+
+
+
+Preview
+
+
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/one-course-item.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-course-item.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-course-item.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,232 @@
+ad_page_contract {
+ Displays all the information about one learning object (ims_item_id)
+
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+ @creation-date 2005-03-17
+} {
+ man_id:integer
+ ims_item_id:integer
+ {name ""}
+ {orderby "class,asc"}
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+set displayed_object_id $ims_item_id
+
+# Get the item_id that the ims_item_id has associated
+set item_id [lors_central::get_item_id -revision_id $ims_item_id]
+set man_item_id [lors_central::get_item_id -revision_id $man_id]
+set course_name [lors_central::get_course_name -man_id $man_id]
+set org_id [db_string get_org_id { } -default ""]
+
+
+# Get the live revision for preview
+
+set last_version [db_string get_live_revision { }]
+set file_revision [lors_central::get_content_revision_id -ims_item_id $ims_item_id]
+if { [empty_string_p $name] } {
+ set name [db_string get_name { }]
+}
+
+if { [string equal $file_revision 0] } {
+ # The items is probably an URL so we are going to get it
+ set file_prev_id [lors_central::get_item_url -ims_item_id $ims_item_id -man_id $man_id]
+ set prev_type ""
+} else {
+ set file_prev_id [lors_central::get_item_id -revision_id $file_revision]
+ set prev_type [db_string get_prev_mime_type { } -default ""]
+ set prev_type [lindex [split $prev_type "/"] 0]
+}
+
+
+#################################### Versions Template #################################################
+set num 0
+db_multirow -extend { ver_num date author mime_type num file_id} item_versions get_versions { } {
+ set ver_num [lors_central::get_version_num -revision_id $ims_item_id]
+ set date [lindex $last_modified 0]
+ append date " [lindex [split [lindex $last_modified 1] "."] 0]"
+ set author [lors_central::get_username -user_id $user_id]
+ set file_id [lors_central::get_res_file_id -res_id $res_id]
+ if { ![string equal $file_id ""] } {
+ set mime_type [db_string get_mime_type { } -default ""]
+ if { [string equal $ims_item_id $last_version] } {
+ set live_file_id $file_id
+ }
+ } else {
+ set mime_type "URL"
+ set live_file_id 0
+ }
+ set num [expr $num + 1]
+ if {$displayed_object_id == $ims_item_id} {
+ set displayed_object_title $item_name
+ }
+}
+
+template::list::create \
+ -name item_versions \
+ -multirow item_versions \
+ -key ims_item_id \
+ -bulk_action_method post \
+ -has_checkboxes \
+ -bulk_action_export_vars {
+ } \
+ -row_pretty_plural "[_ lors-central.item_versions]" \
+ -elements {
+ version_number {
+ label "[_ lors-central.version_number]"
+ display_template {
+
+ » @item_versions.ver_num@
+
+
+ @item_versions.ver_num@
+
+ }
+ }
+ course_name {
+ label "[_ lors-central.item_name]"
+ display_template {
+
+
+ @item_versions.item_name@
+
+
+ @item_versions.item_name@
+
+
+ }
+ }
+ author {
+ label "[_ lors-central.author]"
+ display_template {
+ @item_versions.author@
+ }
+ }
+ last_modified {
+ label "[_ lors-central.last_modified]"
+ display_template {
+ @item_versions.date@
+ }
+ }
+ mime_type {
+ label "[_ lors-central.type]:"
+ display_template {
+ @item_versions.mime_type@
+ }
+ }
+ make_live {
+ display_template {
+ [_ lors-central.make]
+ [_ lors-central.live]
+ /
+ [_ lors-central.hide]
+ [_ lors-central.everywhere]
+ }
+ }
+ }
+
+################################### Associations Template #################################################
+
+template::list::create \
+ -name courses \
+ -multirow cl_list \
+ -key com_id \
+ -has_checkboxes \
+ -bulk_actions { #lors-central.update_versions# "change-one-lo-version" #lors-central.update_course_ver# } \
+ -bulk_action_method post \
+ -bulk_action_export_vars { man_id name ims_item_id } \
+ -row_pretty_plural "[_ lors-central.dotlrn_classes]" \
+ -elements {
+ class {
+ label "[_ lors-central.class_name]"
+ display_template {
+ @cl_list.pretty_name@
+ }
+ }
+ subject {
+ label "[_ lors-central.subject_name]"
+ display_template {
+ @cl_list.class_name@
+ }
+ }
+ term_name {
+ label "[_ lors-central.term_name]"
+ display_template {
+ @cl_list.term_name@
+ }
+ }
+ current {
+ label "[_ lors-central.current]"
+ display_template {
+
+ 0
+
+
+ @cl_list.ver_num@
+
+ [_ lors-central.of] @cl_list.ver_count@
+ }
+ }
+ set_to {
+ label "[_ lors-central.set_to]"
+ display_template {
+
+
+
+ @cl_list.options;noquote@
+
+ }
+ }
+ views {
+ label "[_ lors-central.views_in]"
+ display_template {
+
+
+ [_ lors-central.views]
+
+
+ }
+ }
+ } -filters {
+ man_id {}
+ } -orderby {
+ class {
+ orderby_asc {pretty_name asc}
+ orderby_desc {pretty_name desc}
+ }
+ subject {
+ orderby_asc {class_name asc}
+ orderby_desc {class_name desc}
+ }
+ term_name {
+ orderby_asc {term_name asc}
+ orderby_desc {term_name desc}
+ }
+ }
+
+set orderby_clause [template::list::orderby_clause -orderby -name "courses"]
+
+db_multirow -extend { ver_num ver_count manifest_id options hide_p } cl_list get_dotlrn_classes { } {
+ set manifest_id [lors_central::get_man_id -community_id $com_id -item_id $man_item_id]
+ set ims_item [db_string get_ims_item_id { }]
+ set hide_p [db_string get_hide_p { }]
+ set ver_num [lors_central::get_version_num -revision_id $ims_item]
+ set ver_count [lors_central::get_revision_count -revision_id $ims_item_id]
+ # Create the options for the select menu
+ set options ""
+ for { set i 0 } { $i < [expr $ver_count + 1] } { incr i } {
+ if { [string equal $i $ver_num] } {
+ append options "$i"
+ } else {
+ append options " $i"
+ }
+ }
+}
+
+set title "${course_name}: ${item_title}"
+set context [list [list "one-course?man_id=$man_id" [_ lors-central.one_course]] "[_ lors-central.One_learning]"]
+
+ad_return_template
Index: openacs-4/packages/lors-central/www/one-course-item.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-course-item.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-course-item.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,197 @@
+
+
+
+
+
+ select
+ dc.class_instance_id as com_id,
+ dc.department_name,
+ dc.term_name,
+ dc.class_name,
+ dc.pretty_name
+ from
+ dotlrn_class_instances_full dc
+ where
+ dc.class_instance_id in
+ (
+ select community_id from ims_cp_items_map where man_id = :man_id
+ )
+ and
+ dc.class_instance_id in
+ (
+ select
+ icmc.community_id
+ from
+ ims_cp_manifest_class icmc
+ where
+ icmc.man_id in
+ (
+ select
+ revision_id
+ from
+ cr_revisions
+ where
+ item_id = :man_item_id
+ )
+ )
+ $orderby_clause
+
+
+
+
+
+
+ select
+ r.item_title,
+ r.title as item_name,
+ r.revision_id as ims_item_id,
+ r.publish_date as last_modified,
+ ao.creation_user as user_id,
+ ir.res_id
+ from
+ ims_cp_itemsx r, acs_objects ao,
+ ims_cp_items_to_resources ir
+
+ where
+ r.item_id = :item_id
+ and r.revision_id = ao.object_id
+ and ir.ims_item_id = r.revision_id
+ order by
+ revision_id asc
+
+
+
+
+
+ select
+ res_id
+ from
+ ims_cp_items_to_resources
+ where
+ ims_item_id = :ims_item_id
+
+
+
+
+
+ select
+ file_id
+ from
+ ims_cp_files
+ where
+ res_id = :res_id and
+ pathtofile = :href
+
+
+
+
+
+ select
+ f.file_id
+ frome
+ ims_cp_files f, ims_cp_resources r
+ where
+ r.res_id = :res_id and
+ f.res_id = r.res_id
+ f.pathtofile = r.href
+
+
+
+
+
+ select
+ mime_type
+ from
+ cr_revisions
+ where
+ revision_id = :file_id
+
+
+
+
+
+ select
+ hide_p
+ from
+ ims_cp_items_map
+ where
+ ims_item_id = :ims_item
+ and community_id = :com_id
+
+
+
+
+
+ select
+ org_id
+ from
+ ims_cp_items
+ where
+ ims_item_id=:ims_item_id
+
+
+
+
+
+ select
+ live_revision
+ from
+ cr_items
+ where
+ item_id= :item_id
+
+
+
+
+
+ select
+ item_title
+ from
+ ims_cp_items
+ where
+ ims_item_id= :last_version
+
+
+
+
+
+ select
+ isshared
+ from
+ ims_cp_items
+ where
+ ims_item_id= :ims_item_id
+
+
+
+
+
+ select
+ mime_type
+ from
+ cr_revisions
+ where
+ revision_id = (select live_revision from cr_items where item_id = :file_prev_id)
+
+
+
+
+
+ select
+ ims_item_id
+ from
+ ims_cp_items_map
+ where
+ man_id =:man_id and
+ community_id = :com_id and
+ ims_item_id in ( select revision_id
+ from cr_revisions
+ where item_id = ( select item_id
+ from cr_revisions
+ where revision_id = :ims_item_id
+ )
+ )
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/one-course-views.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-course-views.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-course-views.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,8 @@
+
+@title;noquote@
+@context;noquote@
+
+
+#lors-central.course_versions#:
+
+
Index: openacs-4/packages/lors-central/www/one-course-views.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-course-views.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-course-views.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,94 @@
+ad_page_contract {
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+} {
+ man_id:integer,optional
+ community_id:integer,notnull
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+# Get the item_id that the manifest_id has associated
+if { ![info exist item_id] } {
+ set item_id [lors_central::get_item_id -revision_id $man_id]
+}
+
+set title "[_ lors-central.one_course_views]"
+set context "[list [list "one-course-associations?man_id=$man_id" [_ lors-central.one_course_assoc]] [_ lors-central.one_course_views]]"
+
+############################### Versions Template #################################################
+
+set last_version [db_string get_live_revision "select live_revision from cr_items where item_id = :item_id"]
+db_multirow -extend { ver_num date author live_classes } course_versions get_versions { } {
+ set ver_num [lors_central::get_version_num -revision_id $man_id]
+ set date [lindex $last_modified 0]
+ append date " [lindex [split [lindex $last_modified 1] "."] 0]"
+ set author [lors_central::get_username -user_id $user_id]
+ set live_classes [lors_central::get_live_classes -man_id $man_id]
+}
+
+template::list::create \
+ -name course_versions \
+ -multirow course_versions \
+ -key course_name \
+ -bulk_action_method post \
+ -has_checkboxes \
+ -bulk_action_export_vars {
+ } \
+ -row_pretty_plural "[_ lors-central.course_versions]" \
+ -elements {
+ version_number {
+ label "[_ lors-central.version_number]"
+ display_template {
+
+ @course_versions.ver_num@
+
+
+ @course_versions.ver_num@
+
+ }
+ }
+ course_name {
+ label "[_ lors-central.course_name]"
+ display_template {
+
+ @course_versions.course_name@
+
+
+ @course_versions.course_name@
+
+ }
+ }
+ author {
+ label "[_ lors-central.author]"
+ display_template {
+ @course_versions.author@
+ }
+ }
+ last_modified {
+ label "[_ lors-central.last_modified]"
+ display_template {
+ @course_versions.date@
+ }
+ }
+ live_classes {
+ label "[_ lors-central.live_classes]"
+ display_template {
+
+ @course_versions.live_classes@
+
+ }
+ }
+ views {
+ label "[_ lors-central.views_in]"
+ display_template {
+
+
+ [_ lors-central.views]
+
+
+ }
+ }
+ }
+
Index: openacs-4/packages/lors-central/www/one-course-views.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-course-views.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-course-views.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,21 @@
+
+
+
+
+
+ select
+ r.title as course_name,
+ r.revision_id as man_id,
+ r.publish_date as last_modified,
+ ao.creation_user as user_id
+ from
+ cr_revisions r, acs_objects ao
+ where
+ :item_id = r.item_id and
+ r.revision_id = ao.object_id
+ order by
+ revision_id asc
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/one-course.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-course.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-course.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,136 @@
+
+ @title@
+ "#lors-central.one_course#"
+
+
+
+
+
+
+ #lorsm.Course_Name#
+
+
+ @course_name;noquote@
+
+
+
+
+ #lorsm.Version#
+
+
+
+ @version_msg;noquote@
+
+
+ @version;noquote@ Course Versions Manage
+
+
+
+
+
+ #lorsm.Metadata#
+
+
+
+ #lorsm.Yes#
+
+
+ #lorsm.No#
+
+
+
+
+
+ #lorsm.Identifier#
+
+
+ @identifier@
+
+
+
+
+ #lorsm.Is_SCORM#
+
+
+ #lorsm.lt_classlist_stylefont-w#
+
+
+ class="list"
+
+ valign="top" align="left">@isscorm;noquote@
+
+
+
+
+ #lorsm.Storage_Folder#
+
+
+ @instance@
+
+
+
+
+ #lorsm.Created_By#
+
+
+ @created_by@
+
+
+
+
+ #lorsm.Date#
+
+
+ @creation_date;noquote@
+
+
+
+
+ #lorsm.Submanifests#
+
+
+ @submanifests@
+
+
+
+
+ #lors-central.assoc#
+
+
+ @assoc_num@ #lors-central.watch_assoc#
+
+
+
+
+ #lorsm.Export#
+
+
+ [ Zip ]
+
+
+
+
+
+
+
+
+
+
+ @orgs_list;noquote@
+
+
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/one-course.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-course.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-course.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,211 @@
+ad_page_contract {
+ Displays all the information related to one course
+} {
+ item_id:integer,optional
+ man_id:integer,optional
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+if { ![info exist item_id] && ![info exist man_id] } {
+ ad_return_complaint 1 "You must pass either item_id or man_id"
+} else {
+ if { ![info exist man_id] } {
+ set man_id [content::item::get_live_revision -item_id $item_id]
+ }
+ if { ![info exist item_id] } {
+ set item_id [lors_central::get_item_id -revision_id $man_id]
+ }
+}
+
+
+set package_id ""
+set title "[_ lors-central.one_course]"
+set assoc_num [db_string get_associations_num { } -default 0]
+
+if {[db_0or1row manifest { }]} {
+
+ # Sets the variable for display.
+ set display 1
+
+ # Course Name
+ if {[empty_string_p $course_name]} {
+ set course_name "[_ lorsm.No_course_Name]"
+ }
+
+ # Version
+ set version [lors_central::count_versions -item_id $item_id]
+
+ if {[string equal $version "0"]} {
+ set version_msg "[_ lorsm.No_version_Available]"
+ }
+
+ # Instance
+ set instance [lors_central::get_course_name -man_id $man_id]
+
+ # Folder
+ set root_folder [lors_central::get_root_folder_id]
+
+ set folder [db_string get_folder_id { }]
+
+ # Created By
+ set created_by [person::name -person_id $creation_user]
+
+ # Creation Date
+ set creation_date [lc_time_fmt $creation_date "%x %X"]
+
+ # Check for submanifests
+ if {[db_0or1row submans "
+ select
+ count(*) as submanifests
+ from
+ ims_cp_manifests
+ where
+ man_id = :man_id
+ and
+ parent_man_id = :man_id"]} {
+ } else {
+ set submanifests 0
+ }
+
+
+} else {
+
+ set display 0
+
+}
+
+
+append orgs_list ""
+append orgs_list ""
+
+
+
+db_foreach organizations { } {
+
+ set total_items [db_string items_count {select count(*) from ims_cp_items where org_id=:org_id} -default 0]
+ # We get the indent of the items in this org_id
+ set indent_list [lors_central::get_items_indent -org_id $org_id]
+ template::util::list_of_lists_to_array $indent_list indent_array
+
+ append orgs_list "
+
+ $org_title
+
+
+ $hasmetadata
+ "
+
+ set missing_text "[_ lorsm.Nothing_here]"
+ set return_url [export_vars -base [ns_conn url] man_id]
+ set table_extra_html { width="100%" }
+
+ set table_extra_vars {return_url man_id total_items indent_array}
+ set table_def {
+ {
+ reorder "" "no_sort" "
+ [if {![empty_string_p $identifierref]} {
+ set min_item [db_string get_min_item {
+ select min(sort_order) from ims_cp_items
+ where parent_item = (select parent_item
+ from ims_cp_items
+ where ims_item_id = :item_id)}]
+ set max_item [db_string get_max_item {
+ select max(sort_order) from ims_cp_items
+ where parent_item = (select parent_item
+ from ims_cp_items
+ where ims_item_id = :item_id)}]
+ set childs_count [db_string get_max_item {
+ select count(sort_order) from ims_cp_items
+ where parent_item = (select parent_item
+ from ims_cp_items
+ where ims_item_id = :item_id) and
+ ims_item_id in ( select live_revision from cr_items)}]
+
+ if { $childs_count > 1 } {
+ if { [string equal $max_item $sort_order] } {
+ set href \"
+ \"
+ } else {
+ if { [string equal $min_item $sort_order] } {
+ set href \"
+ \"
+ } else {
+ set href \"
+ \"
+ }
+ }
+ }
+ }]
+ "
+ }
+ { title "\#lorsm.Item_Name\#" \
+ "no_sort" \
+ " [ set indent \"\"
+ for { set i 0 } { $i < [expr $indent_array($item_id)-1]} { incr i } {
+ append indent \" \"
+ }
+ if {![empty_string_p $identifierref]} {
+ set href \"$indent$item_title \"
+ } else {
+ set href \"$item_title\"
+ }
+ ]"
+ }
+ { add_object "\#lors-central.add_object\#" "no_sort" "
+ \"
+ }]"
+ }
+ { metadata "\#lorsm.Metadata_1\#"
+ "no_sort"
+ "[if {$hasmetadata == \"f\"} {
+ set hasmetadata \"No\"} else {set hasmetadata \" Yes\"
+ }] "
+ }
+ { type "\#lorsm.Type\#" "no_sort" "$type " }
+ }
+
+ set table_item [ad_table -Tmissing_text $missing_text -Textra_vars $table_extra_vars -Theader_row_extra "style=\"background-color: #e0e0e0; font-weight: bold;\" class=\"list-header\"" -Ttable_extra_html $table_extra_html ad_table_contents_query { } $table_def]
+
+ append orgs_list "$table_item"
+ append orgs_list "
+
+
+
+ [_ lors-central.add_object]
+
+
+ "
+} if_no_rows {
+ append orgs_list " "
+}
+
+append orgs_list "
"
+
Index: openacs-4/packages/lors-central/www/one-course.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-course.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-course.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,170 @@
+
+
+
+
+
+ select
+ cp.man_id,
+ cp.course_name,
+ cp.identifier,
+ text 'Yes' as hello,
+ case
+ when hasmetadata = 't' then 'Yes'
+ else 'No'
+ end as man_metadata,
+ case
+ when isscorm = 't' then 'Yes'
+ else 'No'
+ end as isscorm,
+ cp.folder_id,
+ cp.isshared,
+ acs.creation_user,
+ acs.creation_date,
+ acs.context_id
+-- cpmc.isenabled,
+-- cpmc.lorsm_instance_id,
+-- cpmc.istrackable
+ from
+ ims_cp_manifests cp, acs_objects acs
+ where
+ cp.man_id = acs.object_id
+ and cp.man_id = :man_id
+-- and cp.man_id = cpmc.man_id
+-- and cpmc.lorsm_instance_id = :package_id
+ and cp.parent_man_id = 0
+
+
+
+
+
+ select
+ item_id
+ from
+ cr_items
+ where
+ name = :instance and
+ parent_id = :root_folder
+
+
+
+
+
+ select
+ org.org_id,
+ org.org_title as org_title,
+ org.hasmetadata,
+ tree_level(o.tree_sortkey) as indent
+ from
+ ims_cp_organizations org, acs_objects o
+ where
+ org.org_id = o.object_id
+ and
+ man_id = :man_id
+ order by
+ org_id
+
+
+
+
+
+ select count(ims_item_id) as total_items
+ from ims_cp_items
+ where org_id = :org_id and
+ ims_item_id in ( select live_revision from cr_items where content_type = 'ims_item_object')
+
+
+
+
+
+ SELECT
+ o.object_id,
+ repeat(' ', (tree_level(cr.tree_sortkey) - :indent)* 3) as indent,
+ i.ims_item_id as item_id,
+ i.sort_order as sort_order,
+ i.item_title as item_title,
+ i.hasmetadata,
+ i.parent_item,
+ i.org_id,
+ i.sort_order,
+ case
+ when i.isshared = 'f' then (
+ 'false'
+ )
+ else 'true'
+ end as isshared,
+ case
+ when i.identifierref <> '' then (
+ SELECT
+ res.href
+ FROM
+ ims_cp_items_to_resources i2r,
+ ims_cp_resources res
+ WHERE
+ i2r.res_id = res.res_id
+ AND
+ i2r.ims_item_id = i.ims_item_id
+ )
+ else ''
+ end as identifierref,
+ case
+ when i.identifierref <> '' then (
+ SELECT
+ res.type
+ FROM
+ ims_cp_items_to_resources i2r,
+ ims_cp_resources res
+ WHERE
+ i2r.res_id = res.res_id
+ AND
+ i2r.ims_item_id = i.ims_item_id
+ )
+ else ''
+ end as type,
+ m.fs_package_id,
+ m.folder_id,
+ m.course_name
+ FROM
+ acs_objects o, ims_cp_items i, ims_cp_manifests m, cr_items cr
+ WHERE
+ o.object_type = 'ims_item_object'
+ AND
+ i.org_id = :org_id
+ AND
+ o.object_id = i.ims_item_id
+ AND
+ i.ims_item_id = (
+ select
+ live_revision
+ from
+ cr_items
+ where
+ item_id = (
+ select
+ item_id
+ from
+ cr_revisions
+ where
+ revision_id = i.ims_item_id
+ )
+ )
+ AND
+ m.man_id = :man_id
+ AND
+ cr.item_id = (select item_id from cr_revisions where revision_id = i.ims_item_id)
+ ORDER BY
+ i.sort_order, cr.tree_sortkey, o.object_id
+
+
+
+
+
+ select
+ count(community_id)
+ from
+ ims_cp_manifest_class
+ where
+ man_id = :man_id
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/one-file-live.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-file-live.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-file-live.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,25 @@
+ad_page_contract {
+ Change the live version to the recieved file_id
+
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+} {
+ man_id:notnull
+ ims_item_id:notnull
+ file_id:notnull
+ org_id:notnull
+ {name "" }
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+set file_item_id [lors_central::get_item_id -revision_id $file_id]
+
+db_dml update_live_revision {
+ update cr_items
+ set live_revision = :file_id
+ where item_id = :file_item_id
+}
+
+ad_returnredirect "one-file?man_id=$man_id&ims_item_id=$ims_item_id&file_id=$file_id&name=$name&org_id=$org_id"
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/one-file.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-file.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-file.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,21 @@
+
+@page_title;noquote@
+@context;noquote@
+@file_id@
+
+Edit Content
+
+#lors-central.this_file_has#:
+
+
+
+#lors-central.and_is_in#:
+
+
+#lors-central.preview#
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/one-file.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-file.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-file.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,99 @@
+ad_page_contract {
+ Displays all information about one file and all it's revisions
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+ man_id:notnull
+ ims_item_id:notnull
+ {org_id "" }
+} {
+ file_id:notnull
+ {res_id ""}
+ {name "" }
+ {prev_file_id ""}
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+#if { [empty_string_p $name] } {
+# set name [db_string get_name { } -default "..."]
+#}
+#if { [empty_string_p $org_id] } {
+# set name [db_string get_name { } -default "..."]
+#}
+
+
+set page_title "[_ lors-central.one_file] [_ lors-central.of_title]"
+
+set context [list [list [export_vars -base one-resource {res_id}] "One Resource" ] [_ lors-central.one_file]]
+# Get the file item_id and live_revision
+set file_item_id [lors_central::get_item_id -revision_id $file_id]
+
+# Get the type of the file for preview
+set type [db_string get_prev_mime_type { }]
+set prev_type [lindex [split $type "/"] 0]
+
+template::list::create \
+ -name file_list \
+ -multirow files \
+ -key file_id \
+ -has_checkboxes \
+ -bulk_actions { } \
+ -bulk_action_method post \
+ -bulk_action_export_vars { } \
+ -row_pretty_plural "[_ lors-central.item_files]" \
+ -elements {
+ filename {
+ label "[_ lors-central.filename]"
+ display_template {
+
+ » @files.filename@
+
+
+ @files.filename@
+
+ }
+ }
+ preview {
+ display_template {
+
+
+
+
+ [_ lors-central.preview]
+
+ }
+ }
+ }
+
+db_multirow -extend { mime_type prev_url } files get_file_info { } {
+ set mime_type [db_string get_mime_type { }]
+ set prev_url [export_vars -base one-file {{file_id $fileid} res_id man_id}]
+}
+
+
+template::list::create \
+ -name course_list \
+ -multirow courses \
+ -key course_id \
+ -has_checkboxes \
+ -bulk_actions { } \
+ -bulk_action_method post \
+ -bulk_action_export_vars { } \
+ -row_pretty_plural "[_ lors-central.courses]" \
+ -elements {
+ coursename {
+ label "[_ lors-central.course_name]"
+ display_template {
+ @courses.course_name@
+ }
+ }
+ }
+
+db_multirow courses get_course_info { } {
+
+}
+
+set return_url [ad_return_url]
+set edit_url [export_vars -base "file-content-edit" {file_id return_url res_id man_id}]
+ad_return_template
Index: openacs-4/packages/lors-central/www/one-file.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-file.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-file.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,77 @@
+
+
+
+
+
+ select
+ item_title
+ from
+ ims_cp_items
+ where
+ ims_item_id= :ims_item_id
+
+
+
+
+
+ select
+ org_id
+ from
+ ims_cp_items
+ where
+ ims_item_id= :ims_item_id
+
+
+
+
+
+ select distinct file_id as fileid, filename
+ from ims_cp_files
+ where file_id in ( select revision_id
+ from cr_revisions
+ where item_id = :file_item_id )
+
+
+
+
+
+
+ select
+ mime_type
+ from
+ cr_revisions
+ where
+ revision_id = :file_id
+
+
+
+
+
+ select
+ mime_type
+ from
+ cr_revisions
+ where
+ revision_id = :fileid
+
+
+
+
+
+ select
+ distinct
+ m.man_id,
+ m.course_name
+ from
+ ims_cp_files f,
+ ims_cp_resources r,
+ ims_cp_manifests m
+ where
+ f.file_id = :file_id
+ and f.res_id=r.res_id
+ and r.man_id=m.man_id
+
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/one-learning-object.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-learning-object.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-learning-object.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,31 @@
+
+@title;noquote@
+@context;noquote@
+@displayed_object_id@
+
+@name@
+#lors-central.All_views#
+Edit Metadata
+All Resources
+Versions of this learning object:
+
+
+#lors-central.This_learning_obj#
+
+
+
+
+
+
+
+
+
+Preview of "Live Version"
+
+
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/one-learning-object.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-learning-object.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-learning-object.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,250 @@
+ad_page_contract {
+ Displays all the information about one learning object (ims_item_id)
+
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+ @creation-date 2005-03-17
+} {
+ man_id:integer
+ ims_item_id:integer
+ {name ""}
+ {orderby "class,asc"}
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+set displayed_object_id $ims_item_id
+
+# Get the item_id that the ims_item_id has associated
+set item_id [lors_central::get_item_id -revision_id $ims_item_id]
+set man_item_id [lors_central::get_item_id -revision_id $man_id]
+set course_name [lors_central::get_course_name -man_id $man_id]
+set org_id [db_string get_org_id { } -default ""]
+
+set res_id [lors_central::get_ims_item_id_or_res_id -ims_item_id $ims_item_id]
+
+# Here we set the ns_variables to make the relative links and images
+# display right on preview, we need to set the ims_item_id
+
+if {[nsv_exists delivery_vars [ad_conn session_id]]} {
+ nsv_unset delivery_vars [ad_conn session_id]
+}
+nsv_set delivery_vars [ad_conn session_id] [list]
+nsv_lappend delivery_vars [ad_conn session_id] $ims_item_id
+
+
+# Get the live revision for preview
+
+set last_version [db_string get_live_revision { }]
+
+set file_revision [lors_central::get_content_revision_id -ims_item_id $ims_item_id]
+
+if { [empty_string_p $name] } {
+ set name [db_string get_name { }]
+}
+
+if { [string equal $file_revision 0] } {
+ # The items is probably an URL so we are going to get it
+ set item_file_revision [lors_central::get_item_url -ims_item_id $ims_item_id -man_id $man_id]
+ set file_revision [item::get_live_revision $item_file_revision]
+ set prev_type ""
+} else {
+ set file_prev_id [lors_central::get_item_id -revision_id $file_revision]
+ set prev_type [db_string get_prev_mime_type { } -default ""]
+ set prev_type [lindex [split $prev_type "/"] 0]
+}
+
+
+#################################### Versions Template #################################################
+set num 0
+db_multirow -extend { ver_num date author mime_type num file_id } item_versions get_versions { } {
+ set ver_num [lors_central::get_version_num -revision_id $ims_item_id]
+ set date [lindex $last_modified 0]
+ append date " [lindex [split [lindex $last_modified 1] "."] 0]"
+ set author [lors_central::get_username -user_id $user_id]
+ set file_id [lors_central::get_res_file_id -res_id $res_id]
+ if { ![string equal $file_id ""] } {
+ set mime_type [db_string get_mime_type { } -default ""]
+ if { [string equal $ims_item_id $last_version] } {
+ set live_file_id $file_id
+ }
+ } else {
+ set mime_type "URL"
+ set live_file_id 0
+ }
+ set num [expr $num + 1]
+ if {$displayed_object_id == $ims_item_id} {
+ set displayed_object_title $item_name
+ }
+}
+
+template::list::create \
+ -name item_versions \
+ -multirow item_versions \
+ -key ims_item_id \
+ -bulk_action_method post \
+ -has_checkboxes \
+ -bulk_action_export_vars {
+ } \
+ -row_pretty_plural "[_ lors-central.item_versions]" \
+ -elements {
+ version_number {
+ label "[_ lors-central.version_number]"
+ display_template {
+
+ » @item_versions.ver_num@
+
+
+ @item_versions.ver_num@
+
+ }
+ }
+ course_name {
+ label "[_ lors-central.item_name]"
+ display_template {
+
+
+ @item_versions.item_name@
+
+
+ @item_versions.item_name@
+
+
+ }
+ }
+ author {
+ label "[_ lors-central.author]"
+ display_template {
+ @item_versions.author@
+ }
+ }
+ last_modified {
+ label "[_ lors-central.last_modified]"
+ display_template {
+ @item_versions.date@
+ }
+ }
+ mime_type {
+ label "[_ lors-central.type]:"
+ display_template {
+ @item_versions.mime_type@
+ }
+ }
+ make_live {
+ display_template {
+ [_ lors-central.make]
+ [_ lors-central.live]
+ /
+ [_ lors-central.hide]
+ [_ lors-central.everywhere]
+ }
+ }
+ }
+
+################################### Associations Template #################################################
+
+template::list::create \
+ -name courses \
+ -multirow cl_list \
+ -key com_id \
+ -has_checkboxes \
+ -bulk_actions { #lors-central.update_versions# "change-one-lo-version" #lors-central.update_course_ver# } \
+ -bulk_action_method post \
+ -bulk_action_export_vars { man_id name ims_item_id } \
+ -row_pretty_plural "[_ lors-central.dotlrn_classes]" \
+ -elements {
+ class {
+ label "[_ lors-central.class_name]"
+ display_template {
+ @cl_list.pretty_name@
+ }
+ }
+ subject {
+ label "[_ lors-central.subject_name]"
+ display_template {
+ @cl_list.class_name@
+ }
+ }
+ term_name {
+ label "[_ lors-central.term_name]"
+ display_template {
+ @cl_list.term_name@
+ }
+ }
+ current {
+ label "[_ lors-central.current]"
+ display_template {
+
+ 0
+
+
+ @cl_list.ver_num@
+
+ [_ lors-central.of] @cl_list.ver_count@
+ }
+ }
+ set_to {
+ label "[_ lors-central.set_to]"
+ display_template {
+
+
+
+ @cl_list.options;noquote@
+
+ }
+ }
+ views {
+ label "[_ lors-central.views_in]"
+ display_template {
+
+
+ [_ lors-central.views]
+
+
+ }
+ }
+ } -filters {
+ man_id {}
+ } -orderby {
+ class {
+ orderby_asc {pretty_name asc}
+ orderby_desc {pretty_name desc}
+ }
+ subject {
+ orderby_asc {class_name asc}
+ orderby_desc {class_name desc}
+ }
+ term_name {
+ orderby_asc {term_name asc}
+ orderby_desc {term_name desc}
+ }
+ }
+
+set orderby_clause [template::list::orderby_clause -orderby -name "courses"]
+
+db_multirow -extend { ver_num ver_count manifest_id options hide_p } cl_list get_dotlrn_classes { } {
+ set manifest_id [lors_central::get_man_id -community_id $com_id -item_id $man_item_id]
+ set ims_item [db_string get_ims_item_id { }]
+ set hide_p [db_string get_hide_p { }]
+ if {$hide_p} {
+ set ver_num 0
+ } else {
+ set ver_num [lors_central::get_version_num -revision_id $ims_item]
+ }
+ set ver_count [lors_central::get_revision_count -revision_id $ims_item_id]
+ # Create the options for the select menu
+ set options ""
+ for { set i 0 } { $i < [expr $ver_count + 1] } { incr i } {
+ if { [string equal $i $ver_num] } {
+ append options "$i"
+ } else {
+ append options " $i"
+ }
+ }
+}
+
+set title "${course_name}: ${item_title}"
+set context [list [list "one-course?man_id=$man_id" [_ lors-central.one_course]] "[_ lors-central.One_learning]"]
+
+ad_return_template
Index: openacs-4/packages/lors-central/www/one-learning-object.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-learning-object.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-learning-object.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,200 @@
+
+
+
+
+
+ select
+ dc.class_instance_id as com_id,
+ dc.department_name,
+ dc.term_name,
+ dc.class_name,
+ dc.pretty_name
+ from
+ dotlrn_class_instances_full dc
+ where
+ dc.class_instance_id in
+ (
+ select community_id from ims_cp_items_map where man_id = :man_id
+ )
+ and
+ dc.class_instance_id in
+ (
+ select
+ icmc.community_id
+ from
+ ims_cp_manifest_class icmc
+ where
+ icmc.man_id in
+ (
+ select
+ revision_id
+ from
+ cr_revisions
+ where
+ item_id = :man_item_id
+ )
+ )
+ $orderby_clause
+
+
+
+
+
+
+ select
+ r.item_title,
+ r.title as item_name,
+ r.revision_id as ims_item_id,
+ r.publish_date as last_modified,
+ ao.creation_user as user_id,
+ ir.res_id,
+ io.man_id
+ from
+ ims_cp_itemsx r, acs_objects ao,
+ ims_cp_items_to_resources ir,
+ ims_cp_organizations io
+
+ where
+ r.org_id=io.org_id
+ and r.item_id = :item_id
+ and r.revision_id = ao.object_id
+ and ir.ims_item_id = r.revision_id
+ order by
+ revision_id asc
+
+
+
+
+
+ select
+ res_id
+ from
+ ims_cp_items_to_resources
+ where
+ ims_item_id = :ims_item_id
+
+
+
+
+
+ select
+ file_id
+ from
+ ims_cp_files
+ where
+ res_id = :res_id and
+ pathtofile = :href
+
+
+
+
+
+ select
+ f.file_id
+ frome
+ ims_cp_files f, ims_cp_resources r
+ where
+ r.res_id = :res_id and
+ f.res_id = r.res_id
+ f.pathtofile = r.href
+
+
+
+
+
+ select
+ mime_type
+ from
+ cr_revisions
+ where
+ revision_id = :file_id
+
+
+
+
+
+ select
+ hide_p
+ from
+ ims_cp_items_map
+ where
+ ims_item_id = :ims_item
+ and community_id = :com_id
+
+
+
+
+
+ select
+ org_id
+ from
+ ims_cp_items
+ where
+ ims_item_id=:ims_item_id
+
+
+
+
+
+ select
+ live_revision
+ from
+ cr_items
+ where
+ item_id= :item_id
+
+
+
+
+
+ select
+ item_title
+ from
+ ims_cp_items
+ where
+ ims_item_id= :last_version
+
+
+
+
+
+ select
+ isshared
+ from
+ ims_cp_items
+ where
+ ims_item_id= :ims_item_id
+
+
+
+
+
+ select
+ mime_type
+ from
+ cr_revisions
+ where
+ revision_id = (select live_revision from cr_items where item_id = :file_prev_id)
+
+
+
+
+
+ select
+ ims_item_id
+ from
+ ims_cp_items_map
+ where
+ man_id =:man_id and
+ community_id = :com_id and
+ ims_item_id in ( select revision_id
+ from cr_revisions
+ where item_id = ( select item_id
+ from cr_revisions
+ where revision_id = :ims_item_id
+ )
+ )
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/one-lo-files.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-lo-files.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-lo-files.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,9 @@
+
+@page_title;noquote@
+@context;noquote@
+
+
+
+Clipboard
+
+
Index: openacs-4/packages/lors-central/www/one-lo-files.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-lo-files.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-lo-files.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,26 @@
+ad_page_contract {
+ Displays al files associated to this version of one LO
+ @author Miguel Marin (miguelmmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+} {
+ man_id:notnull
+ ims_item_id:notnull
+ {org_id ""}
+ {name ""}
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+if { [empty_string_p $name] } {
+ set name [db_string get_name { } -default "..."]
+}
+if { [empty_string_p $org_id] } {
+ set name [db_string get_name { } -default "..."]
+}
+
+
+set page_title "[_ lors-central.lo_files]"
+set context "[list [list "one-learning-object?ims_item_id=$ims_item_id&man_id=$man_id&name=$name" \
+ [_ lors-central.One_learning]] [_ lors-central.lo_files]]"
+
Index: openacs-4/packages/lors-central/www/one-lo-files.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-lo-files.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-lo-files.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,26 @@
+
+
+
+
+
+ select
+ item_title
+ from
+ ims_cp_items
+ where
+ ims_item_id= :ims_item_id
+
+
+
+
+
+ select
+ org_id
+ from
+ ims_cp_items
+ where
+ ims_item_id= :ims_item_id
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/one-object-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-object-edit.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-object-edit.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,9 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/one-object-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-object-edit.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-object-edit.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,188 @@
+ad_page_contract {
+ Edits one learning object (ims_item_id)
+
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+ @creation_date 2005-03-22
+} {
+ man_id:integer,notnull
+ ims_item_id:integer,notnull
+ {name ""}
+ file_upload:trim,optional
+ file_upload.tmpfile:optional,tmpfile
+ file_id:integer
+ {mime_type ""}
+ {edit_p ""}
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+set parent_item [db_string get_parent_item "select parent_item from ims_cp_items where ims_item_id = :ims_item_id"]
+
+set user_id [ad_conn user_id]
+set title "[_ lors-central.edit_object]"
+set context "[list [list "one-learning-object?ims_item_id=$ims_item_id&man_id=$man_id&name=$name" \
+ [_ lors-central.One_learning]] [_ lors-central.edit_object]]"
+
+if { ![string equal $file_id 0] } {
+ set version_id $file_id
+ set mime_type [db_string get_mime_type { } -default t]
+ if { [string eq $mime_type "text/html"] || [string eq $mime_type "text/plain"] } {
+ set edit_p "t"
+ } else {
+ set edit_p "f"
+ }
+
+} else {
+ set mime_type "URL"
+ set edit_p "f"
+}
+
+ad_form -name upload_file -html {enctype multipart/form-data} -form {
+ {file_upload:text(file)
+ {label "[_ lors-central.choose_the_file]"}
+ {help_text "[_ lors-central.help_text]"}
+ }
+ {man_id:text(hidden)
+ {value $man_id}
+ }
+ {ims_item_id:text(hidden)
+ {value $ims_item_id}
+ }
+ {name:text(hidden)
+ {value $name}
+ }
+ {file_id:text(hidden)
+ {value $file_id}
+ }
+ {parent_item:text(hidden)
+ {value $parent_item}
+ }
+} -on_submit {
+ db_transaction {
+ # We get the pathtofile from the editing file and the resources
+ # table since this is the default file the ims_item has
+ set res_id [db_string get_res_id { }]
+ set file_href [db_string get_pathtofile { } ]
+ set file_name [db_string get_filename { } ]
+ set res_href [db_string get_href { } ]
+
+ set tmp_filename [ns_queryget file_upload.tmpfile]
+ set mime_type [cr_filename_to_mime_type -create $file_upload]
+ set tmp_size [file size $tmp_filename]
+
+ # We are going to create a new cr_revision (file) for the new file
+ # We get the revision_id that holds the content on the CR, this is the
+ # live_revision of one file_id
+
+ set cr_revision [lors_central::get_content_revision_id -ims_item_id $ims_item_id]
+ set cr_item_id [lors_central::get_item_id -revision_id $cr_revision]
+ if { [string equal $cr_item_id 0] } {
+ # It's probably an URL so we are going to treat it as one
+ set cr_item_id [lors_central::get_item_url -ims_item_id $ims_item_id -man_id $man_id]
+ }
+ # We get the folder_id to know where to store the new cr_item
+ set folder_id [lors_central::get_parent_id -item_id $cr_item_id]
+
+ # We are going to create a new item for the ims_item_id
+ # First we are going to check if the name already exists to generate a new one
+
+ set res_root_folder_id [lors_central::get_root_resources_folder_id]
+ set res_folder_id [lors_central::folder_id_from_man_parent -man_id $man_id -parent_id $res_root_folder_id]
+ set file_upload [lors_central::check_item_name -parent_id $folder_id -name $file_upload]
+ set file_upload [lors_central::check_item_name -parent_id $res_folder_id -name $file_upload]
+
+ #set new_file_item_id [content::item::new -name $file_upload -creation_user $user_id -parent_id $folder_id]
+ set file_item_id [lors_central::get_item_id -revision_id $file_id]
+ set new_file_id [content::revision::new -item_id $file_item_id -title $file_name -creation_user $user_id \
+ -mime_type $mime_type -is_live "t"]
+
+ # Now we store the content in the CR
+ set cr_file [cr_create_content_file $file_item_id $new_file_id $tmp_filename]
+
+ # get the size
+ set file_size [cr_file_size $cr_file]
+
+ # update the file path in the CR and the size on cr_revisions
+ db_dml update_revision {
+ update
+ cr_revisions
+ set
+ content = :cr_file,
+ content_length = :file_size
+ where
+ revision_id = :new_file_id
+ }
+ # Now that we have the new item store in the CR, we have to make
+ # some insert in some tables to adjust to the new cr_item.
+ # First we have to reflect the new file in the resources table, so we have to make
+ # a new cr_item and revision for the resource and insert it on the ims_cp_resources table
+
+
+ set new_res_item_id [content::item::new -name $file_upload -creation_user $user_id \
+ -parent_id $res_folder_id -content_type "ims_resource_object"]
+
+ set new_res_rev_id [content::revision::new -item_id $new_res_item_id -title $file_upload \
+ -creation_user $user_id -is_live "t"]
+
+ db_dml update_new_res {
+ update
+ ims_cp_resources
+ set
+ man_id = :man_id,
+ identifier = :file_upload,
+ type = 'webcontent',
+ href = :res_href,
+ hasmetadata = 'f'
+ where
+ res_id = :new_res_rev_id
+ }
+ # We need to create a new row in the ims_cp_files to associate the new resource to the new file
+ db_dml insert_new_file {
+ insert into ims_cp_files (file_id, res_id, pathtofile, filename, hasmetadata)
+ values (:new_file_id, :new_res_rev_id, :file_href, :file_name, 'f')
+ }
+ # Now are going to create a new version of the item (ims_cp_item)
+ set item_id [lors_central::get_item_id -revision_id $ims_item_id]
+ set item_title [lors_central::get_item_title -item_id $item_id]
+ set item_count [expr [lors_central::get_revision_count -item_id $item_id] + 1 ]
+ append item_title "_$item_count"
+ set new_ims_rev_id [content::revision::new -item_id $item_id -title $item_title -creation_user $user_id \
+ -is_live "t"]
+
+ # We need to fill the extra information
+ set item_name [lors_central::get_item_name -ims_item_id $ims_item_id]
+ set org_id [db_string get_org_id "select org_id from ims_cp_items where ims_item_id = :ims_item_id"]
+ set item_title [db_string get_item_title_id "select item_title from ims_cp_items where ims_item_id = :ims_item_id"]
+ db_dml update_ims_cp_items {
+ update ims_cp_items
+ set
+ org_id = :org_id,
+ identifier = :item_name,
+ identifierref = :file_upload,
+ item_title = :item_title,
+ parent_item = :parent_item
+ where ims_item_id = :new_ims_rev_id
+
+ }
+ # Now this new revision_id is the one that holds the content of the new resource
+ # We have to make a row in ims_cp_items_to_resources table
+ db_dml insert_new_item_to_res {
+ insert into ims_cp_items_to_resources (ims_item_id, res_id )
+ values (:new_ims_rev_id, :new_res_rev_id)
+ }
+ # get old res_id
+ set old_res_id [db_string get_old_res_id "select f.res_id from ims_cp_files f, ims_cp_items_to_resources r where f.file_id=:file_id and f.res_id=r.res_id and r.ims_item_id=:ims_item_id" -default ""]
+ ns_log notice "\nDAVEB: edit resource ims_item_id='${ims_item_id}' file_id='${file_id}' old_res_id='${old_res_id}'\n"
+ if {![string equal "" $old_res_id]} {
+ db_dml carry_forward_files "
+ insert into ims_cp_files (select file_id, $new_res_rev_id,pathtofile,filename,hasmetadata from ims_cp_files where res_id=:old_res_id and file_id <> :file_id)"
+ }
+ # We are going to set the sort_order field
+ lors_central::set_sort_order -ims_item_id $new_ims_rev_id
+ }
+
+} -after_submit {
+ ad_returnredirect "one-learning-object?ims_item_id=$ims_item_id&man_id=$man_id&name=$name"
+}
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/one-object-edit.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-object-edit.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-object-edit.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,61 @@
+
+
+
+
+
+ select
+ mime_type
+ from
+ cr_revisions
+ where
+ revision_id = :version_id
+
+
+
+
+
+ select
+ res_id
+ from
+ ims_cp_items_to_resources
+ where
+ ims_item_id = :ims_item_id
+
+
+
+
+
+ select
+ pathtofile as file_href
+ from
+ ims_cp_files
+ where
+ file_id = :file_id
+ and res_id = :res_id
+
+
+
+
+
+ select
+ filename as file_name
+ from
+ ims_cp_files
+ where
+ file_id = :file_id
+ and res_id = :res_id
+
+
+
+
+
+ select
+ href as res_href
+ from
+ ims_cp_resources
+ where
+ res_id = :res_id
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/one-resource.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-resource.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-resource.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,11 @@
+
+@page_title;noquote@
+@context;noquote@
+@res_id@
+
+Edit Metadata
+Versions of this learning object
+
+
+Courses that use this learning object
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/one-resource.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-resource.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-resource.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,54 @@
+ad_page_contract {
+ Show one ims_cp_resource object
+ (learning object)
+} {
+ res_id:integer,notnull
+}
+
+set user_id [ad_conn user_id]
+
+# TODO should we allow those with READ permission to look?
+permission::require_permission \
+ -object_id $res_id \
+ -party_id $user_id \
+ -privilege "admin"
+
+set ims_item_id [lors_central::get_ims_item_id_or_res_id -res_id $res_id]
+set man_id [db_string get_man_id { }]
+
+set displayed_object_id $res_id
+set page_title "All Resouces"
+set context [list [list "one-learning-object?man_id=$man_id&ims_item_id=$ims_item_id" \
+ [_ lors-central.One_learning]] "All Resources"]
+
+set res_item_id [lors_central::get_item_id -revision_id $res_id]
+
+db_multirow -extend {type} revisions get_res { } {
+ set last_modified [lc_time_fmt $last_modified "%x %X"]
+
+ if {[string equal "" $file_id]} {
+ set type "URL"
+ }
+}
+
+template::list::create \
+ -name revisions \
+ -multirow revisions \
+ -elements {
+ title {label "Revision Title" display_template {class="list-selected">» > @revisions.title@ } link_url_eval {[export_vars -base one-resource {res_id}]}}
+ last_modified {label "Modified On" display_template {class="list-selected">@revisions.last_modified@ }}
+ type {label "Type"}
+ }
+
+# Find lors-central courses that use this resource
+
+db_multirow courses courses { }
+
+template::list::create \
+ -name courses \
+ -multirow courses \
+ -elements {
+ course_name {label "Course Name" link_url_eval {[export_vars -base one-learning-object {ims_item_id man_id org_id}]}}
+ }
+
+ad_return_template
Index: openacs-4/packages/lors-central/www/one-resource.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-resource.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/one-resource.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,73 @@
+
+
+
+
+
+ select
+ io.org_id,
+ ii.ims_item_id,
+ im.man_id,
+ im.course_name
+ from
+ ims_cp_manifests im,
+ ims_cp_items ii ,
+ ims_cp_items_to_resources ir,
+ ims_cp_organizations io,
+ cr_revisions cr,
+ cr_items ci
+ where
+ im.man_id = io.man_id and
+ ii.org_id = io.org_id and
+ ii.ims_item_id = ir.ims_item_id and
+ ir.res_id = cr.revision_id and
+ cr.item_id = (
+ select
+ item_id
+ from
+ cr_revisions
+ where
+ revision_id = :res_id
+ ) and
+ ci.live_revision = ii.ims_item_id
+
+
+
+
+
+
+ select
+ man_id
+ from
+ ims_cp_resources
+ where
+ res_id = :res_id
+
+
+
+
+
+
+ select
+ r.*,
+ f.file_id,
+ case
+ when r.revision_id =:res_id then 1
+ else 0
+ end as selected
+ from
+ ims_cp_resourcesx r left join ims_cp_files f on f.res_id = r.res_id and
+ f.pathtofile = r.href
+ where
+ item_id = (
+ select
+ item_id
+ from
+ cr_revisions
+ where
+ revision_id = :res_id
+ )
+ order by ( case when revision_id = :res_id then 1 else 0 end), creation_date desc
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/reorder-items.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/reorder-items.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/reorder-items.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,145 @@
+ad_page_contract {
+ Reorders all the items according to sort_order
+} {
+ item_id:integer,notnull
+ dir:notnull
+ org_id:notnull
+ sort_order:notnull
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+set ims_item_id $item_id
+set item_sort [db_string get_item_sort { }]
+set man_id [db_string get_man_id { }]
+set parent_item [db_string get_parent_item { }]
+set global_list [db_list_of_lists get_global_group { }]
+set max_sort_order [db_string get_max_sort { }]
+
+if { [string equal $dir "up"] } {
+ set up_items [list [list $ims_item_id $item_sort]]
+
+ # First we need to get all the items that are going up
+ # (all the revisions and all the childrens if any)
+ # We get all items with the same parent_item as ims_item_id has
+ set same_parent [db_list_of_lists get_items_parent { }]
+
+ # We get all the items for the parent_item
+
+ # To get all the childrens we will get the sort_order of the next
+ # ims_item_id of with the same parent and get all the ims_item_id's
+ # between the ims_item_id to reorder and the next ims_item_id
+ set i 0
+ foreach item $same_parent {
+ if { [string equal [lindex $item 0] $ims_item_id] } {
+ set next_sort_pos [expr $i + 1]
+ set back_sort_pos [expr $i - 1]
+ }
+ incr i
+ }
+ set next_sort [lindex [lindex $same_parent $next_sort_pos] 1]
+ if { [empty_string_p $next_sort] } {
+
+ # This item is the last one so we need to get the sort order of the next parent
+ set next_item [lindex $global_list [expr [lsearch $global_list $parent_item] + 1]]
+ if { [empty_string_p $next_item] } {
+ # This is the last one of the course
+ set next_sort [expr $max_sort_order + 1]
+ } else {
+ set next_sort [db_string get_next_sort { }]
+ }
+ }
+ set up_childs [db_list_of_lists get_up_childs { }]
+ foreach item $up_childs {
+ lappend up_items $item
+ }
+ set tot_items_up [llength $up_items]
+
+ # Finish with up, now we are going to so the same for the items that
+ # are going down
+
+ set back_sort [lindex [lindex $same_parent $back_sort_pos] 1]
+ set down_items [list [lindex $same_parent $back_sort_pos]]
+ set down_childs [db_list_of_lists get_down_childs { }]
+ foreach item $down_childs {
+ lappend down_items $item
+ }
+ set tot_items_down [llength $down_items]
+
+ # Now that we now how many items will go up and how many will go down
+ # we make the updates on the tables
+
+ foreach item $up_items {
+ set ims_item_id [lindex $item 0]
+ set sort [expr [lindex $item 1] - $tot_items_down]
+ lors_central::set_sort_order -ims_item_id $ims_item_id -sort_order $sort
+ }
+ foreach item $down_items {
+ set ims_item_id [lindex $item 0]
+ set sort [expr [lindex $item 1] + $tot_items_up]
+ lors_central::set_sort_order -ims_item_id $ims_item_id -sort_order $sort
+ }
+} else {
+ # We are going to do the same as above but with some variants
+ set down_items [list [list $ims_item_id $item_sort]]
+
+ # We get all items with the same parent_item as ims_item_id has
+ set same_parent [db_list_of_lists get_items_parent { }]
+
+ # To get all the childrens we will get the sort_order of the next
+ # ims_item_id of with the same parent and get all the ims_item_id's
+ # between the ims_item_id to reorder and the next ims_item_id
+ set i 0
+ foreach item $same_parent {
+ if { [string equal [lindex $item 0] $ims_item_id] } {
+ set next_sort_pos [expr $i + 1]
+ set back_sort_pos [expr $i + 2]
+ }
+ incr i
+ }
+ set next_sort [lindex [lindex $same_parent $next_sort_pos] 1]
+ set down_childs [db_list_of_lists get_down_childs_2 { }]
+ foreach item $down_childs {
+ lappend down_items $item
+ }
+ set tot_items_down [llength $down_items]
+
+
+ # Finish with down, now we are going to so the same for the items that
+ # are going up
+
+ set back_sort [lindex [lindex $same_parent $back_sort_pos] 1]
+ if { [empty_string_p $back_sort] } {
+ # This is the last one of same parent
+ set next_item [lindex $global_list [expr [lsearch $global_list $parent_item] + 1]]
+ if { [empty_string_p $next_item] } {
+ # This is the last one of the course
+ set back_sort [expr $max_sort_order + 1]
+ } else {
+ set back_sort [db_string get_next_sort { }]
+ }
+ }
+ set up_items [list [lindex $same_parent $next_sort_pos]]
+ set up_childs [db_list_of_lists get_up_childs_2 { }]
+ foreach item $up_childs {
+ lappend up_items $item
+ }
+ set tot_items_up [llength $up_items]
+
+ # Now that we now how many items will go up and how many will go down
+ # we make the updates on the tables
+
+ foreach item $up_items {
+ set ims_item_id [lindex $item 0]
+ set sort [expr [lindex $item 1] - $tot_items_down]
+ lors_central::set_sort_order -ims_item_id $ims_item_id -sort_order $sort
+ }
+ foreach item $down_items {
+ set ims_item_id [lindex $item 0]
+ set sort [expr [lindex $item 1] + $tot_items_up]
+ lors_central::set_sort_order -ims_item_id $ims_item_id -sort_order $sort
+ }
+}
+
+ad_returnredirect "one-course?man_id=$man_id"
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/reorder-items.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/reorder-items.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/reorder-items.xql 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,145 @@
+
+
+
+
+
+ select
+ man_id
+ from
+ ims_cp_organizations
+ where
+ org_id = :org_id
+
+
+
+
+
+ select
+ sort_order
+ from
+ ims_cp_items
+ where
+ ims_item_id = :ims_item_id
+
+
+
+
+
+
+ select
+ ims_item_id, sort_order
+ from
+ ims_cp_items
+ where
+ parent_item = :parent_item
+ order by sort_order asc
+
+
+
+
+
+ select
+ parent_item
+ from
+ ims_cp_items
+ where
+ ims_item_id = :ims_item_id
+
+
+
+
+
+ select
+ ims_item_id
+ from
+ ims_cp_items
+ where
+ parent_item = ( select
+ parent_item
+ from
+ ims_cp_items
+ where
+ ims_item_id = :parent_item )
+ order by sort_order asc
+
+
+
+
+
+ select
+ ims_item_id, sort_order
+ from
+ ims_cp_items
+ where
+ sort_order > :item_sort and sort_order < :next_sort
+ and org_id = :org_id
+ order by sort_order
+
+
+
+
+
+ select
+ sort_order
+ from
+ ims_cp_items
+ where
+ ims_item_id = :next_item
+ and org_id = :org_id
+ order by sort_order
+
+
+
+
+
+ select
+ max(sort_order)
+ from
+ ims_cp_items
+ where
+ org_id = :org_id
+
+
+
+
+
+
+ select
+ ims_item_id, sort_order
+ from
+ ims_cp_items
+ where
+ sort_order < :item_sort and sort_order > :back_sort
+ and org_id = :org_id
+ order by sort_order
+
+
+
+
+
+ select
+ ims_item_id, sort_order
+ from
+ ims_cp_items
+ where
+ sort_order > :item_sort and sort_order < :next_sort
+ and org_id = :org_id
+ order by sort_order
+
+
+
+
+
+ select
+ ims_item_id, sort_order
+ from
+ ims_cp_items
+ where
+ sort_order > :next_sort and sort_order < :back_sort
+ and org_id = :org_id
+ order by sort_order
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/search.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/search.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/search.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,10 @@
+
+ @page_title@
+ @header_stuff@
+ @context@
+ @focus@
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/search.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/search.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/search.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,102 @@
+#
+
+ad_page_contract {
+
+ Search Learning Objects
+
+ @author Dave Bauer (dave@thedesignexperience.org)
+ @creation-date 2005-03-26
+ @arch-tag: 79e55eed-608a-449e-b684-5c5d4018fe4f
+ @cvs-id $Id: search.tcl,v 1.1 2005/05/17 16:21:19 miguelm Exp $
+} {
+ {q ""}
+ {extra_q ""}
+ {offset 0}
+ {num 0}
+} -properties {
+} -validate {
+} -errors {
+}
+
+set page_title "Search Learning Objects"
+set context [list $page_title]
+set header_stuff ""
+set focus ""
+
+set package_id [ad_conn package_id]
+set user_id [ad_conn user_id]
+
+permission::require_permission \
+ -object_id $package_id \
+ -party_id $user_id \
+ -privilege "read"
+
+set grade_range_options [db_list_of_lists glo "select distinct context_v as label, context_v from ims_md_educational_context"]
+set grade_range_options [linsert $grade_range_options 0 {"--" ""}]
+set subject_area_options [db_list_of_lists so "select distinct entry_s as label, entry_s from ims_md_general_cata where catalog = 'PBS-SubjectArea'"]
+set subject_area_options [linsert $subject_area_options 0 {"--" ""}]
+ad_form -name search -method GET -form {
+ {q:text(text)
+ {label "Enter Search Terms"}
+ {html {id search-textbox}}}
+ {search:text(submit) {label "Search"}}
+ {grade_range:text(select),optional
+ {label "Grade Range"}
+ {options $grade_range_options}}
+ {subject_area:text(select),optional
+ {label "Subject Area"}
+ {options $subject_area_options}}
+
+
+} -on_submit {
+
+append extra_q " object_type:ims_resource_object"
+if {[exists_and_not_null grade_range]} {
+ append extra_q " grade_range:${grade_range} "
+}
+if {[exists_and_not_null subject_area]} {
+ append extra_q " subject_area:${subject_area} "
+}
+}
+
+# if {[info exists q] && ![string equal "" $q]} {
+# set search 1
+# } else {
+# set search 0
+# }
+
+# set filters {search {values {0 1} where_clause_eval {
+# if {$search} {
+# array set result [acs_sc_call FtsEngineDriver search [list [string tolower $q] 0 10 $user_id "" ""] "tsearch2-driver"]
+# if {![info exists result(ids)]} {
+# # search is not working, ignore search terms
+# set where " 1=1 "
+# } elseif {[llength $result(ids)] >0} {
+# set result_ids $result(ids)
+# set where " object_id in ([template::util::tcl_to_sql_list $result_ids])"
+# } else {
+# subst {1=0}
+# }
+# } else {
+# subst {1=0}
+# }
+# } } }
+
+# # search results (with checkboxes for clipboard)
+# template::list::create \
+# -name results \
+# -multirow results \
+# -elements {
+# title { label "title" link_url_col url }
+# } \
+# -filters ${filters}
+
+# # TODO use search to generate multirow, otherwise we have issues with
+# # ordering if we try to put the ids into a IN clause
+
+# db_multirow -extend {url} results get_results "select object_id, coalesce ('Untitled',title) as title from acs_objects where [template::list::filter_where_clauses -name results]" {
+# set url "/o/${object_id}"
+# }
+
+ad_return_template
+
Index: openacs-4/packages/lors-central/www/shared.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/shared.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/shared.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,29 @@
+ad_page_contract {
+ Changes one ims_items isshared field
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+} {
+ man_id:notnull
+ ims_item_id:notnull
+ {name ""}
+ shared:notnull
+ org_id:notnull
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+if { $shared } {
+ set isshared f
+} else {
+ set isshared t
+}
+
+db_dml update_isshared {
+ update ims_cp_items
+ set isshared = :isshared
+ where ims_item_id = :ims_item_id
+ and org_id = :org_id
+}
+
+ad_returnredirect "one-learning-object?man_id=$man_id&name=$name&ims_item_id=$ims_item_id"
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/tracker.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/tracker.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/tracker.adp 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,7 @@
+
+ @title@
+ @context@
+
+
+
+
Index: openacs-4/packages/lors-central/www/tracker.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/tracker.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/tracker.tcl 17 May 2005 16:21:19 -0000 1.1
@@ -0,0 +1,80 @@
+# packages/lorsm/www/tracker.tcl
+
+ad_page_contract {
+
+ set a course for a class to be trackable
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 2004-05-25
+ @arch-tag 07ceb832-2053-4579-bec2-76708522707a
+ @cvs-id $Id: tracker.tcl,v 1.1 2005/05/17 16:21:19 miguelm Exp $
+} {
+ man_id:integer,notnull
+ community_id:integer,notnull
+} -properties {
+} -validate {
+} -errors {
+}
+
+# Checking swa privilege over lors-central
+lors_central::is_swa
+
+set lorsm_instance_id [db_string get_lorsm_instance_id {
+ select lorsm_instance_id from ims_cp_manifest_class where man_id = :man_id and community_id = :community_id
+} -default 0]
+
+set package_id $lorsm_instance_id
+
+if { [string equal $package_id "0"] } {
+ ad_return_complaint 1 "[_ lors-central.you_have_to]"
+ ad_script_abort
+}
+
+set title "[_ lorsm.lt_Set_Course_Track_Opti]"
+set context [list [list "one-course-associations?man_id=$man_id" \
+ "[_ lors-central.one_course_assoc]"] "[_ lorsm.Set_Course_Options]"]
+
+ad_form -name tracker \
+ -export {package_id} \
+ -form {
+ {man_id:key}
+ {project:text(inform)
+ {label "[_ lorsm.Course_Name]"}
+ {value {[lorsm::get_course_name -manifest_id $man_id]}}
+ }
+ {istrackable:text(inform)
+ {label "[_ lorsm.Current_Status]"}
+ }
+ {lorsm_instance_id:text(hidden)
+ {value $lorsm_instance_id}
+ }
+ {community_id:text(hidden)
+ {value $community_id}
+ }
+ {enable:text(radio)
+ {label Status?}
+ {options {{"[_ lorsm.Trackable_1]" t} {"[_ lorsm.No_Thanks]" f}}}
+ }
+ } -select_query {
+ select
+ case when istrackable = 't' then 'Yes'
+ else 'No'
+ end as istrackable
+ from ims_cp_manifest_class
+ where man_id = :man_id and
+ lorsm_instance_id = :package_id
+ } -edit_data {
+ db_dml do_update "
+ update ims_cp_manifest_class
+ set istrackable = :enable
+ where man_id = :man_id and
+ lorsm_instance_id = :package_id"
+ } -after_submit {
+ ad_returnredirect "one-course-associations?man_id=$man_id"
+ ad_script_abort
+ }
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/download/index.vuh
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/download/index.vuh,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/download/index.vuh 17 May 2005 16:21:20 -0000 1.1
@@ -0,0 +1,27 @@
+ ad_page_contract {
+
+ Virtual URL handler for file downloads
+
+ @author Kevin Scaldeferri (kevin@arsdigita.com)
+ @author Don Baccus (simplified it by using cr utility)
+ @creation-date 18 December 2000
+ @cvs-id $Id: index.vuh,v 1.1 2005/05/17 16:21:20 miguelm Exp $
+} {
+ file_id:integer,optional
+ version_id:integer,optional
+}
+
+if {![exists_and_not_null version_id]} {
+ set version_id [item::get_live_revision $file_id]
+}
+
+set user_id [ad_conn user_id]
+
+
+#ad_require_permission $version_id "read"
+
+cr_write_content -revision_id $version_id
+
+
+
+
Index: openacs-4/packages/lors-central/www/download/preview.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/download/preview.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/download/preview.adp 17 May 2005 16:21:20 -0000 1.1
@@ -0,0 +1 @@
+@preview;noquote@
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/download/preview.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/download/preview.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/download/preview.tcl 17 May 2005 16:21:20 -0000 1.1
@@ -0,0 +1,21 @@
+ad_page_contract {
+
+ URL handler for file preview
+
+} {
+ file_id:integer,optional
+ version_id:integer,optional
+}
+
+# DAVEB file_id is version_id now
+set version_id $file_id
+#if {![exists_and_not_null version_id]} {
+# set version_id [item::get_live_revision $file_id]
+#}
+
+set preview [cr_write_content -string -revision_id $version_id]
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/export/create-zip.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/export/create-zip.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/export/create-zip.tcl 17 May 2005 16:21:20 -0000 1.1
@@ -0,0 +1,254 @@
+ad_page_contract {
+ Export one course in IMS type
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+} {
+ man_id:notnull
+ folder_id:notnull
+}
+
+set content_folder_id $folder_id
+set user_id [ad_conn user_id]
+set course_man_id $man_id
+# - - - - - - - - - - - - - - - - - - -
+# We open a new file to write to it
+# - - - - - - - - - - - - - - - - - - -
+
+set fid [open "/tmp/gimsmanifest.xml" w]
+
+set line ""
+puts $fid $line
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Now we are going to check if it has a metadata to insert that on the xml also
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+if { $hasmetadata } {
+ puts $fid ""
+ puts $fid ""
+ db_1row get_metadata_info { }
+ puts $fid " $schema "
+ puts $fid " $schemaversion "
+ puts $fid " "
+ puts $fid " "
+ puts $fid " "
+ puts $fid " $title_s "
+ puts $fid " "
+ puts $fid " "
+ puts $fid " $descrip_s "
+ puts $fid " "
+ puts $fid " "
+ puts $fid " "
+ puts $fid " "
+}
+
+# - - - - - - - - - - - - - - - - - - - - -
+# We are goint to get all organizations
+# - - - - - - - - - - - - - - - - - - - - -
+
+puts $fid ""
+db_foreach get_organizations { } {
+ puts $fid " "
+
+ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ # We need to get all items and arrange them at the proper order to get
+ # parent son relation reflected on test.xml
+ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ set i 0
+ set all_items [lors_central::export::get_items_xml -org_id $org_id]
+ foreach item $all_items {
+ set ims_item_id [lindex $item 0]
+ set level [lindex $item 1]
+ set indent ""
+ for {set j 0 } { $j <= $level } {incr j} {
+ append indent " "
+ }
+ db_1row get_item_info { }
+
+ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ # We add the res_id to the identifierref to avoid names conflicts since resources added
+ # from other courses could have the same name.
+ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ puts $fid "$indent- "
+ puts $fid "$indent
$item_title "
+ set next_level [lindex [lindex $all_items [expr $i + 1]] 1]
+ if { [empty_string_p $next_level] } {
+ set next_level 1
+ }
+ if { [string equal $next_level $level] } {
+ puts $fid "$indent "
+ }
+ if { $next_level < $level } {
+ puts $fid "$indent"
+ for { set j 0 } { $j < [expr $level - $next_level] } { incr j } {
+ puts $fid "$indent"
+ }
+ }
+ incr i
+ }
+ puts $fid " "
+
+}
+puts $fid " "
+
+
+# - - - - - - - - - - - - - - - - - -
+# Here we get all the resources
+# - - - - - - - - - - - - - - - - - -
+set orgs_list "("
+db_foreach get_organizations { } {
+ append orgs_list "$org_id,"
+ puts $fid ""
+ db_foreach get_resources { } {
+
+ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ # We add the res_id to the identifier to avoid names conflicts since resources added
+ # from other courses could have the same name.
+ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ set line ""
+ puts $fid $line
+ db_foreach get_files { } {
+ puts $fid " "
+ }
+ } else {
+ append line ">"
+ puts $fid $line
+ }
+ puts $fid " "
+ }
+ puts $fid " "
+}
+append orgs_list "0)"
+
+# - - - - - - - - - - - -
+# Now we close the file
+# - - - - - - - - - - - -
+
+puts $fid " "
+close $fid
+
+
+# - - - - - - - - - - -
+# Creating zip file
+# - - - - - - - - - - -
+
+
+# publish the object to the file system
+set in_path [ns_tmpnam]
+exec mkdir $in_path
+
+set file [lors_central::export::publish_object_to_file_system -object_id $content_folder_id -path $in_path -user_id $user_id]
+set file_name [file tail $file]
+
+set download_name "${file_name}.zip"
+
+# - - - - - - - - - - - - - - - - - - - - - - - -
+# We get rid of spaces since they are annoying
+# - - - - - - - - - - - - - - - - - - - - - - - -
+regsub -all { } $download_name {_} download_name
+
+# - - - - - - - - - - - - - - - - - - - -
+# Create a temp dir to put the archive in
+# - - - - - - - - - - - - - - - - - - - -
+set out_path [ns_tmpnam]
+file mkdir $out_path
+set out_file [file join ${out_path} ${download_name}]
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# We need to copy all files related to all resources that are not present on this folder
+# This are the one that are on a different course
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+set extra_resources [db_list_of_lists get_other_resources { }]
+
+foreach res $extra_resources {
+ set path [db_string get_href { } ]
+ set split_path [split $path "/"]
+ if { [llength $split_path] <= 1 } {
+ # - - - - - - - - - - - - - - -
+ # It just a file, copy the file
+ # - - - - - - - - - - - - - - -
+ set file_id [db_string get_file { } -default ""]
+ if { ![empty_string_p $file_id] } {
+ set filename [db_string get_filename { } -default ""]
+ }
+ set object_id [lors_central::get_item_id -revision_id $file_id]
+ lors_central::export::publish_versioned_object_to_file_system -object_id $object_id \
+ -path "$file" -file_name $filename
+ } else {
+ # - - - - - - - - - - - - - - - - - - - - - -
+ # Is a folder, we need to create the folder
+ # - - - - - - - - - - - - - - - - - - - - - -
+ if { ![empty_string_p [lindex $split_path 0]] } {
+ set folder_path [lindex $split_path 0]
+ set file_path [lindex $split_path 1]
+ } else {
+ set folder_path [lindex $split_path 1]
+ set file_path [lindex $split_path 2]
+ }
+ with_catch errmsg {
+ exec bash -c "cd '$file'; mkdir $folder_path;"
+ } {
+ # We don't need to create this folder since already exists
+ }
+ db_foreach get_resource_files { } {
+ # - - - - - - - -
+ # Copy all files
+ # - - - - - - - -
+ set object_id [lors_central::get_item_id -revision_id $file_id]
+ lors_central::export::publish_versioned_object_to_file_system -object_id $object_id \
+ -path "$file/$folder_path" -file_name $filename
+ } if_no_rows {
+ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ # This is a file that it's not present on ims_cp_files table ( URL )
+ # We need to get it from the folder directly, using res_id to get
+ # man id to get the folder where the file is present
+ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ set root_folder [lors_central::get_root_folder_id]
+ set man_id [db_string get_man_id { }]
+ set name [lors_central::get_course_name -man_id $man_id]
+ set content_folder [db_string get_content_folder { select item_id from cr_items where parent_id = :root_folder and name = :name }]
+ set folder_id [db_string get_folder_id { select item_id from cr_items where parent_id = :content_folder and name = :folder_path }]
+ set url_file_id [db_string get_url_file_id { select item_id from cr_items where parent_id = :folder_id and name = :file_path} ]
+ lors_central::export::publish_versioned_object_to_file_system -object_id $url_file_id \
+ -path "$file/$folder_path" -file_name $file_path
+ }
+ }
+}
+
+
+set cmd "zip -r '$out_file' *"
+set copy "cp /tmp/gimsmanifest.xml ./imsmanifest.xml"
+
+# - - - - - - - - - -
+# create the archive
+# - - - - - - - - - -
+with_catch errmsg {
+ exec bash -c "cd '$file'; $copy; $cmd; cd -"
+} {
+ # some day we'll do something useful here
+ error $errmsg
+}
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# redirect the archive to index.vuh to be returned to the connection.
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ad_returnredirect ".$out_file"
+
+
+
+# - - - - - - - - - - - - - - - - - - -
+# Removing temporary files and folders
+# - - - - - - - - - - - - - - - - - - -
+
+exec rm -fr $in_path
+exec rm -fr $out_path
+exec rm -fr "tmp/gimsmanifest.xml"
+
+
Index: openacs-4/packages/lors-central/www/export/create-zip.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/export/create-zip.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/export/create-zip.xql 17 May 2005 16:21:20 -0000 1.1
@@ -0,0 +1,187 @@
+
+
+
+
+
+ select
+ distinct res_id
+ from
+ ims_cp_items_to_resources
+ where
+ res_id in (
+ select
+ res_id
+ from
+ ims_cp_items_to_resources
+ where
+ ims_item_id in (
+ select
+ ims_item_id
+ from
+ ims_cp_items
+ where
+ org_id in $orgs_list
+ )
+ )
+ and res_id not in (
+ select
+ res_id
+ from
+ ims_cp_resources
+ where
+ man_id = :course_man_id
+ )
+
+
+
+
+
+
+ select
+ md.schema,
+ md.schemaversion,
+ mdgt.title_l,
+ mdgt.title_s,
+ mdgd.descrip_l,
+ mdgd.descrip_s
+ from
+ ims_md md,
+ ims_md_general_title mdgt,
+ ims_md_general_desc mdgd
+ where
+ md.ims_md_id = mdgd.ims_md_id and
+ mdgd.ims_md_id = mdgt.ims_md_id and
+ md.ims_md_id = :man_id
+
+
+
+
+
+
+ select
+ *
+ from
+ ims_cp_manifests
+ where
+ man_id = :man_id
+
+
+
+
+
+ select
+ *
+ from
+ ims_cp_organizations
+ where
+ man_id = :man_id
+ order by org_id
+
+
+
+
+
+ select
+ r.*
+ from
+ ims_cp_resources r,
+ ims_cp_items_to_resources ir
+ where
+ r.res_id = ir.res_id
+ and ir.ims_item_id in (
+ select
+ ims_item_id
+ from
+ ims_cp_items
+ where
+ org_id = :org_id
+ )
+ order by res_id
+
+
+
+
+
+ select
+ file_id,
+ filename
+ from
+ ims_cp_files
+ where
+ res_id = :res
+
+
+
+
+
+ select
+ *
+ from
+ ims_cp_files
+ where
+ res_id = :res_id
+ order by file_id
+
+
+
+
+
+ select
+ i.identifier,
+ i.identifierref,
+ i.item_title,
+ ir.res_id as item_res_id
+ from
+ ims_cp_items i, ims_cp_items_to_resources ir
+ where
+ i.ims_item_id = ir.ims_item_id and
+ i.ims_item_id = :ims_item_id
+
+
+
+
+
+
+ select
+ href
+ from
+ ims_cp_resources
+ where
+ res_id = :res
+
+
+
+
+
+ select
+ file_id
+ from
+ ims_cp_files
+ where
+ res_id = :res
+
+
+
+
+
+ select
+ filename
+ from
+ ims_cp_files
+ where
+ file_id = :file_id
+
+
+
+
+
+ select
+ man_id
+ from
+ ims_cp_resources
+ where
+ res_id = :res
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/export/index.vuh
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/export/index.vuh,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/export/index.vuh 17 May 2005 16:21:20 -0000 1.1
@@ -0,0 +1,15 @@
+# packages/lors-central/www/export/index.vuh
+
+ad_page_contract {
+ Just to get the propper file name to return to the user
+ from the server
+
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+}
+
+
+set download_name [ad_conn path_info]
+
+ns_returnfile 200 application/octet-stream "/$download_name"
+
Index: openacs-4/packages/lors-central/www/images/down.gif
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/images/down.gif,v
diff -u
Binary files differ
Index: openacs-4/packages/lors-central/www/images/file.gif
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/images/file.gif,v
diff -u
Binary files differ
Index: openacs-4/packages/lors-central/www/images/folder.gif
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/images/folder.gif,v
diff -u
Binary files differ
Index: openacs-4/packages/lors-central/www/images/live.gif
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/images/live.gif,v
diff -u
Binary files differ
Index: openacs-4/packages/lors-central/www/images/up.gif
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/images/up.gif,v
diff -u
Binary files differ
Index: openacs-4/packages/lors-central/www/lib/md-record-pbs.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/lib/md-record-pbs.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/lib/md-record-pbs.adp 17 May 2005 16:21:21 -0000 1.1
@@ -0,0 +1 @@
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/lib/md-record-pbs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/lib/md-record-pbs.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/lib/md-record-pbs.tcl 17 May 2005 16:21:21 -0000 1.1
@@ -0,0 +1,48 @@
+
+template::list::create \
+ -name d_pres \
+ -multirow d_pres \
+ -no_data "-" \
+ -html {width 80%} \
+ -elements {
+ object_type {
+ label "[_ lorsm.Object_Type]"
+ }
+ schema_and_version {
+ label "[_ lorsm.lt_MD_Schema_and_Version]"
+ html { align center }
+ }
+ admin {
+ label "[_ lorsm.Edit_Schema_Details]"
+ display_eval {Modify Schema}
+ link_url_eval {[export_vars -base "addmd" ims_md_id]}
+ link_html {title "[_ lorsm.Admin_Course]" class button}
+ html { align center }
+ }
+
+ }
+
+db_multirow d_pres select_ge_titles {
+ select
+ object_type
+ from
+ acs_objects
+ where
+ object_id = :ims_md_id
+}
+
+db_multirow -extend { schema_and_version } d_pres select_schema_details {
+
+ select
+ ims_md_id,
+ schema,
+ schemaversion
+ from
+ ims_md
+ where
+ ims_md_id = :ims_md_id
+
+} {
+ set schema_and_version [concat $schema " " $schemaversion]
+}
+
Index: openacs-4/packages/lors-central/www/lib/md-record.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/lib/md-record.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/lib/md-record.adp 17 May 2005 16:21:21 -0000 1.1
@@ -0,0 +1 @@
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/lib/md-record.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/lib/md-record.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/lib/md-record.tcl 17 May 2005 16:21:21 -0000 1.1
@@ -0,0 +1,61 @@
+set actions [list]
+
+lappend actions "[_ lorsm._General]" [export_vars -base generalmd {ims_md_id}] "[_ lorsm.lt_View_General_Metadata]"
+lappend actions "[_ lorsm.Lifecycle_MD]" [export_vars -base lifecyclemd {ims_md_id}] "[_ lorsm.lt_View_Lifecycle_Metada]"
+lappend actions "[_ lorsm.Meta_MD]" [export_vars -base metamd {ims_md_id}] "[_ lorsm.View_Meta_Metadata]"
+lappend actions "[_ lorsm.Technical_MD]" [export_vars -base technicalmd {ims_md_id}] "[_ lorsm.lt_View_Technical_Metada]"
+lappend actions "[_ lorsm.Educational_MD]" [export_vars -base educationalmd {ims_md_id}] "[_ lorsm.lt_View_Educational_Meta]"
+lappend actions "[_ lorsm.Rights_MD]" [export_vars -base rightsmd {ims_md_id}] "[_ lorsm.View_Rights_Metadata]"
+lappend actions "[_ lorsm.Relation_MD]" [export_vars -base relationmd {ims_md_id}] "[_ lorsm.lt_View_Relation_Metadat]"
+lappend actions "[_ lorsm.Annotation_MD]" [export_vars -base annotationmd {ims_md_id}] "[_ lorsm.lt_View_Annotation_Metad]"
+lappend actions "[_ lorsm.Classification_MD]" [export_vars -base classificationmd {ims_md_id}] "[_ lorsm.lt_View_Classification_M_1]"
+
+
+# Presentation
+template::list::create \
+ -name d_pres \
+ -multirow d_pres \
+ -no_data "-" \
+ -actions $actions \
+ -elements {
+ object_type {
+ label "[_ lorsm.Object_Type]"
+ }
+ schema_and_version {
+ label "[_ lorsm.lt_MD_Schema_and_Version]"
+ html { align center }
+ }
+ admin {
+ label "[_ lorsm.Edit_Schema_Details]"
+ display_eval {Modify Schema}
+ link_url_eval {[export_vars -base "addmd" ims_md_id]}
+ link_html {title "[_ lorsm.Admin_Course]" class button}
+ html { align center }
+ }
+
+ }
+
+db_multirow d_pres select_ge_titles {
+ select
+ object_type
+ from
+ acs_objects
+ where
+ object_id = :ims_md_id
+}
+
+db_multirow -extend { schema_and_version } d_pres select_schema_details {
+
+ select
+ ims_md_id,
+ schema,
+ schemaversion
+ from
+ ims_md
+ where
+ ims_md_id = :ims_md_id
+
+} {
+ set schema_and_version [concat $schema " " $schemaversion]
+}
+
Index: openacs-4/packages/lors-central/www/lib/repository-shared-courses.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/lib/repository-shared-courses.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/lib/repository-shared-courses.adp 17 May 2005 16:21:21 -0000 1.1
@@ -0,0 +1,3 @@
+
+
+
Index: openacs-4/packages/lors-central/www/lib/repository-shared-courses.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/lib/repository-shared-courses.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/lib/repository-shared-courses.tcl 17 May 2005 16:21:21 -0000 1.1
@@ -0,0 +1,99 @@
+# packages/lorsm/www/lib/repository-shared-courses.tcl
+
+ad_page_contract {
+
+ List all the shared courses in the repository
+ View shared courses
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 2004-07-09
+ @arch-tag: 9dd389d3-195f-49ed-b610-ee893cde06d6
+ @cvs-id $Id: repository-shared-courses.tcl,v 1.1 2005/05/17 16:21:21 miguelm Exp $
+} {
+
+} -properties {
+} -validate {
+} -errors {
+}
+
+
+set title "[_ lorsm.Shared_Courses]"
+set context [list "[_ lorsm.Shared_Courses]"]
+
+set package_id [ad_conn package_id]
+set community_id [dotlrn_community::get_community_id]
+
+set admin_p [dotlrn::user_can_admin_community_p \
+ -user_id [ad_conn user_id] \
+ -community_id $community_id ]
+
+set com_url [dotlrn_community::get_community_url $community_id]
+
+template::list::create \
+ -name d_courses \
+ -multirow d_courses \
+ -html {width 50%} \
+ -key man_id \
+ -no_data "[_ lorsm.No_Courses]" \
+ -elements {
+ course_name {
+ label "[_ lorsm.Available_Courses]"
+ display_col course_name
+ link_url_eval {[export_vars -base $community_url/lorsm/shared/course-info {man_id fs_package_id folder_id}]}
+ link_html {title "[_ lorsm.Access_Course]"}
+
+ }
+ hasmetadata {
+ label "[_ lorsm.Metadata_1]"
+ link_url_eval {[export_vars -base $community_url/lorsm/md {ims_md_id}]}
+ link_html {title "[_ lorsm.See_metadata]" }
+ html { align center }
+ }
+ creation_user {
+ label "[_ lorsm.Owner]"
+ display_eval {[person::name -person_id $creation_user]}
+ link_url_eval {[acs_community_member_url -user_id $creation_user]}
+ }
+ creation_date {
+ label "[_ lorsm.Creation_Date]"
+ display_eval {[lc_time_fmt $creation_date "%x %X"]}
+ }
+ admin {
+ label "[_ lorsm.Course_Info]"
+ display_eval {Info/View}
+ link_url_eval {[export_vars -base $community_url/lorsm/shared/course-info man_id]}
+ link_html {title "[_ lorsm.Info]" class button}
+ html { align center }
+ }
+ }
+
+
+db_multirow -extend { ims_md_id community_url } d_courses select_d_courses {
+ select
+ cp.man_id,
+ cp.course_name,
+ cp.identifier,
+ cp.version,
+ case
+ when hasmetadata = 't' then 'Yes'
+ else 'No'
+ end as hasmetadata,
+ cp.fs_package_id,
+ cp.folder_id,
+ acs.creation_user,
+ acs.creation_date,
+ acs.context_id
+ from
+ ims_cp_manifests cp, acs_objects acs
+ where
+ cp.man_id = acs.object_id
+ and
+ cp.isshared = 't'
+ and cp.man_id in ( select cr.live_revision from cr_items cr
+ where content_type = 'ims_manifest_object' )
+ order by acs.creation_date desc
+} {
+ set ims_md_id $man_id
+ set community_url $com_url
+}
+
Index: openacs-4/packages/lors-central/www/md/addmd.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/addmd.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/addmd.adp 17 May 2005 16:21:21 -0000 1.1
@@ -0,0 +1,31 @@
+
+@title;noquote@
+@context;noquote@
+
+MD Schema
+
+
+
+ Metadata Schema
+
+
+
+
+
+
+
+
+
+
Add Metadata Schema
+
+
+
+ Object: @object_type@
+ Add details for the metadata schema and version.
+
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/addmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/addmd.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/addmd.tcl 17 May 2005 16:21:21 -0000 1.1
@@ -0,0 +1,135 @@
+# packages/lorsm/www/md/addmd.tcl
+
+ad_page_contract {
+
+ Add metadata schema
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 2004-11-13
+ @arch-tag: 28b76527-a05f-42cf-b562-37c7b85e799f
+ @cvs-id $Id: addmd.tcl,v 1.1 2005/05/17 16:21:21 miguelm Exp $
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# Get object information
+set object_type [acs_object_type $ims_md_id]
+
+# set context & title
+set context [list [list [export_vars -base "." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] "[_ lorsm.lt_Edit_Metadata_Schema_]"]
+set title "[_ lorsm.lt_AddEdit_MD_Schema_and]"
+
+
+# Form
+ad_form -name add_md \
+ -cancel_url ".." \
+ -mode edit \
+ -form {
+
+ {schema:text,nospell
+ {html {size 20}}
+ {help_text "[_ lorsm.lt_Metadata_schema_ie_IM]"}
+ {label "[_ lorsm.Schema]"}
+ }
+
+ {schemaversion:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Version_of_the_Schema]"}
+ {label "[_ lorsm.Schema_Version]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ db_transaction {
+
+ if {![lors::imsmd::mdExist -ims_md_id $ims_md_id]} {
+
+ db_dml do_insert "
+ insert into ims_md(ims_md_id, schema, schemaversion)
+ values (:ims_md_id, :schema, :schemaversion)"
+
+ } else {
+
+ db_dml do_update {
+ update ims_md set schema = :schema, schemaversion = :schemaversion
+ where ims_md_id = :ims_md_id
+ }
+
+ }
+
+ # If the object_type is on any of the IMS CP object types,
+ # then we update also the ims cp tables accordingly.
+
+ switch $object_type {
+
+ "ims_manifest" {
+
+ db_dml upd_manifest "
+ update ims_cp_manifests set hasmetadata = 't'
+ where man_id = :ims_md_id"
+ }
+ "ims_item" {
+
+ db_dml upd_item "
+ update ims_cp_items set hasmetadata = 't'
+ where item_id = :ims_md_id"
+ }
+ "ims_organization" {
+
+ db_dml upd_organization "
+ update ims_cp_organizations set hasmetadata = 't'
+ where org_id = :ims_md_id"
+ }
+ "ims_resource" {
+
+ db_dml upd_resource "
+ update ims_cp_resources set hasmetadata = 't'
+ where res_id = :ims_md_id"
+ }
+ "content_item" {
+
+ db_dml upd_file "
+ update ims_cp_files set hasmetadata = 't'
+ where file_id = :ims_md_id"
+ }
+
+ }
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "." ims_md_id]
+ ad_script_abort
+}
+
+# MD Schema Info
+template::list::create \
+ -name md_schema_info \
+ -multirow md_schema_info \
+ -no_data "[_ lorsm.No_Schema_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ schema {
+ label "[_ lorsm.Schema_1]"
+ html { align center }
+ }
+ schemaversion {
+ label "[_ lorsm.Version_1]"
+ html { align center }
+ }
+ }
+
+ db_multirow md_schema_info select_md_schema {
+ select
+ schema,
+ schemaversion
+ from
+ ims_md
+ where
+ ims_md_id = :ims_md_id
+ }
+
Index: openacs-4/packages/lors-central/www/md/annotationmd.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/annotationmd.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/annotationmd.adp 17 May 2005 16:21:21 -0000 1.1
@@ -0,0 +1,16 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+ Annotation Metadata
+
+
+ Annotations:
+
+
+
Index: openacs-4/packages/lors-central/www/md/annotationmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/annotationmd.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/annotationmd.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,45 @@
+ad_page_contract {
+ Displays/Adds IMS Metadata Annotation
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: annotationmd.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_id:integer
+}
+
+# set context & title
+set context [list [list [export_vars -base "." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] "[_ lorsm.Annotation_MD]"]
+set title "[_ lorsm.Annotation_MD]"
+
+# Annotation
+template::list::create \
+ -name d_an_annot \
+ -multirow d_an_annot \
+ -no_data "[_ lorsm.lt_No_Annotation_Availab]" \
+ -actions [list "[_ lorsm.Add_Annotation]" [export_vars -base annotationmd/annotation_add {ims_md_id}] "[_ lorsm.lt_Add_another_Annotatio_1]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ entity {
+ label "[_ lorsm.Entry_1]"
+ }
+ export {
+ display_eval {\[View\]}
+ link_url_eval { [export_vars -base "annotationmd/annotation" {ims_md_an_id ims_md_id}] }
+ link_html {title "[_ lorsm.lt_View_associated_Annot]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_an_annot select_an_annot {
+select
+ entity,
+ ims_md_an_id,
+ ims_md_id
+from
+ ims_md_annotation
+where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/classificationmd.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd.adp 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,16 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+ Classification Metadata
+
+
+ Classifications:
+
+
+
Index: openacs-4/packages/lors-central/www/md/classificationmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,49 @@
+ad_page_contract {
+ Displays/Adds IMS Metadata Classification
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: classificationmd.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_id:integer
+}
+
+# set context & title
+set context [list [list [export_vars -base "." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] "[_ lorsm.Classification_MD]"]
+set title "[_ lorsm.Classification_MD]"
+
+# Classification
+template::list::create \
+ -name d_cl_class \
+ -multirow d_cl_class \
+ -no_data "[_ lorsm.lt_No_Classification_Ava]" \
+ -actions [list "[_ lorsm.Add_Classification]" [export_vars -base classificationmd/classification_add {ims_md_id}] "[_ lorsm.lt_Add_another_Classific_2]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ purpose_s {
+ label ""
+ }
+ purpose_v {
+ label ""
+ }
+ export {
+ display_eval {\[View\]}
+ link_url_eval { [export_vars -base "classificationmd/classification" {ims_md_cl_id ims_md_id}] }
+ link_html {title "[_ lorsm.lt_View_associated_Class]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_cl_class select_cl_class {
+select
+ purpose_s,
+ purpose_v,
+ ims_md_cl_id,
+ ims_md_id
+from
+ ims_md_classification
+where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/educationalmd.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd.adp 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,69 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+ #lorsm.Educational_Metadata#
+
+
+
+ #lorsm.Interactivity_Type#
+
+
+
+
+ #lorsm.lt_Learning_Resource_Typ#
+
+
+
+
+ #lorsm.Interactivity_Level#
+
+
+
+
+ #lorsm.Semantic_Density#
+
+
+
+
+ #lorsm.lt_Intended_End_User_Rol#
+
+
+
+
+ #lorsm.Context#
+
+
+
+
+ #lorsm.Typical_Age_Range#
+
+
+
+
+ #lorsm.Difficulty#
+
+
+
+
+ #lorsm.lt_Typical_Learning_Time#
+
+
+
+
+ #lorsm.Description#
+
+
+
+
+ #lorsm.Language#
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/educationalmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,260 @@
+ad_page_contract {
+ Displays/Adds IMS Metadata Educational
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 30 January 2004
+ @cvs-id $Id: educationalmd.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_id:integer
+}
+
+# set context & title
+set context [list [list [export_vars -base "." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] "[_ lorsm.Educational_MD]"]
+set title "[_ lorsm.Educational_MD]"
+
+# Educational Interactivity Type
+template::list::create \
+ -name d_ed_intt \
+ -multirow d_ed_intt \
+ -no_data "[_ lorsm.lt_No_Interactivity_Type]" \
+ -actions [list "[_ lorsm.lt_Add_Interactivity_Typ]" [export_vars -base educationalmd/educational_intt {ims_md_id}] "[_ lorsm.lt_Add_another_Interacti]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ intt {
+ label ""
+ }
+ }
+
+db_multirow d_ed_intt select_ed_intt {
+ select
+ '[' || int_type_s || '] ' || int_type_v as intt
+ from
+ ims_md_educational
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Educational Learning Resource Type
+template::list::create \
+ -name d_ed_lrt \
+ -multirow d_ed_lrt \
+ -no_data "[_ lorsm.lt_No_Learning_Resource_]" \
+ -actions [list "[_ lorsm.lt_Add_Learning_Resource]" [export_vars -base educationalmd/educational_lrt {ims_md_id}] "[_ lorsm.lt_Add_another_Learning_]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ lrt {
+ label ""
+ }
+ }
+
+db_multirow d_ed_lrt select_ed_lrt {
+ select
+ '[' || lrt_s || '] ' || lrt_v as lrt
+ from
+ ims_md_educational_lrt
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Educational Interactivity Level
+template::list::create \
+ -name d_ed_intl \
+ -multirow d_ed_intl \
+ -no_data "[_ lorsm.lt_No_Interactivity_Leve]" \
+ -actions [list "[_ lorsm.lt_Add_Interactivity_Lev]" [export_vars -base educationalmd/educational_intl {ims_md_id}] "[_ lorsm.lt_Add_another_Interacti_1]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ intl {
+ label ""
+ }
+ }
+
+db_multirow d_ed_intl select_ed_intl {
+ select
+ '[' || int_level_s || '] ' || int_level_v as intl
+ from
+ ims_md_educational
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Educational Semantic Density
+template::list::create \
+ -name d_ed_semd \
+ -multirow d_ed_semd \
+ -no_data "[_ lorsm.lt_No_Semantic_Density_A]" \
+ -actions [list "[_ lorsm.Add_Semantic_Density]" [export_vars -base educationalmd/educational_semd {ims_md_id}] "[_ lorsm.lt_Add_another_Semantic_]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ semd {
+ label ""
+ }
+ }
+
+db_multirow d_ed_semd select_ed_semd {
+ select
+ '[' || sem_density_s || '] ' || sem_density_v as semd
+ from
+ ims_md_educational
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Educational Intended End User Role
+template::list::create \
+ -name d_ed_ieur \
+ -multirow d_ed_ieur \
+ -no_data "[_ lorsm.lt_No_Intended_End_User_]" \
+ -actions [list "[_ lorsm.lt_Add_Intended_End_User]" [export_vars -base educationalmd/educational_ieur {ims_md_id}] "[_ lorsm.lt_Add_another_Intended_]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ ieur {
+ label ""
+ }
+ }
+
+db_multirow d_ed_ieur select_ed_ieur {
+ select
+ '[' || ieur_s || '] ' || ieur_v as ieur
+ from
+ ims_md_educational_ieur
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Educational Context
+template::list::create \
+ -name d_ed_cont \
+ -multirow d_ed_cont \
+ -no_data "[_ lorsm.No_Context_Available]" \
+ -actions [list "[_ lorsm.Add_Context]" [export_vars -base educationalmd/educational_cont {ims_md_id}] "[_ lorsm.Add_another_Context]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ context {
+ label ""
+ }
+ }
+
+db_multirow d_ed_cont select_ed_cont {
+ select
+ '[' || context_s || '] ' || context_v as context
+ from
+ ims_md_educational_context
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Educational Typical Age Range
+template::list::create \
+ -name d_ed_tar \
+ -multirow d_ed_tar \
+ -no_data "[_ lorsm.lt_No_Typical_Age_Range_]" \
+ -actions [list "[_ lorsm.lt_Add_Typical_Age_Range]" [export_vars -base educationalmd/educational_tar {ims_md_id}] "[_ lorsm.lt_Add_another_Typical_A]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ tar {
+ label ""
+ }
+ }
+
+db_multirow d_ed_tar select_ed_tar {
+ select
+ '[' || tar_l || '] ' || tar_s as tar
+ from
+ ims_md_educational_tar
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Educational Difficulty
+template::list::create \
+ -name d_ed_dif \
+ -multirow d_ed_dif \
+ -no_data "[_ lorsm.lt_No_Difficulty_Availab]" \
+ -actions [list "[_ lorsm.Add_Difficulty_Type]" [export_vars -base educationalmd/educational_dif {ims_md_id}] "[_ lorsm.lt_Add_another_Difficult]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ diff {
+ label ""
+ }
+ }
+
+db_multirow d_ed_dif select_ed_dif {
+ select
+ '[' || difficulty_s || '] ' || difficulty_v as diff
+ from
+ ims_md_educational
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Educational Typical Learning Time
+template::list::create \
+ -name d_ed_tlt \
+ -multirow d_ed_tlt \
+ -no_data "[_ lorsm.lt_No_Typical_Learning_T]" \
+ -actions [list "[_ lorsm.lt_Add_Typical_Learning_]" [export_vars -base educationalmd/educational_tlt {ims_md_id}] "[_ lorsm.lt_Add_another_Typical_L]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ tlt {
+ label ""
+ }
+ tlt_ls {
+ label ""
+ }
+ }
+
+db_multirow d_ed_tlt select_ed_tlt {
+ select
+ type_lrn_time as tlt,
+ '[' || type_lrn_time_l || '] ' || type_lrn_time_s as tlt_ls
+ from
+ ims_md_educational
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Educational Description
+template::list::create \
+ -name d_ed_desc \
+ -multirow d_ed_desc \
+ -no_data "[_ lorsm.lt_No_Description_Availa]" \
+ -actions [list "[_ lorsm.Add_Description]" [export_vars -base educationalmd/educational_desc {ims_md_id}] "[_ lorsm.lt_Add_another_Descripti]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ desc {
+ label ""
+ }
+ }
+
+db_multirow d_ed_desc select_ed_desc {
+ select
+ '[' || descrip_l || '] ' || descrip_s as desc
+ from
+ ims_md_educational_descrip
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Educational Language
+template::list::create \
+ -name d_ed_lang \
+ -multirow d_ed_lang \
+ -no_data "[_ lorsm.lt_No_Language_Available]" \
+ -actions [list "[_ lorsm.Add_Language]" [export_vars -base educationalmd/educational_lang {ims_md_id}] "[_ lorsm.Add_another_Language]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ language {
+ label ""
+ }
+ }
+
+db_multirow d_ed_lang select_ed_lang {
+ select
+ language
+ from
+ ims_md_educational_lang
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/generalmd.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd.adp 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,53 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+ #lorsm.General_Metadata#
+
+
+ #lorsm.Titles#
+
+
+
+
+ #lorsm.Catalog-Entries#
+
+
+
+
+ #lorsm.Languages#
+
+
+
+
+ #lorsm.Descriptions#
+
+
+
+
+ #lorsm.Keywords#
+
+
+
+
+ #lorsm.Coverage#
+
+
+
+
+ #lorsm.Structure#
+
+
+
+
+ #lorsm.Aggregation_Level#
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/generalmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,227 @@
+# packages/lorsm/www/md/generalmd.tcl
+
+ad_page_contract {
+ Displays/Adds IMS Metadata General
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 19 January 2004
+ @cvs-id $Id: generalmd.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_id:integer
+}
+
+# set context & title
+set context [list [list [export_vars -base "." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] "[_ lorsm.General_MD]"]
+set title "[_ lorsm.General_MD]"
+
+# General Title
+template::list::create \
+ -name d_gen_titles \
+ -multirow d_gen_titles \
+ -no_data "[_ lorsm.No_Titles_Available]" \
+ -actions [list "[_ lorsm.Add_Title]" [export_vars -base generalmd/general_title {ims_md_id}] "[_ lorsm.Add_another_title]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ title_l {
+ label ""
+ }
+ title_s {
+ label ""
+ }
+ }
+
+db_multirow d_gen_titles select_ge_titles {
+ select title_l,
+ title_s
+ from
+ ims_md_general_title
+ where
+ ims_md_id = :ims_md_id
+} {
+ set item_url [export_vars -base "item" { ims_md_id }]
+}
+
+# General Description
+template::list::create \
+ -name d_gen_desc \
+ -multirow d_gen_desc \
+ -no_data "[_ lorsm.lt_No_Description_Availa]" \
+ -actions [list "[_ lorsm.Add_Description]" [export_vars -base generalmd/general_desc {ims_md_id}] "[_ lorsm.lt_Add_another_Descripti]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ descrip_l {
+ label ""
+ }
+ descrip_s {
+ label ""
+ }
+ }
+
+db_multirow d_gen_desc select_ge_desc {
+ select descrip_l,
+ descrip_s
+ from
+ ims_md_general_desc
+ where
+ ims_md_id = :ims_md_id
+}
+
+# General Catalog-entry
+template::list::create \
+ -name d_gen_cata \
+ -multirow d_gen_cata \
+ -no_data "[_ lorsm.lt_No_Catalog_Entry_Avai]" \
+ -actions [list "[_ lorsm.Add_Catalog-Entry]" [export_vars -base generalmd/general_cata {ims_md_id}] "[_ lorsm.lt_Add_another_Catalog-E]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ catalog {
+ label ""
+ }
+ entry_l {
+ label ""
+ }
+ entry_s {
+ label ""
+ }
+ }
+
+db_multirow d_gen_cata select_ge_cata {
+ select
+ catalog,
+ entry_l,
+ entry_s
+ from
+ ims_md_general_cata
+ where
+ ims_md_id = :ims_md_id
+}
+
+
+
+# General Language
+template::list::create \
+ -name d_gen_lang \
+ -multirow d_gen_lang \
+ -no_data "[_ lorsm.lt_No_Language_Available]" \
+ -actions [list "[_ lorsm.Add_Language]" [export_vars -base generalmd/general_lang {ims_md_id}] "[_ lorsm.Add_another_Language]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ language {
+ label ""
+ }
+ }
+
+db_multirow d_gen_lang select_ge_lang {
+ select
+ language
+ from
+ ims_md_general_lang
+ where
+ ims_md_id = :ims_md_id
+}
+
+# General Keywords
+template::list::create \
+ -name d_gen_key \
+ -multirow d_gen_key \
+ -no_data "[_ lorsm.lt_No_Keywords_Available]" \
+ -actions [list "[_ lorsm.Add_Keywords]" [export_vars -base generalmd/general_key {ims_md_id}] "[_ lorsm.Add_another_Keywords]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ keyword_l {
+ label ""
+ }
+ keyword_s {
+ label ""
+ }
+ }
+
+db_multirow d_gen_key select_ge_key {
+ select
+ keyword_l,
+ keyword_s
+ from
+ ims_md_general_key
+ where
+ ims_md_id = :ims_md_id
+}
+
+# General Coverage
+template::list::create \
+ -name d_gen_cover \
+ -multirow d_gen_cover \
+ -no_data "[_ lorsm.lt_No_Coverage_Available]" \
+ -actions [list "[_ lorsm.Add_Coverage]" [export_vars -base generalmd/general_cover {ims_md_id}] "[_ lorsm.Add_another_Coverage]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ cover_l {
+ label ""
+ }
+ cover_s {
+ label ""
+ }
+ }
+
+db_multirow d_gen_cover select_ge_cover {
+ select
+ cover_l,
+ cover_s
+ from
+ ims_md_general_cover
+ where
+ ims_md_id = :ims_md_id
+}
+
+# General Structure
+template::list::create \
+ -name d_gen_struc \
+ -multirow d_gen_struc \
+ -no_data "[_ lorsm.lt_No_Structure_Availabl]" \
+ -actions [list "[_ lorsm.Add_Structure]" [export_vars -base generalmd/general_struc {ims_md_id}] "[_ lorsm.lt_Add_another_Structure]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ structure_s {
+ label ""
+ }
+ structure_v {
+ label ""
+ }
+ }
+
+db_multirow d_gen_struc select_ge_struc {
+ select
+ structure_s,
+ structure_v
+ from
+ ims_md_general
+ where
+ ims_md_id = :ims_md_id
+}
+
+
+# General Aggregation level
+template::list::create \
+ -name d_gen_aggl \
+ -multirow d_gen_aggl \
+ -no_data "[_ lorsm.lt_No_Aggregation_Level_]" \
+ -actions [list "[_ lorsm.lt_Add_Aggregation_Level]" [export_vars -base generalmd/general_aggl {ims_md_id}] "[_ lorsm.lt_Add_another_Aggregati]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ agg_level_s {
+ label ""
+ }
+ agg_level_v {
+ label ""
+ }
+ }
+
+db_multirow d_gen_aggl select_ge_aggl {
+ select
+ agg_level_s,
+ agg_level_v
+ from
+ ims_md_general
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/index.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/index.adp 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,27 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+
+
+ #lorsm.You_can# #lorsm.lt_upload_a_XML_LOM_meta# #lorsm.lt_to_addchange_the_meta#
+
+
+
+ #lorsm.lt_Heres_a_link_to_the_a#
+
+
+
+
+
+#lorsm.lt_No_metadata_record_ex#
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/index.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/index.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,21 @@
+ad_page_contract {
+ Displays/Adds IMS Metadata
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 19 January 2004
+ @cvs-id $Id: index.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_id:integer
+}
+
+# set context
+set context [list "[_ lorsm.IMS_Metadata_Editor]"]
+set title [list "[_ lorsm.IMS_Metadata_Editor]"]
+set link [export_vars -base "md_upload" ims_md_id]
+
+set hasmetadata [lors::imsmd::mdExist -ims_md_id $ims_md_id]
+set object_type [acs_object_type $ims_md_id]
+
+set write_p [permission::permission_p -party_id [ad_conn user_id] -object_id $ims_md_id -privilege write]
+set read_p [permission::permission_p -party_id [ad_conn user_id] -object_id $ims_md_id -privilege read]
Index: openacs-4/packages/lors-central/www/md/lifecyclemd.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/lifecyclemd.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/lifecyclemd.adp 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+ #lorsm.Lifecycle_Metadata#
+
+
+ #lorsm.Version#
+
+
+
+
+ #lorsm.Status#
+
+
+
+
+ #lorsm.Contribution#
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/lifecyclemd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/lifecyclemd.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/lifecyclemd.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,103 @@
+ad_page_contract {
+ Displays/Adds IMS Metadata Lifecycle
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 30 January 2004
+ @cvs-id $Id: lifecyclemd.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_id:integer
+}
+
+# set context & title
+set context [list [list [export_vars -base "." ims_md_id] "IMS Metadata Editor"] "Lifecycle MD"]
+
+set title "Lifecycle MD"
+
+# Lifecycle version
+template::list::create \
+ -name d_lf_ver \
+ -multirow d_lf_ver \
+ -no_data "[_ lorsm.No_Version_Available]" \
+ -actions [list "[_ lorsm.Add_Version]" [export_vars -base lifecyclemd/lifecycle_version {ims_md_id}] "[_ lorsm.Add_Version]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ version_l {
+ label ""
+ }
+ version_s {
+ label ""
+ }
+ }
+
+db_multirow d_lf_ver select_lf_ver {
+ select version_l,
+ version_s
+ from
+ ims_md_life_cycle
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Lifecycle status
+template::list::create \
+ -name d_lf_stat \
+ -multirow d_lf_stat \
+ -no_data "[_ lorsm.No_Status_Available]" \
+ -actions [list "[_ lorsm.Add_Status]" [export_vars -base lifecyclemd/lifecycle_stat {ims_md_id}] "[_ lorsm.Add_Status]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ status_s {
+ label ""
+ }
+ status_v {
+ label ""
+ }
+ }
+
+db_multirow d_lf_stat select_lf_stat {
+ select status_s,
+ status_v
+ from
+ ims_md_life_cycle
+ where
+ ims_md_id = :ims_md_id
+}
+
+
+# Lifecycle Contrib
+template::list::create \
+ -name d_lf_cont \
+ -multirow d_lf_cont \
+ -no_data "[_ lorsm.lt_No_Contributors_Avail]" \
+ -actions [list "[_ lorsm.Add_Contributors]" [export_vars -base lifecyclemd/lifecycle_cont {ims_md_id}] "[_ lorsm.lt_Add_another_Contribut]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ role {
+ label "[_ lorsm.Role]"
+ }
+ entity {
+ label "[_ lorsm.Entity_1]"
+ }
+ cont_date {
+ label "[_ lorsm.Contribution_Date]"
+ }
+ cont_date_ls {
+ label "[_ lorsm.Description_1]"
+ }
+ }
+
+db_multirow d_lf_cont select_lf_cont {
+select
+ lfc.role_v || ' ' || '[' || lfc.role_s || ']' as role,
+ lfce.entity,
+ lfc.cont_date,
+ '[' || lfc.cont_date_l || ']' || ' ' || lfc.cont_date_s as cont_date_ls
+from
+ ims_md_life_cycle_contrib lfc,
+ ims_md_life_cycle_contrib_entity lfce
+where
+ lfc.ims_md_lf_cont_id = lfce.ims_md_lf_cont_id
+and
+ lfc.ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/metamd.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/metamd.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/metamd.adp 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,34 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+ #lorsm.Meta_Metadata#
+
+
+ #lorsm.Catalog-Entries#
+
+
+
+
+ #lorsm.Contribution#
+
+
+
+
+ #lorsm.Scheme#
+
+
+
+
+ #lorsm.Language#
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/metamd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/metamd.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/metamd.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,122 @@
+ad_page_contract {
+ Displays/Adds IMS Metadata Metametadata
+
+ @author Ernie Ghiglione (ErnieG@ee.usyd.edu.au)
+ @creation-date 30 January 2004
+ @cvs-id $Id: metamd.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_id:integer
+}
+
+# set context & title
+set context [list [list [export_vars -base "." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] "[_ lorsm.Meta_Metadata]"]
+set title "[_ lorsm.Meta_MD]"
+
+# Metametadata Catalogentry
+template::list::create \
+ -name d_md_cata \
+ -multirow d_md_cata \
+ -no_data "[_ lorsm.lt_No_Catalog_Entry_Avai]" \
+ -actions [list "[_ lorsm.Add_Catalog-Entry]" [export_vars -base metamd/meta_cata {ims_md_id}] "[_ lorsm.lt_Add_another_Catalog-E]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ catalog {
+ label "[_ lorsm.Catalog_1]"
+ }
+ entry_ls {
+ label "[_ lorsm.Language_Entry]"
+ }
+ }
+
+db_multirow d_md_cata select_md_cata {
+ select
+ catalog,
+ '[' || entry_l || ']' || ' ' || entry_s as entry_ls
+ from
+ ims_md_metadata_cata
+ where
+ ims_md_id = :ims_md_id
+}
+
+
+# Metametadata Contrib
+template::list::create \
+ -name d_md_cont \
+ -multirow d_md_cont \
+ -no_data "[_ lorsm.lt_No_Contributors_Avail]" \
+ -actions [list "[_ lorsm.Add_Contributors]" [export_vars -base metamd/meta_cont {ims_md_id}] "[_ lorsm.lt_Add_another_Contribut]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ role {
+ label "[_ lorsm.Role]"
+ }
+ entity {
+ label "[_ lorsm.Entity_1]"
+ }
+ cont_date {
+ label "[_ lorsm.Contribution_Date]"
+ }
+ cont_date_ls {
+ label "[_ lorsm.Description_1]"
+ }
+ }
+
+db_multirow d_md_cont select_md_cont {
+select
+ mdc.role_v || ' ' || '[' || mdc.role_s || ']' as role,
+ mdce.entity,
+ mdc.cont_date,
+ '[' || mdc.cont_date_l || ']' || ' ' || mdc.cont_date_s as cont_date_ls
+from
+ ims_md_metadata_contrib mdc,
+ ims_md_metadata_contrib_entity mdce
+where
+ mdc.ims_md_md_cont_id = mdce.ims_md_md_cont_id
+and
+ mdc.ims_md_id = :ims_md_id
+}
+
+# Metametadata metadatascheme
+template::list::create \
+ -name d_md_scheme \
+ -multirow d_md_scheme \
+ -no_data "[_ lorsm.No_Scheme_Available]" \
+ -actions [list "[_ lorsm.Add_Scheme]" [export_vars -base metamd/meta_scheme {ims_md_id}] "[_ lorsm.Add_another_Scheme]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ scheme {
+ label ""
+ }
+ }
+
+db_multirow d_md_scheme select_md_scheme {
+ select
+ scheme
+ from
+ ims_md_metadata_scheme
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Metametadata language
+template::list::create \
+ -name d_md_lang \
+ -multirow d_md_lang \
+ -no_data "[_ lorsm.lt_No_Language_Available]" \
+ -actions [list "[_ lorsm.Add_Language]" [export_vars -base metamd/meta_lang {ims_md_id}] "[_ lorsm.lt_Add_another_Languages]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ language {
+ label ""
+ }
+ }
+
+db_multirow d_md_lang select_md_lang {
+ select
+ language
+ from
+ ims_md_metadata
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/relationmd.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/relationmd.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/relationmd.adp 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,17 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+ #lorsm.Relation_Metadata#
+
+
+ #lorsm.Relations#
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/relationmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/relationmd.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/relationmd.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,53 @@
+ad_page_contract {
+ Displays/Adds IMS Metadata Relation
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: relationmd.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_id:integer
+}
+
+# set context & title
+set context [list [list [export_vars -base "." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] "[_ lorsm.Relation_MD]"]
+set title "Relation MD"
+
+# Relation
+template::list::create \
+ -name d_re_relat \
+ -multirow d_re_relat \
+ -no_data "[_ lorsm.lt_No_Relation_Available]" \
+ -actions [list "[_ lorsm.Add_Relation]" [export_vars -base relationmd/relation_add {ims_md_id}] "[_ lorsm.lt_Add_another_Relation__1]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ kind_s {
+ label ""
+ }
+ kind_v {
+ label ""
+ }
+ export {
+ display_eval {\[View \\ Edit\]}
+ link_url_eval { [export_vars -base "relationmd/relation" {ims_md_re_re_id ims_md_re_id ims_md_id}] }
+ link_html {title "[_ lorsm.lt_View_associated_Relat]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_re_relat select_re_relat {
+select
+ re.kind_s,
+ re.kind_v,
+ re.ims_md_id,
+ re.ims_md_re_id,
+ rere.ims_md_re_re_id
+from
+ ims_md_relation re,
+ ims_md_relation_resource rere
+where
+ re.ims_md_id = :ims_md_id
+and
+ rere.ims_md_re_id = re.ims_md_re_id
+}
Index: openacs-4/packages/lors-central/www/md/rightsmd.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/rightsmd.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/rightsmd.adp 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,28 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+ #lorsm.Rights_Metadata#
+
+
+
+ #lorsm.Cost#
+
+
+
+
+ #lorsm.lt_Copyright_or_other_Re#
+
+
+
+
+ #lorsm.Description#
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/rightsmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/rightsmd.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/rightsmd.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,80 @@
+ad_page_contract {
+ Displays/Adds IMS Metadata Rights
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 30 January 2004
+ @cvs-id $Id: rightsmd.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_id:integer
+}
+
+# set context & title
+set context [list [list [export_vars -base "." ims_md_id] "IMS Metadata Editor"] "Rights MD"]
+set title "[_ lorsm.Rights_MD]"
+
+# Rights Cost
+template::list::create \
+ -name d_ri_cost \
+ -multirow d_ri_cost \
+ -no_data "[_ lorsm.No_Cost_Available]" \
+ -actions [list "[_ lorsm.Add_Cost]" [export_vars -base rightsmd/rights_cost {ims_md_id}] "[_ lorsm.Add_another_Cost]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ cost {
+ label ""
+ }
+ }
+
+db_multirow d_ri_cost select_ri_cost {
+ select
+ '[' || cost_s || '] ' || cost_v as cost
+ from
+ ims_md_rights
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Rights Copyright or other Restrictions
+template::list::create \
+ -name d_ri_caor \
+ -multirow d_ri_caor \
+ -no_data "[_ lorsm.lt_No_Copyright_or_other]" \
+ -actions [list "[_ lorsm.lt_Add_Copyright_or_othe]" [export_vars -base rightsmd/rights_caor {ims_md_id}] "[_ lorsm.lt_Add_another_Copyright]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ caor {
+ label ""
+ }
+ }
+
+db_multirow d_ri_caor select_ri_caor {
+ select
+ '[' || caor_s || '] ' || caor_v as caor
+ from
+ ims_md_rights
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Rights Description
+template::list::create \
+ -name d_ri_desc \
+ -multirow d_ri_desc \
+ -no_data "[_ lorsm.lt_No_Description_Availa]" \
+ -actions [list "[_ lorsm.Add_Description]" [export_vars -base rightsmd/rights_desc {ims_md_id}] "[_ lorsm.lt_Add_another_Descripti]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ desc {
+ label ""
+ }
+ }
+
+db_multirow d_ri_desc select_ri_desc {
+ select
+ '[' || descrip_l || '] ' || descrip_s as desc
+ from
+ ims_md_rights
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/technicalmd.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd.adp 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,49 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+ #lorsm.Technical_Metadata#
+
+
+
+ #lorsm.Formats#
+
+
+
+
+ #lorsm.Size#
+
+
+
+
+ #lorsm.Locations#
+
+
+
+
+ #lorsm.Requirements#
+
+
+
+
+ #lorsm.Installation_Remarks#
+
+
+
+
+ #lorsm.lt_Other_Platform_Requir#
+
+
+
+
+ #lorsm.Duration#
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/technicalmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,192 @@
+ad_page_contract {
+ Displays/Adds IMS Metadata Metametadata
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 30 January 2004
+ @cvs-id $Id: technicalmd.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_id:integer
+}
+
+# set context & title
+set context [list [list [export_vars -base "." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] "[_ lorsm.Technical_MD]"]
+set title "[_ lorsm.Technical_MD]"
+
+# Technical Format
+template::list::create \
+ -name d_te_form \
+ -multirow d_te_form \
+ -no_data "[_ lorsm.No_Format_Available]" \
+ -actions [list "[_ lorsm.Add_Format]" [export_vars -base technicalmd/technical_form {ims_md_id}] "[_ lorsm.Add_another_Format]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ format {
+ label ""
+ }
+ }
+
+db_multirow d_te_form select_te_form {
+ select
+ format
+ from
+ ims_md_technical_format
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Technical Size
+template::list::create \
+ -name d_te_size \
+ -multirow d_te_size \
+ -no_data "[_ lorsm.No_Size_Available]" \
+ -actions [list "[_ lorsm.Add_Size]" [export_vars -base technicalmd/technical_size {ims_md_id}] "[_ lorsm.Add_another_Size]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ t_size_bytes {
+ label ""
+ }
+ }
+
+db_multirow d_te_size select_te_size {
+ select
+ t_size || ' bytes' as t_size_bytes
+ from
+ ims_md_technical
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Technical Location
+template::list::create \
+ -name d_te_loca \
+ -multirow d_te_loca \
+ -no_data "No Location Available" \
+ -actions [list "Add Location" [export_vars -base technicalmd/technical_loca {ims_md_id}] "Add another Location"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ type {
+ label ""
+ }
+ location {
+ label ""
+ }
+ }
+
+db_multirow d_te_loca select_te_loca {
+ select
+ type,
+ location
+ from
+ ims_md_technical_location
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Technical Requirements
+template::list::create \
+ -name d_te_req \
+ -multirow d_te_req \
+ -no_data "[_ lorsm.lt_No_Requirements_Avail]" \
+ -actions [list "[_ lorsm.Add_Requirements]" [export_vars -base technicalmd/technical_req {ims_md_id}] "[_ lorsm.lt_Add_another_Requireme]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ type {
+ label "[_ lorsm.Type]"
+ }
+ name {
+ label "[_ lorsm.Name]"
+ }
+ min_version {
+ label "[_ lorsm.Min_Version]"
+ }
+ max_version {
+ label "[_ lorsm.Max_Version]"
+ }
+ }
+
+db_multirow d_te_req select_te_req {
+ select
+ '[' || type_s || ']' || ' ' || type_v as type,
+ '[' || name_s || ']' || ' ' || name_v as name,
+ min_version,
+ max_version
+ from
+ ims_md_technical_requirement
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Technical Installation Remarks
+template::list::create \
+ -name d_te_inst \
+ -multirow d_te_inst \
+ -no_data "[_ lorsm.lt_No_Installation_Remar]" \
+ -actions [list "[_ lorsm.lt_Add_Installation_Rema]" [export_vars -base technicalmd/technical_inst {ims_md_id}] "[_ lorsm.lt_Add_another_Installat]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ instl_rmrks {
+ label ""
+ }
+ }
+
+db_multirow d_te_inst select_te_inst {
+ select
+ '[' || instl_rmrks_l || ']' || ' ' || instl_rmrks_s as instl_rmrks
+ from
+ ims_md_technical
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Technical Other Platform Requirements
+template::list::create \
+ -name d_te_otr \
+ -multirow d_te_otr \
+ -no_data "[_ lorsm.lt_No_Other_Platform_Req]" \
+ -actions [list "[_ lorsm.lt_Add_Other_Platform_Re]" [export_vars -base technicalmd/technical_otr {ims_md_id}] "[_ lorsm.lt_Add_another_Other_Pla]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ otr_plt {
+ label ""
+ }
+ }
+
+db_multirow d_te_otr select_te_otr {
+ select
+ '[' || otr_plt_l || ']' || ' ' || otr_plt_s as otr_plt
+ from
+ ims_md_technical
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Technical Duration
+template::list::create \
+ -name d_te_dur \
+ -multirow d_te_dur \
+ -no_data "[_ lorsm.lt_No_Duration_Available]" \
+ -actions [list "[_ lorsm.Add_Duration]" [export_vars -base technicalmd/technical_dur {ims_md_id}] "[_ lorsm.Add_another_Duration]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ duration_sec {
+ label ""
+ }
+ duration_l {
+ label ""
+ }
+ duration_s {
+ label ""
+ }
+ }
+
+db_multirow d_te_dur select_te_dur {
+ select
+ duration_l,
+ duration_s,
+ duration || 's' as duration_sec
+ from
+ ims_md_technical
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/annotationmd/annotation.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/annotationmd/annotation.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/annotationmd/annotation.adp 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,28 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+ Annotation Metadata
+
+
+
+ Entity:
+
+
+
+
+ Date:
+
+
+
+
+ Descriptions:
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/annotationmd/annotation.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/annotationmd/annotation.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/annotationmd/annotation.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,84 @@
+ad_page_contract {
+ Displays/Adds IMS Metadata Annotation
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: annotation.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_an_id:integer
+ ims_md_id:integer
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../annotationmd" ims_md_id] "[_ lorsm.Annotation_MD]"] "[_ lorsm.Annotation_Entry]"]
+set title "[_ lorsm.Annotation_MD]"
+
+# Annotation Entity
+template::list::create \
+ -name d_an_ent \
+ -multirow d_an_ent \
+ -no_data "[_ lorsm.No_Entity_Available]" \
+ -actions [list "[_ lorsm.Add_Entity]" [export_vars -base annotation_ent {ims_md_an_id ims_md_id}] "[_ lorsm.Add_another_Entity]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ entity {
+ label ""
+ }
+ }
+
+db_multirow d_an_ent select_an_ent {
+ select entity
+ from
+ ims_md_annotation
+ where
+ ims_md_an_id = :ims_md_an_id
+}
+
+# Annotation Date
+template::list::create \
+ -name d_an_date \
+ -multirow d_an_date \
+ -no_data "[_ lorsm.No_Date_Available]" \
+ -actions [list "[_ lorsm.Add_Date]" [export_vars -base annotation_date {ims_md_an_id ims_md_id}] "[_ lorsm.Add_another_Date]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ date {
+ label "[_ lorsm.Date_1]"
+ }
+ datels {
+ label "[_ lorsm.Description_1]"
+ }
+ }
+
+db_multirow d_an_date select_an_date {
+ select date,
+ '[' || date_l || '] ' || date_s as datels
+ from
+ ims_md_annotation
+ where
+ ims_md_an_id = :ims_md_an_id
+}
+
+# Annotation Description
+template::list::create \
+ -name d_an_desc \
+ -multirow d_an_desc \
+ -no_data "[_ lorsm.lt_No_Description_Availa]" \
+ -actions [list "[_ lorsm.Add_Description]" [export_vars -base annotation_desc {ims_md_an_id ims_md_id}] "[_ lorsm.lt_Add_another_Descripti]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ desc {
+ label ""
+ }
+ }
+
+db_multirow d_an_desc select_an_desc {
+ select
+ '[' || descrip_l || '] ' || descrip_s as desc
+ from
+ ims_md_annotation_descrip
+ where
+ ims_md_an_id = :ims_md_an_id
+}
Index: openacs-4/packages/lors-central/www/md/annotationmd/annotation_add.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/annotationmd/annotation_add.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/annotationmd/annotation_add.adp 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,22 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+Annotation Metadata Entry
+
+
+
+ Annotation Metadata
+
+
+ Add another Annotation Metadata Entry?
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/annotationmd/annotation_add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/annotationmd/annotation_add.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/annotationmd/annotation_add.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,43 @@
+# packages/lorsm/www/md/annotationmd/annotation_add.tcl
+
+ad_page_contract {
+
+ Add/Edit Annotation MD Entry
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: annotation_add.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../annotationmd" ims_md_id] "[_ lorsm.Annotation_MD]"] "[_ lorsm.Annotation_Entry]"]
+set title "[_ lorsm.lt_Add_Annotation_MD_Ent]"
+
+# Form
+ad_form -name annotationmd_add \
+ -cancel_url ../annotationmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_an_id:key(ims_md_annotation_seq)
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_annotation (ims_md_an_id, ims_md_id)
+ values (:ims_md_an_id, :ims_md_id)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../annotationmd" {ims_md_id}]
+ ad_script_abort
+}
+
Index: openacs-4/packages/lors-central/www/md/annotationmd/annotation_date.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/annotationmd/annotation_date.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/annotationmd/annotation_date.adp 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Annotation Metadata Date
+
+
+
+ Annotation Metadata
+
+
+ Date:
+
+
+
+
+
+
+
+
Add/Edit Annotation Metadata Date
+
+
+
Index: openacs-4/packages/lors-central/www/md/annotationmd/annotation_date.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/annotationmd/annotation_date.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/annotationmd/annotation_date.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,95 @@
+# packages/lorsm/www/md/annotationmd/annotation_date.tcl
+
+ad_page_contract {
+
+ Add/Edit Annotation MD Date
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: annotation_date.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_an_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../annotationmd" ims_md_id] "[_ lorsm.Annotation_MD]"] [list [export_vars -base "annotation" {ims_md_id ims_md_an_id}] "[_ lorsm.Annotation_Entry]"] "[_ lorsm.AddEdit_Date]"]
+set title "[_ lorsm.lt_Edit_Annotation_MD_Da]"
+
+
+# Form
+
+ad_form -name annotationmd_date \
+ -cancel_url annotation?ims_md_id=$ims_md_id&ims_md_an_id=$ims_md_an_id \
+ -mode edit \
+ -form {
+
+ ims_md_an_id:key(ims_md_annotation_seq)
+
+ {date:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Annotation_MD_2]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.Date_of_contribution]"}
+ {label "[_ lorsm.Date]"}
+ }
+
+ {date_l:text,nospell,optional
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi_3]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {date_s:text(textarea),nospell,optional
+ {html {rows 2 cols 50}}
+ {help_text "[_ lorsm.lt_Date_and_Time_descrip]"}
+ {label "[_ lorsm.Description]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_annotation where ims_md_an_id = :ims_md_an_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_annotation
+ set date = :date,
+ date_l = :date_l,
+ date_s = :date_s
+ where ims_md_an_id = :ims_md_an_id "
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "annotation" {ims_md_an_id ims_md_id}]
+ ad_script_abort
+}
+
+# Annotation Date
+template::list::create \
+ -name d_an_date \
+ -multirow d_an_date \
+ -no_data "[_ lorsm.No_Date_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ date {
+ label "[_ lorsm.Date_1]"
+ }
+ datels {
+ label "[_ lorsm.Description_1]"
+ }
+ }
+
+db_multirow d_an_date select_an_date {
+ select date,
+ '[' || date_l || '] ' || date_s as datels,
+ ims_md_an_id,
+ ims_md_id
+ from
+ ims_md_annotation
+ where
+ ims_md_an_id = :ims_md_an_id
+}
Index: openacs-4/packages/lors-central/www/md/annotationmd/annotation_desc.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/annotationmd/annotation_desc.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/annotationmd/annotation_desc.adp 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Annotation Metadata Description
+
+
+
+ Annotation Metadata
+
+
+ Description:
+
+
+
+
+
+
+
+
Add/Edit Annotation Metadata Description
+
+
+
Index: openacs-4/packages/lors-central/www/md/annotationmd/annotation_desc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/annotationmd/annotation_desc.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/annotationmd/annotation_desc.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,109 @@
+# packages/lorsm/www/md/annotationmd/annotation_desc.tcl
+
+ad_page_contract {
+
+ Add/Edit Annotation MD Description
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: annotation_desc.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_an_id:integer
+ ims_md_an_de_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_an_de_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../annotationmd" ims_md_id] "[_ lorsm.Annotation_MD]"] [list [export_vars -base "annotation" {ims_md_id ims_md_an_id}] "[_ lorsm.Annotation_Entry]"] "[_ lorsm.Edit_Description]"]
+ set title "Edit Annotation MD Description"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../annotationmd" ims_md_id] "[_ lorsm.Annotation_MD]"] [list [export_vars -base "annotation" {ims_md_id ims_md_an_id}] "[_ lorsm.Annotation_Entry]"] "[_ lorsm.Add_Description]"]
+ set title "[_ lorsm.lt_Add_Annotation_MD_Des]"
+}
+
+# Form
+
+ad_form -name annotationmd_desc \
+ -cancel_url annotation?ims_md_id=$ims_md_id&ims_md_an_id=$ims_md_an_id \
+ -mode edit \
+ -form {
+
+ ims_md_an_de_id:key(ims_md_annotation_descrip_seq)
+
+ {descrip_l:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Annotation_MD]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {descrip_s:text(textarea),nospell
+ {html {rows 2 cols 50}}
+ {help_text "[_ lorsm.lt_Content_of_the_annota]"}
+ {label "[_ lorsm.Description]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+ {ims_md_an_id:text(hidden) {value $ims_md_an_id}
+ }
+
+} -select_query {select * from ims_md_annotation_descrip where ims_md_an_de_id = :ims_md_an_de_id and ims_md_an_id = :ims_md_an_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_annotation_descrip
+ set descrip_l = :descrip_l,
+ descrip_s = :descrip_s
+ where ims_md_an_de_id = :ims_md_an_de_id"
+
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_annotation_descrip (ims_md_an_de_id, ims_md_an_id, descrip_l, descrip_s)
+ values
+ (:ims_md_an_de_id, :ims_md_an_id, :descrip_l, :descrip_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "annotation" {ims_md_an_id ims_md_id}]
+ ad_script_abort
+}
+
+# Annotation Description
+template::list::create \
+ -name d_an_desc \
+ -multirow d_an_desc \
+ -no_data "No Description Available" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ desc {
+ label ""
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "annotation_desc" {ims_md_an_de_id ims_md_an_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_an_desc select_an_desc {
+ select
+ '[' || ande.descrip_l || '] ' || ande.descrip_s as desc,
+ ande.ims_md_an_de_id,
+ an.ims_md_an_id,
+ an.ims_md_id
+ from
+ ims_md_annotation_descrip ande,
+ ims_md_annotation an
+ where
+ ande.ims_md_an_id = an.ims_md_an_id
+ and
+ ande.ims_md_an_id = :ims_md_an_id
+}
Index: openacs-4/packages/lors-central/www/md/annotationmd/annotation_ent.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/annotationmd/annotation_ent.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/annotationmd/annotation_ent.adp 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Annotation Metadata Entity
+
+
+
+ Annotation Metadata
+
+
+ Entity:
+
+
+
+
+
+
+
+
Add/Edit Annotation Metadata Entity
+
+
+
Index: openacs-4/packages/lors-central/www/md/annotationmd/annotation_ent.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/annotationmd/annotation_ent.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/annotationmd/annotation_ent.tcl 17 May 2005 16:21:22 -0000 1.1
@@ -0,0 +1,78 @@
+# packages/lorsm/www/md/annotationmd/annotation_ent.tcl
+
+ad_page_contract {
+
+ Add/Edit Annotation MD Entity
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: annotation_ent.tcl,v 1.1 2005/05/17 16:21:22 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_an_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../annotationmd" ims_md_id] "[_ lorsm.Annotation_MD]"] [list [export_vars -base "annotation" {ims_md_id ims_md_an_id}] "[_ lorsm.Annotation_Entry]"] "[_ lorsm.AddEdit_Entity]"]
+set title "[_ lorsm.lt_Edit_Annotation_MD_En]"
+
+
+# Form
+
+ad_form -name annotationmd_ent \
+ -cancel_url annotation?ims_md_id=$ims_md_id&ims_md_an_id=$ims_md_an_id \
+ -mode edit \
+ -form {
+
+ ims_md_an_id:key(ims_md_annotation_seq)
+
+ {entity:text(textarea),nospell
+ {section "[_ lorsm.lt_AddEdit_Annotation_MD_1]"}
+ {html {rows 5 cols 50}}
+ {help_text "[_ lorsm.Annotator]"}
+ {label "[_ lorsm.Entity]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_annotation where ims_md_an_id = :ims_md_an_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_annotation
+ set entity = :entity
+ where ims_md_an_id = :ims_md_an_id "
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "annotation" {ims_md_an_id ims_md_id}]
+ ad_script_abort
+}
+
+# Annotation Entity
+template::list::create \
+ -name d_an_ent \
+ -multirow d_an_ent \
+ -no_data "[_ lorsm.No_Entity_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ entity {
+ label ""
+ }
+ }
+
+db_multirow d_an_ent select_an_ent {
+ select
+ entity,
+ ims_md_an_id,
+ ims_md_id
+ from
+ ims_md_annotation
+ where
+ ims_md_an_id = :ims_md_an_id
+}
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification.adp 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,28 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+ Classification Metadata
+
+
+ Purpose:
+
+
+
+ Taxonomic Paths:
+
+
+
+ Descriptions:
+
+
+
+ Keywords:
+
+
+
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification.tcl 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,118 @@
+ad_page_contract {
+ Displays/Adds IMS Metadata Classification
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: classification.tcl,v 1.1 2005/05/17 16:21:23 miguelm Exp $
+
+} {
+ ims_md_cl_id:integer
+ ims_md_id:integer
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../classificationmd" ims_md_id] "[_ lorsm.Classification_MD]"] "[_ lorsm.Classification_Entry]"]
+set title "[_ lorsm.Classification_MD]"
+
+# Classification Purpose
+template::list::create \
+ -name d_cl_pur \
+ -multirow d_cl_pur \
+ -no_data "[_ lorsm.No_Purpose_Available]" \
+ -actions [list "[_ lorsm.Add_Purpose]" [export_vars -base classification_pur {ims_md_cl_id ims_md_id}] "[_ lorsm.Add_another_Purpose]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ purpose_s {
+ label ""
+ }
+ purpose_v {
+ label ""
+ }
+ }
+
+db_multirow d_cl_pur select_cl_pur {
+ select purpose_s,
+ purpose_v
+ from
+ ims_md_classification
+ where
+ ims_md_cl_id = :ims_md_cl_id
+}
+
+# Classification Taxonomic Path
+template::list::create \
+ -name d_cl_tpath \
+ -multirow d_cl_tpath \
+ -no_data "[_ lorsm.lt_No_Taxonomic_Paths_Av]" \
+ -actions [list "[_ lorsm.Add_Taxonomic_Path]" [export_vars -base classification_addpath {ims_md_cl_id ims_md_id}] "[_ lorsm.lt_Add_another_Taxonomic]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ source {
+ label ""
+ }
+ export {
+ display_eval {\[[_ lorsm.View]\]}
+ link_url_eval { [export_vars -base "classification_tpath" {ims_md_cl_ta_id ims_md_cl_id ims_md_id}] }
+ link_html {title "[_ lorsm.lt_View_associated_Taxon]"}
+ html { align right }
+ }
+ }
+
+db_multirow d_cl_tpath select_cl_tpath {
+ select
+ '[' || ctp.source_l || '] ' || ctp.source_v as source,
+ ctp.ims_md_cl_ta_id,
+ ctp.ims_md_cl_id,
+ cl.ims_md_id
+ from
+ ims_md_classification_taxpath ctp,
+ ims_md_classification cl
+ where
+ ctp.ims_md_cl_id = :ims_md_cl_id
+ and cl.ims_md_cl_id = :ims_md_cl_id
+}
+
+# Classification Description
+template::list::create \
+ -name d_cl_desc \
+ -multirow d_cl_desc \
+ -no_data "[_ lorsm.lt_No_Description_Availa]" \
+ -actions [list "[_ lorsm.Add_Description]" [export_vars -base classification_desc {ims_md_cl_id ims_md_id}] "[_ lorsm.lt_Add_another_Descripti]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ desc {
+ label ""
+ }
+ }
+
+db_multirow d_cl_desc select_cl_desc {
+ select
+ '[' || descrip_l || '] ' || descrip_s as desc
+ from
+ ims_md_classification_descrip
+ where
+ ims_md_cl_id = :ims_md_cl_id
+}
+
+# Classification Keywords
+template::list::create \
+ -name d_cl_key \
+ -multirow d_cl_key \
+ -no_data "[_ lorsm.lt_No_Keywords_Available]" \
+ -actions [list "[_ lorsm.Add_Keyword]" [export_vars -base classification_key {ims_md_cl_id ims_md_id}] "[_ lorsm.Add_another_Keyword]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ keyword {
+ label ""
+ }
+ }
+
+db_multirow d_cl_key select_cl_key {
+ select
+ '[' || keyword_l || '] ' || keyword_s as keyword
+ from
+ ims_md_classification_keyword
+ where
+ ims_md_cl_id = :ims_md_cl_id
+}
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_add.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_add.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_add.adp 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,22 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+Classification Metadata Entry
+
+
+
+ Classification Metadata
+
+
+ Add another Classification Metadata Entry?
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_add.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_add.tcl 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,41 @@
+# packages/lorsm/www/md/classificationmd/classification_add.tcl
+
+ad_page_contract {
+
+ Add Classification MD Entry
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @creation-date 16 October 2004
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list "[_ lorsm.lt_IMS_Metadata_Editor_-]"]
+set title "[_ lorsm.lt_Add_Classification_MD]"
+
+# Form
+ad_form -name classificationmd_add \
+ -cancel_url ../classificationmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_cl_id:key(ims_md_classification_seq)
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_classification (ims_md_cl_id, ims_md_id)
+ values (:ims_md_cl_id, :ims_md_id)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../classificationmd" {ims_md_id}]
+ ad_script_abort
+}
+
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_addpath.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_addpath.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_addpath.adp 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,22 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+Classification Metadata
+
+
+
+ Classification Metadata
+
+
+ Add another Classification Metadata Taxonomic Path Entry?
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_addpath.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_addpath.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_addpath.tcl 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,47 @@
+# packages/lorsm/www/md/classificationmd/classification_addpath.tcl
+
+ad_page_contract {
+
+ Add Classification MD Taxonomic Path Entry
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: classification_addpath.tcl,v 1.1 2005/05/17 16:21:23 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_cl_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../classificationmd" ims_md_id] "[_ lorsm.Classification_MD]"] [list [export_vars -base "classification" {ims_md_id ims_md_cl_id}] "[_ lorsm.Classification_Entry]"] "[_ lorsm.lt_Add_Taxonomic_Path_En]"]
+set title "[_ lorsm.lt_Add_Classification_MD_1]"
+
+# Form
+ad_form -name classificationmd_addpath \
+ -cancel_url classification?ims_md_id=$ims_md_id&ims_md_cl_id=$ims_md_cl_id \
+ -mode edit \
+ -form {
+
+ ims_md_cl_ta_id:key(ims_md_classification_taxpath_seq)
+
+ {ims_md_cl_id:text(hidden) {value $ims_md_cl_id}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_classification_taxpath (ims_md_cl_ta_id, ims_md_cl_id)
+ values (:ims_md_cl_ta_id, :ims_md_cl_id)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "classification" {ims_md_cl_id ims_md_id}]
+ ad_script_abort
+}
+
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_desc.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_desc.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_desc.adp 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Classification Metadata Description
+
+
+
+ Classification Metadata
+
+
+ Descriptions:
+
+
+
+
+
+
+
+
Add/Edit Classification Metadata Description
+
+
+
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_desc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_desc.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_desc.tcl 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,109 @@
+# packages/lorsm/www/md/classificationmd/classification_desc.tcl
+
+ad_page_contract {
+
+ Add/Edit Classification MD Description
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: classification_desc.tcl,v 1.1 2005/05/17 16:21:23 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_cl_id:integer
+ ims_md_cl_de_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_cl_de_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../classificationmd" ims_md_id] "[_ lorsm.Classification_MD]"] [list [export_vars -base "classification" {ims_md_id ims_md_cl_id}] "[_ lorsm.Classification_Entry]"] "[_ lorsm.Edit_Description]"]
+ set title "[_ lorsm.lt_Edit_Classification_M_4]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../classificationmd" ims_md_id] "[_ lorsm.Classification_MD]"] [list [export_vars -base "classification" {ims_md_id ims_md_cl_id}] "[_ lorsm.Classification_Entry]"] "[_ lorsm.Add_Description]"]
+ set title "[_ lorsm.lt_Add_Classification_MD_2]"
+}
+
+# Form
+
+ad_form -name classificationmd_desc \
+ -cancel_url classification?ims_md_id=$ims_md_id&ims_md_cl_id=$ims_md_cl_id \
+ -mode edit \
+ -form {
+
+ ims_md_cl_de_id:key(ims_md_classification_desc_seq)
+
+ {descrip_l:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Classificatio_5]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {descrip_s:text(textarea),nospell
+ {html {rows 2 cols 50}}
+ {help_text "[_ lorsm.lt_Description_of_the_le]"}
+ {label "[_ lorsm.Description]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+ {ims_md_cl_id:text(hidden) {value $ims_md_cl_id}
+ }
+
+} -select_query {select * from ims_md_classification_descrip where ims_md_cl_de_id = :ims_md_cl_de_id and ims_md_cl_id = :ims_md_cl_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_classification_descrip
+ set descrip_l = :descrip_l,
+ descrip_s = :descrip_s
+ where ims_md_cl_de_id = :ims_md_cl_de_id"
+
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_classification_descrip (ims_md_cl_de_id, ims_md_cl_id, descrip_l, descrip_s)
+ values
+ (:ims_md_cl_de_id, :ims_md_cl_id, :descrip_l, :descrip_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "classification" {ims_md_cl_id ims_md_id}]
+ ad_script_abort
+}
+
+# Classification Description
+template::list::create \
+ -name d_cl_desc \
+ -multirow d_cl_desc \
+ -no_data "[_ lorsm.lt_No_Description_Availa]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ desc {
+ label ""
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "classification_desc" {ims_md_cl_de_id ims_md_cl_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_cl_desc select_cl_desc {
+ select
+ '[' || clde.descrip_l || '] ' || clde.descrip_s as desc,
+ clde.ims_md_cl_de_id,
+ cl.ims_md_cl_id,
+ cl.ims_md_id
+ from
+ ims_md_classification_descrip clde,
+ ims_md_classification cl
+ where
+ clde.ims_md_cl_id = cl.ims_md_cl_id
+ and
+ clde.ims_md_cl_id = :ims_md_cl_id
+}
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_key.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_key.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_key.adp 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Classification Metadata Keyword
+
+
+
+ Classification Metadata
+
+
+ Keywords:
+
+
+
+
+
+
+
+
Add/Edit Classification Metadata Keyword
+
+
+
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_key.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_key.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_key.tcl 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,109 @@
+# packages/lorsm/www/md/classificationmd/classification_key.tcl
+
+ad_page_contract {
+
+ Add/Edit Classification MD Keyword
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: classification_key.tcl,v 1.1 2005/05/17 16:21:23 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_cl_id:integer
+ ims_md_cl_ke_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_cl_ke_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../classificationmd" ims_md_id] "[_ lorsm.Classification_MD]"] [list [export_vars -base "classification" {ims_md_id ims_md_cl_id}] "[_ lorsm.Classification_Entry]"] "[_ lorsm.Edit_Keyword_1]"]
+ set title "[_ lorsm.lt_Edit_Classification_M]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../classificationmd" ims_md_id] "[_ lorsm.Classification_MD]"] [list [export_vars -base "classification" {ims_md_id ims_md_cl_id}] "[_ lorsm.Classification_Entry]"] "[_ lorsm.Add_Keyword]"]
+ set title "[_ lorsm.lt_Add_Classification_MD_3]"
+}
+
+# Form
+
+ad_form -name classificationmd_key \
+ -cancel_url classification?ims_md_id=$ims_md_id&ims_md_cl_id=$ims_md_cl_id \
+ -mode edit \
+ -form {
+
+ ims_md_cl_ke_id:key(ims_md_classification_keyword_seq)
+
+ {keyword_l:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Classificatio_6]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {keyword_s:text,nospell
+ {html {size 20}}
+ {help_text "[_ lorsm.lt_Keyword_description_o]"}
+ {label "[_ lorsm.Keyword]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+ {ims_md_cl_id:text(hidden) {value $ims_md_cl_id}
+ }
+
+} -select_query {select * from ims_md_classification_keyword where ims_md_cl_ke_id = :ims_md_cl_ke_id and ims_md_cl_id = :ims_md_cl_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_classification_keyword
+ set keyword_l = :keyword_l,
+ keyword_s = :keyword_s
+ where ims_md_cl_ke_id = :ims_md_cl_ke_id"
+
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_classification_keyword (ims_md_cl_ke_id, ims_md_cl_id, keyword_l, keyword_s)
+ values
+ (:ims_md_cl_ke_id, :ims_md_cl_id, :keyword_l, :keyword_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "classification" {ims_md_cl_id ims_md_id}]
+ ad_script_abort
+}
+
+# Classification Keyword
+template::list::create \
+ -name d_cl_key \
+ -multirow d_cl_key \
+ -no_data "[_ lorsm.No_Keyword_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ keyword {
+ label ""
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "classification_key" {ims_md_cl_ke_id ims_md_cl_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_cl_key select_cl_key {
+ select
+ '[' || kw.keyword_l || '] ' || kw.keyword_s as keyword,
+ kw.ims_md_cl_ke_id,
+ cl.ims_md_cl_id,
+ cl.ims_md_id
+ from
+ ims_md_classification_keyword kw,
+ ims_md_classification cl
+ where
+ kw.ims_md_cl_id = cl.ims_md_cl_id
+ and
+ kw.ims_md_cl_id = :ims_md_cl_id
+}
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_pur.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_pur.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_pur.adp 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Classification Metadata Purpose
+
+
+
+ Classification Metadata
+
+
+ Purpose:
+
+
+
+
+
+
+
+
Add/Edit Classification Metadata Purpose
+
+
+
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_pur.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_pur.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_pur.tcl 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,89 @@
+# packages/lorsm/www/md/classificationmd/classification_pur.tcl
+
+ad_page_contract {
+
+ Add/Edit Classification MD Purpose
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: classification_pur.tcl,v 1.1 2005/05/17 16:21:23 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_cl_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../classificationmd" ims_md_id] "[_ lorsm.Classification_MD]"] [list [export_vars -base "classification" {ims_md_id ims_md_cl_id}] "[_ lorsm.Classification_Entry]"] "[_ lorsm.AddEdit_Purpose]"]
+set title "[_ lorsm.lt_Edit_Classification_M_1]"
+
+
+# Form
+
+ad_form -name classificationmd_pur \
+ -cancel_url classification?ims_md_id=$ims_md_id&ims_md_cl_id=$ims_md_cl_id \
+ -mode edit \
+ -form {
+
+ ims_md_cl_id:key(ims_md_classification_seq)
+
+ {purpose_s:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Classificatio_7]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {purpose_v:text,nospell
+ {html {size 20}}
+ {help_text "[_ lorsm.lt_Characteristics_of_th]"}
+ {label "[_ lorsm.Purpose]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_classification where ims_md_cl_id = :ims_md_cl_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_classification
+ set purpose_s = :purpose_s,
+ purpose_v = :purpose_v
+ where ims_md_cl_id = :ims_md_cl_id "
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "classification" {ims_md_cl_id ims_md_id}]
+ ad_script_abort
+}
+
+# Classification Purpose
+template::list::create \
+ -name d_cl_pur \
+ -multirow d_cl_pur \
+ -no_data "[_ lorsm.No_Purpose_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ purpose_s {
+ label ""
+ }
+ purpose_v {
+ label ""
+ }
+ }
+
+db_multirow d_cl_pur select_cl_pur {
+ select purpose_s,
+ purpose_v,
+ ims_md_cl_id,
+ ims_md_id
+ from
+ ims_md_classification
+ where
+ ims_md_cl_id = :ims_md_cl_id
+}
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_taxon.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_taxon.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_taxon.adp 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Classification Metadata Taxonomic Path Taxonomy
+
+
+
+ Classification Metadata
+
+
+ Keywords:
+
+
+
+
+
+
+
+
Add/Edit Classification Metadata Taxonomic Path Taxonomy
+
+
+
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_taxon.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_taxon.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_taxon.tcl 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,124 @@
+# packages/lorsm/www/md/classificationmd/classification_taxon.tcl
+
+ad_page_contract {
+
+ Add/Edit Classification MD Taxonomic Path Taxonomy
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: classification_taxon.tcl,v 1.1 2005/05/17 16:21:23 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_cl_id:integer
+ ims_md_cl_ta_id:integer
+ ims_md_cl_ta_ta_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_cl_ta_ta_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../classificationmd" ims_md_id] "[_ lorsm.Classification_MD]"] [list [export_vars -base "classification" {ims_md_id ims_md_cl_id ims_md_cl_ta_id}] "[_ lorsm.Classification_Entry]"] [list [export_vars -base "classification_tpath" {ims_md_id ims_md_cl_id ims_md_cl_ta_id}] "[_ lorsm.Taxonomic_Paths_2]"] "[_ lorsm.Edit_Taxonomy]"]
+ set title "[_ lorsm.lt_Edit_Classification_M_2]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../classificationmd" ims_md_id] "[_ lorsm.Classification_MD]"] [list [export_vars -base "classification" {ims_md_id ims_md_cl_id ims_md_cl_ta_id}] "[_ lorsm.lt_Classification_Entry_]"] "[_ lorsm.Add_Taxonomy]"]
+ set title "[_ lorsm.lt_Add_Classification_MD_4]"
+}
+
+# Form
+
+ad_form -name classificationmd_taxon \
+ -cancel_url classification_tpath?ims_md_id=$ims_md_id&ims_md_cl_id=$ims_md_cl_id&ims_md_cl_ta_id=$ims_md_cl_ta_id \
+ -mode edit \
+ -form {
+
+ ims_md_cl_ta_ta_id:key(ims_md_classification_taxpath_taxon_seq)
+
+ {identifier:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Classificatio_8]"}
+ {html {size 50}}
+ {help_text "[_ lorsm.lt_Taxons_identifier_in_]"}
+ {label "[_ lorsm.Identifier]"}
+ }
+
+ {entry_l:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {entry_s:text,nospell
+ {html {size 50}}
+ {help_text "[_ lorsm.lt_Number_in_the_Catalog]"}
+ {label "[_ lorsm.Entry]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+ {ims_md_cl_id:text(hidden) {value $ims_md_cl_id}
+ }
+
+ {ims_md_cl_ta_id:text(hidden) {value $ims_md_cl_ta_id}
+ }
+
+} -select_query {select * from ims_md_classification_taxpath_taxon where ims_md_cl_ta_ta_id = :ims_md_cl_ta_ta_id and ims_md_cl_ta_id = :ims_md_cl_ta_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_classification_taxpath_taxon
+ set identifier = :identifier,
+ entry_l = :entry_l,
+ entry_s = :entry_s
+ where ims_md_cl_ta_ta_id = :ims_md_cl_ta_ta_id"
+
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_classification_taxpath_taxon (ims_md_cl_ta_ta_id, ims_md_cl_ta_id, identifier, entry_l, entry_s)
+ values
+ (:ims_md_cl_ta_ta_id, :ims_md_cl_ta_id, :identifier, :entry_l, :entry_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "classification_tpath" {ims_md_cl_ta_id ims_md_cl_id ims_md_id}]
+ ad_script_abort
+}
+
+# Classification Taxonomic Path Taxonomy
+template::list::create \
+ -name d_cl_taxon \
+ -multirow d_cl_taxon \
+ -no_data "[_ lorsm.lt_No_Taxonomies_Availab]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ identifier {
+ label "[_ lorsm.ID]"
+ }
+ entry {
+ label "[_ lorsm.Entry_1]"
+ }
+ export {
+ display_eval {\[[_ lorsm.Edit_1]\]}
+ link_url_eval { [export_vars -base "classification_taxon" {ims_md_cl_ta_ta_id ims_md_cl_ta_id ims_md_cl_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_cl_taxon select_cl_taxon {
+ select ctt.identifier,
+ '[' || ctt.entry_l || '] ' || ctt.entry_s as entry,
+ ctt.ims_md_cl_ta_id,
+ ctt.ims_md_cl_ta_ta_id,
+ cl.ims_md_cl_id,
+ cl.ims_md_id
+ from
+ ims_md_classification_taxpath_taxon ctt,
+ ims_md_classification cl
+ where
+ ctt.ims_md_cl_ta_id = :ims_md_cl_ta_id
+ and
+ cl.ims_md_cl_id = :ims_md_cl_id
+}
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_tpath.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_tpath.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_tpath.adp 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,20 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+ Classification Metadata Taxonomic Path
+
+
+ Source:
+
+
+
+ Taxonomies:
+
+
+
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_tpath.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_tpath.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_tpath.tcl 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,65 @@
+ad_page_contract {
+ Displays IMS Metadata Classification Taxonomic Path Entry
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: classification_tpath.tcl,v 1.1 2005/05/17 16:21:23 miguelm Exp $
+
+} {
+ ims_md_cl_id:integer
+ ims_md_cl_ta_id:integer
+ ims_md_id:integer
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../classificationmd" ims_md_id] "[_ lorsm.Classification_MD]"] [list [export_vars -base "classification" {ims_md_id ims_md_cl_id ims_md_cl_ta_id}] "[_ lorsm.Classification_Entry]"] "[_ lorsm.Taxonomic_Paths_1]"]
+set title "[_ lorsm.lt_Classification_MD_Tax]"
+
+# Classification Taxonomic Path Source
+template::list::create \
+ -name d_cl_source \
+ -multirow d_cl_source \
+ -no_data "[_ lorsm.No_Source_Available]" \
+ -actions [list "[_ lorsm.Add_Source]" [export_vars -base classification_tsource {ims_md_cl_ta_id ims_md_cl_id ims_md_id}] "[_ lorsm.Add_another_Source]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ source {
+ label ""
+ }
+ }
+
+db_multirow d_cl_source select_cl_source {
+ select
+ '[' || source_l || '] ' || source_v as source
+ from
+ ims_md_classification_taxpath
+ where
+ ims_md_cl_ta_id = :ims_md_cl_ta_id
+ and ims_md_cl_id = :ims_md_cl_id
+}
+
+# Classification Taxonomic Path Taxonomy
+template::list::create \
+ -name d_cl_taxon \
+ -multirow d_cl_taxon \
+ -no_data "[_ lorsm.lt_No_Taxonomies_Availab]" \
+ -actions [list "[_ lorsm.Add_Taxonomy]" [export_vars -base classification_taxon {ims_md_cl_ta_id ims_md_cl_id ims_md_id}] "[_ lorsm.Add_another_Taxonomy]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ identifier {
+ label "[_ lorsm.ID]"
+ }
+ entry {
+ label "[_ lorsm.Entry_1]"
+ }
+ }
+
+db_multirow d_cl_taxon select_cl_taxon {
+ select identifier,
+ '[' || entry_l || '] ' || entry_s as entry
+ from
+ ims_md_classification_taxpath_taxon
+ where
+ ims_md_cl_ta_id = :ims_md_cl_ta_id
+}
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_tsource.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_tsource.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_tsource.adp 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Classification Metadata Taxonomic Path Source
+
+
+
+ Classification Metadata Taxonomic Path
+
+
+ Source:
+
+
+
+
+
+
+
+
Add/Edit Classification Metadata Taxonomic Path Source
+
+
+
Index: openacs-4/packages/lors-central/www/md/classificationmd/classification_tsource.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/classificationmd/classification_tsource.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/classificationmd/classification_tsource.tcl 17 May 2005 16:21:23 -0000 1.1
@@ -0,0 +1,100 @@
+# packages/lorsm/www/md/classificationmd/classification_tsource.tcl
+
+ad_page_contract {
+
+ Add/Edit Classification MD Taxonomic Path Source
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: classification_tsource.tcl,v 1.1 2005/05/17 16:21:23 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_cl_id:integer
+ ims_md_cl_ta_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../classificationmd" ims_md_id] "[_ lorsm.Classification_MD]"] [list [export_vars -base "classification" {ims_md_id ims_md_cl_id ims_md_cl_ta_id}] "[_ lorsm.Classification_Entry]"] [list [export_vars -base "classification_tpath" {ims_md_id ims_md_cl_id ims_md_cl_ta_id}] "[_ lorsm.Taxonomic_Paths_1]"] "[_ lorsm.AddEdit_Source]"]
+
+set title "[_ lorsm.lt_Edit_Classification_M_3]"
+
+
+# Form
+
+ad_form -name classificationmd_tsource \
+ -cancel_url classification_tpath?ims_md_id=$ims_md_id&ims_md_cl_id=$ims_md_cl_id&ims_md_cl_ta_id=$ims_md_cl_ta_id \
+ -mode edit \
+ -form {
+
+ ims_md_cl_ta_id:key(ims_md_classification_taxpath_seq)
+
+ {source_l:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Classificatio_9]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {source_v:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {ims_md_cl_id:text(hidden) {value $ims_md_cl_id}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_classification_taxpath where ims_md_cl_ta_id = :ims_md_cl_ta_id and ims_md_cl_id = :ims_md_cl_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_classification_taxpath
+ set source_l = :source_l,
+ source_v = :source_v
+ where ims_md_cl_ta_id = :ims_md_cl_ta_id"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "classification_tpath" {ims_md_cl_ta_id ims_md_cl_id ims_md_id}]
+ ad_script_abort
+}
+
+# Classification Taxonomic Path Source
+template::list::create \
+ -name d_cl_tsource \
+ -multirow d_cl_tsource \
+ -no_data "[_ lorsm.lt_No_Taxonomic_Path_Sou]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ source {
+ label ""
+ }
+ export {
+ display_eval {\[[_ lorsm.Edit_1]\]}
+ link_url_eval { [export_vars -base "classification_tsource" {ims_md_cl_ta_id ims_md_cl_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_cl_tsource select_cl_tsource {
+ select
+ '[' || ctp.source_l || '] ' || ctp.source_v as source,
+ ctp.ims_md_cl_ta_id,
+ ctp.ims_md_cl_id,
+ cl.ims_md_id
+ from
+ ims_md_classification_taxpath ctp,
+ ims_md_classification cl
+ where
+ ctp.ims_md_cl_ta_id = :ims_md_cl_ta_id
+ and cl.ims_md_cl_id = :ims_md_cl_id
+}
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_cont.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_cont.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_cont.adp 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Educational Metadata Context
+
+
+
+ Educational Metadata
+
+
+ Context:
+
+
+
+
+
+
+
+
Add/Edit Educational Metadata Context
+
+
+
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_cont.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_cont.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_cont.tcl 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,98 @@
+# packages/lorsm/www/md/educationalmd/educational_cont.tcl
+
+ad_page_contract {
+
+ Add/Edit Educational MD Context
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: educational_cont.tcl,v 1.1 2005/05/17 16:21:24 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_ed_co_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ed_co_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" im\s_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.Edit_Context]"]
+ set title "[_ lorsm.lt_Edit_Educational_MD_C]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" im\s_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.Add_Context]"]
+ set title "[_ lorsm.lt_Add_Educational_MD_Co]"
+}
+
+# Form
+
+ad_form -name educationalmd_cont \
+ -cancel_url ../educationalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ed_co_id:key(ims_md_educational_context_seq)
+
+ {context_s:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Educational_M_11]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {context_v:text,nospell
+ {html {size 20}}
+ {help_text "[_ lorsm.lt_Learning_environment_]"}
+ {label "[_ lorsm.Context]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_educational_context where ims_md_ed_co_id = :ims_md_ed_co_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_educational_context
+ set context_s = :context_s,
+ context_v = :context_v
+ where ims_md_ed_co_id = :ims_md_ed_co_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_educational_context (ims_md_ed_co_id, ims_md_id, context_s, context_v)
+ values (:ims_md_ed_co_id, :ims_md_id, :context_s, :context_v)"
+} -after_submit {
+ ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Educational Context
+template::list::create \
+ -name d_ed_cont \
+ -multirow d_ed_cont \
+ -no_data "[_ lorsm.No_Context_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ context {
+ label "[_ lorsm.Context_1]"
+ }
+ export {
+ display_eval {\[[_ lorsm.Edit_1]\]}
+ link_url_eval { [export_vars -base "educational_cont" {ims_md_ed_co_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_ed_cont select_ed_cont {
+ select
+ '[' || context_s || '] ' || context_v as context,
+ ims_md_ed_co_id,
+ ims_md_id
+ from
+ ims_md_educational_context
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_desc.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_desc.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_desc.adp 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Educational Metadata Description
+
+
+
+ Educational Metadata
+
+
+ Description:
+
+
+
+
+
+
+
+
Add/Edit Educational Metadata Description
+
+
+
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_desc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_desc.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_desc.tcl 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,98 @@
+# packages/lorsm/www/md/educationalmd/educational_desc.tcl
+
+ad_page_contract {
+
+ Add/Edit Educational MD Description
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: educational_desc.tcl,v 1.1 2005/05/17 16:21:24 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_ed_de_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ed_de_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" ims_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.Edit_Description]"]
+ set title "[_ lorsm.lt_Edit_Educational_MD_D]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" ims_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.Add_Description]"]
+ set title "[_ lorsm.lt_Add_Educational_MD_De]"
+}
+
+# Form
+
+ad_form -name educationalmd_desc \
+ -cancel_url ../educationalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ed_de_id:key(ims_md_educational_descrip_seq)
+
+ {descrip_l:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Educational_M_12]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {descrip_s:text(textarea),nospell
+ {html {rows 2 cols 50}}
+ {help_text "[_ lorsm.lt_How_the_learning_obje]"}
+ {label "[_ lorsm.Description]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_educational_descrip where ims_md_ed_de_id = :ims_md_ed_de_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_educational_descrip
+ set descrip_l = :descrip_l,
+ descrip_s = :descrip_s
+ where ims_md_ed_de_id = :ims_md_ed_de_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_educational_descrip (ims_md_ed_de_id, ims_md_id, descrip_l, descrip_s)
+ values (:ims_md_ed_de_id, :ims_md_id, :descrip_l, :descrip_s)"
+} -after_submit {
+ ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Educational Description
+template::list::create \
+ -name d_ed_desc \
+ -multirow d_ed_desc \
+ -no_data "[_ lorsm.lt_No_Description_Availa]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ desc {
+ label "[_ lorsm.Description_1]"
+ }
+ export {
+ display_eval {\[[_ lorsm.Edit_1]\]}
+ link_url_eval { [export_vars -base "educational_desc" {ims_md_ed_de_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_ed_desc select_ed_desc {
+ select
+ '[' || descrip_l || '] ' || descrip_s as desc,
+ ims_md_ed_de_id,
+ ims_md_id
+ from
+ ims_md_educational_descrip
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_dif.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_dif.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_dif.adp 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Educational Metadata Difficulty
+
+
+
+ Educational Metadata
+
+
+ Difficulty:
+
+
+
+
+
+
+
+
Add/Edit Educational Metadata Difficulty
+
+
+
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_dif.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_dif.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_dif.tcl 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,88 @@
+# packages/lorsm/www/md/educationalmd/educational_dif.tcl
+
+ad_page_contract {
+
+ Add/Edit Educational MD Difficulty
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: educational_dif.tcl,v 1.1 2005/05/17 16:21:24 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" ims_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.AddEdit_Difficulty]"]
+set title "[_ lorsm.lt_AddEdit_Educational_M_13]"
+
+# Form
+
+ad_form -name educationalmd_dif \
+ -cancel_url ../educationalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ {difficulty_s:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Educational_M_13]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {difficulty_v:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Level_of_difficulty_i]"}
+ {label "[_ lorsm.Difficulty]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the educational difficulty details already exist...
+
+ if {[db_0or1row select_size {select ims_md_id from ims_md_educational where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_educational
+ set difficulty_s = :difficulty_s, difficulty_v = :difficulty_v
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_educational (ims_md_id, difficulty_s, difficulty_v)
+ values
+ (:ims_md_id, :difficulty_s, :difficulty_v) "
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Educational Difficulty
+template::list::create \
+ -name d_ed_dif \
+ -multirow d_ed_dif \
+ -no_data "[_ lorsm.lt_No_Difficulty_Type_Av]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ diff {
+ label "[_ lorsm.Difficulty_1]"
+ }
+ }
+
+db_multirow d_ed_dif select_ed_dif {
+ select
+ '[' || difficulty_s || '] ' || difficulty_v as diff,
+ ims_md_id
+ from
+ ims_md_educational
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_ieur.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_ieur.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_ieur.adp 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Educational Metadata Intended End User Role
+
+
+
+ Educational Metadata
+
+
+ Intended End User Role:
+
+
+
+
+
+
+
+
Add/Edit Educational Metadata Intended End User Role
+
+
+
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_ieur.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_ieur.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_ieur.tcl 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,98 @@
+# packages/lorsm/www/md/educationalmd/educational_ieur.tcl
+
+ad_page_contract {
+
+ Add/Edit Educational MD Intended End User Role
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: educational_ieur.tcl,v 1.1 2005/05/17 16:21:24 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_ed_ie_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ed_ie_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" ims_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.lt_Edit_Intended_End_Use]"]
+ set title "[_ lorsm.lt_Edit_Educational_MD_I]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" ims_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.lt_Add_Intended_End_User]"]
+ set title "[_ lorsm.lt_Add_Educational_MD_In]"
+}
+
+# Form
+
+ad_form -name educationalmd_ieur \
+ -cancel_url ../educationalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ed_ie_id:key(ims_md_educational_ieur_seq)
+
+ {ieur_s:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Educational_M_14]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {ieur_v:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Normal_user_of_the_le]"}
+ {label "[_ lorsm.lt_Intended_End_User_Rol]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_educational_ieur where ims_md_ed_ie_id = :ims_md_ed_ie_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_educational_ieur
+ set ieur_s = :ieur_s,
+ ieur_v = :ieur_v
+ where ims_md_ed_ie_id = :ims_md_ed_ie_id"
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_educational_ieur (ims_md_ed_ie_id, ims_md_id, ieur_s, ieur_v)
+ values (:ims_md_ed_ie_id, :ims_md_id, :ieur_s, :ieur_v)"
+} -after_submit {
+ ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Educational Intended End User Role
+template::list::create \
+ -name d_ed_ieur \
+ -multirow d_ed_ieur \
+ -no_data "[_ lorsm.lt_No_Intended_End_User_]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ ieur {
+ label "[_ lorsm.lt_Intended_End_User_Rol_1]"
+ }
+ export {
+ display_eval {\[[_ lorsm.Edit_1]\]}
+ link_url_eval { [export_vars -base "educational_ieur" {ims_md_ed_ie_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_ed_ieur select_ed_ieur {
+ select
+ '[' || ieur_s || '] ' || ieur_v as ieur,
+ ims_md_ed_ie_id,
+ ims_md_id
+ from
+ ims_md_educational_ieur
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_intl.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_intl.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_intl.adp 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Educational Metadata Interactivity Level
+
+
+
+ Educational Metadata
+
+
+ Interactivity Level:
+
+
+
+
+
+
+
+
Add/Edit Educational Metadata Interactivity Level
+
+
+
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_intl.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_intl.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_intl.tcl 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,88 @@
+# packages/lorsm/www/md/educationalmd/educational_intl.tcl
+
+ad_page_contract {
+
+ Add/Edit Educational MD Interactivity Level
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: educational_intl.tcl,v 1.1 2005/05/17 16:21:24 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" \im\\\s_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.lt_AddEdit_Interactivity]"]
+
+set title "[_ lorsm.lt_Edit_Educational_MD_I_1]"
+
+# Form
+
+ad_form -name educationalmd_intl \
+ -cancel_url ../educationalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ {int_level_s:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Educational_M_15]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {int_level_v:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Level_of_interactivit]"}
+ {label "[_ lorsm.Interactivity_Level]"}
+ }
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the ED Interactivity Level already exist...
+
+ if {[db_0or1row select_size {select ims_md_id from ims_md_educational where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_educational
+ set int_level_s = :int_level_s, int_level_v = :int_level_v
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_educational (ims_md_id, int_level_s, int_level_v)
+ values
+ (:ims_md_id, :int_level_s, :int_level_v) "
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Educational Interactivity Level
+template::list::create \
+ -name d_ed_intl \
+ -multirow d_ed_intl \
+ -no_data "[_ lorsm.lt_No_Interactivity_Leve]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ intl {
+ label "[_ lorsm.Interactivity_Level_1]"
+ }
+ }
+
+db_multirow d_ed_intl select_ed_intl {
+ select
+ '[' || int_level_s || '] ' || int_level_v as intl,
+ ims_md_id
+ from
+ ims_md_educational
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_intt.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_intt.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_intt.adp 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Educational Metadata Interactivity Type
+
+
+
+ Educational Metadata
+
+
+ Interactivity Type:
+
+
+
+
+
+
+
+
Add/Edit Educational Metadata Interactivity Type
+
+
+
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_intt.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_intt.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_intt.tcl 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,87 @@
+# packages/lorsm/www/md/educationalmd/educational_intt.tcl
+
+ad_page_contract {
+
+ Add/Edit Educational MD Interactivity Type
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: educational_intt.tcl,v 1.1 2005/05/17 16:21:24 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" ims_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.lt_AddEdit_Interactivity]"]
+set title "[_ lorsm.lt_AddEdit_Educational_M_16]"
+
+# Form
+
+ad_form -name educationalmd_intt \
+ -cancel_url ../educationalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ {int_type_s:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Educational_M_16]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {int_type_v:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Type_of_interactivity]"}
+ {label "[_ lorsm.Interactivity_Type]"}
+ }
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the ED interactivity type details already exist...
+
+ if {[db_0or1row select_type {select ims_md_id from ims_md_educational where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_educational
+ set int_type_s = :int_type_s, int_type_v = :int_type_v
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_educational (ims_md_id, int_type_s, int_type_v)
+ values
+ (:ims_md_id, :int_type_s, :int_type_v) "
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Educational Interactivity Type
+template::list::create \
+ -name d_ed_intt \
+ -multirow d_ed_intt \
+ -no_data "[_ lorsm.lt_No_Interactivity_Type]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ intt {
+ label "[_ lorsm.Interactivity_Type_1]"
+ }
+ }
+
+db_multirow d_ed_intt select_ed_intt {
+ select
+ '[' || int_type_s || '] ' || int_type_v as intt,
+ ims_md_id
+ from
+ ims_md_educational
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_lang.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_lang.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_lang.adp 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Educational Metadata Language
+
+
+
+ Educational Metadata
+
+
+ Language:
+
+
+
+
+
+
+
+
Add/Edit Educational Metadata Language
+
+
+
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_lang.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_lang.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_lang.tcl 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,91 @@
+# packages/lorsm/www/md/educationalmd/educational_lang.tcl
+
+ad_page_contract {
+
+ Add/Edit Educational MD Language
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: educational_lang.tcl,v 1.1 2005/05/17 16:21:24 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_ed_la_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ed_la_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" ims_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.Edit_Language]"]
+ set title "[_ lorsm.lt_Edit_Educational_MD_L]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" ims_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.Add_Language]"]
+ set title "[_ lorsm.lt_Add_Educational_MD_La]"
+}
+
+# Form
+
+ad_form -name educationalmd_lang \
+ -cancel_url ../educationalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ed_la_id:key(ims_md_educational_lang_seq)
+
+ {language:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Educational_M_17]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_educational_lang where ims_md_ed_la_id = :ims_md_ed_la_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_educational_lang
+ set language = :language
+ where ims_md_ed_la_id = :ims_md_ed_la_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_educational_lang (ims_md_ed_la_id, ims_md_id, language)
+ values (:ims_md_ed_la_id, :ims_md_id, :language)"
+} -after_submit {
+ ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Educational Language
+template::list::create \
+ -name d_ed_lang \
+ -multirow d_ed_lang \
+ -no_data "[_ lorsm.lt_No_Language_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ language {
+ label "[_ lorsm.Language_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "educational_lang" {ims_md_ed_la_id ims_md_id}] }
+q link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_ed_lang select_ed_lang {
+ select
+ language,
+ ims_md_ed_la_id,
+ ims_md_id
+ from
+ ims_md_educational_lang
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_lrt.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_lrt.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_lrt.adp 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Educational Metadata Learning Resource Type
+
+
+
+ Educational Metadata
+
+
+ Learning Resource Type:
+
+
+
+
+
+
+
+
Add/Edit Educational Metadata Learning Resource Type
+
+
+
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_lrt.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_lrt.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_lrt.tcl 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,96 @@
+# packages/lorsm/www/md/educationalmd/educational_lrt.tcl
+
+ad_page_contract {
+
+ Add/Edit Educational MD Learning Resource Type
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @creation-date 16 October 2004
+
+} {
+ ims_md_id:integer
+ ims_md_ed_lr_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ed_lr_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" \i\m\\\s_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.lt_Edit_Learning_Resourc]"]
+ set title "[_ lorsm.lt_Edit_Educational_MD_L_1]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor] "] [list [export_vars -base "../educationalmd" \i\m\\\s_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.lt_Add_Learning_Resource]"]
+ set title "[_ lorsm.lt_Add_Educational_MD_Le]"
+}
+
+# Form
+
+ad_form -name educationalmd_lrt \
+ -cancel_url ../educationalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ed_lr_id:key(ims_md_educational_lrt_seq)
+
+ {lrt_s:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Educational_M_18]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {lrt_v:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Type_of_interactivity]"}
+ {label "[_ lorsm.lt_Learning_Resource_Typ]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_educational_lrt where ims_md_ed_lr_id = :ims_md_ed_lr_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_educational_lrt
+ set lrt_s = :lrt_s,
+ lrt_v = :lrt_v
+ where ims_md_ed_lr_id = :ims_md_ed_lr_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_educational_lrt (ims_md_ed_lr_id, ims_md_id, lrt_s, lrt_v)
+ values (:ims_md_ed_lr_id, :ims_md_id, :lrt_s, :lrt_v)"
+} -after_submit {
+ ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Educational Learning Resource Type
+template::list::create \
+ -name d_ed_lrt \
+ -multirow d_ed_lrt \
+ -no_data "[_ lorsm.lt_No_Learning_Resource_]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ lrt {
+ label ""
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "educational_lrt" {ims_md_ed_lr_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_ed_lrt select_ed_lrt {
+ select
+ '[' || lrt_s || '] ' || lrt_v as lrt,
+ ims_md_ed_lr_id,
+ ims_md_id
+ from
+ ims_md_educational_lrt
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_semd.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_semd.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_semd.adp 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Educational Metadata Semantic Density
+
+
+
+ Educational Metadata
+
+
+ Semantic Density:
+
+
+
+
+
+
+
+
Add/Edit Educational Metadata Semantic Density
+
+
+
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_semd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_semd.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_semd.tcl 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,89 @@
+# packages/lorsm/www/md/educationalmd/educational_semd.tcl
+
+ad_page_contract {
+
+ Add/Edit Educational MD Semantic Density
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: educational_semd.tcl,v 1.1 2005/05/17 16:21:24 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" ims_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.lt_AddEdit_Semantic_Dens]"]
+set title "[_ lorsm.lt_Edit_Educational_MD_S]"
+
+# Form
+
+ad_form -name educationalmd_semd \
+ -cancel_url ../educationalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ {sem_density_s:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Educational_M_19]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {sem_density_v:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Learning_objects_usef]"}
+ {label "[_ lorsm.Semantic_Density]"}
+ }
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the ED Semantic Density already exist...
+
+ if {[db_0or1row select_size {select ims_md_id from ims_md_educational where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_educational
+ set sem_density_s = :sem_density_s,
+ sem_density_v = :sem_density_v
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_educational (ims_md_id, sem_density_s, sem_density_v)
+ values
+ (:ims_md_id, :sem_density_s, :sem_density_v) "
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Educational Semantic Density
+template::list::create \
+ -name d_ed_semd \
+ -multirow d_ed_semd \
+ -no_data "[_ lorsm.lt_No_Semantic_Density_A]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ semd {
+ label "[_ lorsm.Semantic_Density_1]"
+ }
+ }
+
+db_multirow d_ed_semd select_ed_semd {
+ select
+ '[' || sem_density_s || '] ' || sem_density_v as semd,
+ ims_md_id
+ from
+ ims_md_educational
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_tar.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_tar.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_tar.adp 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Educational Metadata Typical Age Range
+
+
+
+ Educational Metadata
+
+
+ Typical Age Range:
+
+
+
+
+
+
+
+
Add/Edit Educational Metadata Typical Age Range
+
+
+
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_tar.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_tar.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_tar.tcl 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,98 @@
+# packages/lorsm/www/md/educationalmd/educational_tar.tcl
+
+ad_page_contract {
+
+ Add/Edit Educational MD Typical Age Range
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: educational_tar.tcl,v 1.1 2005/05/17 16:21:24 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_ed_ta_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ed_ta_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" ims_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.lt_Edit_Typical_Age_Rang]"]
+ set title "[_ lorsm.lt_Edit_Educational_MD_T]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" ims_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.Add_Typical_Age_Rang]"]
+ set title "[_ lorsm.lt_Add_Educational_MD_Ty]"
+}
+
+# Form
+
+ad_form -name educationalmd_tar \
+ -cancel_url ../educationalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ed_ta_id:key(ims_md_educational_tar_seq)
+
+ {tar_l:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Educational_M_20]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {tar_s:text,nospell
+ {html {size 20}}
+ {help_text "[_ lorsm.lt_Age_of_the_typical_in]"}
+ {label "[_ lorsm.Typical_Age_Range]" }
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_educational_tar where ims_md_ed_ta_id = :ims_md_ed_ta_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_educational_tar
+ set tar_l = :tar_l,
+ tar_s = :tar_s
+ where ims_md_ed_ta_id = :ims_md_ed_ta_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_educational_tar (ims_md_ed_ta_id, ims_md_id, tar_l, tar_s)
+ values (:ims_md_ed_ta_id, :ims_md_id, :tar_l, :tar_s)"
+} -after_submit {
+ ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Educational Typical Age Range
+template::list::create \
+ -name d_ed_tar \
+ -multirow d_ed_tar \
+ -no_data "[_ lorsm.lt_No_Typical_Age_Range_]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ tar {
+ label "[_ lorsm.Typical_Age_Range_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "educational_tar" {ims_md_ed_ta_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_ed_tar select_ed_tar {
+ select
+ '[' || tar_l || '] ' || tar_s as tar,
+ ims_md_ed_ta_id,
+ ims_md_id
+ from
+ ims_md_educational_tar
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_tlt.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_tlt.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_tlt.adp 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Educational Metadata Typical Learning Time
+
+
+
+ Educational Metadata
+
+
+ Typical Learning Time:
+
+
+
+
+
+
+
+
Add/Edit Educational Metadata Typical Learning Time
+
+
+
Index: openacs-4/packages/lors-central/www/md/educationalmd/educational_tlt.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/educationalmd/educational_tlt.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/educationalmd/educational_tlt.tcl 17 May 2005 16:21:24 -0000 1.1
@@ -0,0 +1,99 @@
+# packages/lorsm/www/md/educationalmd/educational_tlt.tcl
+
+ad_page_contract {
+
+ Add/Edit Educational MD Typical Learning Time
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: educational_tlt.tcl,v 1.1 2005/05/17 16:21:24 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../educationalmd" ims_md_id] "[_ lorsm.Educational_MD]"] "[_ lorsm.lt_AddEdit_Typical_Learn]"]
+set title "[_ lorsm.lt_Edit_Educational_MD_T_1]"
+
+# Form
+
+ad_form -name educationalmd_tlt \
+ -cancel_url ../educationalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ {type_lrn_time_l:text,nospell,optional
+ {section "[_ lorsm.lt_AddEdit_Educational_M_21]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {type_lrn_time_s:text(textarea),nospell,optional
+ {html {rows 2 cols 50}}
+ {help_text "[_ lorsm.lt_Brief_Description_Req]"}
+ {label "[_ lorsm.Description]"}
+ }
+
+ {type_lrn_time:text,nospell
+ {html {size 20}}
+ {help_text "[_ lorsm.lt_Amount_of_time_it_tak]"}
+ {label "[_ lorsm.lt_Typical_Learning_Time]"}
+ }
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the educational typical learning time details already exist...
+
+ if {[db_0or1row select_size {select ims_md_id from ims_md_educational where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_educational
+ set type_lrn_time_s = :type_lrn_time_s,
+ type_lrn_time_l = :type_lrn_time_l,
+ type_lrn_time = :type_lrn_time
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_educational (ims_md_id, type_lrn_time_s, type_lrn_time_l, type_lrn_time)
+ values
+ (:ims_md_id, :type_lrn_time_s, :type_lrn_time_l, :type_lrn_time) "
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../educationalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Educational Typical Learning Time
+template::list::create \
+ -name d_ed_tlt \
+ -multirow d_ed_tlt \
+ -no_data "[_ lorsm.lt_No_Typical_Learning_T]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ tlt {
+ label "[_ lorsm.lt_Typical_Learning_Time_1]"
+ }
+ tlt_ls {
+ label "[_ lorsm.Language_1]"
+ }
+ }
+
+db_multirow d_ed_tlt select_ed_tlt {
+ select
+ type_lrn_time as tlt,
+ '[' || type_lrn_time_l || '] ' || type_lrn_time_s as tlt_ls,
+ ims_md_id
+ from
+ ims_md_educational
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/form-md-record/md-record.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/form-md-record/md-record.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/form-md-record/md-record.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1 @@
+
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/md/form-md-record/md-record.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/form-md-record/md-record.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/form-md-record/md-record.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,33 @@
+set actions [list]
+
+lappend actions "[_ lorsm.General_MD]" [export_vars -base ../generalmd {ims_md_id}] "[_ lorsm.lt_View_General_Metadata]"
+lappend actions "[_ lorsm.Lifecycle_MD]" [export_vars -base ../lifecyclemd {ims_md_id}] "[_ lorsm.lt_View_Lifecycle_Metada]"
+lappend actions "[_ lorsm.Meta_MD]" [export_vars -base ../metamd {ims_md_id}] "[_ lorsm.View_Meta_Metadata]"
+lappend actions "[_ lorsm.Technical_MD]" [export_vars -base ../technicalmd {ims_md_id}] "[_ lorsm.lt_View_Technical_Metada]"
+lappend actions "[_ lorsm.Educational_MD]" [export_vars -base ../educationalmd {ims_md_id}] "[_ lorsm.lt_View_Educational_Meta]"
+lappend actions "[_ lorsm.Rights_MD]" [export_vars -base ../rightsmd {ims_md_id}] "[_ lorsm.View_Rights_Metadata]"
+lappend actions "[_ lorsm.Relation_MD]" [export_vars -base ../relationmd {ims_md_id}] "[_ lorsm.lt_View_Relation_Metadat]"
+lappend actions "[_ lorsm.Annotation_MD]" [export_vars -base ../annotationmd {ims_md_id}] "[_ lorsm.lt_View_Annotation_Metad]"
+lappend actions "[_ lorsm.Classification_MD]" [export_vars -base ../classificationmd {ims_md_id}] "[_ lorsm.lt_View_Classification_M_1]"
+
+
+# Presentation
+template::list::create \
+ -name d_pres \
+ -multirow d_pres \
+ -no_data "-" \
+ -actions $actions \
+ -elements {
+ object_type {
+ label "[_ lorsm.Object_Type]"
+ }
+ }
+
+db_multirow d_pres select_ge_titles {
+ select
+ object_type
+ from
+ acs_objects
+ where
+ object_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/generalmd/general_aggl.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_aggl.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_aggl.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+General Metadata Aggregation Level
+
+
+
+ General Metadata
+
+
+ Aggregation Level:
+
+
+
+
+
+
+
+
Add/Edit General Metadata Aggregation Level
+
+
+
Index: openacs-4/packages/lors-central/www/md/generalmd/general_aggl.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_aggl.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_aggl.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,101 @@
+# packages/lorsm/www/md/generalmd/general_aggl.tcl
+
+ad_page_contract {
+
+ Add/Edit General MD Aggregation Level
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: general_aggl.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../generalmd" im\\\\\s_md_id] "[_ lorsm.General_MD]"] "[_ lorsm.lt_Edit_Aggregation_Leve]"]
+set title "[_ lorsm.lt_Edit_General_MD_Aggre]"
+
+# Form
+
+ad_form -name generalmd_aggl \
+ -cancel_url ../generalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+
+
+ {agg_level_v:text,nospell
+ {section "[_ lorsm.lt_AddEdit_General_MD_Ag]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Functional_size_of_th]"}
+ {label "[_ lorsm.Aggregation_Level]"}
+ }
+
+ {agg_level_s:text,nospell,optional
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the aggregation level already exist..
+
+ if {[db_0or1row select_aggregation_level {select ims_md_id from ims_md_general where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_general
+ set agg_level_v = :agg_level_v, agg_level_s = :agg_level_s
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_general (ims_md_id, agg_level_v, agg_level_s)
+ values
+ (:ims_md_id, :agg_level_v, :agg_level_s)"
+
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../generalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# General Aggregation Level
+template::list::create \
+ -name d_gen_aggl \
+ -multirow d_gen_aggl \
+ -no_data "[_ lorsm.lt_No_Aggregation_Level__1]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ agg_level_s {
+ label "[_ lorsm.Source_1]"
+ }
+ agg_level_v {
+ label "[_ lorsm.Value]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "general_aggl" {ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record] "}
+ html { align center }
+ }
+ }
+
+db_multirow d_gen_aggl select_ge_aggl {
+ select agg_level_s,
+ agg_level_v,
+ ims_md_id
+ from
+ ims_md_general
+ where
+ ims_md_id = :ims_md_id
+}
+
Index: openacs-4/packages/lors-central/www/md/generalmd/general_cata.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_cata.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_cata.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+List of General Metadata Catalog-Entries
+
+
+
+ General Metadata
+
+
+ Catalog-Entries:
+
+
+
+
+
+
+
+
Add/Edit General Metadata Catalog-Entry
+
+
+
Index: openacs-4/packages/lors-central/www/md/generalmd/general_cata.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_cata.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_cata.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,113 @@
+# packages/lorsm/www/md/generalmd/general_cata.tcl
+
+ad_page_contract {
+
+ Add/Edit General MD Catalog-Entry
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: general_cata.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_ge_cata_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ge_cata_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../generalmd" im\s_md_id] "[_ lorsm.General_MD]"] "[_ lorsm.Edit_Catalog-Entry]"]
+ set title "[_ lorsm.lt_Edit_General_MD_Catal]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../generalmd" im\s_md_id] "[_ lorsm.General_MD]"] "[_ lorsm.Add_Catalog-Entry]"]
+ set title "[_ lorsm.lt_Add_General_MD_Catalo]"
+}
+
+# Form
+
+ad_form -name generalmd_cata \
+ -cancel_url ../generalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ge_cata_id:key(ims_md_general_cata_seq)
+
+ {catalog:text,nospell
+ {section "[_ lorsm.lt_AddEdit_General_MD_Ca]"}
+ {html {size 50}}
+ {help_text "[_ lorsm.Name_of_the_catalog]"}
+ {label "[_ lorsm.Catalog]"}
+ }
+
+ {entry_l:text,nospell,optional
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {entry_s:text,nospell
+ {html {size 50}}
+ {help_text "[_ lorsm.lt_Number_in_the_Catalog]"}
+ {label "[_ lorsm.Entry]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_general_cata where ims_md_ge_cata_id = :ims_md_ge_cata_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_general_cata
+ set catalog = :catalog, entry_l = :entry_l, entry_s = :entry_s
+ where ims_md_ge_cata_id = :ims_md_ge_cata_id"
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_general_cata (ims_md_ge_cata_id, ims_md_id, catalog, entry_l, entry_s)
+ values
+ (:ims_md_ge_cata_id, :ims_md_id, :catalog, :entry_l, :entry_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../generalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# General Catalog-entry
+template::list::create \
+ -name d_gen_cata \
+ -multirow d_gen_cata \
+ -no_data "[_ lorsm.lt_No_Catalog_Entry_Avai]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ catalog {
+ label "[_ lorsm.Catalog_1]"
+ }
+ entry_l {
+ label "[_ lorsm.Language_1]"
+ }
+ entry_s {
+ label "[_ lorsm.Entry_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "general_cata" {ims_md_ge_cata_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_gen_cata select_ge_cata {
+ select catalog,
+ entry_l,
+ entry_s,
+ ims_md_ge_cata_id,
+ ims_md_id
+ from
+ ims_md_general_cata
+ where
+ ims_md_id = :ims_md_id
+}
+
Index: openacs-4/packages/lors-central/www/md/generalmd/general_cover.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_cover.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_cover.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+List of General Metadata Coverages
+
+
+
+ General Metadata
+
+
+ Coverage:
+
+
+
+
+
+
+
+
Add/Edit General Metadata Coverage
+
+
+
Index: openacs-4/packages/lors-central/www/md/generalmd/general_cover.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_cover.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_cover.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,102 @@
+# packages/lorsm/www/md/generalmd/general_cover.tcl
+
+ad_page_contract {
+
+ Add/Edit General MD Coverage
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: general_cover.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_ge_cove_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ge_cove_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../generalmd" im\\\s_md_id] "[_ lorsm.General_MD]"] "[_ lorsm.Edit_Coverage]"]
+ set title "[_ lorsm.lt_Edit_General_MD_Cover]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../generalmd" im\\\s_md_id] "[_ lorsm.General_MD]"] "[_ lorsm.Add_Coverage]"]
+ set title "[_ lorsm.lt_Add_General_MD_Covera]"
+}
+
+# Form
+
+ad_form -name generalmd_cover \
+ -cancel_url ../generalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ge_cove_id:key(ims_md_general_cover_seq)
+
+ {cover_l:text,nospell,optional
+ {section "[_ lorsm.lt_AddEdit_General_MD_Co]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {cover_s:text,nospell
+ {html {size 50}}
+ {help_text "[_ lorsm.lt_Temporalspatial_chara]"}
+ {label "[_ lorsm.Coverage]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_general_cover where ims_md_ge_cove_id = :ims_md_ge_cove_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_general_cover
+ set cover_l = :cover_l, cover_s = :cover_s
+ where ims_md_ge_cove_id = :ims_md_ge_cove_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_general_cover (ims_md_ge_cove_id, ims_md_id, cover_l, cover_s)
+ values
+ (:ims_md_ge_cove_id, :ims_md_id, :cover_l, :cover_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../generalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# General Coverage
+template::list::create \
+ -name d_gen_cover \
+ -multirow d_gen_cover \
+ -no_data "[_ lorsm.lt_No_Coverage_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ cover_l {
+ label "[_ lorsm.Language_1]"
+ }
+ cover_s {
+ label "[_ lorsm.Coverage_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "general_cover" {ims_md_ge_cove_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_gen_cover select_ge_cover {
+ select cover_l,
+ cover_s,
+ ims_md_ge_cove_id,
+ ims_md_id
+ from
+ ims_md_general_cover
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/generalmd/general_desc.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_desc.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_desc.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+List of General Metadata Descriptions
+
+
+
+ General Metadata
+
+
+ Descriptions:
+
+
+
+
+
+
+
+
Add/Edit General Metadata Description
+
+
+
Index: openacs-4/packages/lors-central/www/md/generalmd/general_desc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_desc.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_desc.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,102 @@
+# packages/lorsm/www/md/generalmd/general_desc.tcl
+
+ad_page_contract {
+
+ Add/Edit General MD Description
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: general_desc.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_ge_desc_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ge_desc_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../generalmd" ims_md_id] "[_ lorsm.General_MD]"] "[_ lorsm.Edit_Description]"]
+ set title "[_ lorsm.lt_Edit_General_MD_Descr]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../generalmd" ims_md_id] "[_ lorsm.General_MD]"] "[_ lorsm.Add_Description]"]
+ set title "[_ lorsm.lt_Add_General_MD_Descri]"
+}
+
+# Form
+
+ad_form -name generalmd_desc \
+ -cancel_url ../generalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ge_desc_id:key(ims_md_general_desc_seq)
+
+ {descrip_l:text,nospell,optional
+ {section "[_ lorsm.lt_AddEdit_General_MD_De]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {descrip_s:text(textarea),nospell
+ {html {rows 5 cols 50}}
+ {help_text "[_ lorsm.lt_Describes_learning_ob]"}
+ {label "[_ lorsm.Description]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_general_desc where ims_md_ge_desc_id = :ims_md_ge_desc_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_general_desc
+ set descrip_l = :descrip_l, descrip_s = :descrip_s
+ where ims_md_ge_desc_id = :ims_md_ge_desc_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_general_desc (ims_md_ge_desc_id, ims_md_id, descrip_l, descrip_s)
+ values
+ (:ims_md_ge_desc_id, :ims_md_id, :descrip_l, :descrip_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../generalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# General Language
+template::list::create \
+ -name d_gen_desc \
+ -multirow d_gen_desc \
+ -no_data "[_ lorsm.lt_No_Description_Availa]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ descrip_l {
+ label "[_ lorsm.Language_1]"
+ }
+ descrip_s {
+ label "[_ lorsm.Description_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "general_desc" {ims_md_ge_desc_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record] "}
+ html { align center }
+ }
+ }
+
+db_multirow d_gen_desc select_ge_desc {
+ select descrip_l,
+ descrip_s,
+ ims_md_ge_desc_id,
+ ims_md_id
+ from
+ ims_md_general_desc
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/generalmd/general_key.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_key.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_key.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+List of General Metadata Keywords
+
+
+
+ General Metadata
+
+
+ Keywords:
+
+
+
+
+
+
+
+
Add/Edit General Metadata Keyword
+
+
+
Index: openacs-4/packages/lors-central/www/md/generalmd/general_key.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_key.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_key.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,103 @@
+# packages/lorsm/www/md/generalmd/general_key.tcl
+
+ad_page_contract {
+
+ Add/Edit General MD Keyword
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: general_key.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_ge_key_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ge_key_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../generalmd" im\\\s_md_id] "[_ lorsm.General_MD]"] "[_ lorsm.Edit_Keyword_1]"]
+ set title "[_ lorsm.lt_Edit_General_MD_Keywo]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]" ] [list [export_vars -base "../generalmd" im\\\s_md_id] "[_ lorsm.General_MD]"] "[_ lorsm.Add_Keyword]"]
+ set title "[_ lorsm.lt_Add_General_MD_Keywor]"
+}
+
+# Form
+
+ad_form -name generalmd_key \
+ -cancel_url ../generalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ge_key_id:key(ims_md_general_key_seq)
+
+ {keyword_l:text,nospell,optional
+ {section "[_ lorsm.lt_AddEdit_General_MD_Ke]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {keyword_s:text,nospell
+ {html {size 50}}
+ {help_text "[_ lorsm.lt_Keyword_description_o]"}
+ {label "[_ lorsm.Keyword]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_general_key where ims_md_ge_key_id = :ims_md_ge_key_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_general_key
+ set keyword_l = :keyword_l, keyword_s = :keyword_s
+ where ims_md_ge_key_id = :ims_md_ge_key_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_general_key (ims_md_ge_key_id, ims_md_id, keyword_l, keyword_s)
+ values
+ (:ims_md_ge_key_id, :ims_md_id, :keyword_l, :keyword_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../generalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# General Keyword
+template::list::create \
+ -name d_gen_key \
+ -multirow d_gen_key \
+ -no_data "[_ lorsm.lt_No_Keywords_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ keyword_l {
+ label ""
+ }
+ keyword_s {
+ label ""
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "general_key" {ims_md_ge_key_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_gen_key select_ge_key {
+ select keyword_l,
+ keyword_s,
+ ims_md_ge_key_id,
+ ims_md_id
+ from
+ ims_md_general_key
+ where
+ ims_md_id = :ims_md_id
+}
+
Index: openacs-4/packages/lors-central/www/md/generalmd/general_lang.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_lang.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_lang.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+List of General Metadata Languages
+
+
+
+ General Metadata
+
+
+ Languages:
+
+
+
+
+
+
+
+
Add/Edit General Metadata Language
+
+
+
Index: openacs-4/packages/lors-central/www/md/generalmd/general_lang.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_lang.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_lang.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,92 @@
+# packages/lorsm/www/md/generalmd/general_lang.tcl
+
+ad_page_contract {
+
+ Add/Edit General MD Language
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: general_lang.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_ge_lang_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ge_lang_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../generalmd" im\\s_md_id] "[_ lorsm.General_MD]"] "[_ lorsm.Edit_Language]"]
+ set title "[_ lorsm.lt_Edit_General_MD_Langu]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../generalmd" im\\s_md_id] "[_ lorsm.General_MD]"] "[_ lorsm.Add_Language]"]
+ set title "[_ lorsm.lt_Add_General_MD_Langua]"
+}
+
+# Form
+
+ad_form -name generalmd_lang \
+ -cancel_url ../generalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ge_lang_id:key(ims_md_general_lang_seq)
+
+ {language:text,nospell
+ {section "[_ lorsm.lt_AddEdit_General_MD_La]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_general_lang where ims_md_ge_lang_id = :ims_md_ge_lang_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_general_lang
+ set language = :language
+ where ims_md_ge_lang_id = :ims_md_ge_lang_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_general_lang (ims_md_ge_lang_id, ims_md_id, language)
+ values
+ (:ims_md_ge_lang_id, :ims_md_id, :language)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../generalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# General Language
+template::list::create \
+ -name d_gen_lang \
+ -multirow d_gen_lang \
+ -no_data "[_ lorsm.lt_No_Language_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ language {
+ label "[_ lorsm.Language_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "general_lang" {ims_md_ge_lang_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_gen_lang select_ge_lang {
+ select language,
+ ims_md_ge_lang_id,
+ ims_md_id
+ from
+ ims_md_general_lang
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/generalmd/general_struc.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_struc.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_struc.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+General Metadata Structure
+
+
+
+ General Metadata
+
+
+ Structure:
+
+
+
+
+
+
+
+
Add/Edit General Metadata Structure
+
+
+
Index: openacs-4/packages/lors-central/www/md/generalmd/general_struc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_struc.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_struc.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,95 @@
+# packages/lorsm/www/md/generalmd/general_struc.tcl
+
+ad_page_contract {
+
+ Add/Edit General MD Structure
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: general_struc.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../generalmd" im\\\\s_md_id] "[_ lorsm.General_MD]"] "[_ lorsm.Edit_Structure]"]
+set title "[_ lorsm.lt_Edit_General_MD_Struc]"
+
+# Form
+
+ad_form -name generalmd_struc \
+ -cancel_url [export_vars -base "../generalmd" ims_md_id] \
+ -mode edit \
+ -form {
+
+ {structure_v:text
+ {section "[_ lorsm.lt_AddEdit_General_MD_St]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Organizational_struct]"}
+ {label "[_ lorsm.Structure]"}
+ }
+
+ {structure_s:text,nospell,optional
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the structure details already exist...
+
+ if {[db_0or1row select_structure {select ims_md_id from ims_md_general where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_general
+ set structure_v = :structure_v, structure_s = :structure_s
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_general (ims_md_id, structure_v, structure_s)
+ values
+ (:ims_md_id, :structure_v, :structure_s)"
+
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../generalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# General Structure
+template::list::create \
+ -name d_gen_struc \
+ -multirow d_gen_struc \
+ -no_data "[_ lorsm.lt_No_Structure_Availabl]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ structure_s {
+ label "[_ lorsm.Source_1]"
+ html {align center}
+ }
+ structure_v {
+ label "[_ lorsm.Value]"
+ html {align center}
+ }
+ }
+
+db_multirow d_gen_struc select_ge_struc {
+ select structure_s,
+ structure_v,
+ ims_md_id
+ from
+ ims_md_general
+ where
+ ims_md_id = :ims_md_id
+}
+
Index: openacs-4/packages/lors-central/www/md/generalmd/general_title.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_title.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_title.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+List of General Metadata Titles
+
+
+
+ General Metadata
+
+
+ Titles:
+
+
+
+
+
+
+
+
Add/Edit General Metadata Title
+
+
+
Index: openacs-4/packages/lors-central/www/md/generalmd/general_title.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/generalmd/general_title.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/generalmd/general_title.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,105 @@
+# packages/lorsm/www/md/generalmd/general_title.tcl
+
+ad_page_contract {
+
+ Add/Edit General MD Title
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 2004-05-03
+ @arch-tag 1956d02e-511a-470c-81d0-c2857242651c
+ @cvs-id $Id: general_title.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+} {
+ ims_md_id:integer
+ ims_md_ge_ti_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ge_ti_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../generalmd" ims_md_id] "[_ lorsm.General_MD]"] "[_ lorsm.Edit_Titles]"]
+ set title "[_ lorsm.lt_Edit_General_MD_Title]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../generalmd" ims_md_id] "[_ lorsm.General_MD]"] "[_ lorsm.Add_Titles]"]
+# set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] "[_ lorsm.General_MD]"]
+ set title "[_ lorsm.Add_General_MD_Title]"
+}
+
+# Form
+
+ad_form -name generalmd_title \
+ -cancel_url [export_vars -base "../generalmd" ims_md_id] \
+ -mode edit \
+ -form {
+
+ ims_md_ge_ti_id:key(ims_md_general_title_seq)
+
+ {title_l:text,nospell,optional
+ {section "[_ lorsm.lt_AddEdit_General_MD_Ti]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {title_s:text,nospell
+ {html {size 50}}
+ {help_text "[_ lorsm.lt_Learning_objects_name]"}
+ {label "[_ lorsm.Title]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_general_title where ims_md_ge_ti_id = :ims_md_ge_ti_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_general_title
+ set title_l = :title_l, title_s = :title_s
+ where ims_md_ge_ti_id = :ims_md_ge_ti_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_general_title (ims_md_ge_ti_id, ims_md_id, title_l, title_s)
+ values
+ (:ims_md_ge_ti_id, :ims_md_id, :title_l, :title_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../generalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# General Title
+template::list::create \
+ -name d_gen_titles \
+ -multirow d_gen_titles \
+ -no_data "[_ lorsm.No_Titles_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ title_l {
+ label "[_ lorsm.Language_1]"
+ }
+ title_s {
+ label "[_ lorsm.Titles_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "general_title" {ims_md_ge_ti_id ims_md_id}] }
+ link_html {title "Edit Record "}
+ html { align center }
+ }
+ }
+
+db_multirow d_gen_titles select_ge_titles {
+ select title_l,
+ title_s,
+ ims_md_ge_ti_id,
+ ims_md_id
+ from
+ ims_md_general_title
+ where
+ ims_md_id = :ims_md_id
+} {
+ set item_url [export_vars -base "item" { ims_md_id }]
+}
+
Index: openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_cont.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_cont.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_cont.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Lifecyle Metadata Contribution
+
+
+
+ Lifecycle Metadata
+
+
+ Contribution:
+
+
+
+
+
+
+
+
Add/Edit Lifecycle Metadata Contributor
+
+
+
Index: openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_cont.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_cont.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_cont.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,165 @@
+# packages/lorsm/www/md/lifecyclemd/lifecycle_cont.tcl
+
+ad_page_contract {
+
+ Add/Edit Lifecycle MD Contributor
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: lifecycle_cont.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_lf_cont_id:integer,optional
+ ims_md_lf_cont_enti_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_lf_cont_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../lifecyclemd" im\\\\\\\s_md_id] " [_ lorsm.Life_Cycle_MD]"] "[_ lorsm.Edit_Contributor]"]
+ set title "[_ lorsm.lt_Edit_Lifecycle_MD_Con]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../lifecyclemd" im\\\\\\\s_md_id] "[_ lorsm.Life_Cycle_MD]"] "[_ lorsm.Add_Contributor]"]
+ set title "[_ lorsm.lt_Add_Lifecycle_MD_Cont]"
+}
+
+# Form
+
+ad_form -name lifecyclemd_cont \
+ -cancel_url ../lifecyclemd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_lf_cont_id:key(ims_md_life_cycle_contrib_seq)
+
+ {role_s:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Lifecycle_MD_]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {role_v:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.Type_of_contribution]"}
+ {label "[_ lorsm.Role_1]"}
+ }
+ {entity:text(textarea),nospell
+ {html {rows 5 cols 50}}
+ {help_text "[_ lorsm.lt_Entity_or_entities_in]"}
+ {label "[_ lorsm.Entity]"}
+ }
+
+ {cont_date:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.Date_of_contribution]"}
+ {label "[_ lorsm.Date]"}
+ }
+
+ {cont_date_l:text,nospell,optional
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi_3]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {cont_date_s:text(textarea),nospell,optional
+ {html {rows 2 cols 50}}
+ {help_text "[_ lorsm.lt_Describes_contributio]"}
+ {label "[_ lorsm.Description]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {
+ select * from
+ ims_md_life_cycle_contrib lfc,
+ ims_md_life_cycle_contrib_entity lfce
+ where
+ lfc.ims_md_lf_cont_id = :ims_md_lf_cont_id
+ and
+ lfc.ims_md_id = :ims_md_id
+ and
+ lfce.ims_md_lf_cont_id = :ims_md_lf_cont_id
+
+} -edit_data {
+ db_transaction {
+ db_dml update_lfc "
+ update ims_md_life_cycle_contrib
+ set role_v = :role_v,
+ role_s = :role_s,
+ cont_date = :cont_date,
+ cont_date_l = :cont_date_l,
+ cont_date_s = :cont_date_s
+ where ims_md_lf_cont_id = :ims_md_lf_cont_id"
+
+ db_dml update_lfce "
+ update ims_md_life_cycle_contrib_entity
+ set entity = :entity
+ where ims_md_lf_cont_id = :ims_md_lf_cont_id"
+ }
+
+} -new_data {
+ db_transaction {
+ db_dml insert_lfc "
+ insert into ims_md_life_cycle_contrib (ims_md_lf_cont_id, ims_md_id, role_s, role_v, cont_date, cont_date_l, cont_date_s)
+ values (:ims_md_lf_cont_id, :ims_md_id, :role_s, :role_v, :cont_date, :cont_date_l, :cont_date_s)"
+
+ db_dml insert_lfce "
+ insert into ims_md_life_cycle_contrib_entity (ims_md_lf_cont_enti_id, ims_md_lf_cont_id, entity)
+ values (nextval('ims_md_life_cycle_contrib_entity_seq'), :ims_md_lf_cont_id, :entity)"
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../lifecyclemd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Lifecycle Contrib
+template::list::create \
+ -name d_lf_cont \
+ -multirow d_lf_cont \
+ -no_data "[_ lorsm.lt_No_Contributors_Avail]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ role {
+ label "[_ lorsm.Role]"
+ }
+ entity {
+ label "[_ lorsm.Entity_1]"
+ }
+ cont_date {
+ label "[_ lorsm.Contribution_Date]"
+ }
+ cont_date_ls {
+ label "[_ lorsm.Description_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "lifecycle_cont" {ims_md_lf_cont_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record] "}
+ html { align center }
+ }
+ }
+
+db_multirow d_lf_cont select_lf_cont {
+ select
+ lfc.role_v || ' ' || '[' || lfc.role_s || ']' as role,
+ lfce.entity,
+ lfc.cont_date,
+ '[' || lfc.cont_date_l || ']' || ' ' || lfc.cont_date_s as cont_date_ls,
+ lfc.ims_md_lf_cont_id,
+ lfc.ims_md_id
+ from
+ ims_md_life_cycle_contrib lfc,
+ ims_md_life_cycle_contrib_entity lfce
+ where
+ lfc.ims_md_lf_cont_id = lfce.ims_md_lf_cont_id
+ and
+ lfc.ims_md_id = :ims_md_id
+}
+
Index: openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_stat.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_stat.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_stat.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Lifecyle Metadata Status
+
+
+
+ Lifecycle Metadata
+
+
+ Status:
+
+
+
+
+
+
+
+
Add/Edit Lifecycle Metadata Status
+
+
+
Index: openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_stat.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_stat.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_stat.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,93 @@
+# packages/lorsm/www/md/lifecyclemd/lifecycle_stat.tcl
+
+ad_page_contract {
+
+ Add/Edit Lifecycle MD Status
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: lifecycle_stat.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../lifecyclemd" im\\\\\\\s_md_id] "[_ lorsm.Life_Cycle_MD]"] "[_ lorsm.Edit_Status]"]
+set title "[_ lorsm.lt_Edit_Lifecycle_MD_Sta]"
+
+# Form
+
+ad_form -name lifecyclemd_stat \
+ -cancel_url ../lifecyclemd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ {status_v:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Lifecycle_MD__1]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Learning_objects_edit]"}
+ {label "[_ lorsm.Status]"}
+ }
+
+ {status_s:text,nospell,optional
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # Checks whether LC status exist...
+
+ if {[db_0or1row select_lc_version {select ims_md_id from ims_md_life_cycle where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_life_cycle
+ set status_s = :status_s, status_v = :status_v
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_life_cycle (ims_md_id, status_s, status_v)
+ values
+ (:ims_md_id, :status_s, :status_v)"
+
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../lifecyclemd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Lifecycle Status
+template::list::create \
+ -name d_lf_stat \
+ -multirow d_lf_stat \
+ -no_data "[_ lorsm.No_Status_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ status_s {
+ label "[_ lorsm.Source_1]"
+ }
+ status_v {
+ label "[_ lorsm.Value]"
+ }
+ }
+
+db_multirow d_lf_stat select_lf_stat {
+ select status_s,
+ status_v,
+ ims_md_id
+ from
+ ims_md_life_cycle
+ where
+ ims_md_id = :ims_md_id
+}
+
Index: openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_version.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_version.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_version.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Lifecyle Metadata Version
+
+
+
+ Lifecycle Metadata
+
+
+ Version:
+
+
+
+
+
+
+
+
Add/Edit Lifecycle Metadata Version
+
+
+
Index: openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_version.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_version.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/lifecyclemd/lifecycle_version.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,96 @@
+# packages/lorsm/www/md/lifecyclemd/lifecycle_version.tcl
+
+ad_page_contract {
+
+ Add/Edit Lifecycle MD Version
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: lifecycle_version.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../lifecyclemd" im\\\\\\s_md_id] "[_ lorsm.Life_Cycle_MD]"] "[_ lorsm.Edit_Version]"]
+set title "[_ lorsm.lt_Edit_Lifecycle_MD_Ver]"
+
+# Form
+
+ad_form -name lifecyclemd_ver \
+ -cancel_url ../lifecyclemd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+
+ {version_l:text,nospell,optional
+ {section "[_ lorsm.lt_AddEdit_Lifecycle_MD__1]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {version_s:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Edition_of_the_learni]"}
+ {label "[_ lorsm.Version]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+
+ # check if the LC version already exists...
+
+ if {[db_0or1row select_lc_version {select ims_md_id from ims_md_life_cycle where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_life_cycle
+ set version_l = :version_l, version_s = :version_s
+ where ims_md_id = :ims_md_id "
+
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_life_cycle (ims_md_id, version_l, version_s)
+ values
+ (:ims_md_id, :version_l, :version_s)"
+
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../lifecyclemd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Lifecycle Version
+template::list::create \
+ -name d_lf_ver \
+ -multirow d_lf_ver \
+ -no_data "[_ lorsm.lt_No_Structure_Availabl]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ version_l {
+ label "[_ lorsm.Language_1]"
+ }
+ version_s {
+ label "[_ lorsm.Version_1]"
+ }
+ }
+
+db_multirow d_lf_ver select_lf_ver {
+ select version_l,
+ version_s,
+ ims_md_id
+ from
+ ims_md_life_cycle
+ where
+ ims_md_id = :ims_md_id
+}
+
Index: openacs-4/packages/lors-central/www/md/metamd/meta_cata.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/metamd/meta_cata.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/metamd/meta_cata.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+List of Meta Metadata Catalog-Entries
+
+
+
+ Meta Metadata
+
+
+ Catalog-Entries:
+
+
+
+
+
+
+
+
Add/Edit Meta Metadata Catalog-Entry
+
+
+
Index: openacs-4/packages/lors-central/www/md/metamd/meta_cata.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/metamd/meta_cata.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/metamd/meta_cata.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,109 @@
+# packages/lorsm/www/md/metamd/meta_cata.tcl
+
+ad_page_contract {
+
+ Add/Edit Meta MD Catalog-Entry
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: meta_cata.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_md_cata_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_md_cata_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "IMS Metadata Editor"] [list [export_vars -base "../metamd" im\s_md_id] "Meta Metadata"] "Edit Catalog-Entry"]
+ set title "Edit Meta MD Catalog-Entry"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "IMS Metadata Editor"] [list [export_vars -base "../metamd" im\s_md_id] "Meta Metadata"] "Add Catalog-Entry"]
+ set title "Add Meta MD Catalog-Entry"
+}
+
+# Form
+
+ad_form -name metamd_cata \
+ -cancel_url ../metamd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_md_cata_id:key(ims_md_metadata_cata_seq)
+
+ {catalog:text,nospell
+ {section "Add/Edit Meta MD Catalog-Entry"}
+ {html {size 50}}
+ {help_text "Name of the catalog"}
+ {label "Catalog:"}
+ }
+
+ {entry_l:text,nospell,optional
+ {html {size 10}}
+ {help_text "i.e.: 'en_AU' for Australian English"}
+ {label "Language:"}
+ }
+
+ {entry_s:text,nospell
+ {html {size 50}}
+ {help_text "Number in the Catalog i.e.: '1.3.1'"}
+ {label "Entry:"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_metadata_cata where ims_md_md_cata_id = :ims_md_md_cata_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_metadata_cata
+ set catalog = :catalog, entry_l = :entry_l, entry_s = :entry_s
+ where ims_md_md_cata_id = :ims_md_md_cata_id"
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_metadata_cata (ims_md_md_cata_id, ims_md_id, catalog, entry_l, entry_s)
+ values
+ (:ims_md_md_cata_id, :ims_md_id, :catalog, :entry_l, :entry_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../metamd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Metametadata Catalog-entry
+template::list::create \
+ -name d_md_cata \
+ -multirow d_md_cata \
+ -no_data "No Catalog Entry Available" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ catalog {
+ label "Catalog"
+ }
+ entry_ls {
+ label "Language Entry"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "meta_cata" {ims_md_md_cata_id ims_md_id}] }
+ link_html {title "Edit Record "}
+ html { align center }
+ }
+ }
+
+db_multirow d_md_cata select_md_cata {
+ select catalog,
+ '[' || entry_l || ']' || ' ' || entry_s as entry_ls,
+ ims_md_md_cata_id,
+ ims_md_id
+ from
+ ims_md_metadata_cata
+ where
+ ims_md_id = :ims_md_id
+}
+
Index: openacs-4/packages/lors-central/www/md/metamd/meta_cont.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/metamd/meta_cont.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/metamd/meta_cont.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Meta Metadata Contribution
+
+
+
+ Meta Metadata
+
+
+ Contribution:
+
+
+
+
+
+
+
+
Add/Edit Meta Metadata Contributor
+
+
+
Index: openacs-4/packages/lors-central/www/md/metamd/meta_cont.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/metamd/meta_cont.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/metamd/meta_cont.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,166 @@
+# packages/lorsm/www/md/metamd/meta_cont.tcl
+
+ad_page_contract {
+
+ Add/Edit Meta MD Contributor
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: meta_cont.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_md_cont_id:integer,optional
+ ims_md_md_cont_enti_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_md_cont_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../metamd" im\s_\md_id] "[_ lorsm.Meta_Metadata]"] "[_ lorsm.Add_Contributor]"]
+ set title "[_ lorsm.lt_Edit_Meta_MD_Contribu]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../metamd" im\s_\md_id] "[_ lorsm.Meta_Metadata]"] "[_ lorsm.Add_Contributor]"]
+ set title "[_ lorsm.lt_Add_Meta_MD_Contribut]"
+}
+
+# Form
+
+ad_form -name metamd_cont \
+ -cancel_url ../metamd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_md_cont_id:key(ims_md_metadata_contrib_seq)
+
+ {role_s:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Meta_MD_Contr]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {role_v:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.Type_of_contribution]"}
+ {label "[_ lorsm.Role_1]"}
+ }
+
+ {entity:text(textarea),nospell
+ {html {rows 5 cols 50}}
+ {help_text "[_ lorsm.lt_Entity_or_entities_in]"}
+ {label "[_ lorsm.Entity]"}
+ }
+
+ {cont_date:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.Date_of_contribution]"}
+ {label "[_ lorsm.Date]"}
+ }
+
+ {cont_date_l:text,nospell,optional
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi_3]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {cont_date_s:text(textarea),nospell,optional
+ {html {rows 2 cols 50}}
+ {help_text "[_ lorsm.lt_Describes_contributio]"}
+ {label "[_ lorsm.Description]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {
+ select * from
+ ims_md_metadata_contrib mdc,
+ ims_md_metadata_contrib_entity mdce
+ where
+ mdc.ims_md_md_cont_id = :ims_md_md_cont_id
+ and
+ mdc.ims_md_id = :ims_md_id
+ and
+ mdce.ims_md_md_cont_id = :ims_md_md_cont_id
+
+} -edit_data {
+ db_transaction {
+ db_dml update_mdc "
+ update ims_md_metadata_contrib
+ set role_v = :role_v,
+ role_s = :role_s,
+ cont_date = :cont_date,
+ cont_date_l = :cont_date_l,
+ cont_date_s = :cont_date_s
+ where ims_md_md_cont_id = :ims_md_md_cont_id"
+
+ db_dml update_mdce "
+ update ims_md_metadata_contrib_entity
+ set entity = :entity
+ where ims_md_md_cont_id = :ims_md_md_cont_id"
+ }
+
+} -new_data {
+ db_transaction {
+ db_dml insert_mdc "
+ insert into ims_md_metadata_contrib (ims_md_md_cont_id, ims_md_id, role_s, role_v, cont_date, cont_date_l, cont_date_s)
+ values (:ims_md_md_cont_id, :ims_md_id, :role_s, :role_v, :cont_date, :cont_date_l, :cont_date_s)"
+
+ db_dml insert_mdce "
+ insert into ims_md_metadata_contrib_entity (ims_md_md_cont_enti_id, ims_md_md_cont_id, entity)
+ values (nextval('ims_md_metadata_contrib_entity_seq'), :ims_md_md_cont_id, :entity)"
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../metamd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Metametadata Contrib
+template::list::create \
+ -name d_md_cont \
+ -multirow d_md_cont \
+ -no_data "[_ lorsm.lt_No_Contributors_Avail]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ role {
+ label "[_ lorsm.Role]"
+ }
+ entity {
+ label "[_ lorsm.Entity_1]"
+ }
+ cont_date {
+ label "[_ lorsm.Contribution_Date]"
+ }
+ cont_date_ls {
+ label "[_ lorsm.Description_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "meta_cont" {ims_md_md_cont_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record] "}
+ html { align center }
+ }
+ }
+
+db_multirow d_md_cont select_md_cont {
+ select
+ mdc.role_v || ' ' || '[' || mdc.role_s || ']' as role,
+ mdce.entity,
+ mdc.cont_date,
+ '[' || mdc.cont_date_l || ']' || ' ' || mdc.cont_date_s as cont_date_ls,
+ mdc.ims_md_md_cont_id,
+ mdc.ims_md_id
+ from
+ ims_md_metadata_contrib mdc,
+ ims_md_metadata_contrib_entity mdce
+ where
+ mdc.ims_md_md_cont_id = mdce.ims_md_md_cont_id
+ and
+ mdc.ims_md_id = :ims_md_id
+}
+
Index: openacs-4/packages/lors-central/www/md/metamd/meta_lang.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/metamd/meta_lang.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/metamd/meta_lang.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Meta Metadata Language
+
+
+
+ Meta Metadata
+
+
+ Language:
+
+
+
+
+
+
+
+
Add/Edit Meta Metadata Language
+
+
+
Index: openacs-4/packages/lors-central/www/md/metamd/meta_lang.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/metamd/meta_lang.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/metamd/meta_lang.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,81 @@
+# packages/lorsm/www/md/metamd/meta_lang.tcl
+
+ad_page_contract {
+
+ Add/Edit Meta MD Language
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: meta_lang.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../metamd" im\s_\\\md_id] "[_ lorsm.Meta_Metadata]"] "[_ lorsm.Edit_Language]"]
+set title "[_ lorsm.lt_Edit_Meta_MD_Language]"
+
+# Form
+
+ad_form -name metamd_lang \
+ -cancel_url ../metamd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ {language:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Meta_MD_Langu]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the mdmd language details already exist...
+
+ if {[db_0or1row select_lang {select ims_md_id from ims_md_metadata where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_metadata
+ set language = :language
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_metadata (ims_md_id, language)
+ values
+ (:ims_md_id, :language)"
+
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../metamd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Metametadata Language
+template::list::create \
+ -name d_md_lang \
+ -multirow d_md_lang \
+ -no_data "[_ lorsm.lt_No_Language_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ language {
+ label "[_ lorsm.Language_1]"
+ }
+ }
+
+db_multirow d_md_lang select_md_lang {
+ select language,
+ ims_md_id
+ from
+ ims_md_metadata
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/metamd/meta_scheme.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/metamd/meta_scheme.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/metamd/meta_scheme.adp 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Meta Metadata Scheme
+
+
+
+ Meta Metadata
+
+
+ Scheme:
+
+
+
+
+
+
+
+
Add/Edit Meta Metadata Scheme
+
+
+
Index: openacs-4/packages/lors-central/www/md/metamd/meta_scheme.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/metamd/meta_scheme.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/metamd/meta_scheme.tcl 17 May 2005 16:21:25 -0000 1.1
@@ -0,0 +1,93 @@
+# packages/lorsm/www/md/metamd/meta_scheme.tcl
+
+ad_page_contract {
+
+ Add/Edit Meta MD Language
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: meta_scheme.tcl,v 1.1 2005/05/17 16:21:25 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_md_sch_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_md_sch_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../metamd" im\s_\\md_id] "[_ lorsm.Meta_Metadata]"] "[_ lorsm.Edit_Scheme]"]
+ set title "[_ lorsm.Edit_Meta_MD_Scheme]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../metamd" im\s_\\md_id] "[_ lorsm.Meta_Metadata]"] "[_ lorsm.Add_Scheme]"]
+ set title "[_ lorsm.Add_Meta_MD_Scheme]"
+}
+
+# Form
+
+ad_form -name metamd_scheme \
+ -cancel_url ../metamd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_md_sch_id:key(ims_md_metadata_scheme_seq)
+
+ {scheme:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Meta_MD_Schem]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Structure_of_meta-dat]"}
+ {label "[_ lorsm.Scheme]"}
+ }
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+
+} -select_query {select * from ims_md_metadata_scheme where ims_md_md_sch_id = :ims_md_md_sch_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_metadata_scheme
+ set scheme = :scheme
+ where ims_md_md_sch_id = :ims_md_md_sch_id "
+
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_metadata_scheme (ims_md_md_sch_id, ims_md_id, scheme)
+ values
+ (:ims_md_md_sch_id, :ims_md_id, :scheme)"
+
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../metamd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Metametadata metadatascheme
+template::list::create \
+ -name d_md_scheme \
+ -multirow d_md_scheme \
+ -no_data "[_ lorsm.No_Scheme_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ scheme {
+ label "[_ lorsm.Scheme_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "meta_scheme" {ims_md_id ims_md_md_sch_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_md_scheme select_md_scheme {
+ select scheme,
+ ims_md_id, ims_md_md_sch_id, scheme
+ from
+ ims_md_metadata_scheme
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/pbs-md/addmd.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/addmd.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/addmd.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,31 @@
+
+@title;noquote@
+@context;noquote@
+
+MD Schema
+
+
+
+ Metadata Schema
+
+
+
+
+
+
+
+
+
+
Add Metadata Schema
+
+
+
+ Object: @object_type@
+ Add details for the metadata schema and version.
+
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/addmd.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/addmd.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/addmd.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,135 @@
+# packages/lorsm/www/md/addmd.tcl
+
+ad_page_contract {
+
+ Add metadata schema
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 2004-11-13
+ @arch-tag: 28b76527-a05f-42cf-b562-37c7b85e799f
+ @cvs-id $Id: addmd.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# Get object information
+set object_type [acs_object_type $ims_md_id]
+
+# set context & title
+set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] "PBS Metadata"]
+set title "MD Schema"
+
+
+# Form
+ad_form -name add_md \
+ -cancel_url [export_vars -base "." {ims_md_id}] \
+ -mode edit \
+ -form {
+
+ {schema:text,nospell
+ {html {size 20}}
+ {help_text "[_ lorsm.lt_Metadata_schema_ie_IM]"}
+ {label "[_ lorsm.Schema]"}
+ }
+
+ {schemaversion:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Version_of_the_Schema]"}
+ {label "[_ lorsm.Schema_Version]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ db_transaction {
+
+ if {![lors::imsmd::mdExist -ims_md_id $ims_md_id]} {
+
+ db_dml do_insert "
+ insert into ims_md(ims_md_id, schema, schemaversion)
+ values (:ims_md_id, :schema, :schemaversion)"
+
+ } else {
+
+ db_dml do_update {
+ update ims_md set schema = :schema, schemaversion = :schemaversion
+ where ims_md_id = :ims_md_id
+ }
+
+ }
+
+ # If the object_type is on any of the IMS CP object types,
+ # then we update also the ims cp tables accordingly.
+
+ switch $object_type {
+
+ "ims_manifest_object" {
+
+ db_dml upd_manifest "
+ update ims_cp_manifests set hasmetadata = 't'
+ where man_id = :ims_md_id"
+ }
+ "ims_item_object" {
+
+ db_dml upd_item "
+ update ims_cp_items set hasmetadata = 't'
+ where ims_item_id = :ims_md_id"
+ }
+ "ims_organization_object" {
+
+ db_dml upd_organization "
+ update ims_cp_organizations set hasmetadata = 't'
+ where org_id = :ims_md_id"
+ }
+ "ims_resource_object" {
+
+ db_dml upd_resource "
+ update ims_cp_resources set hasmetadata = 't'
+ where res_id = :ims_md_id"
+ }
+ "content_item" {
+
+ db_dml upd_file "
+ update ims_cp_files set hasmetadata = 't'
+ where file_id = :ims_md_id"
+ }
+
+ }
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "." ims_md_id]
+ ad_script_abort
+}
+
+# MD Schema Info
+template::list::create \
+ -name md_schema_info \
+ -multirow md_schema_info \
+ -no_data "[_ lorsm.No_Schema_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ schema {
+ label "[_ lorsm.Schema_1]"
+ html { align center }
+ }
+ schemaversion {
+ label "[_ lorsm.Version_1]"
+ html { align center }
+ }
+ }
+
+ db_multirow md_schema_info select_md_schema {
+ select
+ schema,
+ schemaversion
+ from
+ ims_md
+ where
+ ims_md_id = :ims_md_id
+ }
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/index.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/index.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,27 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+
+
+ #lorsm.You_can# #lorsm.lt_upload_a_XML_LOM_meta# #lorsm.lt_to_addchange_the_meta#
+
+
+
+ #lorsm.lt_Heres_a_link_to_the_a#
+
+
+
+
+
+#lorsm.lt_No_metadata_record_ex#
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/index.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/index.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,25 @@
+ad_page_contract {
+ Displays/Adds IMS Metadata
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 19 January 2004
+ @cvs-id $Id: index.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+
+} {
+ ims_md_id:integer
+}
+
+# set context
+set context [list "PBS Metadata Editor"]
+set title "PBS Metadata Editor"
+set link [export_vars -base "md_upload" ims_md_id]
+
+set hasmetadata [lors::imsmd::mdExist -ims_md_id $ims_md_id]
+set object_type [acs_object_type $ims_md_id]
+
+set write_p [permission::permission_p -party_id [ad_conn user_id] -object_id $ims_md_id -privilege write]
+set read_p [permission::permission_p -party_id [ad_conn user_id] -object_id $ims_md_id -privilege read]
+
+if {$hasmetadata} {
+ ad_returnredirect [export_vars -base "pbs-md" {ims_md_id}]
+}
\ No newline at end of file
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbs-md.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbs-md.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbs-md.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,56 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+ PBS Metadata
+
+
+ Program Title/Episode Title:
+
+
+
+
+ PBS Curriculum Topics:
+
+
+
+
+ PBS Subject Areas:
+
+
+
+
+ #lorsm.Descriptions#
+
+
+
+
+ #lorsm.Keywords#
+
+
+
+
+ URL:
+
+
+
+
+ Grade Range:
+
+
+
+
+ Resource Type
+
+
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbs-md.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbs-md.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbs-md.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,236 @@
+# packages/lors-central/www/md/pbs-md/pbs-md.tcl
+
+ad_page_contract {
+
+ Add/Edit PBS MD Schema
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 2005-04-03
+ @arch-tag: 4eb5b155-a31b-461e-a671-9265963e3257
+ @cvs-id $Id: pbs-md.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+
+# set context & title
+set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] "PBS Metadata"]
+set title "PBS Metadata Editor"
+
+# General Title
+template::list::create \
+ -name d_gen_titles \
+ -multirow d_gen_titles \
+ -no_data "No Title Available" \
+ -actions [list " Add Program Title " [export_vars -base pbsmd_title {ims_md_id}] "Add Program Title"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ title_l {
+ label ""
+ }
+ title_s {
+ label ""
+ }
+ }
+
+db_multirow d_gen_titles select_ge_titles {
+ select title_l,
+ title_s
+ from
+ ims_md_general_title
+ where
+ ims_md_id = :ims_md_id
+} {
+ set item_url [export_vars -base "item" { ims_md_id }]
+}
+
+# General Description
+template::list::create \
+ -name d_gen_desc \
+ -multirow d_gen_desc \
+ -no_data "[_ lorsm.lt_No_Description_Availa]" \
+ -actions [list "[_ lorsm.Add_Description]" [export_vars -base pbsmd_desc {ims_md_id}] "[_ lorsm.lt_Add_another_Descripti]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ descrip_l {
+ label ""
+ }
+ descrip_s {
+ label ""
+ }
+ }
+
+db_multirow d_gen_desc select_ge_desc {
+ select descrip_l,
+ descrip_s
+ from
+ ims_md_general_desc
+ where
+ ims_md_id = :ims_md_id
+}
+
+# General Catalog-entry (PBS SubjectArea)
+template::list::create \
+ -name d_gen_cata_pbs_sa \
+ -multirow d_gen_cata_pbs_sa \
+ -no_data " No PBS Subject Area Available " \
+ -actions [list "Add PBS-Subject Area" [export_vars -base pbsmd_subarea {ims_md_id}] "Add PBS-Subject Area"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ catalog {
+ label ""
+ }
+ entry_l {
+ label ""
+ }
+ entry_s {
+ label ""
+ }
+ }
+
+db_multirow d_gen_cata_pbs_sa select_ge_cata {
+ select
+ catalog,
+ entry_l,
+ entry_s
+ from
+ ims_md_general_cata
+ where
+ catalog = 'PBS-SubjectArea'
+ and
+ ims_md_id = :ims_md_id
+}
+
+# General Catalog-entry (PBS-CurriculumTopic)
+template::list::create \
+ -name d_gen_cata_pbs_ct \
+ -multirow d_gen_cata_pbs_ct \
+ -no_data "[_ lorsm.lt_No_Catalog_Entry_Avai]" \
+ -actions [list "Add PBS-Curriculum Topic" [export_vars -base pbsmd_currtop {ims_md_id}] " Add another PBS-Curriculum Topic "] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ catalog {
+ label ""
+ }
+ entry_l {
+ label ""
+ }
+ entry_s {
+ label ""
+ }
+ }
+
+db_multirow d_gen_cata_pbs_ct select_ge_cata {
+ select
+ catalog,
+ entry_l,
+ entry_s
+ from
+ ims_md_general_cata
+ where
+ catalog = 'PBS-CurriculumTopic'
+ and
+ ims_md_id = :ims_md_id
+}
+
+
+
+# General Keywords
+template::list::create \
+ -name d_gen_key \
+ -multirow d_gen_key \
+ -no_data "[_ lorsm.lt_No_Keywords_Available]" \
+ -actions [list "[_ lorsm.Add_Keywords]" [export_vars -base pbsmd_key {ims_md_id}] "[_ lorsm.Add_another_Keywords]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ keyword_l {
+ label ""
+ }
+ keyword_s {
+ label ""
+ }
+ }
+
+db_multirow d_gen_key select_ge_key {
+ select
+ keyword_l,
+ keyword_s
+ from
+ ims_md_general_key
+ where
+ ims_md_id = :ims_md_id
+}
+
+
+# Technical Location (PBS: URL)
+template::list::create \
+ -name d_te_loca \
+ -multirow d_te_loca \
+ -no_data "No URL Available" \
+ -actions [list "Add URL" [export_vars -base pbsmd_url {ims_md_id}] "Add another URL"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ type {
+ label ""
+ }
+ location {
+ label ""
+ }
+ }
+
+db_multirow d_te_loca select_te_loca {
+ select
+ type,
+ location
+ from
+ ims_md_technical_location
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Educational Context (PBS: Grade Range)
+template::list::create \
+ -name d_ed_cont \
+ -multirow d_ed_cont \
+ -no_data "No Grade Range Available" \
+ -actions [list "Add Grade Range" [export_vars -base pbsmd_grade {ims_md_id}] "Add another Grade Range"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ context {
+ label ""
+ }
+ }
+
+db_multirow d_ed_cont select_ed_cont {
+ select
+ '[' || context_s || '] ' || context_v as context
+ from
+ ims_md_educational_context
+ where
+ ims_md_id = :ims_md_id
+}
+
+# Educational Learning Resource Type (PBS: Resource Type)
+template::list::create \
+ -name d_ed_lrt \
+ -multirow d_ed_lrt \
+ -no_data "No Resource Type Available" \
+ -actions [list "Add Resource Type" [export_vars -base pbsmd_restype {ims_md_id}] "Add another Resource Type"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ lrt {
+ label ""
+ }
+ }
+
+db_multirow d_ed_lrt select_ed_lrt {
+ select
+ '[' || lrt_s || '] ' || lrt_v as lrt
+ from
+ ims_md_educational_lrt
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_currtop.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_currtop.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_currtop.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+List of PBS Curriculm Topics
+
+
+
+ Curriculum Topics
+
+
+ Topics:
+
+
+
+
+
+
+
+
Add/Edit Curriculum Topics
+
+
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_currtop.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_currtop.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_currtop.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,117 @@
+# packages/lorsm/www/md/pbs-md/pbsmd_currtop.tcl
+
+ad_page_contract {
+
+ Add/Edit PBS Curriculum Topic
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: pbsmd_currtop.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_ge_cata_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ge_cata_id]} {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] [list [export_vars -base pbs-md ims_md_id] "PBS Metadata"] "PBS Curriculum Topic "]
+ set title "Edit PBS Curriculum Topic"
+} else {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] [list [export_vars -base pbs-md ims_md_id] "PBS Metadata"] "PBS Curriculum Topic"]
+ set title "Add PBS Curriculum Topic"
+}
+
+# Form
+
+ad_form -name generalmd_cata \
+ -cancel_url pbs-md?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ge_cata_id:key(ims_md_general_cata_seq)
+
+ {catalogx:text,nospell,optional
+ {section "Add/Edit PBS Curriculum Topics"}
+ {html {size 50 value {PBS-CurriculumTopics} disabled {}}}
+ {label "Catalog Schema:"}
+ }
+
+ {entry_l:text,nospell,optional
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {entry_s:text,nospell
+ {html {size 50}}
+ {help_text "[_ lorsm.lt_Number_in_the_Catalog]"}
+ {label "[_ lorsm.Entry]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+ {catalog:text(hidden) {value {PBS-CurriculumTopic}}
+ }
+
+} -select_query {select * from ims_md_general_cata where catalog = 'PBS-CurriculumTopic' and ims_md_ge_cata_id = :ims_md_ge_cata_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_general_cata
+ set catalog = :catalog, entry_l = :entry_l, entry_s = :entry_s
+ where ims_md_ge_cata_id = :ims_md_ge_cata_id"
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_general_cata (ims_md_ge_cata_id, ims_md_id, catalog, entry_l, entry_s)
+ values
+ (:ims_md_ge_cata_id, :ims_md_id, :catalog, :entry_l, :entry_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "pbs-md" {ims_md_id}]
+ ad_script_abort
+}
+
+# General Catalog-entry
+template::list::create \
+ -name d_gen_cata \
+ -multirow d_gen_cata \
+ -no_data "No PBS Curriculum Topics Available" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ catalog {
+ label "[_ lorsm.Catalog_1]"
+ }
+ entry_l {
+ label "[_ lorsm.Language_1]"
+ }
+ entry_s {
+ label "[_ lorsm.Entry_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "pbsmd_currtop" {ims_md_ge_cata_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_gen_cata select_ge_cata {
+ select catalog,
+ entry_l,
+ entry_s,
+ ims_md_ge_cata_id,
+ ims_md_id
+ from
+ ims_md_general_cata
+ where
+ catalog = 'PBS-CurriculumTopic'
+ and
+ ims_md_id = :ims_md_id
+}
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_desc.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_desc.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_desc.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+List of PBS Descriptions
+
+
+
+ General Descriptions
+
+
+ Descriptions:
+
+
+
+
+
+
+
+
Add/Edit Description
+
+
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_desc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_desc.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_desc.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,101 @@
+# packages/lorsm/www/md/pbs-md/pbsmd_desc.tcl
+
+ad_page_contract {
+
+ Add/Edit PBS Schema Description
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: pbsmd_desc.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_ge_desc_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ge_desc_id]} {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] [list [export_vars -base "pbs-md" ims_md_id] "PBS Metadata"] "Edit Description"]
+ set title "Edit Description"
+} else {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] [list [export_vars -base "pbs-md" ims_md_id] "PBS Metadata"] "Add Description"]
+ set title "Add Description"
+}
+
+# Form
+
+ad_form -name generalmd_desc \
+ -cancel_url pbs-md?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ge_desc_id:key(ims_md_general_desc_seq)
+
+ {descrip_l:text,nospell,optional
+ {section "Add/Edit Description"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {descrip_s:text(textarea),nospell
+ {html {rows 5 cols 50}}
+ {help_text "[_ lorsm.lt_Describes_learning_ob]"}
+ {label "[_ lorsm.Description]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_general_desc where ims_md_ge_desc_id = :ims_md_ge_desc_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_general_desc
+ set descrip_l = :descrip_l, descrip_s = :descrip_s
+ where ims_md_ge_desc_id = :ims_md_ge_desc_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_general_desc (ims_md_ge_desc_id, ims_md_id, descrip_l, descrip_s)
+ values
+ (:ims_md_ge_desc_id, :ims_md_id, :descrip_l, :descrip_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "pbs-md" {ims_md_id}]
+ ad_script_abort
+}
+
+# General Language
+template::list::create \
+ -name d_gen_desc \
+ -multirow d_gen_desc \
+ -no_data "No Description Available" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ descrip_l {
+ label "[_ lorsm.Language_1]"
+ }
+ descrip_s {
+ label "[_ lorsm.Description_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "pbsmd_desc" {ims_md_ge_desc_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record] "}
+ html { align center }
+ }
+ }
+
+db_multirow d_gen_desc select_ge_desc {
+ select descrip_l,
+ descrip_s,
+ ims_md_ge_desc_id,
+ ims_md_id
+ from
+ ims_md_general_desc
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_grade.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_grade.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_grade.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,30 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Grade Ranges
+
+
+
+ Grade Ranges
+
+
+ Grade Range:
+
+
+
+
+
+
+
+
Add/Edit Grade Range
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_grade.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_grade.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_grade.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,98 @@
+# packages/lors-central/www/md/pbs-md/pbsmd_grade.tcl
+
+ad_page_contract {
+
+ Add/Edit PBS Grade Range MD
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 2005-04-03
+ @arch-tag: 6d6ac4ab-a0d4-4610-9175-335981940c33
+ @cvs-id $Id: pbsmd_grade.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+} {
+ ims_md_id:integer
+ ims_md_ed_co_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ed_co_id]} {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] [list [export_vars -base "pbs-md" im\s_md_id] "PBS Metadata"] "Edit Grade Range"]
+ set title "Edit Grade Range"
+} else {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] [list [export_vars -base "pbs-md" ims_md_id] "PBS Metadata"] "Add Grade Range"]
+ set title "Add Grade Range"
+}
+
+# Form
+
+ad_form -name educationalmd_cont \
+ -cancel_url pbs-md?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ed_co_id:key(ims_md_educational_context_seq)
+
+ {context_s:text,nospell
+ {section "Add/Edit Grade Range"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {context_v:text,nospell
+ {html {size 20}}
+ {help_text "[_ lorsm.lt_Learning_environment_]"}
+ {label "[_ lorsm.Context]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_educational_context where ims_md_ed_co_id = :ims_md_ed_co_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_educational_context
+ set context_s = :context_s,
+ context_v = :context_v
+ where ims_md_ed_co_id = :ims_md_ed_co_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_educational_context (ims_md_ed_co_id, ims_md_id, context_s, context_v)
+ values (:ims_md_ed_co_id, :ims_md_id, :context_s, :context_v)"
+} -after_submit {
+ ad_returnredirect [export_vars -base "pbs-md" {ims_md_id}]
+ ad_script_abort
+}
+
+# Educational Context
+template::list::create \
+ -name d_ed_cont \
+ -multirow d_ed_cont \
+ -no_data "[_ lorsm.No_Context_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ context {
+ label "[_ lorsm.Context_1]"
+ }
+ export {
+ display_eval {\[[_ lorsm.Edit_1]\]}
+ link_url_eval { [export_vars -base "pbsmd_grade" {ims_md_ed_co_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_ed_cont select_ed_cont {
+ select
+ '[' || context_s || '] ' || context_v as context,
+ ims_md_ed_co_id,
+ ims_md_id
+ from
+ ims_md_educational_context
+ where
+ ims_md_id = :ims_md_id
+}
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_key.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_key.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_key.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+List of PBS Keywords
+
+
+
+ PBS Keywords
+
+
+ Keywords:
+
+
+
+
+
+
+
+
Add/Edit Keyword
+
+
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_key.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_key.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_key.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,102 @@
+# packages/lorsm/www/md/pbs-md/pbsmd_key.tcl
+
+ad_page_contract {
+
+ Add/Edit
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: pbsmd_key.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_ge_key_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ge_key_id]} {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] [list [export_vars -base "pbs-md" ims_md_id] "PBS Metadata"] "Edit Keywords"]
+ set title "Edit Keywords"
+} else {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor" ] [list [export_vars -base "pbs-md" ims_md_id] "PBS Metadata"] "Add Keywords"]
+ set title "Add Keywords"
+}
+
+# Form
+
+ad_form -name generalmd_key \
+ -cancel_url pbs-md?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ge_key_id:key(ims_md_general_key_seq)
+
+ {keyword_l:text,nospell,optional
+ {section "Add/Edit Keywords"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {keyword_s:text,nospell
+ {html {size 50}}
+ {help_text "[_ lorsm.lt_Keyword_description_o]"}
+ {label "[_ lorsm.Keyword]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_general_key where ims_md_ge_key_id = :ims_md_ge_key_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_general_key
+ set keyword_l = :keyword_l, keyword_s = :keyword_s
+ where ims_md_ge_key_id = :ims_md_ge_key_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_general_key (ims_md_ge_key_id, ims_md_id, keyword_l, keyword_s)
+ values
+ (:ims_md_ge_key_id, :ims_md_id, :keyword_l, :keyword_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "pbs-md" {ims_md_id}]
+ ad_script_abort
+}
+
+# General Keyword
+template::list::create \
+ -name d_gen_key \
+ -multirow d_gen_key \
+ -no_data "No Keywords Available" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ keyword_l {
+ label ""
+ }
+ keyword_s {
+ label ""
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "pbsmd_key" {ims_md_ge_key_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_gen_key select_ge_key {
+ select keyword_l,
+ keyword_s,
+ ims_md_ge_key_id,
+ ims_md_id
+ from
+ ims_md_general_key
+ where
+ ims_md_id = :ims_md_id
+}
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_restype.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_restype.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_restype.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,30 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Learning Resource Type
+
+
+
+ Resource Types
+
+
+ Learning Resource Type:
+
+
+
+
+
+
+
+
Add/Edit Resource Type
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_restype.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_restype.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_restype.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,97 @@
+# packages/lors-central/www/md/pbs-md/pbsmd_restype.tcl
+
+ad_page_contract {
+
+ Add/Edit PBS Resource Type MD
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 2005-04-03
+ @arch-tag: b18e4129-8f95-4a73-b6ec-50f67c96ee3c
+ @cvs-id $Id: pbsmd_restype.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+} {
+ ims_md_id:integer
+ ims_md_ed_lr_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ed_lr_id]} {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] [list [export_vars -base "pbs-md" ims_md_id] "PBS Metadata"] "Add PBS Resource Type"]
+ set title "Edit PBS Resource Type"
+} else {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor "] [list [export_vars -base "pbs-md" ims_md_id] "PBS Metadata"] "Add PBS Resource Type"]
+ set title "Add PBS Resource Type"
+}
+
+# Form
+
+ad_form -name educationalmd_lrt \
+ -cancel_url pbs-md?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ed_lr_id:key(ims_md_educational_lrt_seq)
+
+ {lrt_s:text,nospell
+ {section "Add/Edit PBS Resource Type"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {lrt_v:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Type_of_interactivity]"}
+ {label "[_ lorsm.lt_Learning_Resource_Typ]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_educational_lrt where ims_md_ed_lr_id = :ims_md_ed_lr_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_educational_lrt
+ set lrt_s = :lrt_s,
+ lrt_v = :lrt_v
+ where ims_md_ed_lr_id = :ims_md_ed_lr_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_educational_lrt (ims_md_ed_lr_id, ims_md_id, lrt_s, lrt_v)
+ values (:ims_md_ed_lr_id, :ims_md_id, :lrt_s, :lrt_v)"
+} -after_submit {
+ ad_returnredirect [export_vars -base "pbs-md" {ims_md_id}]
+ ad_script_abort
+}
+
+# Educational Learning Resource Type
+template::list::create \
+ -name d_ed_lrt \
+ -multirow d_ed_lrt \
+ -no_data "[_ lorsm.lt_No_Learning_Resource_]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ lrt {
+ label ""
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "pbsmd_restype" {ims_md_ed_lr_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_ed_lrt select_ed_lrt {
+ select
+ '[' || lrt_s || '] ' || lrt_v as lrt,
+ ims_md_ed_lr_id,
+ ims_md_id
+ from
+ ims_md_educational_lrt
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_subarea.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_subarea.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_subarea.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,30 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+
+List of PBS Curriculm Topics
+
+
+
+ Subject Areas
+
+
+ Topics:
+
+
+
+
+
+
+
+
Add/Edit Subject Areas
+
+
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_subarea.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_subarea.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_subarea.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,111 @@
+# packages/lorsm/www/md/pbs-md/pbsmd_subarea.tcl
+
+ad_page_contract {
+
+ Add/Edit PBS Subject Area
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: pbsmd_subarea.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_ge_cata_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ge_cata_id]} {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] [list [export_vars -base pbs-md ims_md_id] "PBS Metadata"] "PBS Subject Area "]
+ set title "Edit PBS Subject Area"
+} else {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] [list [export_vars -base pbs-md ims_md_id] "PBS Metadata"] "PBS Subject Area"]
+ set title "Add PBS Subject Area"
+}
+
+# Form
+
+ad_form -name generalmd_cata \
+ -cancel_url pbs-md?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_ge_cata_id:key(ims_md_general_cata_seq)
+
+ {entry_l:text,nospell,optional
+ {section "Add/Edit PBS Subject Areas"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {entry_s:text,nospell
+ {html {size 50}}
+ {help_text "[_ lorsm.lt_Number_in_the_Catalog]"}
+ {label "[_ lorsm.Entry]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+ {catalog:text(hidden) {value {PBS-SubjectArea}}
+ }
+
+} -select_query {select * from ims_md_general_cata where catalog = 'PBS-SubjectArea' and ims_md_ge_cata_id = :ims_md_ge_cata_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_general_cata
+ set catalog = :catalog, entry_l = :entry_l, entry_s = :entry_s
+ where ims_md_ge_cata_id = :ims_md_ge_cata_id"
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_general_cata (ims_md_ge_cata_id, ims_md_id, catalog, entry_l, entry_s)
+ values
+ (:ims_md_ge_cata_id, :ims_md_id, :catalog, :entry_l, :entry_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "pbs-md" {ims_md_id}]
+ ad_script_abort
+}
+
+# General Catalog-entry
+template::list::create \
+ -name d_gen_cata \
+ -multirow d_gen_cata \
+ -no_data "No PBS Subject Areas Available" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ catalog {
+ label "[_ lorsm.Catalog_1]"
+ }
+ entry_l {
+ label "[_ lorsm.Language_1]"
+ }
+ entry_s {
+ label "[_ lorsm.Entry_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "pbsmd_subarea" {ims_md_ge_cata_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_gen_cata select_ge_cata {
+ select catalog,
+ entry_l,
+ entry_s,
+ ims_md_ge_cata_id,
+ ims_md_id
+ from
+ ims_md_general_cata
+ where
+ catalog = 'PBS-SubjectArea'
+ and
+ ims_md_id = :ims_md_id
+}
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_title.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_title.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_title.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+List of General Metadata Titles
+
+
+
+ General Metadata
+
+
+ Titles:
+
+
+
+
+
+
+
+
Add/Edit General Metadata Title
+
+
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_title.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_title.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_title.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,104 @@
+# packages/lorsm/www/md/generalmd/general_title.tcl
+
+ad_page_contract {
+
+ Add/Edit General MD Title
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 2004-05-03
+ @arch-tag 1956d02e-511a-470c-81d0-c2857242651c
+ @cvs-id $Id: pbsmd_title.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+} {
+ ims_md_id:integer
+ ims_md_ge_ti_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_ge_ti_id]} {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] [list [export_vars -base "pbs-md" ims_md_id] "PBS Metadata"] "Edit Titles"]
+ set title "Add PBS Title"
+} else {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] [list [export_vars -base "pbs-md" ims_md_id] "PBS Metadata"] "Add Titles"]
+ set title "Add PBS Title"
+}
+
+# Form
+
+ad_form -name generalmd_title \
+ -cancel_url [export_vars -base "pbs-md" ims_md_id] \
+ -mode edit \
+ -form {
+
+ ims_md_ge_ti_id:key(ims_md_general_title_seq)
+
+ {title_l:text,nospell,optional
+ {section "[_ lorsm.lt_AddEdit_General_MD_Ti]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {title_s:text,nospell
+ {html {size 50}}
+ {help_text "[_ lorsm.lt_Learning_objects_name]"}
+ {label "[_ lorsm.Title]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_general_title where ims_md_ge_ti_id = :ims_md_ge_ti_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_general_title
+ set title_l = :title_l, title_s = :title_s
+ where ims_md_ge_ti_id = :ims_md_ge_ti_id "
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_general_title (ims_md_ge_ti_id, ims_md_id, title_l, title_s)
+ values
+ (:ims_md_ge_ti_id, :ims_md_id, :title_l, :title_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "pbs-md" {ims_md_id}]
+ ad_script_abort
+}
+
+# General Title
+template::list::create \
+ -name d_gen_titles \
+ -multirow d_gen_titles \
+ -no_data "[_ lorsm.No_Titles_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ title_l {
+ label "[_ lorsm.Language_1]"
+ }
+ title_s {
+ label "[_ lorsm.Titles_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "pbsmd_title" {ims_md_ge_ti_id ims_md_id}] }
+ link_html {title "Edit Record "}
+ html { align center }
+ }
+ }
+
+db_multirow d_gen_titles select_ge_titles {
+ select title_l,
+ title_s,
+ ims_md_ge_ti_id,
+ ims_md_id
+ from
+ ims_md_general_title
+ where
+ ims_md_id = :ims_md_id
+} {
+ set item_url [export_vars -base "item" { ims_md_id }]
+}
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_url.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_url.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_url.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+List of URLs
+
+
+
+ URL
+
+
+ URLs:
+
+
+
+
+
+
+
+
Add/Edit URLs
+
+
+
Index: openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_url.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_url.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/pbs-md/pbsmd_url.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,104 @@
+# packages/lorsm/www/md/pbs-md/pbsmd_url.tcl
+
+ad_page_contract {
+
+ Add/Edit PBS URL
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: pbsmd_url.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_te_lo_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_te_lo_id]} {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] [list [export_vars -base "../technicalmd" ims_md_id] "PBS Metadata"] "Edit URL"]
+ set title "Edit URL"
+} else {
+ set context [list [list [export_vars -base "." ims_md_id] "PBS Metadata Editor"] [list [export_vars -base "../technicalmd" ims_md_id] "PBS Metadata"] "Add URL"]
+ set title "Add URL"
+}
+
+# Form
+
+ad_form -name technicalmd_loca \
+ -cancel_url pbs-md?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_te_lo_id:key(ims_md_technical_location_seq)
+
+ {type:text,nospell,optional
+ {section "Add/Edit URL"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Reference_to_location]"}
+ {label "[_ lorsm.Type_1]"}
+ }
+
+ {location:text,nospell
+ {html {size 50}}
+ {help_text "[_ lorsm.lt_Location_of_the_resou]"}
+ {label "[_ lorsm.Location_1]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+
+} -select_query {select * from ims_md_technical_location where ims_md_te_lo_id = :ims_md_te_lo_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_technical_location
+ set type = :type,
+ location = :location
+ where ims_md_te_lo_id = :ims_md_te_lo_id "
+
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_technical_location (ims_md_te_lo_id, ims_md_id, type, location)
+ values
+ (:ims_md_te_lo_id, :ims_md_id, :type, :location)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "pbs-md" {ims_md_id}]
+ ad_script_abort
+}
+
+# Technical Location
+template::list::create \
+ -name d_te_loca \
+ -multirow d_te_loca \
+ -no_data "No URL Available" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ type {
+ label "[_ lorsm.Type]"
+ }
+ location {
+ label "[_ lorsm.Location]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "pbsmd_url" {ims_md_te_lo_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_te_loca select_te_loca {
+ select type,
+ location,
+ ims_md_te_lo_id,
+ ims_md_id
+ from
+ ims_md_technical_location
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/relationmd/relation.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/relationmd/relation.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/relationmd/relation.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,31 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+ Relation Metadata
+
+
+ Kind:
+
+
+
+ Relation Metadata Resource
+
+
+ Identifier:
+
+
+
+ Description:
+
+
+
+ Catalog-Entries:
+
+
+
Index: openacs-4/packages/lors-central/www/md/relationmd/relation.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/relationmd/relation.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/relationmd/relation.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,118 @@
+ad_page_contract {
+ Displays/Adds IMS Metadata Relation
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: relation.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+
+} {
+ ims_md_re_id:integer
+ ims_md_id:integer
+ ims_md_re_re_id:integer
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../relationmd" ims_md_id] "[_ lorsm.Relation_MD]"] "[_ lorsm.Relation_Entry]"]
+set title "[_ lorsm.Relation_MD]"
+
+# Relation Kind
+template::list::create \
+ -name d_re_kind \
+ -multirow d_re_kind \
+ -no_data "[_ lorsm.No_Kind_Available]" \
+ -actions [list "[_ lorsm.Add_Kind]" [export_vars -base relation_kind {ims_md_re_re_id ims_md_re_id ims_md_id}] "[_ lorsm.Add_another_Kind]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ kind_s {
+ label ""
+ }
+ kind_v {
+ label ""
+ }
+ }
+
+db_multirow d_re_kind select_re_kind {
+ select kind_s,
+ kind_v
+ from
+ ims_md_relation
+ where
+ ims_md_re_id = :ims_md_re_id
+ and ims_md_id = :ims_md_id
+}
+
+# Relation Resource Identifier
+template::list::create \
+ -name d_re_ident \
+ -multirow d_re_ident \
+ -actions [list "[_ lorsm.Add_Identifier]" [export_vars -base relation_ident {ims_md_re_re_id ims_md_re_id ims_md_id}] "[_ lorsm.lt_Add_another_Identifie]"] \
+ -no_data "[_ lorsm.lt_No_Resource_Identifie]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ identifier {
+ label ""
+ }
+ }
+
+db_multirow d_re_ident select_re_ident {
+ select identifier
+ from
+ ims_md_relation_resource
+ where
+ ims_md_re_id = :ims_md_re_id
+ and ims_md_re_re_id = :ims_md_re_re_id
+}
+
+# Relation Resource Catalog-Entry
+template::list::create \
+ -name d_re_cata \
+ -multirow d_re_cata \
+ -no_data "[_ lorsm.lt_No_Catalog-Entries_Av]" \
+ -actions [list "[_ lorsm.Add_Catalog-Entry]" [export_vars -base relation_cata {ims_md_re_re_id ims_md_re_id ims_md_id}] "[_ lorsm.lt_Add_another_Catalog-E]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ catalog {
+ label ""
+ }
+ entry_l {
+ label ""
+ }
+ entry_s {
+ label ""
+ }
+ }
+
+db_multirow d_re_cata select_re_cata {
+ select catalog,
+ entry_l,
+ entry_s
+ from
+ ims_md_relation_resource_catalog
+ where
+ ims_md_re_re_id = :ims_md_re_re_id
+}
+
+# Relation Resource Description
+template::list::create \
+ -name d_re_desc \
+ -multirow d_re_desc \
+ -no_data "[_ lorsm.lt_No_Resource_Descripti]" \
+ -actions [list "[_ lorsm.Add_Description]" [export_vars -base relation_desc {ims_md_re_re_id ims_md_re_id ims_md_id}] "[_ lorsm.lt_Add_another_Descripti]"] \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ descrip {
+ label ""
+ }
+ }
+
+db_multirow d_re_desc select_re_desc {
+ select '[' || descrip_l || ']' || ' ' || descrip_s as descrip
+ from
+ ims_md_relation_resource
+ where
+ ims_md_re_id = :ims_md_re_id
+ and ims_md_re_re_id = :ims_md_re_re_id
+}
+
+
Index: openacs-4/packages/lors-central/www/md/relationmd/relation_add.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/relationmd/relation_add.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/relationmd/relation_add.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,22 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+Relation Metadata Entry
+
+
+
+ Relation Metadata
+
+
+ Add another Relation Metadata Entry?
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/md/relationmd/relation_add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/relationmd/relation_add.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/relationmd/relation_add.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,48 @@
+# packages/lorsm/www/md/relationmd/relation_add.tcl
+
+ad_page_contract {
+
+ Add/Edit Relation MD Entry
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: relation_add.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../relationmd" ims_md_id] "[_ lorsm.Relation_MD]"] "[_ lorsm.Add_Relation_Entry]"]
+set title "[_ lorsm.lt_Add_Relation_MD_Entry]"
+
+# Form
+ad_form -name relationmd_add \
+ -cancel_url ../relationmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_re_id:key(ims_md_relation_seq)
+
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -new_data {
+ db_transaction {
+ db_dml do_insert_relation "
+ insert into ims_md_relation (ims_md_re_id, ims_md_id)
+ values (:ims_md_re_id, :ims_md_id)"
+
+ db_dml do_insert_resource "
+ insert into ims_md_relation_resource (ims_md_re_re_id, ims_md_re_id)
+ values (nextval('ims_md_relation_resource_seq'), :ims_md_re_id)"
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../relationmd" {ims_md_id}]
+ ad_script_abort
+}
+
Index: openacs-4/packages/lors-central/www/md/relationmd/relation_cata.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/relationmd/relation_cata.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/relationmd/relation_cata.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Relation Metadata Resource Catalog-Entry
+
+
+
+ Relation Metadata Resource
+
+
+ Catalog-Entries:
+
+
+
+
+
+
+
+
Add/Edit Relation Metadata Resource Catalog-Entry
+
+
+
Index: openacs-4/packages/lors-central/www/md/relationmd/relation_cata.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/relationmd/relation_cata.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/relationmd/relation_cata.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,129 @@
+# packages/lorsm/www/md/relationmd/relation_cata.tcl
+
+ad_page_contract {
+
+ Add/Edit Relation MD Resource Catalog-Entry
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: relation_cata.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_re_id:integer
+ ims_md_re_re_id:integer
+ ims_md_re_re_ca_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_re_re_ca_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../relationmd" ims_md_id] "[_ lorsm.Relation_MD]"] [list [export_vars -base "relation" {ims_md_id ims_md_re_id ims_md_re_re_id}] "[_ lorsm.Relation_Entry]"] "[_ lorsm.Edit_Catalog-Entry]"]
+ set title "[_ lorsm.lt_Edit_Relation_MD_Reso]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../relationmd" ims_md_id] "[_ lorsm.Relation_MD]"] [list [export_vars -base "relation" {ims_md_id ims_md_re_id ims_md_re_re_id}] "[_ lorsm.Relation_Entry]"] "[_ lorsm.Add_Catalog-Entry]"]
+ set title "[_ lorsm.lt_Add_Relation_MD_Resou]"
+}
+
+# Form
+
+ad_form -name relationmd_cata \
+ -cancel_url relation?ims_md_id=$ims_md_id&ims_md_re_id=$ims_md_re_id&ims_md_re_re_id=$ims_md_re_re_id \
+ -mode edit \
+ -form {
+
+ ims_md_re_re_ca_id:key(ims_md_relation_resource_catalog_seq)
+
+ {catalog:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Relation_MD_R]"}
+ {html {size 50}}
+ {help_text "[_ lorsm.Name_of_the_catalog]"}
+ {label "[_ lorsm.Catalog]"}
+ }
+
+ {entry_l:text,nospell,optional
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {entry_s:text,nospell
+ {html {size 50}}
+ {help_text "[_ lorsm.lt_Number_in_the_Catalog]"}
+ {label "[_ lorsm.Entry]"}
+ }
+
+ {ims_md_re_re_id:text(hidden) {value $ims_md_re_re_id}
+ }
+
+ {ims_md_re_id:text(hidden) {value $ims_md_re_id}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {select * from ims_md_relation_resource_catalog where ims_md_re_re_ca_id = :ims_md_re_re_ca_id and ims_md_re_re_id = :ims_md_re_re_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_relation_resource_catalog
+ set catalog = :catalog,
+ entry_l = :entry_l,
+ entry_s = :entry_s
+ where ims_md_re_re_ca_id = :ims_md_re_re_ca_id"
+
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_relation_resource_catalog (ims_md_re_re_ca_id, ims_md_re_re_id, catalog, entry_l, entry_s)
+ values
+ (:ims_md_re_re_ca_id, :ims_md_re_re_id, :catalog, :entry_l, :entry_s)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "relation" {ims_md_re_id ims_md_re_re_id ims_md_id}]
+ ad_script_abort
+}
+
+# Relation Catalog-Entry
+template::list::create \
+ -name d_re_cata \
+ -multirow d_re_cata \
+ -no_data "[_ lorsm.lt_No_Catalog-Entries_Av]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ catalog {
+ label ""
+ }
+ entry_l {
+ label ""
+ }
+ entry_s {
+ label ""
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "relation_cata" {ims_md_re_re_ca_id ims_md_re_re_id ims_md_re_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_re_cata select_re_cata {
+ select
+ reca.catalog,
+ reca.entry_l,
+ reca.entry_s,
+ reca.ims_md_re_re_ca_id,
+ reca.ims_md_re_re_id,
+ re.ims_md_id,
+ re.ims_md_re_id
+ from
+ ims_md_relation_resource_catalog reca,
+ ims_md_relation re
+ where
+ reca.ims_md_re_re_id = :ims_md_re_re_id
+ and
+ re.ims_md_re_id = :ims_md_re_id
+}
Index: openacs-4/packages/lors-central/www/md/relationmd/relation_desc.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/relationmd/relation_desc.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/relationmd/relation_desc.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Relation Metadata Resource Description
+
+
+
+ Relation Metadata Resource
+
+
+ Description:
+
+
+
+
+
+
+
+
Add/Edit Relation Metadata Resource Description
+
+
+
Index: openacs-4/packages/lors-central/www/md/relationmd/relation_desc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/relationmd/relation_desc.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/relationmd/relation_desc.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,90 @@
+# packages/lorsm/www/md/annotationmd/relation_desc.tcl
+
+ad_page_contract {
+
+ Add/Edit Relation MD Resource Description
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: relation_desc.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_re_id:integer
+ ims_md_re_re_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../relationmd" ims_md_id] "[_ lorsm.Relation_MD]"] [list [export_vars -base "relation" {ims_md_id ims_md_re_id ims_md_re_re_id}] "[_ lorsm.Relation_Entry]"] "[_ lorsm.AddEdit_Description]"]
+set title "[_ lorsm.lt_Edit_Relation_MD_Reso_1]"
+
+# Form
+
+ad_form -name relationmd_desc \
+ -cancel_url relation?ims_md_id=$ims_md_id&ims_md_re_id=$ims_md_re_id&ims_md_re_re_id=$ims_md_re_re_id \
+ -mode edit \
+ -form {
+
+ ims_md_re_re_id:key(ims_md_relation_resource_seq)
+
+ {descrip_l:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Relation_MD_R_1]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {descrip_s:text(textarea),nospell
+ {html {rows 2 cols 50}}
+ {help_text "[_ lorsm.lt_Description_of_the_ot]"}
+ {label "[_ lorsm.Description]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+ {ims_md_re_id:text(hidden) {value $ims_md_re_id}
+ }
+
+} -select_query {select * from ims_md_relation_resource where ims_md_re_re_id = :ims_md_re_re_id and ims_md_re_id = :ims_md_re_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_relation_resource
+ set descrip_l = :descrip_l,
+ descrip_s = :descrip_s
+ where ims_md_re_re_id = :ims_md_re_re_id "
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "relation" {ims_md_re_re_id ims_md_re_id ims_md_id}]
+ ad_script_abort
+}
+
+# Relation Description
+template::list::create \
+ -name d_re_desc \
+ -multirow d_re_desc \
+ -no_data "[_ lorsm.lt_No_Resource_Descripti]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ descrip {
+ label "[_ lorsm.Description_1]"
+ }
+ }
+
+db_multirow d_re_desc select_re_desc {
+ select '[' || rere.descrip_l || ']' || ' ' || rere.descrip_s as descrip,
+ rere.ims_md_re_re_id,
+ re.ims_md_re_id,
+ re.ims_md_id
+ from
+ ims_md_relation_resource rere,
+ ims_md_relation re
+ where
+ rere.ims_md_re_id = :ims_md_re_id
+ and re.ims_md_re_id = :ims_md_re_id
+}
Index: openacs-4/packages/lors-central/www/md/relationmd/relation_ident.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/relationmd/relation_ident.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/relationmd/relation_ident.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Relation Metadata Resource Identifier
+
+
+
+ Relation Metadata Resource
+
+
+ Identifier:
+
+
+
+
+
+
+
+
Add/Edit Relation Metadata Resource Identifier
+
+
+
Index: openacs-4/packages/lors-central/www/md/relationmd/relation_ident.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/relationmd/relation_ident.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/relationmd/relation_ident.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,84 @@
+# packages/lorsm/www/md/relationmd/relation_ident.tcl
+
+ad_page_contract {
+
+ Add/Edit Relation MD Resource Identifier
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: relation_ident.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_re_id:integer
+ ims_md_re_re_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../relationmd" ims_md_id] "[_ lorsm.Relation_MD]"] [list [export_vars -base "relation" {ims_md_id ims_md_re_id ims_md_re_re_id}] "[_ lorsm.Relation_Entry]"] "[_ lorsm.lt_AddEdit_Resource_Iden]"]
+set title "[_ lorsm.lt_Edit_Relation_MD_Reso_2]"
+
+
+# Form
+
+ad_form -name relationmd_ident \
+ -cancel_url relation?ims_md_id=$ims_md_id&ims_md_re_id=$ims_md_re_id&ims_md_re_re_id=$ims_md_re_re_id \
+ -mode edit \
+ -form {
+
+ ims_md_re_re_id:key(ims_md_relation_resource_seq)
+
+ {identifier:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Relation_MD_R_2]"}
+ {html {size 50}}
+ {help_text "[_ lorsm.lt_Unique_identifier_of_]"}
+ {label "[_ lorsm.Identifier]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+ {ims_md_re_id:text(hidden) {value $ims_md_re_id}
+ }
+
+} -select_query {select * from ims_md_relation_resource where ims_md_re_re_id = :ims_md_re_re_id and ims_md_re_id = :ims_md_re_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_relation_resource
+ set identifier = :identifier
+ where ims_md_re_re_id = :ims_md_re_re_id "
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "relation" {ims_md_re_re_id ims_md_re_id ims_md_id}]
+ ad_script_abort
+}
+
+# Relation Identifier
+template::list::create \
+ -name d_re_ident \
+ -multirow d_re_ident \
+ -no_data "[_ lorsm.lt_No_Resource_Identifie]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ identifier {
+ label "[_ lorsm.Identifier_1]"
+ }
+ }
+
+db_multirow d_re_ident select_re_ident {
+ select rere.identifier,
+ rere.ims_md_re_re_id,
+ re.ims_md_re_id,
+ re.ims_md_id
+ from
+ ims_md_relation_resource rere,
+ ims_md_relation re
+ where
+ rere.ims_md_re_id = :ims_md_re_id
+ and re.ims_md_re_id = :ims_md_re_id
+}
Index: openacs-4/packages/lors-central/www/md/relationmd/relation_kind.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/relationmd/relation_kind.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/relationmd/relation_kind.adp 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Relation Metadata Kind
+
+
+
+ Relation Metadata Kind
+
+
+ Kind:
+
+
+
+
+
+
+
+
Add/Edit Relation Metadata Kind
+
+
+
Index: openacs-4/packages/lors-central/www/md/relationmd/relation_kind.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/relationmd/relation_kind.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/relationmd/relation_kind.tcl 17 May 2005 16:21:26 -0000 1.1
@@ -0,0 +1,95 @@
+# packages/lorsm/www/md/relationmd/relation_kind.tcl
+
+ad_page_contract {
+
+ Add/Edit Relation MD Kind
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: relation_kind.tcl,v 1.1 2005/05/17 16:21:26 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_re_id:integer
+ ims_md_re_re_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../relationmd" ims_md_id] "[_ lorsm.Relation_MD]"] [list [export_vars -base "relation" {ims_md_id ims_md_re_id ims_md_re_re_id}] "[_ lorsm.Relation_Entry]"] "[_ lorsm.AddEdit_Kind]"]
+set title "[_ lorsm.lt_AddEdit_Relation_MD_K]"
+
+# Form
+
+ad_form -name relationmd_kind \
+ -cancel_url relation?ims_md_id=$ims_md_id&ims_md_re_id=$ims_md_re_id&ims_md_re_re_id=$ims_md_re_re_id \
+ -mode edit \
+ -form {
+
+ ims_md_re_id:key(ims_md_relation_seq)
+
+ {kind_s:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Relation_MD_K]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {kind_v:text,nospell
+ {html {size 20}}
+ {help_text "[_ lorsm.lt_Nature_of_the_relatio]"}
+ {label "[_ lorsm.Kind]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+ {ims_md_re_re_id:text(hidden) {value $ims_md_re_re_id}
+ }
+
+} -select_query {select * from ims_md_relation where ims_md_re_id = :ims_md_re_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_relation
+ set kind_s = :kind_s,
+ kind_v = :kind_v
+ where ims_md_re_id = :ims_md_re_id"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "relation" {ims_md_re_re_id ims_md_re_id ims_md_id}]
+ ad_script_abort
+}
+
+# Relation Kind
+template::list::create \
+ -name d_re_kind \
+ -multirow d_re_kind \
+ -no_data "[_ lorsm.No_Kind_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ kind_s {
+ label "[_ lorsm.Source_1]"
+ }
+ kind_v {
+ label "[_ lorsm.Value]"
+ }
+ }
+
+db_multirow d_re_kind select_re_kind {
+ select re.kind_s,
+ re.kind_v,
+ re.ims_md_re_id,
+ re.ims_md_id,
+ rere.ims_md_re_re_id
+ from
+ ims_md_relation re,
+ ims_md_relation_resource rere
+ where
+ re.ims_md_re_id = :ims_md_re_id
+ and rere.ims_md_re_id = :ims_md_re_id
+}
Index: openacs-4/packages/lors-central/www/md/rightsmd/rights_caor.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/rightsmd/rights_caor.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/rightsmd/rights_caor.adp 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Rights Metadata Copyright or other Restrictions
+
+
+
+ Rights Metadata
+
+
+ Copyright or other Restrictions:
+
+
+
+
+
+
+
+
Add/Edit Rights Metadata Copyright or other Restrictions
+
+
+
Index: openacs-4/packages/lors-central/www/md/rightsmd/rights_caor.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/rightsmd/rights_caor.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/rightsmd/rights_caor.tcl 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,88 @@
+# packages/lorsm/www/md/rightsmd/rights_caor.tcl
+
+ad_page_contract {
+
+ Add/Edit Rights MD Copyright or other Restrictions
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: rights_caor.tcl,v 1.1 2005/05/17 16:21:27 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../rightsmd" ims_md_id] "[_ lorsm.Rights_MD]"] " <#_Add/Edit Copyrights or other Restrictions #>"]
+set title "[_ lorsm.lt_Edit_Rights_MD_Copyri]"
+
+
+# Form
+
+ad_form -name rightsmd_caor \
+ -cancel_url ../rightsmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ {caor_s:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Rights_MD_Cop]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {caor_v:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Whether_copyright_or_]"}
+ {label "[_ lorsm.lt_Copyright_or_other_Re]"}
+ }
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the Rights Copyright details already exist...
+
+ if {[db_0or1row select_type {select ims_md_id from ims_md_rights where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_rights
+ set caor_s = :caor_s, caor_v = :caor_v
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_rights (ims_md_id, caor_s, caor_v)
+ values
+ (:ims_md_id, :caor_s, :caor_v) "
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../rightsmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Rights Copyright or other Restrictions
+template::list::create \
+ -name d_ri_caor \
+ -multirow d_ri_caor \
+ -no_data "[_ lorsm.lt_No_Copyright_or_other]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ caor {
+ label "[_ lorsm.Copyright_Info]"
+ }
+ }
+
+db_multirow d_ri_caor select_ri_caor {
+ select
+ '[' || caor_s || '] ' || caor_v as caor,
+ ims_md_id
+ from
+ ims_md_rights
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/rightsmd/rights_cost.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/rightsmd/rights_cost.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/rightsmd/rights_cost.adp 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Rights Metadata Cost
+
+
+
+ Rights Metadata
+
+
+ Cost:
+
+
+
+
+
+
+
+
Add/Edit Rights Metadata Cost
+
+
+
Index: openacs-4/packages/lors-central/www/md/rightsmd/rights_cost.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/rightsmd/rights_cost.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/rightsmd/rights_cost.tcl 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,88 @@
+# packages/lorsm/www/md/rightsmd/rights_cost.tcl
+
+ad_page_contract {
+
+ Add/Edit Rights MD Cost
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: rights_cost.tcl,v 1.1 2005/05/17 16:21:27 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../rightsmd" ims_md_id] "[_ lorsm.Rights_MD]"] "[_ lorsm.AddEdit_Cost]"]
+set title "[_ lorsm.lt_AddEdit_Rights_MD_Cos]"
+
+
+# Form
+
+ad_form -name rightsmd_cost \
+ -cancel_url ../rightsmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ {cost_s:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Rights_MD_Cos]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {cost_v:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Whether_use_of_the_re]"}
+ {label "[_ lorsm.Cost]"}
+ }
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the Rights Cost details already exist...
+
+ if {[db_0or1row select_type {select ims_md_id from ims_md_rights where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_rights
+ set cost_s = :cost_s, cost_v = :cost_v
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_rights (ims_md_id, cost_s, cost_v)
+ values
+ (:ims_md_id, :cost_s, :cost_v) "
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../rightsmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Rights Cost
+template::list::create \
+ -name d_ri_cost \
+ -multirow d_ri_cost \
+ -no_data "[_ lorsm.No_Cost_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ cost {
+ label "[_ lorsm.Cost_1]"
+ }
+ }
+
+db_multirow d_ri_cost select_ri_cost {
+ select
+ '[' || cost_s || '] ' || cost_v as cost,
+ ims_md_id
+ from
+ ims_md_rights
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/rightsmd/rights_desc.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/rightsmd/rights_desc.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/rightsmd/rights_desc.adp 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Rights Metadata Description
+
+
+
+ Rights Metadata
+
+
+ Description:
+
+
+
+
+
+
+
+
Add/Edit Rights Metadata Description
+
+
+
Index: openacs-4/packages/lors-central/www/md/rightsmd/rights_desc.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/rightsmd/rights_desc.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/rightsmd/rights_desc.tcl 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,88 @@
+# packages/lorsm/www/md/rightsmd/rights_desc.tcl
+
+ad_page_contract {
+
+ Add/Edit Rights MD Description
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: rights_desc.tcl,v 1.1 2005/05/17 16:21:27 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../rightsmd" ims_md_id] "[_ lorsm.Rights_MD]"] "[_ lorsm.AddEdit_Description]"]
+set title "[_ lorsm.lt_Edit_Rights_MD_Descri]"
+
+
+# Form
+
+ad_form -name rightsmd_desc \
+ -cancel_url ../rightsmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ {descrip_l:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Rights_MD_Des]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {descrip_s:text(textarea),nospell
+ {html {rows 2 cols 50}}
+ {help_text "[_ lorsm.lt_Conditions_of_use_for]"}
+ {label "[_ lorsm.Description]"}
+ }
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the Rights Description details already exist...
+
+ if {[db_0or1row select_type {select ims_md_id from ims_md_rights where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_rights
+ set descrip_l = :descrip_l, descrip_s = :descrip_s
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_rights (ims_md_id, descrip_l, descrip_s)
+ values
+ (:ims_md_id, :descrip_l, :descrip_s) "
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../rightsmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Rights Description
+template::list::create \
+ -name d_ri_desc \
+ -multirow d_ri_desc \
+ -no_data "[_ lorsm.lt_No_Description_Availa]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ desc {
+ label "[_ lorsm.Description_1]"
+ }
+ }
+
+db_multirow d_ri_desc select_ri_desc {
+ select
+ '[' || descrip_l || '] ' || descrip_s as desc,
+ ims_md_id
+ from
+ ims_md_rights
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/technicalmd/technical_dur.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd/technical_dur.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd/technical_dur.adp 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,28 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Technical Metadata Duration
+
+
+
+ Technical Metadata
+
+
+ Duration:
+
+
+
+
+
+
+
Add/Edit Technical Metadata Duration
+
+
+
Index: openacs-4/packages/lors-central/www/md/technicalmd/technical_dur.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd/technical_dur.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd/technical_dur.tcl 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,104 @@
+# packages/lorsm/www/md/technicalmd/technical_dur.tcl
+
+ad_page_contract {
+
+ Add/Edit Technical MD Duration
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: technical_dur.tcl,v 1.1 2005/05/17 16:21:27 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../technicalmd" \\\i\\m\\s_md_id] "[_ lorsm.Technical_MD]"] "[_ lorsm.AddEdit_Duration]"]
+set title "[_ lorsm.lt_Edit_Technical_MD_Dur]"
+
+# Form
+
+ad_form -name technicalmd_dur \
+ -cancel_url ../technicalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ {duration:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Technical_MD_]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Time_the_continuous_l]"}
+ {label "[_ lorsm.Duration] "}
+ }
+
+ {duration_l:text,nospell,optional
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {duration_s:text,nospell,optional
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the tech duration details already exist...
+
+ if {[db_0or1row select_duration {select ims_md_id from ims_md_technical where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_technical
+ set duration_s = :duration_s,
+ duration_l = :duration_l,
+ duration = :duration
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_technical (ims_md_id, duration_l, duration_s)
+ values
+ (:ims_md_id, :duration_l, :duration_s)"
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../technicalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Technical Duration
+template::list::create \
+ -name d_te_dur \
+ -multirow d_te_dur \
+ -no_data "[_ lorsm.lt_No_Duration_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ duration_sec {
+ label "[_ lorsm.Duration_Seconds]"
+ }
+ duration_l {
+ label "[_ lorsm.Language_1]"
+ }
+ duration_s {
+ label "[_ lorsm.Source_1]"
+ }
+
+ }
+
+db_multirow d_te_dur select_te_dur {
+ select
+ duration_l,
+ duration_s,
+ duration || 's' as duration_sec,
+ ims_md_id
+ from
+ ims_md_technical
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/technicalmd/technical_form.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd/technical_form.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd/technical_form.adp 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Technical Metadata Format
+
+
+
+ Technical Metadata
+
+
+ Formats:
+
+
+
+
+
+
+
+
Add/Edit Technical Metadata Format
+
+
+
Index: openacs-4/packages/lors-central/www/md/technicalmd/technical_form.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd/technical_form.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd/technical_form.tcl 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,92 @@
+# packages/lorsm/www/md/technicalmd/technical_form.tcl
+
+ad_page_contract {
+
+ Add/Edit Technical MD Format
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: technical_form.tcl,v 1.1 2005/05/17 16:21:27 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_te_fo_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_te_fo_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "I[_ lorsm.MS_Metadata_Editor]"] [list [export_vars -base "../technicalmd" im\s_md_id] "[_ lorsm.Technical_MD]"] "[_ lorsm.Edit_Format]"]
+ set title "[_ lorsm.lt_Edit_Technical_MD_For]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../technicalmd" im\s_md_id] "[_ lorsm.Technical_MD]"] "[_ lorsm.Add_Format]"]
+ set title "[_ lorsm.lt_Add_Technical_MD_Form]"
+}
+
+# Form
+
+ad_form -name technicalmd_form \
+ -cancel_url ../technicalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_te_fo_id:key(ims_md_technical_format_seq)
+
+ {format:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Technical_MD__1]"}
+ {html {size 30}}
+ {help_text "[_ lorsm.lt_Technical_data_type_o]"}
+ {label "[_ lorsm.Format]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -select_query {select * from ims_md_technical_format where ims_md_te_fo_id = :ims_md_te_fo_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_technical_format
+ set format = :format
+ where ims_md_te_fo_id = :ims_md_te_fo_id "
+
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_technical_format (ims_md_te_fo_id, ims_md_id, format)
+ values
+ (:ims_md_te_fo_id, :ims_md_id, :format)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../technicalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Technical Format
+template::list::create \
+ -name d_te_form \
+ -multirow d_te_form \
+ -no_data "[_ lorsm.No_Format_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ format {
+ label "[_ lorsm.Format_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "technical_form" {ims_md_te_fo_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_te_form select_te_form {
+ select format,
+ ims_md_te_fo_id,
+ ims_md_id
+ from
+ ims_md_technical_format
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/technicalmd/technical_inst.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd/technical_inst.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd/technical_inst.adp 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Technical Metadata Installation Remarks
+
+
+
+ Technical Metadata
+
+
+ Installation Remarks:
+
+
+
+
+
+
+
+
Add/Edit Technical Metadata Installation Remarks
+
+
+
Index: openacs-4/packages/lors-central/www/md/technicalmd/technical_inst.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd/technical_inst.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd/technical_inst.tcl 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,88 @@
+# packages/lorsm/www/md/technicalmd/technical_inst.tcl
+
+ad_page_contract {
+
+ Add/Edit Technical MD Installation Remarks
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: technical_inst.tcl,v 1.1 2005/05/17 16:21:27 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../technicalmd" \\\im\\s_md_id] "[_ lorsm.Technical_MD]"] "[_ lorsm.lt_Edit_Installation_Rem]"]
+set title "[_ lorsm.lt_AddEdit_Technical_MD__2]"
+
+# Form
+
+ad_form -name technicalmd_inst \
+ -cancel_url ../technicalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ {instl_rmrks_l:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Technical_MD__2]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {instl_rmrks_s:text(textarea),nospell
+ {html {rows 5 cols 60}}
+ {help_text "[_ lorsm.lt_Information_on_how_to]"}
+ {label "[_ lorsm.Installation_Remarks]"}
+ }
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the tech size details already exist...
+
+ if {[db_0or1row select_size {select ims_md_id from ims_md_technical where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_technical
+ set instl_rmrks_l = :instl_rmrks_l,
+ instl_rmrks_s = :instl_rmrks_s
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_technical (ims_md_id, instl_rmrks_l, instl_rmrks_s)
+ values
+ (:ims_md_id, :instl_rmrks_l, :instl_rmrks_s) "
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../technicalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Technical Installation Remarks
+template::list::create \
+ -name d_te_inst \
+ -multirow d_te_inst \
+ -no_data "[_ lorsm.lt_No_Installation_Remar]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ instl_rmrks {
+ label "[_ lorsm.Installation_Remarks_1]"
+ }
+ }
+
+db_multirow d_te_inst select_te_inst {
+ select
+ '[' || instl_rmrks_l || ']' || ' ' || instl_rmrks_s as instl_rmrks,
+ ims_md_id
+ from
+ ims_md_technical
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/technicalmd/technical_loca.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd/technical_loca.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd/technical_loca.adp 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+List of Technical Metadata Locations
+
+
+
+ Technical Metadata
+
+
+ Locations:
+
+
+
+
+
+
+
+
Add/Edit Technical Metadata Format
+
+
+
Index: openacs-4/packages/lors-central/www/md/technicalmd/technical_loca.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd/technical_loca.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd/technical_loca.tcl 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,105 @@
+# packages/lorsm/www/md/technicalmd/technical_loca.tcl
+
+ad_page_contract {
+
+ Add/Edit Technical MD Location
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: technical_loca.tcl,v 1.1 2005/05/17 16:21:27 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_te_lo_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_te_lo_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../technicalmd" \im\\s_md_id] "[_ lorsm.Technical_MD]"] " [_ lorsm.Edit_Location]"]
+ set title "[_ lorsm.lt_Edit_Technical_MD_Loc]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../technicalmd" \im\\s_md_id] "[_ lorsm.Technical_MD]"] "[_ lorsm.Add_Location]"]
+ set title "[_ lorsm.lt_Add_Technical_MD_Loca]"
+}
+
+# Form
+
+ad_form -name technicalmd_loca \
+ -cancel_url ../technicalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_te_lo_id:key(ims_md_technical_location_seq)
+
+ {type:text,nospell,optional
+ {section "[_ lorsm.lt_AddEdit_Technical_MD__3]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Reference_to_location]"}
+ {label "[_ lorsm.Type_1]"}
+ }
+
+ {location:text,nospell
+ {html {size 50}}
+ {help_text "[_ lorsm.lt_Location_of_the_resou]"}
+ {label "[_ lorsm.Location_1]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+
+} -select_query {select * from ims_md_technical_location where ims_md_te_lo_id = :ims_md_te_lo_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_technical_location
+ set type = :type,
+ location = :location
+ where ims_md_te_lo_id = :ims_md_te_lo_id "
+
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_technical_location (ims_md_te_lo_id, ims_md_id, type, location)
+ values
+ (:ims_md_te_lo_id, :ims_md_id, :type, :location)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../technicalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Technical Location
+template::list::create \
+ -name d_te_loca \
+ -multirow d_te_loca \
+ -no_data "[_ lorsm.lt_No_Location_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ type {
+ label "[_ lorsm.Type]"
+ }
+ location {
+ label "[_ lorsm.Location]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "technical_loca" {ims_md_te_lo_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_te_loca select_te_loca {
+ select type,
+ location,
+ ims_md_te_lo_id,
+ ims_md_id
+ from
+ ims_md_technical_location
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/technicalmd/technical_otr.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd/technical_otr.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd/technical_otr.adp 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Technical Metadata Other Platform Requirements
+
+
+
+ Technical Metadata
+
+
+ Other Platform Requirements:
+
+
+
+
+
+
+
+
Add/Edit Technical Metadata Other Platform Requirements
+
+
+
Index: openacs-4/packages/lors-central/www/md/technicalmd/technical_otr.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd/technical_otr.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd/technical_otr.tcl 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,88 @@
+# packages/lorsm/www/md/technicalmd/technical_otr.tcl
+
+ad_page_contract {
+
+ Add/Edit Technical MD Other Platform Requirements
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: technical_otr.tcl,v 1.1 2005/05/17 16:21:27 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../technicalmd" \\\i\m\\s_md_id] "[_ lorsm.Technical_MD]"] "[_ lorsm.lt_AddEdit_Other_Platfor]"]
+set title "[_ lorsm.lt_AddEdit_Technical_MD__4]"
+
+# Form
+
+ad_form -name technicalmd_otr \
+ -cancel_url ../technicalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ {otr_plt_l:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Technical_MD__4]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_ie_en_AU_for_Australi]"}
+ {label "[_ lorsm.Language]"}
+ }
+
+ {otr_plt_s:text(textarea),nospell
+ {html {rows 5 cols 60}}
+ {help_text "[_ lorsm.lt_Information_on_other_]"}
+ {label "[_ lorsm.lt_Other_Platform_Requir]"}
+ }
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the tech other platform req details already exist...
+
+ if {[db_0or1row select_size {select ims_md_id from ims_md_technical where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_technical
+ set otr_plt_l = :otr_plt_l,
+ otr_plt_s = :otr_plt_s
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_technical (ims_md_id, otr_plt_l, otr_plt_s)
+ values
+ (:ims_md_id, :otr_plt_l, :otr_plt_s)"
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../technicalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Technical Installation Remarks
+template::list::create \
+ -name d_te_otr \
+ -multirow d_te_otr \
+ -no_data "[_ lorsm.lt_No_Other_Platform_Req]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ otr_plt {
+ label "[_ lorsm.Other_Platform_Req]"
+ }
+ }
+
+db_multirow d_te_otr select_te_otr {
+ select
+ '[' || otr_plt_l || ']' || ' ' || otr_plt_s as otr_plt,
+ ims_md_id
+ from
+ ims_md_technical
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/md/technicalmd/technical_req.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd/technical_req.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd/technical_req.adp 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+List of Technical Metadata Requirements
+
+
+
+ Technical Metadata
+
+
+ Requirements:
+
+
+
+
+
+
+
+
Add/Edit Technical Metadata Requirement
+
+
+
Index: openacs-4/packages/lors-central/www/md/technicalmd/technical_req.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd/technical_req.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd/technical_req.tcl 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,139 @@
+# packages/lorsm/www/md/technicalmd/technical_req.tcl
+
+ad_page_contract {
+
+ Add/Edit Technical MD Requirement
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: technical_req.tcl,v 1.1 2005/05/17 16:21:27 miguelm Exp $
+
+} {
+ ims_md_id:integer
+ ims_md_te_rq_id:integer,optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+if { ![ad_form_new_p -key ims_md_te_rq_id]} {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../technicalmd" \\im\\s_md_id] "[_ lorsm.Technical_MD]"] "[_ lorsm.Edit_Requirement]"]
+ set title "[_ lorsm.lt_Edit_Technical_MD_Req]"
+} else {
+ set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../technicalmd" \\im\\s_md_id] "[_ lorsm.Technical_MD]"] "[_ lorsm.Add_Requirement]"]
+ set title "[_ lorsm.lt_Add_Technical_MD_Requ]"
+}
+
+# Form
+
+ad_form -name technicalmd_req \
+ -cancel_url ../technicalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ ims_md_te_rq_id:key(ims_md_technical_requirement_seq)
+
+ {type_s:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Technical_MD__5]"}
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Source_of_vocabulary_]"}
+ {label "[_ lorsm.Source]"}
+ }
+
+ {type_v:text,nospell
+ {html {size 20}}
+ {help_text "[_ lorsm.Type_of_requirement]"}
+ {label "[_ lorsm.Type_1]"}
+ }
+
+ {name_v:text,nospell
+ {html {size 20}}
+ {help_text "[_ lorsm.lt_Name_of_required_item]"}
+ {label "[_ lorsm.Name_1]"}
+ }
+
+ {min_version:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Lowest_version_of_the]"}
+ {label "[_ lorsm.Minimum_Version]"}
+ }
+
+ {max_version:text,nospell
+ {html {size 10}}
+ {help_text "[_ lorsm.lt_Highest_version_of_th]"}
+ {label "[_ lorsm.Maximum_Version]"}
+ }
+
+ {ims_md_id:text(hidden) {value $ims_md_id}
+ }
+
+} -select_query {
+ select * from
+ ims_md_technical_requirement
+ where
+ ims_md_te_rq_id = :ims_md_te_rq_id and ims_md_id = :ims_md_id
+
+} -edit_data {
+ db_dml do_update "
+ update ims_md_technical_requirement
+ set type_v = :type_v,
+ type_s = :type_s,
+ name_v = :name_v,
+ name_s = :type_s,
+ min_version = :min_version,
+ max_version = :max_version
+ where ims_md_te_rq_id = :ims_md_te_rq_id"
+
+} -new_data {
+ db_dml do_insert "
+ insert into ims_md_technical_requirement (ims_md_te_rq_id, ims_md_id, type_s, type_v, name_s, name_v, min_version, max_version)
+ values (:ims_md_te_rq_id, :ims_md_id, :type_s, :type_v, :type_s, :name_v, :min_version, :max_version)"
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../technicalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Technical Requirements
+template::list::create \
+ -name d_te_req \
+ -multirow d_te_req \
+ -no_data "No Requirements Available" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ type {
+ label "[_ lorsm.Type]"
+ }
+ name {
+ label "[_ lorsm.Name]"
+ }
+ min_version {
+ label "[_ lorsm.Min_Version]"
+ }
+ max_version {
+ label "[_ lorsm.Max_Version]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "technical_req" {ims_md_te_rq_id ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record] "}
+ html { align center }
+ }
+ }
+
+db_multirow d_te_req select_te_req {
+ select
+ '[' || type_s || ']' || ' ' || type_v as type,
+ '[' || name_s || ']' || ' ' || name_v as name,
+ min_version,
+ max_version,
+ ims_md_te_rq_id,
+ ims_md_id
+ from
+ ims_md_technical_requirement
+ where
+ ims_md_id = :ims_md_id
+}
+
Index: openacs-4/packages/lors-central/www/md/technicalmd/technical_size.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd/technical_size.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd/technical_size.adp 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,29 @@
+
+@title;noquote@
+@context;noquote@
+
+
+
+
+
+Technical Metadata Size
+
+
+
+ Technical Metadata
+
+
+ Size:
+
+
+
+
+
+
+
+
Add/Edit Technical Metadata Size
+
+
+
Index: openacs-4/packages/lors-central/www/md/technicalmd/technical_size.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/md/technicalmd/technical_size.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/md/technicalmd/technical_size.tcl 17 May 2005 16:21:27 -0000 1.1
@@ -0,0 +1,86 @@
+# packages/lorsm/www/md/technicalmd/technical_size.tcl
+
+ad_page_contract {
+
+ Add/Edit Technical MD Size
+
+ @author Gerard Low (glow5809@mail.usyd.edu.au)
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 16 October 2004
+ @cvs-id $Id: technical_size.tcl,v 1.1 2005/05/17 16:21:27 miguelm Exp $
+
+} {
+ ims_md_id:integer
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set context & title
+set context [list [list [export_vars -base ".." ims_md_id] "[_ lorsm.IMS_Metadata_Editor]"] [list [export_vars -base "../technicalmd" \im\s_md_id] "[_ lorsm.Technical_MD]"] "[_ lorsm.Edit_Size]"]
+set title "[_ lorsm.lt_AddEdit_Technical_MD__6]"
+
+# Form
+
+ad_form -name technicalmd_size \
+ -cancel_url ../technicalmd?ims_md_id=$ims_md_id \
+ -mode edit \
+ -form {
+
+ {t_size:text,nospell
+ {section "[_ lorsm.lt_AddEdit_Technical_MD__6]"}
+ {html {size 30}}
+ {help_text "[_ lorsm.lt_Size_of_the_resource_]"}
+ {label "[_ lorsm.Size]"}
+ }
+ {ims_md_id:text(hidden) {value $ims_md_id}}
+
+} -on_submit {
+ # check if the tech size details already exist...
+
+ if {[db_0or1row select_size {select ims_md_id from ims_md_technical where ims_md_id = :ims_md_id}]} {
+
+ db_dml do_update "
+ update ims_md_technical
+ set t_size = :t_size
+ where ims_md_id = :ims_md_id "
+
+ } else {
+
+ db_dml do_insert "
+ insert into ims_md_technical (ims_md_id, t_size)
+ values
+ (:ims_md_id, :t_size) "
+ }
+
+} -after_submit {
+ ad_returnredirect [export_vars -base "../technicalmd" {ims_md_id}]
+ ad_script_abort
+}
+
+# Technical Size
+template::list::create \
+ -name d_te_size \
+ -multirow d_te_size \
+ -no_data "[_ lorsm.No_Size_Available]" \
+ -html { align right style "width: 100%;" } \
+ -elements {
+ t_size_bytes {
+ label "[_ lorsm.Size_1]"
+ }
+ export {
+ display_eval {\[Edit\]}
+ link_url_eval { [export_vars -base "technical_size" {ims_md_id}] }
+ link_html {title "[_ lorsm.Edit_Record]"}
+ html { align center }
+ }
+ }
+
+db_multirow d_te_size select_te_size {
+ select t_size || ' bytes' as t_size_bytes,
+ ims_md_id
+ from
+ ims_md_technical
+ where
+ ims_md_id = :ims_md_id
+}
Index: openacs-4/packages/lors-central/www/tracking/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/tracking/index.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/tracking/index.adp 17 May 2005 16:21:28 -0000 1.1
@@ -0,0 +1,9 @@
+
+ @title@
+ @context@
+
+
+
+
+
+
Index: openacs-4/packages/lors-central/www/tracking/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/tracking/index.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lors-central/www/tracking/index.tcl 17 May 2005 16:21:28 -0000 1.1
@@ -0,0 +1,226 @@
+# packages/lorsm/www/tracking/index.tcl
+
+ad_page_contract {
+
+ Student Tracking Index Page
+
+ @author Ernie Ghiglione (ErnieG@mm.st)
+ @creation-date 2004-05-25
+ @arch-tag a5b230ee-0fa7-4e48-be1b-eeae323291e7
+ @cvs-id $Id: index.tcl,v 1.1 2005/05/17 16:21:28 miguelm Exp $
+} {
+ man_id:integer,notnull
+ { lorsm_instance_id "" }
+ { community_id "" }
+ {item_id 0}
+ group:optional
+} -properties {
+} -validate {
+} -errors {
+}
+
+# set package_id [ad_conn package_id]
+# set community_id [dotlrn_community::get_community_id]
+
+if { ![empty_string_p $lorsm_instance_id] } {
+ set package_id $lorsm_instance_id
+}
+if { ![empty_string_p $community_id] } {
+ set community_id $community_id
+}
+
+# set admin_p [dotlrn::user_can_admin_community_p \
+ -user_id [ad_conn user_id] \
+ -community_id $community_id ]
+
+# Permissions
+# dotlrn::require_user_admin_community -user_id [ad_conn user_id] -community_id $community_id
+
+set title [list "[_ lorsm.Student_Tracking]"]
+set context [list "[_ lorsm.Tracking_1]"]
+
+if {![exists_and_not_null group]} {
+ set group 1
+}
+
+if {$group == 1} {
+
+ template::list::create \
+ -name student_track \
+ -multirow student_track \
+ -actions [list "[_ lorsm.Summarize]" [export_vars -base ".?group=0" {man_id item_id lorsm_instance_id community_id}] "[_ lorsm.lt_Summarize_all_student]"] \
+ -key man_id \
+ -html {width 50%} \
+ -no_data "[_ lorsm.No_Students]" \
+ -elements {
+ student_name {
+ label "[_ lorsm.Student_Name]"
+ display_eval {[person::name -person_id $student_name]}
+ link_url_eval {[acs_community_member_url -user_id $student_name]}
+ link_html {title "[_ lorsm.Students_profile]"}
+ }
+ start_time {
+ label "[_ lorsm.Start_Course]"
+ display_eval {[lc_time_fmt $start_time "%x %T"]}
+ html { align center }
+ }
+ end_time {
+ label "[_ lorsm.Exit_Course]"
+ display_eval {[lc_time_fmt $end_time "%x %T"]}
+ html { align center }
+ }
+ time_spend {
+ label "[_ lorsm.Time_Spent]"
+ display_eval {[lorsm::dates_calc -start_date [string range $start_time 0 18] -end_date [string range $end_time 0 18]]}
+ html { align center }
+ }
+ }
+
+ db_multirow -extend { ims_md_id } student_track select_students {
+ select
+ user_id as student_name,
+ start_time,
+ end_time
+ from
+ lorsm_student_track
+ where
+ community_id = :community_id
+ and
+ course_id = :man_id
+ and
+ end_time NOTNULL
+ order by
+ start_time desc
+ } {
+ set ims_md_id $man_id
+ }
+
+ template::list::create \
+ -name object_views \
+ -multirow object_views \
+ -elements {
+ title {
+ label "[_ lorsm.Title_1]"
+ }
+ viewer_name {
+ label "[_ lorsm.Viewed_By]"
+ }
+ views {
+ label "[_ lorsm.Total_Views]"
+ }
+ last_viewed {
+ label "[_ lorsm.Last_Viewed_On]"
+ display_eval {[lc_time_fmt $last_viewed "%x %X"]}
+ }
+ }
+
+ if {$item_id} {
+ set extra_where " and v.object_id in ( select revision_id from cr_revisions where item_id = (
+ select item_id from cr_revisions where revision_id = :item_id))"
+ } else {
+ set extra_where ""
+ }
+
+ db_multirow -extend {viewer_name} object_views objects_views "
+ select v.*,
+ i.item_title as title
+ from views v,
+ ims_cp_items i,
+ ims_cp_organizations o
+ where
+ i.ims_item_id = v.object_id
+ and
+ i.org_id = o.org_id
+ and
+ o.man_id = :man_id
+ $extra_where
+ " {
+ set viewer_name [acs_user::get_element -user_id $viewer_id -element name]
+ }
+
+} else {
+ # group display
+
+ template::list::create \
+ -name student_track \
+ -multirow student_track \
+ -key man_id \
+ -actions [list "[_ lorsm.Expand]" [export_vars -base ".?group=1" {man_id item_id lorsm_instance_id community_id}] "Expand all students"] \
+ -html {width 50%} \
+ -no_data "[_ lorsm.No_Students]" \
+ -elements {
+ student_name {
+ label "Student Name"
+ display_eval {[person::name -person_id $student_name]}
+ link_url_eval {[acs_community_member_url -user_id $student_name]}
+ link_html {title "Student's profile"}
+ }
+ counter {
+ label "[_ lorsm.Times_Viewed]"
+ html { align center }
+ }
+ time_spent {
+ label "[_ lorsm.Time_Spent]"
+ html { align center }
+ }
+ }
+
+ db_multirow -extend { ims_md_id } student_track select_students {
+ select
+ user_id as student_name,
+ count(*) as counter,
+ sum(end_time - start_time) as time_spent
+ from
+ lorsm_student_track
+ where
+ community_id = :community_id
+ and
+ course_id = :man_id
+ and
+ end_time NOTNULL
+ group by user_id
+
+ } {
+ set ims_md_id $man_id
+ }
+
+ template::list::create \
+ -name object_views \
+ -multirow object_views \
+ -elements {
+ title {
+ label "[_ lorsm.Title_1]"
+ }
+ views {
+ label "[_ lorsm.Total_Views]"
+ }
+ unique_views {
+ label "[_ lorsm.Unique_Views]"
+ }
+ last_viewed {
+ label "[_ lorsm.Last_Viewed_On]"
+ }
+ }
+
+ if {$item_id} {
+ set extra_where " and v.object_id = :item_id"
+ } else {
+ set extra_where ""
+ }
+
+ db_multirow object_views objects_views "
+ select v.*,
+ i.item_title as title
+ from view_aggregates v,
+ ims_cp_items i,
+ ims_cp_organizations o
+ where
+ i.ims_item_id = v.object_id
+ and
+ i.org_id = o.org_id
+ and
+ o.man_id = :man_id
+ $extra_where
+ "
+
+}