Index: openacs-4/packages/assessment/www/admin/asm-action-admin.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/admin/asm-action-admin.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/assessment/www/admin/asm-action-admin.adp 25 Jan 2005 22:03:44 -0000 1.2 +++ openacs-4/packages/assessment/www/admin/asm-action-admin.adp 10 Feb 2005 21:30:08 -0000 1.3 @@ -1,6 +1,6 @@ #assessment.action_admin# -@context_bar;noquote@ +@context;noquote@

Index: openacs-4/packages/assessment/www/admin/asm-action-admin.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/admin/asm-action-admin.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/assessment/www/admin/asm-action-admin.tcl 25 Jan 2005 22:03:44 -0000 1.2 +++ openacs-4/packages/assessment/www/admin/asm-action-admin.tcl 10 Feb 2005 21:30:08 -0000 1.3 @@ -6,8 +6,8 @@ } { } -set context_bar [ ad_context_bar Actions] - +set context [list Actions] +set package_id [ad_conn package_id] #See the params we already have template::list::create \ -name actions \ Index: openacs-4/packages/assessment/www/admin/asm-action-admin.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/admin/asm-action-admin.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/www/admin/asm-action-admin.xql 24 Jan 2005 17:45:56 -0000 1.1 +++ openacs-4/packages/assessment/www/admin/asm-action-admin.xql 10 Feb 2005 21:30:08 -0000 1.2 @@ -5,23 +5,18 @@ select name,description,tcl_code from as_actions - where action_id = :action_id + where action_id = :action_id - - - insert into as_actions (action_id,name,description,tcl_code) - values(:action_id,:name,:description,:tcl_code) - - - - select action_id, name,description from as_actions + select a.action_id, a.name,a.description from as_actions a where (select package_id from acs_objects + where object_id=a.action_id)=:package_id + Index: openacs-4/packages/assessment/www/admin/asm-action-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/admin/asm-action-new.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/assessment/www/admin/asm-action-new.tcl 25 Jan 2005 22:03:44 -0000 1.2 +++ openacs-4/packages/assessment/www/admin/asm-action-new.tcl 10 Feb 2005 21:30:08 -0000 1.3 @@ -7,6 +7,10 @@ action_id:optional } +set package_id [ad_conn package_id] +set user_id [ad_conn user_id] +set node_id [ad_conn node_id] + if { ![ad_form_new_p -key action_id] } { set page_title [_ assessment.Edit_Assessment] set parameter_exist "y" @@ -43,10 +47,10 @@ where action_id = :action_id } -new_data { - db_dml insert_action {} + db_exec_plsql insert_action {} } -edit_data { db_dml edit_action {} -} -on_submit { +} -after_submit { ad_returnredirect "asm-action-new?action_id=$action_id" } Index: openacs-4/packages/assessment/www/admin/asm-action-new.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/admin/asm-action-new.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/www/admin/asm-action-new.xql 24 Jan 2005 17:45:56 -0000 1.1 +++ openacs-4/packages/assessment/www/admin/asm-action-new.xql 10 Feb 2005 21:30:08 -0000 1.2 @@ -10,14 +10,6 @@ - - - insert into as_actions (action_id,name,description,tcl_code) - values(:action_id,:name,:description,:tcl_code) - - - - update as_actions set Index: openacs-4/packages/assessment/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/admin/index.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/assessment/www/admin/index.tcl 1 Feb 2005 21:33:13 -0000 1.9 +++ openacs-4/packages/assessment/www/admin/index.tcl 10 Feb 2005 21:30:08 -0000 1.10 @@ -1,55 +1,10 @@ ad_page_contract { - - Presents a form to upload a QTI ZIP file, - lists all assessments and shows a link to - assessment editor and another to assessment - catalog. - @author eperez@it.uc3m.es - @creation-date 2004-09-21 + Redirects to asm-admin + + @author Anny Flores (annyflores@viaro.net) Viaro Networks (www.viaro.net) + @create-date 2005-09-02 } { -} -properties { - zipfile - context:onevalue -} -set title "[_ assessment.Administration]" -set context {} -set package_id [ad_conn package_id] -set categories_url [db_string get_category_url {}] -set user_id [ad_conn user_id] -set admin_p [ad_permission_p $package_id admin] - -#form to upload a QTI ZIP file -ad_form -name form_upload_file -action {unzip-file} -html {enctype multipart/form-data} -form { - {zipfile:file {label "[_ assessment.Import_QTI_ZIP_File]"}} -} - -set actions [list "[_ assessment.New_Assessment]" assessment-form "[_ assessment.New_Assessment2]"] - -if {[ad_permission_p [acs_magic_object "security_context_root"] "admin"]} { - # lappend actions "[_ assessment.Admin_catalog]" "catalog/" "[_ assessment.Admin_catalog]" -} - -#get all assessments order by title -db_multirow -extend { export } assessments get_all_assessments {} { - set export "[_ assessment.Export]" -} - -#list all assessments -list::create \ - -name assessments \ - -key assessment_id \ - -no_data "[_ assessment.None]" \ - -elements { - title { - label "[_ assessment.Title]" - link_url_eval "[export_vars -base one-a { assessment_id }]" - } - export { - label "[_ assessment.Export]" - link_url_eval "[export_vars -base export { assessment_id }]" - } - } -actions $actions - -ad_return_template +} +ad_returnredirect "../asm-admin/" \ No newline at end of file Index: openacs-4/packages/assessment/www/asm-admin/action-params.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/action-params.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/www/asm-admin/action-params.xql 1 Feb 2005 22:00:10 -0000 1.1 +++ openacs-4/packages/assessment/www/asm-admin/action-params.xql 10 Feb 2005 21:29:36 -0000 1.2 @@ -39,7 +39,7 @@ where ci.item_id = cr.item_id and cr.revision_id = s.section_id and s.section_id = asm.section_id - and asm.assessment_id = :new_assessment_revision + and asm.assessment_id = :new_assessment_revision order by asm.sort_order) Index: openacs-4/packages/assessment/www/asm-admin/action-select.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/action-select.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/www/asm-admin/action-select.xql 1 Feb 2005 22:00:10 -0000 1.1 +++ openacs-4/packages/assessment/www/asm-admin/action-select.xql 10 Feb 2005 21:29:36 -0000 1.2 @@ -3,7 +3,8 @@ - select name, action_id from as_actions + select a.name, a.action_id from as_actions a where (select package_id from + acs_objects where object_id=a.action_id)=:package_id