Index: openacs-4/packages/lorsm/lorsm.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/lorsm.info,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/lorsm.info 22 Apr 2004 03:58:08 -0000 1.1 @@ -0,0 +1,32 @@ + + + + + LORS Management + LORS Management + f + f + lorsm + + + + 0 + + + + + Ernie Ghiglione + Application to manage the services from the Learning Object Repository. + This application manages the services from the Learning Object Repository: upload courses, manage and create metadata, delete resources and courses. + + + + + + + + + + + + Index: openacs-4/packages/lorsm/lib/user-lorsm.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/lib/user-lorsm.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/lib/user-lorsm.adp 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1 @@ + Index: openacs-4/packages/lorsm/lib/user-lorsm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/lib/user-lorsm.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/lib/user-lorsm.tcl 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,69 @@ +# packages/lorsm/lib/user-lorsm.tcl +# +# User portlet view +# +# @author Ernie Ghiglione (ErnieG@mm.st) +# @creation-date 2004-04-10 +# @arch-tag c4c3448b-3f12-43cc-9f96-19b4c4a72a58 +# @cvs-id $Id: user-lorsm.tcl,v 1.1 2004/04/22 03:58:09 ernieg Exp $ + +foreach required_param {package_id} { + if {![info exists $required_param]} { + return -code error "$required_param is a required parameter." + } +} + +template::list::create \ + -name d_courses \ + -multirow d_courses \ + -html {width 100%} \ + -key man_id \ + -no_data "No Courses" \ + -elements { + course_name { + label "Course Name" + display_col course_name + link_url_eval {[site_node::get_url_from_object_id -object_id $context_id]delivery/?[export_vars man_id]} + link_html {title "Access Course"} + } + creation_user { + label "Owner" + display_eval {[person::name -person_id $creation_user]} + link_url_eval {[acs_community_member_url -user_id $creation_user]} + } + creation_date { + label "Creation Date" + display_eval {[lc_time_fmt $creation_date "%x %X"]} + } + } + +db_multirow -extend { ims_md_id } d_courses select_d_courses { + select + cp.man_id, + cp.course_name, + cp.identifier, + cp.version, + text '[view]' as course_structure, + 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 + from + ims_cp_manifests cp, acs_objects acs + where + cp.man_id = acs.object_id + and + acs.context_id = :package_id +} { + set ims_md_id $man_id +} + Index: openacs-4/packages/lorsm/tcl/lorsm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/tcl/lorsm-procs.tcl 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,55 @@ +# packages/lorsm/tcl/lorsm-procs.tcl + +ad_library { + + LORS Management Procedures + + @author Ernie Ghiglione (ErnieG@mm.st) + @creation-date 2004-04-16 + @arch-tag daf81eac-5543-4f92-b06a-547313205683 + @cvs-id $Id: lorsm-procs.tcl,v 1.1 2004/04/22 03:58:09 ernieg Exp $ +} + +# +# Copyright (C) 2004 Ernie Ghiglione +# +# This package is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# It is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +namespace eval lorsm { + + ad_proc -public fix_url { + -url:required + } { + Function use to fix URLs for course that use whitespaces for their directories, + since the file-storage renames the directories and put a _ instead of a whitespace. + This function should be gone when the file-storage can add folders with whitespaces. + + @param url The identifier reference that we need to modify. + @author Ernie Ghiglione (ErnieG@mm.st) + + } { + set filename [file tail $url] + + if {!([string length $filename] == [string length $url])} { + + set path [string trimright $url $filename] + regsub -all { } $path {_} newpath + return $newpath$filename + } else { + return $url + } + } + + +} + + Index: openacs-4/packages/lorsm/www/course-add-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/Attic/course-add-2.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/course-add-2.adp 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,36 @@ + +@context;noquote@ + +

+ +

Preliminary information

+

+ + + +

+ + The uploaded file is a SCORM complaint package +

+ +

+ + +

SCORM Package Info

+ +

+ + + + +

IMS Package Info

+ +

+ +Note: the package has not yet being added to the Learning Object Repository. + + + + + + Index: openacs-4/packages/lorsm/www/course-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/Attic/course-add-2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/course-add-2.tcl 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,363 @@ +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 2004/04/22 03:58:09 ernieg Exp $ +} { + folder_id:integer,notnull + upload_file:trim,optional + upload_file.tmpfile:optional,tmpfile + course_id:integer,notnull + indb_p:integer,notnull + fs_package_id:integer,notnull + +} -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 "The upload failed or the file was empty" + } + } +} + +# 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 "The uploaded file doesn't seem to be an IMS Content Package compliant file: Unable to expand your archive file" + 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] + +} + +#check permission +set user_id [ad_conn user_id] +ad_require_permission $folder_id admin + + +# 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 "The uploaded file doesn't seem to be an IMS Content Package compliant file: Unable to expand your archive file" + ad_script_abort +} + +# 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 "There is no $file with description and structure of the course" +} + + +## 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 "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 "No IMS Package structure information available" \ + -elements { + organizations { + label "Organizations" + html {valign top align center} + } + items { + label "Items" + html {valign top align center} + } + resources { + label "Resources" + html {valign top align center} + } + files { + label "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 "No Items" \ + -elements { + scos { + label "SCOs" + html {valign top} + } + assets { + label "Assets" + html {valign top} + } + sharableresources { + label "Sharable Resources" + html {valign top} + } + files { + label "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 "Importing: $manifest_title" + + ## 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 "Importing: No Metadata Available" + } + } else { + # manifest title doesn't exist, so we create one for it. + regexp {([^/\\]+)$} $tmp_dir match manifest_title + set context "Importing: No Metadata Available" + } + + + # 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 "The package you are trying to upload doesn't have resources. Please check the $file and try again" + 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 "There has been a problem with your uploaded file that we can't identified: temporary directory not found" + ad_script_abort + +} + +template::form create course_upload -action course-add-3 \ + -display_buttons { {"Upload Course" upload_course} } \ + -html {enctype multipart/form-data} \ + -mode edit \ + -cancel_url "index" + + +template::element create course_upload course_name \ + -label "Course Name:" -datatype text -widget text -help_text "This is the name the name of the course, as it will be stored in the system" \ + -maxlength 200 + +template::element create course_upload course_id \ + -label "course_id" -datatype integer -widget hidden + +template::element create course_upload indb_p \ + -label "indb_p" -datatype integer -widget hidden + +template::element create course_upload tmp_dir \ + -label "tmp_dir" -datatype text -widget hidden -optional + +template::element create course_upload folder_id \ + -label "folder_id" -datatype integer -widget hidden + +template::element create course_upload isSCORM \ + -label "isSCORM" -datatype integer -widget hidden -optional + +template::element create course_upload fs_package_id \ + -label "fs_package_id" -datatype integer -widget hidden + +template::element set_properties course_upload course_name -value $manifest_title + +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 fs_package_id -value $fs_package_id + + + + + + Index: openacs-4/packages/lorsm/www/course-add-3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/Attic/course-add-3.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/course-add-3.adp 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,56 @@ + +@context;noquote@ + +

+ +

Preliminary information

+

+ +

+ +

+ + The uploaded file is a SCORM complaint package +

+ +Note: the package has not yet being added to the Learning Object Repository. +

+ +

Organizations

+ +

+ +

+

Items

+ +
+

+ + + +

SCOs

+ +

+ +

Assets

+ +

+ + + + +

Resources

+ +

+ +

+ + + +
+@l_files@ +
+ +

+@all_files@ + Index: openacs-4/packages/lorsm/www/course-add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/Attic/course-add-3.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/course-add-3.tcl 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,488 @@ +ad_page_contract { + Upload an IMS Content Package 3 + + Scope: + + Add files to the CR + Process imsmanifest.xml + + @author Ernie Ghiglione (ErnieG@mm.st) + @creation-date 19 March 2003 + @cvs-id $Id: course-add-3.tcl,v 1.1 2004/04/22 03:58:09 ernieg Exp $ +} { + folder_id:integer,notnull + tmp_dir:optional,notnull + course_id:integer,notnull + course_name:notnull + indb_p:integer,notnull + fs_package_id:integer,notnull + +} -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 "The upload failed or the file was empty" + } + } +} + + +#check permission +set user_id [ad_conn user_id] +ad_require_permission $folder_id admin + + +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] + + # Display progress bar + + ad_progress_bar_begin \ + -title "Uploading course..." \ + -message_1 "Uploading and processing your course, please wait ..." \ + -message_2 "We will continue automatically when processing is complete." + + + + ns_write "

Initiating Updating log...

" + + set filesx [lors::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 "Processing folder : $cr_dir
" + set new_cr_folder_id [lors::cr::add_folder -parent_id $base_parent_id -folder_name $cr_dir] + 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 "Processing file(s):
" + foreach file $files { + ns_write " [string trimleft $file $tmp_dir]...OK
" + } + ns_write "
" + # + + if ![empty_string_p $files] { + set filesx [lors::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 "

Now processing imsmanifest.xml 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 "Importing: $manifest_title" + + ## 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 "Importing: No Metadata Available" + } + + } + + + + # Gets the organizations + + set organizations [$manifest child all organizations] + set man_orgs_default [lors::imsmd::getAtt $organizations default] + + set man_id [lors::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 \ + -fs_package_id $fs_package_id] + + ns_write "Adding $course_name Manifest...
" + + if {$man_hasmetadata == 1} { + # adds manifest metadata + set aa [lors::imsmd::addMetadata \ + -acs_object $man_id \ + -node $metadata \ + -dir $tmp_dir] + + ns_write "Adding Manifest Metadata...
" + + } + + + 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::imscp::organization_add \ + -man_id $man_id \ + -identifier $org_identifier \ + -structure $org_structure \ + -title $org_title \ + -hasmetadata $org_hasmetadata] + + ns_write "Adding Organization $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 "here is list_items $list_items\n" + + set add [concat $add [lors::imscp::addItems -org_id $org_id $list_items 0 $tmp_dir]] + + ns_write "Adding [llength $add] items and their respective metadata...
" + + } + + + } + + set l_files [list] + + set resources [$manifest child all resources] + + set resourcex [$resources child all resource] + + +########## REMOVE DEBUGGING PURPOSE ONLY #### + set f_handler [open /tmp/add.txt w+] + puts -nonewline $f_handler $add + close $f_handler +########## REMOVE DEBUGGING PURPOSE ONLY #### + + 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] + + + set resource_id [lors::imscp::resource_add \ + -man_id $man_id \ + -identifier $res_identifier \ + -type $res_type \ + -href $res_href \ + -scorm_type $res_scormtype \ + -hasmetadata $res_hasmetadata] + + ns_write "Adding resource $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 "Adding resource $res_identifier metadata...
" + + } + + + foreach dependency $res_dependencies { + + set dep_id [lors::imscp::dependency_add \ + -res_id $resource_id \ + -identifierref $dependency] + + ns_write "Adding resource dependencies...
" + + } + + + 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 "no page" + } + +########## REMOVE DEBUGGING PURPOSE ONLY #### + set f_handler [open /tmp/res_list.txt w+] + puts -nonewline $f_handler $res_list + close $f_handler +########## REMOVE DEBUGGING PURPOSE ONLY #### + + + # 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 "Now we are almost done...
" + +# set all_files [lindex $all_files 0] + +# ns_write +# ns_write + + +########## REMOVE DEBUGGING PURPOSE ONLY #### + set f_handler [open /tmp/all_files.txt w+] + puts -nonewline $f_handler $all_files + close $f_handler + set f_handler [open /tmp/l_files.txt w+] + puts -nonewline $f_handler $l_files + close $f_handler +########## REMOVE DEBUGGING PURPOSE ONLY #### + + 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] + } + + if {![empty_string_p $found_file]} { + set file_id [lindex [lindex $all_files $found_file] 3] + 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_id \ + -res_id $res_id \ + -pathtofile $filename \ + -filename $filex \ + -hasmetadata $hasmetadata] + + ns_write "Adding file $filex...
" + + + if {$file_hasmetadata != 0} { + set add_file_metadata [lors::imsmd::addMetadata \ + -acs_object $file_id \ + -node $file_hasmetadata \ + -dir $tmp_dir] + + ns_write "Adding file $filex metadata...
" + } + } + + } + + + # Delete temporary directory + ns_write "Deleting temporary folder...
" + ns_log Debug "Delete temporary folder $tmp_dir" + lors::imscp::deltmpdir $tmp_dir + + ns_write "Done!


" + + # jump to the front page + ad_progress_bar_end -url [apm_package_url_from_id [ad_conn package_id]] + + +} \ No newline at end of file Index: openacs-4/packages/lorsm/www/course-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/Attic/course-add.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/course-add.adp 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,9 @@ + +Upload an IMS/SCORM Content Package Course +@context;noquote@ + + +

We have detected the root folder for @folder_name;noquote@ and we will import your course in this folder.

+ + + Index: openacs-4/packages/lorsm/www/course-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/Attic/course-add.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/course-add.tcl 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,80 @@ +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 2004/04/22 03:58:09 ernieg Exp $ + +} { +} + +set user_id [ad_conn user_id] +set community_id [dotlrn_community::get_community_id] + +# Permissions +dotlrn::require_user_admin_community -user_id $user_id -community_id $community_id + + +# 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] + +# 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] + +# 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 "Upload IMS Content Package"] + +template::form create course_upload -action course-add-2 -html {enctype multipart/form-data} + +template::element create course_upload course_id \ + -label "course_id" -datatype integer -widget hidden + +template::element create course_upload indb_p \ + -label "indb_p" -datatype integer -widget hidden + +template::element create course_upload fs_package_id \ + -label "fs_package_id" -datatype integer -widget hidden + +template::element create course_upload folder_id \ + -label "folder_id" -datatype integer -widget hidden + +template::element create course_upload upload_file \ + -label "Choose the course zip file to upload" -help_text "Use the \"Browse...\" button to locate your file, then click \"Open\"" -datatype text -widget file + +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 + +ad_return_template + + Index: openacs-4/packages/lorsm/www/course-structure.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/Attic/course-structure.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/course-structure.adp 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,114 @@ + + @title;noquote@ + @context;noquote@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Course Information +
+ Course Name: + + @course_name;noquote@ +
+ Version: + + @version;noquote@ +
+ Metadata?: + + + Yes + + + No + +
+ Identifier: + + @identifier@ +
+ Is SCORM?: + + class="list" style="font-weight: bold;" + + + class="list" + + valign="top" align="left">@isscorm;noquote@ +
+ Storage Folder: + + @instance@ +
+ Created By: + + @created_by@ +
+ Date: + + @creation_date;noquote@ +
+ Submanifests: + + @submanifests@ +
+ Organizations +
+ +
+ @orgs_list;noquote@ +
+
+ +
Index: openacs-4/packages/lorsm/www/course-structure.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/Attic/course-structure.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/course-structure.tcl 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,197 @@ +# packages/lorsm/www/course_structure.tcl + +ad_page_contract { + + View Manifest Course Structure + + @author Ernie Ghiglione (ErnieG@mm.st) + @creation-date 2004-03-31 + @arch-tag 208f2801-d110-45d3-9401-d5eae1f72c93 + @cvs-id $Id: course-structure.tcl,v 1.1 2004/04/22 03:58:09 ernieg Exp $ +} { + man_id:integer,notnull +} -properties { +} -validate { +} -errors { +} + +ad_proc -public getFolderKey { + {-object_id:required} +} { + Gets the Folderkey for a file-storage folder_id + + @option object_id Folder_id for file-storage folder + @author Ernie Ghiglione (ErnieG@mm.st) + +} { + return [db_string select_folder_key "select key from fs_folders where object_id = :object_id"] +} + +# set context & title +set context [list "Course Structure"] +set title "Course Structure" + +if {[db_0or1row manifest " + select + cp.man_id, + cp.course_name, + cp.identifier, + cp.version, + 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.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.man_id = :man_id + and cp.parent_man_id = 0"]} { + + # Sets the variable for display. + set display 1 + + # Course Name + if {[empty_string_p $course_name]} { + set course_name "No course Name" + } + + # Version + if {[empty_string_p $version]} { + set version "No version Available" + } + + # Instance + set instance [apm_package_key_from_id $fs_package_id] + + # Folder + set folder [apm_package_url_from_id $fs_package_id]?[export_vars 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 { + select + org.org_id, + 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 +} { + + + append orgs_list "" } + { metadata "" "no_sort" "" } + } + + set table_item [ad_table -Tmissing_text $missing_text -Ttable_extra_html $table_extra_html blah { + SELECT + o.object_id, + repeat(' ', (tree_level(tree_sortkey) - :indent)* 5) as indent, + i.item_id, + i.title as item_title, + i.hasmetadata, + i.org_id, + 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.item_id = i.item_id +) + else '' + end as identifierref, + m.fs_package_id, + m.folder_id, + m.course_name + FROM + acs_objects o, ims_cp_items i, ims_cp_manifests m + WHERE + o.object_type = 'ims_item' + AND + i.org_id = :org_id + AND + o.object_id = i.item_id + AND + m.man_id = :man_id + ORDER BY + tree_sortkey, object_id + + + } $table_def] + + append orgs_list "$table_item" + + + append orgs_list "" + +} if_no_rows { + append orgs_list "" +} + +append orgs_list "
OrganizationMetadata?Items
$org_title$hasmetadata" + + set indent [expr $indent +1] + set missing_text "Nothing here" + + set table_extra_html { width="100%" } + set table_def { + { title "" "no_sort" "$indent[if {![empty_string_p $identifierref]} {set href \"$item_title\"} else {set href $item_title}][if {$hasmetadata == \"f\"} {set hasmetadata \"\"} else {set hasmetadata \"Metadata\"}]
" + + + + Index: openacs-4/packages/lorsm/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/Attic/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/index.adp 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,16 @@ + + + + + + + + + + +
+

Courses

+ +
Index: openacs-4/packages/lorsm/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/index.tcl 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,96 @@ +ad_page_contract { + Learning Object Repository Management Index page + + @author Ernie Ghiglione (ErnieG@mm.st) + @creation-date 19 January 2003 + @cvs-id $Id: index.tcl,v 1.1 2004/04/22 03:58:09 ernieg Exp $ + +} { +} + +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 ] + + +template::list::create \ + -name d_courses \ + -multirow d_courses \ + -html {width 50%} \ + -key man_id \ + -no_data "No Courses" \ + -elements { + course_name { + label "Course Name" + display_col course_name + link_url_eval {delivery/?[export_vars man_id]} + link_html {title "Access Course"} + + } + course_structure { + label "Course Structure" + display_eval {\[view\]} + link_url_eval {course-structure?[export_vars man_id]} + link_html {title "Course Structure"} + html { align center } + } + hasmetadata { + label "Metadata?" + link_url_eval {md/?[export_vars ims_md_id]} + link_html {title "See metadata"} + html { align center } + } + isscorm { + label "SCORM?" + html { align center } + } + creation_user { + label "Owner" + display_eval {[person::name -person_id $creation_user]} + link_url_eval {[acs_community_member_url -user_id $creation_user]} + } + creation_date { + label "Creation Date" + display_eval {[lc_time_fmt $creation_date "%x %X"]} + } + export { + label "Export" + display_eval {\[zip\]} + link_url_eval {export/?[export_vars folder_id]} + link_html {title "Export as IMS Content Package"} + html { align center } + } + } + +db_multirow -extend { ims_md_id } 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, + 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 + from + ims_cp_manifests cp, acs_objects acs + where + cp.man_id = acs.object_id + and + acs.context_id = :package_id +} { + set ims_md_id $man_id +} + Index: openacs-4/packages/lorsm/www/delivery/body.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/body.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/delivery/body.adp 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + +

Welcome to LEON
Course Delivery System for LORS +

+ +

Click on the Course Index items to start your @course_name@ course.

+ + Index: openacs-4/packages/lorsm/www/delivery/body.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/body.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/delivery/body.tcl 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,17 @@ +# packages/lorsm/www/delivery/body.tcl + +ad_page_contract { + + Course Delivery Body + + @author Ernie Ghiglione (ErnieG@mm.st) + @creation-date 2004-04-09 + @arch-tag a20dffe3-6d54-4ece-858c-4529e82c163b + @cvs-id $Id: body.tcl,v 1.1 2004/04/22 03:58:12 ernieg Exp $ +} { + course_name:notnull +} -properties { +} -validate { +} -errors { +} + Index: openacs-4/packages/lorsm/www/delivery/footer.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/Attic/footer.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/delivery/footer.adp 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + +LEON: LORS Delivery System
+by Ernie Ghiglione + + \ No newline at end of file Index: openacs-4/packages/lorsm/www/delivery/header.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/Attic/header.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/delivery/header.adp 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/lorsm/www/delivery/header.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/Attic/header.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/delivery/header.tcl 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,18 @@ +# packages/lorsm/www/delivery/header.tcl + +ad_page_contract { + + Course Delivery Header + + @author Ernie Ghiglione (ErnieG@mm.st) + @creation-date 2004-04-09 + @arch-tag 3e231cd4-395e-428e-a3ba-ca52cf73a0dd + @cvs-id $Id: header.tcl,v 1.1 2004/04/22 03:58:12 ernieg Exp $ +} { + course_name:notnull +} -properties { +} -validate { +} -errors { +} + +set back_to_community [dotlrn_community::get_community_url [dotlrn_community::get_community_id]] \ No newline at end of file Index: openacs-4/packages/lorsm/www/delivery/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/delivery/index.adp 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,20 @@ + + + + @course_name@ + + + + + + + + + + + <p><br /> + </p> + + + \ No newline at end of file Index: openacs-4/packages/lorsm/www/delivery/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/delivery/index.tcl 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,67 @@ +# packages/lorsm/www/delivery/index.tcl + +ad_page_contract { + + Course Delivery Based on IMS Content Packaging Structure + + @author Ernie Ghiglione (ErnieG@mm.st) + @creation-date 2004-04-09 + @arch-tag cfea182c-c686-4bee-be61-ec73f3d3a10f + @cvs-id $Id: index.tcl,v 1.1 2004/04/22 03:58:12 ernieg Exp $ +} { + man_id:integer,notnull +} -properties { +} -validate { +} -errors { +} +if {[db_0or1row manifest " + select + cp.man_id, + cp.course_name, + cp.identifier, + cp.version, + 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.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.man_id = :man_id + and cp.parent_man_id = 0"]} { + + + # Course Name + if {[empty_string_p $course_name]} { + set course_name "No course Name" + } + + # Version + if {[empty_string_p $version]} { + set version "No version Available" + } + + # Instance + set instance [apm_package_key_from_id $fs_package_id] + + # Folder + set folder [apm_package_url_from_id $fs_package_id]?[export_vars folder_id] + +} else { + + set display 0 + +} + + Index: openacs-4/packages/lorsm/www/delivery/lists.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/Attic/lists.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/delivery/lists.css 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,137 @@ +table.list { + font-family: tahoma, verdana, helvetica; + border-collapse: collapse; + font-size: 85%; +} +table.list-tiny { + font-family: tahoma, verdana, helvetica; + font-size: 75%; + border-collapse: collapse; +} + +p.list-row { + font-family: tahoma, verdana, helvetica; + font-size: 85%; +} + +span.list-label { + color: #6f6f6f; +} + + +tr.list-header { + background-color: white; +} +tr.list-subheader { + background-color: white; + font-weight: bold; + border-top: 3px solid #A0BDEB; + border-bottom: 1px solid #A0BDEB; +} +tr.list-even { + background-color: white; +} +tr.list-odd { + background-color: #EAF2FF; +} +tr.list-spacer { + background-color: #f9f9f9; +} + + +th.list { + padding-left: 16px; + padding-right: 16px; + border-bottom: 3px solid #A0BDEB; +} +th.list-narrow { + padding-left: 4px; + padding-right: 4px; + border-bottom: 3px solid #A0BDEB; +} +th.list a { + color: black; +} +th.list-narrow a { + color: black; +} + + +td.list { + padding-left: 16px; + padding-right: 16px; + border-bottom: 1px solid #A0BDEB; +} +td.list-narrow { + padding-left: 4px; + padding-right: 4px; + border-bottom: 1px solid #A0BDEB; +} + +tr.last td { + border-bottom: 3px solid #A0BDEB; +} + + + +tr.list-paginator { + background-color: #eeeeee; + font-size: 90%; } + + +td.list-button-bar { + padding-bottom: 12px; + font-size: 115%; + +} + +.list-filter { + font-size: 70%; + font-family: tahoma,verdana,arial,helvetica; +} +tr.list-filter-selected { + background-color: #eeeeff; +} +span.list-filter-selected { + color: black; +} +.list-filter-header { + font-size: 70%; + font-family: tahoma,verdana,arial,helvetica; + font-weight: bold; +} +.list-filter-section { + font-size: 70%; + font-family: tahoma,verdana,arial,helvetica; + font-weight: bold; + background-color: #bbbbff; + padding-left: 4px; + padding-top: 4px; + padding-bottom: 4px; + margin-top: 0px; + margin-bottom: 8px; +} + +div.list-inline-filter { + font-size: 70%; + font-family: tahoma,verdana,arial,helvetica; +} +span.list-inline-filter { +} +span.list-inline-filter-selected { + font-weight: bold; +} +a.list-inline-filter { +} + + +td.list-filter-pane { + background-color: #ddddff; + vertical-align: top; +} + +td.list-list-pane { + background-color: white; + valign: center; + padding-left: 10px; +} Index: openacs-4/packages/lorsm/www/delivery/lorsm_delivery.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/Attic/lorsm_delivery.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/delivery/lorsm_delivery.css 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,644 @@ + +/********************************************************************** +/* Site-Wide/Master Templates +/**********************************************************************/ +/* cvs $Id: lorsm_delivery.css,v 1.1 2004/04/22 03:58:12 ernieg Exp $ +/* BODY tag */ + +body { + font-family: verdana, helvetica, arial, sans-serif; + background-color: white; + margin: 0px; +} + + +/* Site Header */ + +#site-header { + background-color: #313063; + color: white; + font-family: tahoma, verdana, helvetica, sans-serif; + font-size: 85%; + padding-top: 4px; + padding-bottom: 4px; + padding-left: 8px; + padding-right: 8px; + text-align: center; +} + +#site-header .system-name { + font-size: 120%; + font-weight: bold; + float: left; +} +#site-header .system-name a { + color: white; + text-decoration: none; +} +#site-header .system-name a:hover { + color: white; + text-decoration: none; +} + +#site-header .users-online { + display: inline; + float: right; + padding-right: 4em; +} + +#site-header .user-greeting { + display: inline; +} + +#site-header .permanent-navigation { + display: inline; + float: right; +} + +#site-header .action-list a { + border: solid 1px #313063; + text-align: center; + padding: 1px; + padding-left: 4px; + padding-right: 4px; + color: white; + text-decoration: none; +} +#site-header .action-list a:hover { + text-decoration: none; + background-color: #666666; + border: solid 1px #999999; +} + + + +/* User Messages */ + +#user-message { + background-color: #ccff99; + padding: 4px; + padding-top: 6px; + padding-bottom: 6px; + font-size: 85%; +} + +#user-message ul { + margin-left: 0; + padding-left: 0; + display: inline; + border: none; +} +#user-message ul li { + margin-left: 0; + padding-left: 2px; + border: none; + list-style: none; +} + + +/* Boxed User Message */ + +.boxed-user-message { + background-color: #ccff99; + padding-left: 12px; + padding-right: 12px; + padding-top: 8px; + padding-bottom: 8px; + font-size: 85%; + border: 1px solid #dd9988; +} + +.boxed-user-message h3 { + color: #990000; + margin-top: 0px; +} + +.boxed-user-message .body { + color: #990000; +} + + +/* Context Bar */ + +#context-bar { + font-family: Arial, sans-serif; + font-size: 11px; + margin-bottom: 2px; + padding-left: 8px; +} +#context-bar #breadcrumbs { + clear: left; + float: left; + padding-top: 3px; +} +#context-bar #breadcrumbs ul { + margin-left: 0; + padding-left: 0; + display: inline; + border: none; +} +#context-bar #breadcrumbs ul li { + margin-left: 0; + padding-left: 2px; + border: none; + list-style: none; + display: inline; +} +#context-bar #navlinks { + float: right; +} + + + +/* Subsite Name */ + +#subsite-name { + font-weight: bold; + font-size: 120%; + font-family: verdana; + padding-left: 8px; +} +a.subsite-name { + color: black; + text-decoration: none; +} +a.subsite-name:hover { + color: black; + text-decoration: none; +} + +/* This wraps everything except site-header and site-footer, and is used to ensure proper margins */ +/* Only used on non-tabbed (navbar and subnavbar) pages */ + +#page-body { + margin-left: 8px; + margin-right: 8px; +} + + + + +/* Title of page, typically used on an H1 tag */ + +.page-title { +} + + +/* Site Footer */ + +#site-footer { + clear: both; + border-top: 1px solid #ccc; + font-family: tahoma, verdana, helvetica, sans-serif; + font-size: 85%; + margin-top: 24px; + padding-top: 3px; + padding-bottom: 3px; + padding-left: 8px; + padding-right: 8px; + text-align: center; +} + +#site-footer ul { + display: inline; + margin-left: 0; + padding-left: 0; + border: none; +} + +#site-footer ul li { + margin-left: 0; + padding-left: 10px; + border: none; + list-style: none; + display: inline; +} + +#site-footer .action-list { + float: left; +} + + + + + + +/********************************************************************** +/* General navigation +/**********************************************************************/ + +/* First level tabs */ + +#navbar-div { + border-bottom: 1px solid #666; +} +#navbar-container { + height: 35px; + position: relative; +} +#navbar { + position: absolute; + height: 21px; + margin: 0px; + padding: 0px 0px 0px 0px; + left: 10px; + bottom: -2px; + margin-top: 10px; + font-family: Arial, sans-serif; + font-size: 80%; + font-weight: bold; +} +html>body #navbar { bottom: 0px } + +#navbar .tab { + height: 16px; + float: left; + background-color: #eeeeee; + border: 1px solid #666; + padding: 2px 5px 2px 5px; + margin: 0px 2px 0px 2px; +} +#navbar a { + text-decoration: none; + color: black; +} +#navbar a:hover { + text-decoration: underline; +} +#navbar #navbar-here { + border-bottom-color: white; + background-color: white; +} +#navbar #navbar-here a { + color: black; +} + +#navbar-body { + border-bottom: 1px solid #016799; + background-color: white; + clear: both; + padding-top: 4px; + padding-left: 12px; + padding-right: 12px; + padding-bottom: 12px; +} + + +/* Second level tabs */ + +#subnavbar-div { + border-bottom: 1px solid #666; +} +#subnavbar-container { + height: 35px; + width: 742px; + position: relative; +} +#subnavbar { + position: absolute; + width: 720px; + height: 21px; + margin: 0px; + padding: 0px 0px 0px 0px; + right: 0px; + bottom: -2px; + margin-top: 10px; + font-family: Arial, sans-serif; + font-size: 80%; + font-weight: bold; +} +html>body #subnavbar { bottom: 0px } + +#subnavbar .tab { + height: 16px; + float: left; + background-color: #eeeeee; + border: 1px solid #666; + padding: 2px 5px 2px 5px; + margin: 0px 2px 0px 2px; +} +#subnavbar a { + text-decoration: none; + color: black; +} +#subnavbar a:hover { + text-decoration: underline; +} +#subnavbar #subnavbar-here { + border-bottom-color: white; + background-color: white; +} +#subnavbar #subnavbar-here a { + color: black; +} + + +#subnavbar-body { + border-bottom: 1px solid #016799; + border-left: 1px solid #016799; + border-right: 1px solid #016799; + background-color: white; + clear: both; + padding-top: 6px; + padding-bottom: 6px; + padding-left: 6px; + padding-right: 6px; +} + + + +/********************************************************************** +/* Widgets +/**********************************************************************/ + + +/* Various forms of links */ + +.action-list { + padding: 0; +} + +.action-list ul { + margin: 0; + padding: 0; + display: inline; + border: none; +} + +.action-list ul li { + margin: 0; + padding: 0; + border: none; + list-style: none; + display: inline; +} + +a.refresh { + color: white; + text-decoration: underline; +} +a.refresh:hover { + color: red; + text-decoration: underline; +} + +a.button { + font: 85% arial; + border: solid 1px black; + background-color: #e1e1e1; + text-align: center; + padding: 1px; + padding-left: 8px; + padding-right: 8px; + color: black; + text-decoration: none; + white-space: nowrap; +} +a.button:link { + text-decoration: none; + border: solid 1px black; +} +a.button:visited { + text-decoration: none; + border: solid 1px black; +} +a.button:hover { + text-decoration: none; + background-color: #ccc; + border: solid 1px black; +} +a.button:active { + text-decoration: none; + border: solid 1px black; +} + +a.admin:link, a.admin:visited { + color: #f00; + font-family: verdana; + font-size: 11px; + font-weight: normal; +} + +a.admin:hover { + color: #fff; + background: #f00; +} + + +ul.action-links li { + list-style: circle url(/resources/acs-subsite/action-link-marker.png); + margin: 8px; + margin-left: -16px; +} + +div.subsite-context-bar { + font-size: 85%; + margin-bottom: 4px; + position: relative; +} + + + +/* Text Styles */ + +h1 { + font-size: 120%; + margin-bottom: 12px; +} +h2 { + font-size: 115%; + margin-bottom: 12px; +} +h3 { + font-size: 110%; + margin-bottom: 12px; +} +h4 { + font-size: 105%; + margin-bottom: 12px; +} + +.small { + font-size: 85%; +} + +.highlight { + background-color: #ffc; +} + + +/* Portlets */ + +.portlet h2 { + background: #dddddd; + padding: 2px 8px 2px 8px; + margin: 0; +} + +.portlet-header { + background: #dddddd; +} + +.portlet-header h2 { + padding: 2px 8px 2px 8px; + margin: 0; +} + +.portlet .portlet-body { + border: 1px dotted #999; + border-top: 0px; + padding: 6px 8px 6px 8px; +} + + + + + + + + +/* Generally Available Tabs */ + +#tabs-div { + border-bottom: 1px solid #666; +} +#tabs-container { + height: 15px; + position: relative; +} +#tabs { + position: absolute; + height: 21px; + margin: 0px; + padding: 0px 0px 0px 0px; + left: 10px; + bottom: -2px; + margin-top: 10px; + font-family: Arial, sans-serif; + font-size: 80%; + font-weight: bold; +} +html>body #tabs { bottom: 0px } + +#tabs .tab { + height: 16px; + float: left; + background-color: #cccccc; + border: 1px solid #666; + padding: 2px 5px 2px 5px; + margin: 0px 2px 0px 2px; +} +#tabs .disabled { + color: #999999; +} +#tabs a { + text-decoration: none; + color: black; +} +#tabs a:hover { + text-decoration: underline; +} +#tabs #tabs-here { + border-bottom-color: #f6f6f6; + background-color: #f6f6f6; +} +#tabs #tabs-here a { + color: black; +} + +#tabs-body { + border-bottom: 1px solid #016799; + background-color: #f6f6f6; + clear: both; + padding-top: 4px; + padding-bottom: 4px; + padding-left: 4px; + padding-right: 4px; +} + + + + + + + + + + + + +/********************************************************************** +/* acs-developer-support Toolbar +/**********************************************************************/ +/* LARS: This ought to go in the developer-support package, somehow */ + +#developer-toolbar { + background-color: #616093; + color: white; + font-family: tahoma, verdana; + font-size: 80%; + padding-left: 8px; + padding-right: 8px; + padding-top: 2px; + padding-bottom: 2px; +} +#developer-toolbar td a { + border: solid 1px #616093; + text-align: center; + color: white; + text-decoration: none; +} +#developer-toolbar td a:hover { + text-decoration: none; + background-color: #999999; + border: solid 1px #cccccc; +} +#developer-toolbar #search { + font: 80% tahoma; + color: white; +} +#developer-toolbar #search input { + font: 100% tahoma; +} +#developer-toolbar td a.on { + background-color: #888888; + border: solid 1px #cccccc; +} +#developer-toolbar td a:hover.on { + background-color: #666666; + border: solid 1px #999999; +} + +/* Developer-support footer */ + +#developer-support-footer { + float: left; + padding: 6px; + border: solid 1px gray; + background-color: #e1e1e1; + margin-top: 4px; +} + + + + + + + + + + + +/********************************************************************** +/* DEPRECATED CLASSES +/**********************************************************************/ + +/* Deprecated, not sure what it's replaced with just yet */ +a.action { + margin: 8px; + margin-left: 24px; + display: list-item; + list-style: circle url(/resources/acs-subsite/right.gif); +} + + Index: openacs-4/packages/lorsm/www/delivery/toc.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/Attic/toc.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/delivery/toc.adp 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + +@table_item;noquote@ +
+ + \ No newline at end of file Index: openacs-4/packages/lorsm/www/delivery/toc.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/Attic/toc.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/delivery/toc.tcl 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,91 @@ +# packages/lorsm/www/delivery/toc.tcl + +ad_page_contract { + + Course Delivery Table of Content + + @author Ernie Ghiglione (ErnieG@mm.st) + @creation-date 2004-04-09 + @arch-tag 553390f0-450e-48db-99f0-c5dcb17978b8 + @cvs-id $Id: toc.tcl,v 1.1 2004/04/22 03:58:12 ernieg Exp $ +} { + man_id:integer,notnull +} -properties { +} -validate { +} -errors { +} + +set table_item "" +db_foreach organizations { + select + org.org_id, + 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 +} { + + set indent [expr $indent +1] + set missing_text "Nothing here" + + set table_extra_html { width="100%" } + set table_def { + { title "" "no_sort" "$indent[if {![empty_string_p $identifierref]} {set href \"$item_title\"} else {set href $item_title}]" } + } + + set table_item [concat $table_item [ad_table -Tmissing_text $missing_text -Ttable_extra_html $table_extra_html blah { + SELECT + o.object_id, + repeat(' ', (tree_level(tree_sortkey) - :indent)* 4) as indent, + i.item_id, + i.title as item_title, + i.hasmetadata, + i.org_id, + 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.item_id = i.item_id + ) + else '' + end as identifierref, + m.fs_package_id, + m.folder_id, + m.course_name + FROM + acs_objects o, ims_cp_items i, ims_cp_manifests m + WHERE + o.object_type = 'ims_item' + AND + i.org_id = :org_id + AND + o.object_id = i.item_id + AND + m.man_id = :man_id + ORDER BY + object_id, tree_sortkey + + + } $table_def]] + + append orgs_list "$table_item" + + + append orgs_list "" + +} + + Index: openacs-4/packages/lorsm/www/doc/creating_package.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/creating_package.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/doc/creating_package.html 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,124 @@ + + + +LORS Tutorial - Creating and Authoring Courses + + + +

LORS Creating Courses

+LORS Documentation: Creating/Authoring Courses +
+

+By Ernie Ghiglione. +

+

Intro to Authoring Courses

+ + + + +
+ +

Although, LORS doesn't provide authoring tools (except for some metadata) I thought of explaining how to use Reload to author a simple course using SCORM so you could see how easy it is. +

You can get Reload Editor from the Reload Project website. Reload is a really nice tool for packaging and creating metadata. It supports IMS and SCORM extensions and runs on Java, so it can be used in any platform that supports it. Therefore, here's an example on how to create a course with Reload. + +

On this part, we will cover how to create an SCORM Course Package following these steps: + +

    +
  1. Select the Package Specification to Use
  2. +
  3. Create Metadata for the Course
  4. +
  5. Add Organizations
  6. +
  7. Add Items and subitems
  8. +
  9. Add Resource
  10. +
  11. Linking Items to Resources
  12. +
  13. Exporting your Course to a Package
  14. +
+ +

Select the Package specification to be used

+
+ +

Once you have open Reload, you have the chance to create a package using IMS Content Packaging 1.1.3 or ADL SCORM 1.2. For our example, we will create a SCORM package.

+

+

Once selected, Reload will prompt you for a directory where to put your course. I suggest you select a new blank directory as shown in the pic.

+

+
+ +

Create Metadata for your Course!

+
+

Creating basic metadata for your course is critical and a requirement as this information will later be used to determine your package structure as well as the provide information about your course. To do so, you can right-click on the manifest tag and select "Add Metadata"... +

+ +

But before you go about creating the metadata for your course, you need to provide the Metadata schema and version you will use. Since we are using SCORM packaging, we simply don't have to as there is only one choice. But if we would be using another metadata set, we would be prompt with choices.

+ +

Same goes for the Metadata schema version:

+ +

+Once we added the schema and the version, let's add the course metadata using the Reload's excellent metadata editor:

+ +

At bare minimum, add a title for your course. But the more information you can provide about your course, better you make your resources to be findable and, therefore, reusable!. If you have questions about what each of these fields mean, you can have a look at IMS Metadata specifications.

+ +

+

+ +

Add Organizations

+
+

Now, let's add some organizations. Usually, unless you know why you want to have multiple organization, it is better to stick to one and only one organization. But again, it is upto you how you want to organize your course. Reload allows you to add multiple organizations and LORS also permits their use as well. So, if you are passionate about creating a multiple organization course, please go for it. Otherwise, just create one organization

+ +

+ +

Add Items

+
+

Here's where the fun starts... you can use items to create the structure of your course. Say for example you want to structure your clases based on timeline, then you can create items that indicate the concepts to be learned thru the weeks that the course will take. If that is the case, then you can start creating an item and call it "Week 1"...

+ +

And within the Week1 item you can have subitems specifing the concepts or units of learning to be gain that week.

+ +

For our example, we have two subitems for Week 1: Lecture and Labs. Note that we can create more subitems within this subitems if required.

+ +

You can keep adding Weeks as you please, as well as subitems. For sake of brevity, we'll continue with our example

+
+ +

Adding Resources

+
+

Ok, so now we have the structure of our course, but we need to link that structure to content (the actual files that explain those concepts in the structure).

For this, Reload also offers a very cool feature to import your content files all at once. Click on "File" and then proceed to "Import Resources"...

+ +

An select the folder where all your resources are... and Reload will add those to the folder where the course is being created.

+ +

Take into account that you can do this several times if your resources are scattered around the place.

+

Now, as you can see, we have added the "Course_Materials" folder to our course. But these have not being added as Resources as yet.

+ +

If you just drag-and-drop the week1 folder into the Resources folder on the left box, you will see that Reload automatically links the files in the directory as resources:

+ +

+

Linking Items to Resources

+
+

So to recap, we have added the structure of the course (by adding the items) and also the content files (as resources)... so that's all good, but now we need to link both, so we know which content file represents a unit of study (or lecture, or week, etc).

+

Hence, let's go back to the items that we created... In this case, we click on the Item "Lecture" and to link it to the resource "Course_Materials/week1/LectureNotes.pdf", we simply click on the Referenced element to select the resource that we need to link it to.
In plain English, we are telling Reload: "Ok, so this 'Lecture' Item has to be referenced to the 'Course_Materials/week1/LectureNotes.pdf' resource"

+ +

+

Exporting your Course to a Package

+
+

Once we linked all the items we want to link to resources, then we are ready to export all your course structure and content to a single zipped file by clicking on "File" and then "Zip Content Package".!

+ +

Choose the name of the file and location to be saved and...

+ +

Voila... you have yourself a course

+

+
+
+cvs: $Id: creating_package.html,v 1.1 2004/04/22 03:58:09 ernieg Exp $ + + \ No newline at end of file Index: openacs-4/packages/lorsm/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/index.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/doc/index.html 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,37 @@ + + + +LORS Documentation + + + +

LORS Management

+LORS Documentation +
+By Ernie Ghiglione. +

+

    +
  1. LORS Management Overview
  2. + +
  3. Authoring/Creating Course Packages
  4. +
+

+


+cvs: $Id: index.html,v 1.1 2004/04/22 03:58:09 ernieg Exp $ + + \ No newline at end of file Index: openacs-4/packages/lorsm/www/doc/lors_overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/lors_overview.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/doc/lors_overview.html 22 Apr 2004 03:58:09 -0000 1.1 @@ -0,0 +1,103 @@ + + + +LORS Documentation - LORS Management + + + +

LORS Management

+LORS Documentation: LORS Management +
+By Ernie Ghiglione. + + +

Overview

+ + + + +
+ +

Now that we know how to package content, and we have created our own course package, we are ready to see the features that LORS Management has to offer.

+Before we start though, let's have an introduction to LORS.

+ +

Learning Object Repository System (LORS)

+ +

LORS is a set of libraries that expands OpenACS/.LRN to incorporate IMS Metadata and Content Packaging specifications as well as ADL SCORM extensions. LORS does not provide a user interface, as it is only a set of libraries and works as a singleton. It has been conceived so other applications/packages can make use of its functions.

+ +

Architecture

+ +

...

+ +

LORS Management (LORSm)

+ +

Since LORS doesn't provide an interface, I created a separate package (that enhances the original random-package; first interface to LORS. LORSm puts together the LORS functions to import, export, manage and deliver IMS Content Packages, IMS Metadata and SCORM compliant packages.

+ +

+ +

LORS Management Features

+ +

As of version 0.1d, LORSm supports:

+
    +
  1. Import Course Content (IMS CP & SCORM).
  2. +
  3. Course Management
  4. +
  5. Course Structure
  6. +
  7. Metadata Viewer
  8. +
  9. Course Delivery
  10. +
  11. Export Course Content
  12. +
+ +

Importing Course Content

+
+ +

To import a content into LORS, you will need to have admin rights to a class/community and the LORSm applet installed (see installation instructions for details). In your class/community admin screen, you will a link to LORS Management Administration: +

+

+
+

Course Management

+
+

Once you click there, you are presented with all different courses that have been already being uploaded into your class/community instance.

+

Here, you can manage all courses and see all their resources:

+

+
+ +

Course Structure

+
+

On Course Structure, you can see the instrinsic characteristics of the package. These characteristic include the type of package, its metadata, the actual file-storage folder where the course is places (and you can access it, just as you would do with any file-storage folder), whether the course contains submanifests, the organizations -their metadata, and the tree(s) of items that belong to each organization.

+Note that all items that have references to resources have their correspondent hyperlink to the file(s) described in the resource(s).

. +

+
+ +

Metadata Viewer

+
+

Hopefully all courses will contain as much metadata as possible, as that makes the course findable and reusable. In order to see the content of the course and its details, LORSm incorporates a very versatily metadata viewer that shows all nine metadata sections as described in the IMS Metadata specifications. (Note version 0.1d does not include online editing of metadata, that will come a bit later).

Although the picture only shows the metadata for the manifest (course) we can browse and view metadata for all elements that are part of the manifest: manifest, organizations, items, resources, and files.

+

+
+ +

Course Delivery

+
+

Using the structure of the IMS/SCORM package, we provide a pseudo course delivery feature that renders the contents of the code to the learner.

Acording to the organizations, items and subitems, we create a tree of hierarquical order similar to an index that the learner can use to browse thru the content. A set of frames that permit easy navigation (although, I don't quite like the frames though) is rendered. The top frames provides the user with information about the course he/she is taking as well as an exit button. On the left, LORSm renders the actual index based on the structural information of the course (again, given by the organizations, items, subitems and their correspondent links to the resources). The central frame is where the content is display when the learner clicks on the item on the left frame (index). And finally the bottom frame shows information about the delivery tool (and hopefully a set of sequencing buttons will be display so items can be automatically sequenced without the need to click on the index).

+

+ +
+ +
+
+cvs: $Id: lors_overview.html,v 1.1 2004/04/22 03:58:09 ernieg Exp $ + + \ No newline at end of file Index: openacs-4/packages/lorsm/www/doc/images/snapshot01.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot01.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot02.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot02.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot03.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot03.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot04.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot04.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot05.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot05.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot06.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot06.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot07.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot07.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot08.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot08.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot09.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot09.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot10.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot10.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot11.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot11.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot12.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot12.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot13.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot13.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot14.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot14.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot15.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot15.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot16.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot16.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot17.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot17.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot18.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot18.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot20.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot20.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot21.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot21.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot22.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot22.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot23.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot23.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot24.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot24.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot25.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot25.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot26.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot26.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/doc/images/snapshot27.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/doc/images/Attic/snapshot27.png,v diff -u Binary files differ Index: openacs-4/packages/lorsm/www/export/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/export/Attic/index.vuh,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/export/index.vuh 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,77 @@ +# packages/lorsm/www/export/index.vuh + +ad_page_contract { + + Export IMS Content Packages from the Content Repository + + @author Ernie Ghiglione (ErnieG@mm.st) + @creation-date 2004-04-15 + @arch-tag 59c959a1-a9ce-450d-a33e-5221db50abd7 + @cvs-id $Id: index.vuh,v 1.1 2004/04/22 03:58:12 ernieg Exp $ +} -query { + {folder_id:integer,optional} +} + +# Based on Yun's file system exports + +if {[exists_and_not_null folder_id]} { + set download_name [fs::get_file_system_safe_object_name -object_id $folder_id] + + # We get rid of spaces since they are annoying + regsub -all { } $download_name {_} download_name + + set tmp_dir $download_name + set ext "zip" + if {![empty_string_p $ext]} { + append download_name ".${ext}" + } + + ad_returnredirect "${folder_id}/${download_name}" + ad_script_abort +} + +# convenient way to get the values out of a list +foreach {folder_id download_name} [split [ad_conn path_info] /] {break} + +if {![fs::object_p -object_id $folder_id]} { + ad_return_complaint 1 "Object \#$folder_id is not a file storage object." + ad_script_abort +} + +set user_id [ad_conn user_id] +if {$user_id == 0} { + set user_id "" +} + +# publish the object to the file system +set in_path [ns_tmpnam] +file mkdir $in_path + +set file [fs::publish_object_to_file_system -object_id $folder_id -path $in_path -user_id $user_id] +set file_name [file tail $file] + +# 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}] + +# get the archive command +#set cmd [fs::get_archive_command -in_file $file_name -out_file $out_file] +set cmd "zip -r $out_file *" + + +# create the archive +with_catch errmsg { + exec bash -c "cd '$file'; $cmd; cd -" +} { + # some day we'll do something useful here + error $errmsg +} + +# return the archive to the connection. +ns_returnfile 200 application/octet-stream $out_file + +# clean everything up +file delete -force $in_path +file delete -force $out_path Index: openacs-4/packages/lorsm/www/lib/md-record.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/lib/Attic/md-record.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/lib/md-record.adp 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1 @@ + \ No newline at end of file Index: openacs-4/packages/lorsm/www/lib/md-record.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/lib/Attic/md-record.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/lib/md-record.tcl 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,33 @@ +set actions [list] + +lappend actions "General MD" [export_vars -base generalmd {ims_md_id}] "View General Metadata" +lappend actions "Lifecycle MD" [export_vars -base lifecyclemd {ims_md_id}] "View Lifecycle Metadata" +lappend actions "Meta MD" [export_vars -base metamd {ims_md_id}] "View Meta Metadata" +lappend actions "Technical MD" [export_vars -base technicalmd {ims_md_id}] "View Technical Metadata" +lappend actions "Educational MD" [export_vars -base educationalmd {ims_md_id}] "View Educational Metadata" +lappend actions "Rights MD" [export_vars -base rightsmd {ims_md_id}] "View Rights Metadata" +lappend actions "Relation MD" [export_vars -base relationmd {ims_md_id}] "View Relation Metadata" +lappend actions "Annotation MD" [export_vars -base generalmd {ims_md_id}] "View Annotation Metadata" +lappend actions "Classification MD" [export_vars -base classificationmd {ims_md_id}] "View Classification Metadata" + + +# Presentation +template::list::create \ + -name d_pres \ + -multirow d_pres \ + -no_data "-" \ + -actions $actions \ + -elements { + object_type { + label "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/lorsm/www/md/educationalmd.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/educationalmd.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/educationalmd.adp 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,68 @@ + +@title;noquote@ +@context;noquote@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Educational Metadata
Interactivity Type:
Learning Resource Type:
Interactivity Level:
Semantic Density:
Intended End User Role:
Context:
Typical Age Range:
Difficulty:
Typical Learning Time:
Description:
Language:
Index: openacs-4/packages/lorsm/www/md/educationalmd.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/educationalmd.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/educationalmd.tcl 22 Apr 2004 03:58:12 -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 2004/04/22 03:58:12 ernieg Exp $ + +} { + ims_md_id:integer +} + +# set context & title +set context [list "IMS Metadata Editor - Educational MD"] +set title "Educational MD" + +# Educational Interactivity Type +template::list::create \ + -name d_ed_intt \ + -multirow d_ed_intt \ + -no_data "No Interactivity Type Available" \ + -actions [list "Add Interactivity Type" [export_vars -base educationalmd_intt {ims_md_id}] "Add another Interactivity Type"] \ + -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 "No Learning Resource Type Available" \ + -actions [list "Add Learning Resource Type" [export_vars -base educationalmd_lrt {ims_md_id}] "Add another Learning 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 +} + +# Educational Interactivity Level +template::list::create \ + -name d_ed_intl \ + -multirow d_ed_intl \ + -no_data "No Interactivity Level Available" \ + -actions [list "Add Interactivity Level" [export_vars -base educationalmd_intl {ims_md_id}] "Add another Interactivity Level"] \ + -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 "No Semantic Density Available" \ + -actions [list "Add Semantic Density" [export_vars -base educationalmd_semd {ims_md_id}] "Add another Semantic Density"] \ + -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 "No Intended End User Role Available" \ + -actions [list "Add Intended End User Role" [export_vars -base educationalmd_ieur {ims_md_id}] "Add another Intended End User Role"] \ + -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 "No Context Available" \ + -actions [list "Add Context" [export_vars -base educationalmd_cont {ims_md_id}] "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 "No Typical Age Range Available" \ + -actions [list "Add Typical Age Range" [export_vars -base educationalmd_tar {ims_md_id}] "Add another Typical Age Range"] \ + -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 "No Difficulty Available" \ + -actions [list "Add Difficulty Type" [export_vars -base educationalmd_dif {ims_md_id}] "Add another Difficulty"] \ + -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 "No Typical Learning Time Available" \ + -actions [list "Add Typical Learning Time" [export_vars -base educationalmd_tlt {ims_md_id}] "Add another Typical Learning Time"] \ + -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 "No Description Available" \ + -actions [list "Add Description" [export_vars -base educationalmd_tlt {ims_md_id}] "Add another Description"] \ + -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 "No Language Available" \ + -actions [list "Add Language" [export_vars -base educationalmd_lang {ims_md_id}] "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 +} \ No newline at end of file Index: openacs-4/packages/lorsm/www/md/generalmd.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/generalmd.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/generalmd.adp 22 Apr 2004 03:58:12 -0000 1.1 @@ -0,0 +1,55 @@ + +@title;noquote@ +@context;noquote@ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
General Metadata
Titles:
Catalog entries:
Languages:
Descriptions:
Keywords:
Coverage:
Structure:
Aggregation Levels:
Index: openacs-4/packages/lorsm/www/md/generalmd.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/generalmd.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/generalmd.tcl 22 Apr 2004 03:58:13 -0000 1.1 @@ -0,0 +1,225 @@ +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 2004/04/22 03:58:13 ernieg Exp $ + +} { + ims_md_id:integer +} + +# set context & title +set context [list "IMS Metadata Editor - General MD"] +set title "General MD" + +# General Title +template::list::create \ + -name d_gen_titles \ + -multirow d_gen_titles \ + -no_data "No Titles Available" \ + -actions [list "Add title" [export_vars -base general_title {ims_md_id}] "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 "No Description Available" \ + -actions [list "Add Description" [export_vars -base general_desc {ims_md_id}] "Add another Description"] \ + -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 "No Catalog Entry Available" \ + -actions [list "Add Catalog-Entry" [export_vars -base general_cata {ims_md_id}] "Add another Catalog-Entry"] \ + -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 "No Language Available" \ + -actions [list "Add Language" [export_vars -base general_lang {ims_md_id}] "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 "No Keywords Available" \ + -actions [list "Add Keywords" [export_vars -base general_key {ims_md_id}] "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 "No Coverage Available" \ + -actions [list "Add Coverage" [export_vars -base general_cover {ims_md_id}] "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 "No Structure Available" \ + -actions [list "Add Structure" [export_vars -base general_struc {ims_md_id}] "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 "No Aggregation Level Available" \ + -actions [list "Add Aggregation Level" [export_vars -base general_aggl {ims_md_id}] "Add another Aggregation Level"] \ + -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 +} \ No newline at end of file Index: openacs-4/packages/lorsm/www/md/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/index.adp 22 Apr 2004 03:58:13 -0000 1.1 @@ -0,0 +1,7 @@ + +@title;noquote@ +@context;noquote@ + + + Index: openacs-4/packages/lorsm/www/md/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/index.tcl 22 Apr 2004 03:58:13 -0000 1.1 @@ -0,0 +1,14 @@ +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 2004/04/22 03:58:13 ernieg Exp $ + +} { + ims_md_id:integer +} + +# set context +set context [list "IMS Metadata Editor"] +set title "IMS Metadata Editor" \ No newline at end of file Index: openacs-4/packages/lorsm/www/md/lifecyclemd.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/lifecyclemd.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/lifecyclemd.adp 22 Apr 2004 03:58:13 -0000 1.1 @@ -0,0 +1,28 @@ + +@title;noquote@ +@context;noquote@ + + + + + + + + + + + + + + + + + + + + + + + +
Lifecycle Metadata
Version:
Status:
Contributes:
Index: openacs-4/packages/lorsm/www/md/lifecyclemd.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/lifecyclemd.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/lifecyclemd.tcl 22 Apr 2004 03:58:13 -0000 1.1 @@ -0,0 +1,102 @@ +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 2004/04/22 03:58:13 ernieg Exp $ + +} { + ims_md_id:integer +} + +# set context & title +set context [list "IMS Metadata Editor - Lifecycle MD"] +set title "Lifecycle MD" + +# Lifecycle version +template::list::create \ + -name d_lf_ver \ + -multirow d_lf_ver \ + -no_data "No Version Available" \ + -actions [list "Add Version" [export_vars -base lifecycle_version {ims_md_id}] "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 "No Version Available" \ + -actions [list "Add Status" [export_vars -base lifecycle_stat {ims_md_id}] "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 "No Contributors Available" \ + -actions [list "Add Contributors" [export_vars -base lifecycle_cont {ims_md_id}] "Add another Contributors"] \ + -html { align right style "width: 100%;" } \ + -elements { + role { + label "Role" + } + entity { + label "Entity" + } + cont_date { + label "Contribution Date" + } + cont_date_ls { + label "Description" + } + } + +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/lorsm/www/md/metamd.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/metamd.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/metamd.adp 22 Apr 2004 03:58:13 -0000 1.1 @@ -0,0 +1,33 @@ + +@title;noquote@ +@context;noquote@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Meta Metadata
Catalog:
Contributes:
Scheme:
Language:
+ Index: openacs-4/packages/lorsm/www/md/metamd.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/metamd.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/metamd.tcl 22 Apr 2004 03:58:13 -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 2004/04/22 03:58:13 ernieg Exp $ + +} { + ims_md_id:integer +} + +# set context & title +set context [list "IMS Metadata Editor - Metadata MD"] +set title "Metadata MD" + +# Metametadata Catalogentry +template::list::create \ + -name d_md_cata \ + -multirow d_md_cata \ + -no_data "No Catalog Entry Available" \ + -actions [list "Add Catalog-Entry" [export_vars -base metamd_cata {ims_md_id}] "Add another Catalog-Entry"] \ + -html { align right style "width: 100%;" } \ + -elements { + catalog { + label "Catalog" + } + entry_ls { + label "\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 "No Contributors Available" \ + -actions [list "Add Contributors" [export_vars -base metamd_cont {ims_md_id}] "Add another Contributors"] \ + -html { align right style "width: 100%;" } \ + -elements { + role { + label "Role" + } + entity { + label "Entity" + } + cont_date { + label "Contribution Date" + } + cont_date_ls { + label "Description" + } + } + +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 "No Scheme Available" \ + -actions [list "Add Scheme" [export_vars -base metamd_scheme {ims_md_id}] "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 "No Language Available" \ + -actions [list "Add Language" [export_vars -base metamd_lang {ims_md_id}] "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 +} \ No newline at end of file Index: openacs-4/packages/lorsm/www/md/relationmd.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/relationmd.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/relationmd.adp 22 Apr 2004 03:58:13 -0000 1.1 @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + +
Relation Metadata
Cost:
\ No newline at end of file Index: openacs-4/packages/lorsm/www/md/relationmd.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/relationmd.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/relationmd.tcl 22 Apr 2004 03:58:13 -0000 1.1 @@ -0,0 +1,33 @@ +ad_page_contract { + Displays/Adds IMS Metadata Relation + + @author Ernie Ghiglione (ErnieG@mm.st) + @creation-date 30 January 2004 + @cvs-id $Id: relationmd.tcl,v 1.1 2004/04/22 03:58:13 ernieg Exp $ + +} { + ims_md_id:integer +} + + +# Rights Cost +template::list::create \ + -name d_re_kind \ + -multirow d_ri_cost \ + -no_data "No Cost Available" \ + -actions [list "Add Cost" [export_vars -base educationalmd_cost {ims_md_id}] "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 +} Index: openacs-4/packages/lorsm/www/md/rightsmd.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/rightsmd.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/rightsmd.adp 22 Apr 2004 03:58:13 -0000 1.1 @@ -0,0 +1,28 @@ + +@title;noquote@ +@context;noquote@ + + + + + + + + + + + + + + + + + + + + + + + +
Rights Metadata
Cost:
Copyright or other Restrictions:
Description:
\ No newline at end of file Index: openacs-4/packages/lorsm/www/md/rightsmd.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/rightsmd.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/rightsmd.tcl 22 Apr 2004 03:58:13 -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 2004/04/22 03:58:13 ernieg Exp $ + +} { + ims_md_id:integer +} + +# set context & title +set context [list "IMS Metadata Editor - Rights MD"] +set title "Rights MD" + +# Rights Cost +template::list::create \ + -name d_ri_cost \ + -multirow d_ri_cost \ + -no_data "No Cost Available" \ + -actions [list "Add Cost" [export_vars -base educationalmd_cost {ims_md_id}] "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 "No Copyright or other Restrictions Available" \ + -actions [list "Add Copyright or other Restrictions" [export_vars -base educationalmd_caor {ims_md_id}] "Add another Copyright or other Restrictions"] \ + -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 "No Description Available" \ + -actions [list "Add Description" [export_vars -base educationalmd_desc {ims_md_id}] "Add another Description"] \ + -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 +} \ No newline at end of file Index: openacs-4/packages/lorsm/www/md/technicalmd.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/technicalmd.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/technicalmd.adp 22 Apr 2004 03:58:13 -0000 1.1 @@ -0,0 +1,48 @@ + +@title;noquote@ +@context;noquote@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Technical Metadata
Formats:
Size:
Locations:
Requirements:
Installation Remarks:
Other Platform Requirements:
Duration:
\ No newline at end of file Index: openacs-4/packages/lorsm/www/md/technicalmd.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/md/Attic/technicalmd.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/md/technicalmd.tcl 22 Apr 2004 03:58:13 -0000 1.1 @@ -0,0 +1,188 @@ +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 2004/04/22 03:58:13 ernieg Exp $ + +} { + ims_md_id:integer +} + +# set context & title +set context [list "IMS Metadata Editor - Technical MD"] +set title "Technical MD" + +# Technical Format +template::list::create \ + -name d_te_form \ + -multirow d_te_form \ + -no_data "No Format Available" \ + -actions [list "Add Format" [export_vars -base technicalmd_form {ims_md_id}] "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 "No Size Available" \ + -actions [list "Add Size" [export_vars -base technicalmd_size {ims_md_id}] "Add another Size"] \ + -html { align right style "width: 100%;" } \ + -elements { + t_size { + label "" + } + } + +db_multirow d_te_size select_te_size { + select + t_size + 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_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 "No Requirements Available" \ + -actions [list "Add Requirements" [export_vars -base technicalmd_req {ims_md_id}] "Add another Requirement"] \ + -html { align right style "width: 100%;" } \ + -elements { + type { + label "Type" + } + name { + label "Name" + } + min_version { + label "Min Version" + } + max_version { + label "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 "No Installation Remarks Available" \ + -actions [list "Add Installation Remark" [export_vars -base technicalmd_inst {ims_md_id}] "Add another Installation remark"] \ + -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 "No Other Platform Requirements Available" \ + -actions [list "Add Other Platform Requirements" [export_vars -base technicalmd_otr {ims_md_id}] "Add another Other Platform Requiements"] \ + -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 "No Duration Available" \ + -actions [list "Add Duration" [export_vars -base technicalmd_dur {ims_md_id}] "Add another Duration"] \ + -html { align right style "width: 100%;" } \ + -elements { + duration { + label "" + } + dur_descrip { + label "" + } + } + +db_multirow d_te_dur select_te_dur { + select + duration, + '[' || duration_l || ']' || ' ' || duration_s as dur_descrip + from + ims_md_technical + where + ims_md_id = :ims_md_id +}