ad_page_contract { Serve a course file from the content repository. URL consists of the object id of the course followed by the relative URL. @cvs-id $Id: index.vuh,v 1.2 2010/05/14 16:57:54 donb Exp $ } set id [lindex [split [ad_conn path_info] /] 0] set resource_url [join [lrange [split [ad_conn path_info] /] 1 end] /] permission::require_permission \ -party_id [ad_conn user_id] \ -object_id $id \ -privilege read db_1row get_folder_id {} set item_id [content::item::get_id \ -item_path $resource_url \ -root_folder_id $folder_id] # Give a nice error if the item doesn't exist, return its content if it does. if { $item_id eq "" } { ns_return 200 text/html [scorm_player::rte_api::specialPage_GET -id $id -page _NOTHING_] } else { cr_write_content -item_id $item_id } ad_script_abort