Index: openacs-4/contrib/packages/simulation/www/siminst/begin-casting.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/begin-casting.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/simulation/www/siminst/begin-casting.tcl 12 Dec 2003 15:40:32 -0000 1.1
@@ -0,0 +1,18 @@
+ad_page_contract {
+ Verify that a simulation is ready for casting and, if so, change its type. If not, show an error page.
+} {
+ workflow_id:integer
+}
+
+set page_title "Not ready for casting"
+set context [list [list "." "SimInst"] $page_title]
+set package_id [ad_conn package_id]
+
+# Perform the same test as in siminst/index.tcl:
+# if { [string equal $role_empty_count 0] && [string equal $prop_empty_count 0]} {
+# change sim_type to casting_sim
+# ad_returnredirect [export_vars -base "simulation-casting-2" { workflow_id }]
+# } else {
+# show an error page with links to the incomplete roles and props
+# }
+
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/www/siminst/cast-actors.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/www/siminst/cast-actors.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/contrib/packages/simulation/www/siminst/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/index.tcl,v
diff -u -r1.10 -r1.11
--- openacs-4/contrib/packages/simulation/www/siminst/index.tcl 12 Dec 2003 11:22:19 -0000 1.10
+++ openacs-4/contrib/packages/simulation/www/siminst/index.tcl 12 Dec 2003 15:40:32 -0000 1.11
@@ -1,6 +1,6 @@
ad_page_contract {
The index page for SimInst
-}
+}
set page_title "Simulations in Development"
set context [list $page_title]
@@ -33,16 +33,12 @@
@dev_sims.role_count@ (@dev_sims.role_empty_count@ incomplete)
}
}
- prop_count {
- label "Props"
- link_url_col map_props_url
- display_template {
- @dev_sims.prop_count@ (@dev_sims.prop_empty_count@ incomplete)
- }
- }
tasks {
label "Tasks"
link_url_col sim_tasks_url
+ display_template {
+ @dev_sims.tasks@ , with @dev_sims.prop_empty_count@ incomplete props
+ }
}
delete {
sub_class narrow
@@ -57,9 +53,13 @@
}
}
cast {
- link_url_col cast_url
display_template {
- Begin casting
+
+ Begin casting
+
+
+ Not Ready for Casting
+
}
}
}
@@ -108,7 +108,11 @@
and ss.sim_type = 'dev_sim'
$sim_in_dev_filter_sql
" {
- set cast_url [export_vars -base "${base_url}siminst/simulation-casting" { workflow_id }]
+ if { [string equal $role_empty_count 0] && [string equal $prop_empty_count 0]} {
+ set cast_url [export_vars -base "${base_url}siminst/simulation-casting" { workflow_id }]
+ } else {
+ set cast_url ""
+ }
set map_roles_url [export_vars -base "${base_url}siminst/map-characters" { workflow_id }]
set map_props_url [export_vars -base "${base_url}siminst/map-tasks" { workflow_id }]
set sim_tasks_url [export_vars -base "${base_url}siminst/sim-tasks" { workflow_id }]
@@ -177,6 +181,6 @@
and ss.sim_type = 'casting_sim'
$sim_in_dev_filter_sql
" {
- set edit_url [export_vars -base "${base_url}siminst/cast-edit" { workflow_id }]
+ set edit_url [export_vars -base "${base_url}siminst/simulation-casting" { workflow_id }]
set delete_url [export_vars -base "${base_url}siminst/simulation-delete" { workflow_id }]
}
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/www/siminst/map-complete.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/www/siminst/map-complete.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/contrib/packages/simulation/www/siminst/sim-tasks.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/sim-tasks.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/simulation/www/siminst/sim-tasks.adp 12 Dec 2003 11:22:19 -0000 1.1
+++ openacs-4/contrib/packages/simulation/www/siminst/sim-tasks.adp 12 Dec 2003 15:40:32 -0000 1.2
@@ -3,13 +3,4 @@
@context;noquote@
template.pretty_name
-TODO:
-
-Task1 name | Task 1 description field text/html
-widget spellcheck |
-
-Task2 name | Task 2 description field text/html
-widget spellcheck |
-
-
-OK
\ No newline at end of file
+
Index: openacs-4/contrib/packages/simulation/www/siminst/sim-tasks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/sim-tasks.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/simulation/www/siminst/sim-tasks.tcl 12 Dec 2003 11:22:20 -0000 1.1
+++ openacs-4/contrib/packages/simulation/www/siminst/sim-tasks.tcl 12 Dec 2003 15:40:32 -0000 1.2
@@ -17,15 +17,49 @@
#
# tasks
#
-# a form showing description for all tasks in a sim
+# a list showing description for all tasks in a sim
#
-# TODO: display mode doesn't exist yet - all display is through edit mode
-#
######################################################################
#---------------------------------------------------------------------
# tasks form
#---------------------------------------------------------------------
+template::list::create \
+ -name tasks \
+ -multirow tasks \
+ -no_data "No tasks in this Simulation" \
+ -elements {
+ pretty_name {
+ link_url_col task_url
+ label "Task"
+ orderby upper(w.pretty_name)
+ }
+ }
+#-------------------------------------------------------------
+# tasks db_multirow
+#-------------------------------------------------------------
+db_multirow -extend { task_url } tasks tasks_sql "
+ select wa.action_id,
+ wa.pretty_name,
+ wa.assigned_role,
+ (select pretty_name
+ from workflow_roles
+ where role_id = wa.assigned_role) as assigned_name,
+ (select pretty_name
+ from workflow_roles
+ where role_id = st.recipient) as recipient_name,
+ wa.sort_order
+ from workflow_actions wa,
+ sim_tasks st
+ where wa.workflow_id = :workflow_id
+ and st.task_id = wa.action_id
+ order by wa.sort_order
+" {
+ set task_url [export_vars -base "[apm_package_url_from_id $package_id]siminst/task-edit" { action_id }]
+}
+
+
+
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-2.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-2.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/www/siminst/simulation-casting.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-casting.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-casting.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/contrib/packages/simulation/www/siminst/simulation-casting.tcl 12 Dec 2003 13:39:05 -0000 1.4
+++ openacs-4/contrib/packages/simulation/www/siminst/simulation-casting.tcl 12 Dec 2003 15:40:32 -0000 1.5
@@ -1,82 +1,19 @@
ad_page_contract {
- Create a new simulation
+ Edit a simulation in casting mode
+} {
+ workflow_id:integer
}
-set page_title "Cast simulation"
+set page_title "Not ready for casting"
set context [list [list "." "SimInst"] $page_title]
set package_id [ad_conn package_id]
-# TODO: only one aplication group per package - need different solution
-set group_id [application_group::group_id_from_package_id -package_id $package_id]
-set group_name [group::get_element -group_id $group_id -element group_name]
-set group_options [list [list $group_name $group_id]]
+# Perform the same test as in siminst/index.tcl:
+# if { [string equal $role_empty_count 0] && [string equal $prop_empty_count 0]} {
+# change sim_type to casting_sim
+# ad_returnredirect [export_vars -base "simulation-casting-2" { workflow_id }]
+# } else {
+# show an error page with links to the incomplete roles and props
+# }
-# TODO: Possible future casting_type options:
-# choose_role
-# choose_role_and_instance
-# TODO: provide more sensible default dates?
-# Notification send could be start date minus some parameter
-set in_a_month_date [clock format [expr [clock seconds] + 3600*24*31] -format "%Y %m %d"]
-set in_two_months_date [clock format [expr [clock seconds] + 2*3600*24*31] -format "%Y %m %d"]
-set in_two_and_a_half_months_date [clock format [expr [clock seconds] + 3*3600*24*31 - 3600*24*15] -format "%Y %m %d"]
-set in_three_months_date [clock format [expr [clock seconds] + 3*3600*24*31] -format "%Y %m %d"]
-set in_four_months_date [clock format [expr [clock seconds] + 4*3600*24*31] -format "%Y %m %d"]
-ad_form -export { workflow_id } -name simulation \
- -form {
- {enroll_start:date,optional
- {label "Enrollment start date"}
- {value $in_a_month_date}
- }
- {enroll_end:date,optional
- {label "Enrollment end date"}
- {value $in_two_months_date}
- }
- {notification_date:date
- {label "Date to send start notification"}
- {value $in_two_and_a_half_months_date}
- }
- {case_start:date
- {label "Simulation start date"}
- {value $in_three_months_date}
- }
- {case_end:date
- {label "Simulation end date"}
- {value $in_four_months_date}
- }
- {enroll_type:text(radio)
- {label "Enrollment type"}
- {options {{Closed closed} {Open closed}}}
- {value closed}
- }
- {casting_type:text(radio)
- {label "Casting type"}
- {options {{Automatic automatic} {Group group} {Open open}}}
- {value automatic}
- }
- {user_group:integer(checkbox),multiple
- {label "Invite all users in these groups"}
- {options $group_options}
- }
- } -on_submit {
- # Convert dates to ANSI format
- foreach var_name {enroll_start enroll_end notification_date case_start case_end} {
- set ${var_name}_ansi "[lindex [set $var_name] 0]-[lindex [set $var_name] 1]-[lindex [set $var_name] 2]"
- }
-
- simulation::template::instantiate_edit \
- -workflow_id $workflow_id \
- -enroll_start $enroll_start_ansi \
- -enroll_end $enroll_end_ansi \
- -notification_date $notification_date_ansi \
- -case_start $case_start_ansi \
- -case_end $case_end_ansi \
- -enroll_type $enroll_type \
- -casting_type $casting_type \
- -parties $user_group
-
- # Proceed to choosing actors
- ad_returnredirect [export_vars -base cast-actors { workflow_id }]
- ad_script_abort
- }
-
Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-edit-2.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-edit-2.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/simulation/www/siminst/simulation-edit-2.adp 12 Dec 2003 15:40:32 -0000 1.1
@@ -0,0 +1,5 @@
+
+ @page_title;noquote@
+ @context;noquote@
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-edit-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-edit-2.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/simulation/www/siminst/simulation-edit-2.tcl 12 Dec 2003 15:40:32 -0000 1.1
@@ -0,0 +1,78 @@
+ad_page_contract {
+ Edit casting parameters of a simulation
+}
+
+set page_title "Cast simulation"
+set context [list [list "." "SimInst"] $page_title]
+set package_id [ad_conn package_id]
+
+# TODO: only one aplication group per package - need different solution
+set group_id [application_group::group_id_from_package_id -package_id $package_id]
+set group_name [group::get_element -group_id $group_id -element group_name]
+set group_options [list [list $group_name $group_id]]
+
+# TODO: provide more sensible default dates?
+# Notification send could be start date minus some parameter
+set in_a_month_date [clock format [expr [clock seconds] + 3600*24*31] -format "%Y %m %d"]
+set in_two_months_date [clock format [expr [clock seconds] + 2*3600*24*31] -format "%Y %m %d"]
+set in_two_and_a_half_months_date [clock format [expr [clock seconds] + 3*3600*24*31 - 3600*24*15] -format "%Y %m %d"]
+set in_three_months_date [clock format [expr [clock seconds] + 3*3600*24*31] -format "%Y %m %d"]
+set in_four_months_date [clock format [expr [clock seconds] + 4*3600*24*31] -format "%Y %m %d"]
+
+ad_form -export { workflow_id } -name simulation -form {
+ {enroll_start:date,optional
+ {label "Enrollment start date"}
+ {value $in_a_month_date}
+ }
+ {enroll_end:date,optional
+ {label "Enrollment end date"}
+ {value $in_two_months_date}
+ }
+ {notification_date:date
+ {label "Date to send start notification"}
+ {value $in_two_and_a_half_months_date}
+ }
+ {case_start:date
+ {label "Simulation start date"}
+ {value $in_three_months_date}
+ }
+ {case_end:date
+ {label "Simulation end date"}
+ {value $in_four_months_date}
+ }
+ {enroll_type:text(radio)
+ {label "Enrollment type"}
+ {options {{Closed closed} {Open closed}}}
+ {value closed}
+ }
+ {casting_type:text(radio)
+ {label "Casting type"}
+ {options {{Automatic automatic} {Group group} {Open open}}}
+ {value automatic}
+ }
+ {user_group:integer(checkbox),multiple,optional
+ {label "Invite all users in these groups"}
+ {options $group_options}
+ }
+} -on_submit {
+ # Convert dates to ANSI format
+ foreach var_name {enroll_start enroll_end notification_date case_start case_end} {
+ set ${var_name}_ansi "[lindex [set $var_name] 0]-[lindex [set $var_name] 1]-[lindex [set $var_name] 2]"
+ }
+
+ simulation::template::instantiate_edit \
+ -workflow_id $workflow_id \
+ -enroll_start $enroll_start_ansi \
+ -enroll_end $enroll_end_ansi \
+ -notification_date $notification_date_ansi \
+ -case_start $case_start_ansi \
+ -case_end $case_end_ansi \
+ -enroll_type $enroll_type \
+ -casting_type $casting_type \
+ -parties $user_group
+
+ # Proceed to
+ ad_returnredirect [export_vars -base "simulation-casting-2" { workflow_id }]
+ ad_script_abort
+}
+
Index: openacs-4/contrib/packages/simulation/www/siminst/task-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/task-edit.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/simulation/www/siminst/task-edit.adp 12 Dec 2003 15:40:32 -0000 1.1
@@ -0,0 +1,10 @@
+
+ @page_title;noquote@
+ @context;noquote@
+ template.pretty_name
+
+TODO
+show task description body, list of related props (similar to
+object-edit and images). end-to-end requires that props can be
+associated but not that they can be embedded in the
+description body.
Index: openacs-4/contrib/packages/simulation/www/siminst/task-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/task-edit.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/simulation/www/siminst/task-edit.tcl 12 Dec 2003 15:40:32 -0000 1.1
@@ -0,0 +1,23 @@
+ad_page_contract {
+ Show task description and props for editing.
+
+ @author Joel Aufrecht
+} {
+ workflow_id:integer
+}
+
+set user_id [auth::require_login]
+
+set page_title "Edit Task"
+set context [list [list "." "SimInst"] $page_title]
+set old_name [workflow::get_element -workflow_id $workflow_id -element pretty_name]
+acs_user::get -user_id $user_id -array user_array
+
+######################################################################
+#
+# tasks
+#
+# a list showing description for all tasks in a sim
+#
+######################################################################
+
Index: openacs-4/packages/simulation/www/siminst/begin-casting.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/Attic/begin-casting.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/simulation/www/siminst/begin-casting.tcl 12 Dec 2003 15:40:32 -0000 1.1
@@ -0,0 +1,18 @@
+ad_page_contract {
+ Verify that a simulation is ready for casting and, if so, change its type. If not, show an error page.
+} {
+ workflow_id:integer
+}
+
+set page_title "Not ready for casting"
+set context [list [list "." "SimInst"] $page_title]
+set package_id [ad_conn package_id]
+
+# Perform the same test as in siminst/index.tcl:
+# if { [string equal $role_empty_count 0] && [string equal $prop_empty_count 0]} {
+# change sim_type to casting_sim
+# ad_returnredirect [export_vars -base "simulation-casting-2" { workflow_id }]
+# } else {
+# show an error page with links to the incomplete roles and props
+# }
+
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/simulation/www/siminst/cast-actors.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/simulation/www/siminst/cast-actors.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/simulation/www/siminst/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/index.tcl,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/simulation/www/siminst/index.tcl 12 Dec 2003 11:22:19 -0000 1.10
+++ openacs-4/packages/simulation/www/siminst/index.tcl 12 Dec 2003 15:40:32 -0000 1.11
@@ -1,6 +1,6 @@
ad_page_contract {
The index page for SimInst
-}
+}
set page_title "Simulations in Development"
set context [list $page_title]
@@ -33,16 +33,12 @@
@dev_sims.role_count@ (@dev_sims.role_empty_count@ incomplete)
}
}
- prop_count {
- label "Props"
- link_url_col map_props_url
- display_template {
- @dev_sims.prop_count@ (@dev_sims.prop_empty_count@ incomplete)
- }
- }
tasks {
label "Tasks"
link_url_col sim_tasks_url
+ display_template {
+ @dev_sims.tasks@ , with @dev_sims.prop_empty_count@ incomplete props
+ }
}
delete {
sub_class narrow
@@ -57,9 +53,13 @@
}
}
cast {
- link_url_col cast_url
display_template {
- Begin casting
+
+ Begin casting
+
+
+ Not Ready for Casting
+
}
}
}
@@ -108,7 +108,11 @@
and ss.sim_type = 'dev_sim'
$sim_in_dev_filter_sql
" {
- set cast_url [export_vars -base "${base_url}siminst/simulation-casting" { workflow_id }]
+ if { [string equal $role_empty_count 0] && [string equal $prop_empty_count 0]} {
+ set cast_url [export_vars -base "${base_url}siminst/simulation-casting" { workflow_id }]
+ } else {
+ set cast_url ""
+ }
set map_roles_url [export_vars -base "${base_url}siminst/map-characters" { workflow_id }]
set map_props_url [export_vars -base "${base_url}siminst/map-tasks" { workflow_id }]
set sim_tasks_url [export_vars -base "${base_url}siminst/sim-tasks" { workflow_id }]
@@ -177,6 +181,6 @@
and ss.sim_type = 'casting_sim'
$sim_in_dev_filter_sql
" {
- set edit_url [export_vars -base "${base_url}siminst/cast-edit" { workflow_id }]
+ set edit_url [export_vars -base "${base_url}siminst/simulation-casting" { workflow_id }]
set delete_url [export_vars -base "${base_url}siminst/simulation-delete" { workflow_id }]
}
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/simulation/www/siminst/map-complete.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/simulation/www/siminst/map-complete.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/simulation/www/siminst/sim-tasks.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/Attic/sim-tasks.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/simulation/www/siminst/sim-tasks.adp 12 Dec 2003 11:22:19 -0000 1.1
+++ openacs-4/packages/simulation/www/siminst/sim-tasks.adp 12 Dec 2003 15:40:32 -0000 1.2
@@ -3,13 +3,4 @@
@context;noquote@
template.pretty_name
-TODO:
-
-Task1 name | Task 1 description field text/html
-widget spellcheck |
-
-Task2 name | Task 2 description field text/html
-widget spellcheck |
-
-
-OK
\ No newline at end of file
+
Index: openacs-4/packages/simulation/www/siminst/sim-tasks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/Attic/sim-tasks.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/simulation/www/siminst/sim-tasks.tcl 12 Dec 2003 11:22:20 -0000 1.1
+++ openacs-4/packages/simulation/www/siminst/sim-tasks.tcl 12 Dec 2003 15:40:32 -0000 1.2
@@ -17,15 +17,49 @@
#
# tasks
#
-# a form showing description for all tasks in a sim
+# a list showing description for all tasks in a sim
#
-# TODO: display mode doesn't exist yet - all display is through edit mode
-#
######################################################################
#---------------------------------------------------------------------
# tasks form
#---------------------------------------------------------------------
+template::list::create \
+ -name tasks \
+ -multirow tasks \
+ -no_data "No tasks in this Simulation" \
+ -elements {
+ pretty_name {
+ link_url_col task_url
+ label "Task"
+ orderby upper(w.pretty_name)
+ }
+ }
+#-------------------------------------------------------------
+# tasks db_multirow
+#-------------------------------------------------------------
+db_multirow -extend { task_url } tasks tasks_sql "
+ select wa.action_id,
+ wa.pretty_name,
+ wa.assigned_role,
+ (select pretty_name
+ from workflow_roles
+ where role_id = wa.assigned_role) as assigned_name,
+ (select pretty_name
+ from workflow_roles
+ where role_id = st.recipient) as recipient_name,
+ wa.sort_order
+ from workflow_actions wa,
+ sim_tasks st
+ where wa.workflow_id = :workflow_id
+ and st.task_id = wa.action_id
+ order by wa.sort_order
+" {
+ set task_url [export_vars -base "[apm_package_url_from_id $package_id]siminst/task-edit" { action_id }]
+}
+
+
+
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/simulation/www/siminst/simulation-casting-2.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/simulation/www/siminst/simulation-casting-2.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/packages/simulation/www/siminst/simulation-casting.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/simulation/www/siminst/simulation-casting.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/simulation-casting.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/simulation/www/siminst/simulation-casting.tcl 12 Dec 2003 13:39:05 -0000 1.4
+++ openacs-4/packages/simulation/www/siminst/simulation-casting.tcl 12 Dec 2003 15:40:32 -0000 1.5
@@ -1,82 +1,19 @@
ad_page_contract {
- Create a new simulation
+ Edit a simulation in casting mode
+} {
+ workflow_id:integer
}
-set page_title "Cast simulation"
+set page_title "Not ready for casting"
set context [list [list "." "SimInst"] $page_title]
set package_id [ad_conn package_id]
-# TODO: only one aplication group per package - need different solution
-set group_id [application_group::group_id_from_package_id -package_id $package_id]
-set group_name [group::get_element -group_id $group_id -element group_name]
-set group_options [list [list $group_name $group_id]]
+# Perform the same test as in siminst/index.tcl:
+# if { [string equal $role_empty_count 0] && [string equal $prop_empty_count 0]} {
+# change sim_type to casting_sim
+# ad_returnredirect [export_vars -base "simulation-casting-2" { workflow_id }]
+# } else {
+# show an error page with links to the incomplete roles and props
+# }
-# TODO: Possible future casting_type options:
-# choose_role
-# choose_role_and_instance
-# TODO: provide more sensible default dates?
-# Notification send could be start date minus some parameter
-set in_a_month_date [clock format [expr [clock seconds] + 3600*24*31] -format "%Y %m %d"]
-set in_two_months_date [clock format [expr [clock seconds] + 2*3600*24*31] -format "%Y %m %d"]
-set in_two_and_a_half_months_date [clock format [expr [clock seconds] + 3*3600*24*31 - 3600*24*15] -format "%Y %m %d"]
-set in_three_months_date [clock format [expr [clock seconds] + 3*3600*24*31] -format "%Y %m %d"]
-set in_four_months_date [clock format [expr [clock seconds] + 4*3600*24*31] -format "%Y %m %d"]
-ad_form -export { workflow_id } -name simulation \
- -form {
- {enroll_start:date,optional
- {label "Enrollment start date"}
- {value $in_a_month_date}
- }
- {enroll_end:date,optional
- {label "Enrollment end date"}
- {value $in_two_months_date}
- }
- {notification_date:date
- {label "Date to send start notification"}
- {value $in_two_and_a_half_months_date}
- }
- {case_start:date
- {label "Simulation start date"}
- {value $in_three_months_date}
- }
- {case_end:date
- {label "Simulation end date"}
- {value $in_four_months_date}
- }
- {enroll_type:text(radio)
- {label "Enrollment type"}
- {options {{Closed closed} {Open closed}}}
- {value closed}
- }
- {casting_type:text(radio)
- {label "Casting type"}
- {options {{Automatic automatic} {Group group} {Open open}}}
- {value automatic}
- }
- {user_group:integer(checkbox),multiple
- {label "Invite all users in these groups"}
- {options $group_options}
- }
- } -on_submit {
- # Convert dates to ANSI format
- foreach var_name {enroll_start enroll_end notification_date case_start case_end} {
- set ${var_name}_ansi "[lindex [set $var_name] 0]-[lindex [set $var_name] 1]-[lindex [set $var_name] 2]"
- }
-
- simulation::template::instantiate_edit \
- -workflow_id $workflow_id \
- -enroll_start $enroll_start_ansi \
- -enroll_end $enroll_end_ansi \
- -notification_date $notification_date_ansi \
- -case_start $case_start_ansi \
- -case_end $case_end_ansi \
- -enroll_type $enroll_type \
- -casting_type $casting_type \
- -parties $user_group
-
- # Proceed to choosing actors
- ad_returnredirect [export_vars -base cast-actors { workflow_id }]
- ad_script_abort
- }
-
Index: openacs-4/packages/simulation/www/siminst/simulation-edit-2.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/Attic/simulation-edit-2.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/simulation/www/siminst/simulation-edit-2.adp 12 Dec 2003 15:40:32 -0000 1.1
@@ -0,0 +1,5 @@
+
+ @page_title;noquote@
+ @context;noquote@
+
+
\ No newline at end of file
Index: openacs-4/packages/simulation/www/siminst/simulation-edit-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/Attic/simulation-edit-2.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/simulation/www/siminst/simulation-edit-2.tcl 12 Dec 2003 15:40:32 -0000 1.1
@@ -0,0 +1,78 @@
+ad_page_contract {
+ Edit casting parameters of a simulation
+}
+
+set page_title "Cast simulation"
+set context [list [list "." "SimInst"] $page_title]
+set package_id [ad_conn package_id]
+
+# TODO: only one aplication group per package - need different solution
+set group_id [application_group::group_id_from_package_id -package_id $package_id]
+set group_name [group::get_element -group_id $group_id -element group_name]
+set group_options [list [list $group_name $group_id]]
+
+# TODO: provide more sensible default dates?
+# Notification send could be start date minus some parameter
+set in_a_month_date [clock format [expr [clock seconds] + 3600*24*31] -format "%Y %m %d"]
+set in_two_months_date [clock format [expr [clock seconds] + 2*3600*24*31] -format "%Y %m %d"]
+set in_two_and_a_half_months_date [clock format [expr [clock seconds] + 3*3600*24*31 - 3600*24*15] -format "%Y %m %d"]
+set in_three_months_date [clock format [expr [clock seconds] + 3*3600*24*31] -format "%Y %m %d"]
+set in_four_months_date [clock format [expr [clock seconds] + 4*3600*24*31] -format "%Y %m %d"]
+
+ad_form -export { workflow_id } -name simulation -form {
+ {enroll_start:date,optional
+ {label "Enrollment start date"}
+ {value $in_a_month_date}
+ }
+ {enroll_end:date,optional
+ {label "Enrollment end date"}
+ {value $in_two_months_date}
+ }
+ {notification_date:date
+ {label "Date to send start notification"}
+ {value $in_two_and_a_half_months_date}
+ }
+ {case_start:date
+ {label "Simulation start date"}
+ {value $in_three_months_date}
+ }
+ {case_end:date
+ {label "Simulation end date"}
+ {value $in_four_months_date}
+ }
+ {enroll_type:text(radio)
+ {label "Enrollment type"}
+ {options {{Closed closed} {Open closed}}}
+ {value closed}
+ }
+ {casting_type:text(radio)
+ {label "Casting type"}
+ {options {{Automatic automatic} {Group group} {Open open}}}
+ {value automatic}
+ }
+ {user_group:integer(checkbox),multiple,optional
+ {label "Invite all users in these groups"}
+ {options $group_options}
+ }
+} -on_submit {
+ # Convert dates to ANSI format
+ foreach var_name {enroll_start enroll_end notification_date case_start case_end} {
+ set ${var_name}_ansi "[lindex [set $var_name] 0]-[lindex [set $var_name] 1]-[lindex [set $var_name] 2]"
+ }
+
+ simulation::template::instantiate_edit \
+ -workflow_id $workflow_id \
+ -enroll_start $enroll_start_ansi \
+ -enroll_end $enroll_end_ansi \
+ -notification_date $notification_date_ansi \
+ -case_start $case_start_ansi \
+ -case_end $case_end_ansi \
+ -enroll_type $enroll_type \
+ -casting_type $casting_type \
+ -parties $user_group
+
+ # Proceed to
+ ad_returnredirect [export_vars -base "simulation-casting-2" { workflow_id }]
+ ad_script_abort
+}
+
Index: openacs-4/packages/simulation/www/siminst/task-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/Attic/task-edit.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/simulation/www/siminst/task-edit.adp 12 Dec 2003 15:40:32 -0000 1.1
@@ -0,0 +1,10 @@
+
+ @page_title;noquote@
+ @context;noquote@
+ template.pretty_name
+
+TODO
+show task description body, list of related props (similar to
+object-edit and images). end-to-end requires that props can be
+associated but not that they can be embedded in the
+description body.
Index: openacs-4/packages/simulation/www/siminst/task-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/Attic/task-edit.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/simulation/www/siminst/task-edit.tcl 12 Dec 2003 15:40:32 -0000 1.1
@@ -0,0 +1,23 @@
+ad_page_contract {
+ Show task description and props for editing.
+
+ @author Joel Aufrecht
+} {
+ workflow_id:integer
+}
+
+set user_id [auth::require_login]
+
+set page_title "Edit Task"
+set context [list [list "." "SimInst"] $page_title]
+set old_name [workflow::get_element -workflow_id $workflow_id -element pretty_name]
+acs_user::get -user_id $user_id -array user_array
+
+######################################################################
+#
+# tasks
+#
+# a list showing description for all tasks in a sim
+#
+######################################################################
+