Index: openacs-4/packages/lorsm/www/change_presentation_format.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/Attic/change_presentation_format.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/change_presentation_format.tcl 25 Feb 2005 08:49:58 -0000 1.1 @@ -0,0 +1,31 @@ +# packages/lorsm/www/change_presentation_format.tcl + +ad_page_contract { + + Update course presentations. + + @author Jonatan Tierno (jonatantierno@inv.it.uc3m.es) + @creation-date 2004-03-31 + @arch-tag 208f2801-d110-45d3-9401-d5eae1f72c93 + @cvs-id $Id: change_presentation_format.tcl,v 1.1 2005/02/25 08:49:58 jonatan Exp $ + } { + man_id:integer,notnull + selected_presentation:integer,notnull + } -properties { + } -validate { + } -errors { +} + + +if { [ db_0or1row get_selected " + select presentation_id from ims_cp_manifests where man_id=:man_id and presentation_id is not null limit 1 + "] } {\ + set message #lorsm.Presentation_format_modified# +} else {\ + set message #lorsm.Presentation_format_added# +} + +db_dml change_update "update ims_cp_manifests set presentation_id = :selected_presentation where man_id = :man_id" + +ad_returnredirect -message $message course-structure?man_id=$man_id + Index: openacs-4/packages/lorsm/www/choose_presentation_format.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/Attic/choose_presentation_format.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/choose_presentation_format.adp 25 Feb 2005 08:49:30 -0000 1.1 @@ -0,0 +1,9 @@ + + @title;noquote@ + @context;noquote@ + +
+ + + +
Index: openacs-4/packages/lorsm/www/choose_presentation_format.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/Attic/choose_presentation_format.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lorsm/www/choose_presentation_format.tcl 25 Feb 2005 08:49:30 -0000 1.1 @@ -0,0 +1,54 @@ +# packages/lorsm/www/choose_presentation_format.tcl + +ad_page_contract { + + Show a list of available presentation formats so that user can choose one. + + @author Jonatan Tierno (jonatantierno@inv.it.uc3m.es) + @creation-date 2004-03-31 + @arch-tag 208f2801-d110-45d3-9401-d5eae1f72c93 + @cvs-id $Id: choose_presentation_format.tcl,v 1.1 2005/02/25 08:49:30 jonatan Exp $ +} { + man_id:integer,notnull +} -properties { + context:onevalue +} -validate { +} -errors { +} + + +if { [ db_0or1row get_selected " + select presentation_id as selected_presentation from ims_cp_manifests where man_id=:man_id; +"] } {} else { set selected_presentation "0"} + + template::list::create \ + -name available_presentation_formats \ + -multirow apf \ + -key presentation_id \ + -pass_properties selected_presentation \ + -elements { + selected { + label #lorsm.Selected# + + display_template { + checked="checked"> + } + } + presentation_id { + hide_p 1 + } + presentation_name { + label #lorsm.Presentation_name# + display_col presentation_name + } + + } + +db_multirow apf apf_sql " + select pf.presentation_id as presentation_id, pf.presentation_name as presentation_name from lors_available_presentation_formats as pf; +" +# set context & title +set context [list "[_ lorsm.Course_Structure]"] +set title "[_ lorsm.Course_Structure]" + +