Index: openacs-4/contrib/packages/simulation/tcl/simulation-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/tcl/Attic/simulation-procs.tcl,v
diff -u -r1.21 -r1.22
--- openacs-4/contrib/packages/simulation/tcl/simulation-procs.tcl 6 Jan 2004 18:36:27 -0000 1.21
+++ openacs-4/contrib/packages/simulation/tcl/simulation-procs.tcl 7 Jan 2004 12:22:40 -0000 1.22
@@ -153,9 +153,9 @@
set options_list [list]
# We only want the label and the id, i.e. strip off the count
- array set groups [casting_groups_with_counts -enrolled_only=$enrolled_only_p -workflow_id $workflow_id]
- foreach group_id [array names groups] {
- lappend options_list [list "[lindex $groups($group_id) 0] ([lindex $groups($group_id) 1] users)" $group_id]
+ set groups [casting_groups_with_counts -enrolled_only=$enrolled_only_p -workflow_id $workflow_id]
+ foreach { group_id val } $groups {
+ lappend options_list [list "[lindex $val 0] ([lindex $val 1] users)" $group_id]
}
return $options_list
@@ -190,6 +190,7 @@
)"]
set groups_list [list]
set permission_group_name [permission_group_name]
+
db_foreach subsite_group_options "
select g.group_name,
g.group_id,
@@ -200,7 +201,7 @@
and pamm.member_id = u.user_id
) as n_users
from acs_rels ar,
- groups g
+ groups g
where ar.object_id_one = :subsite_group_id
and ar.object_id_two = g.group_id
and exists (select 1
@@ -211,6 +212,7 @@
)
and g.group_name <> :permission_group_name
$enrollment_clause
+ order by lower(g.group_name)
" {
lappend groups_list $group_id [list $group_name $n_users]
}
Index: openacs-4/contrib/packages/simulation/tcl/template-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/tcl/Attic/template-procs.tcl,v
diff -u -r1.32 -r1.33
--- openacs-4/contrib/packages/simulation/tcl/template-procs.tcl 6 Jan 2004 18:36:27 -0000 1.32
+++ openacs-4/contrib/packages/simulation/tcl/template-procs.tcl 7 Jan 2004 12:22:40 -0000 1.33
@@ -761,7 +761,6 @@
} {
simulation::template::get -workflow_id $workflow_id -array sim_template
-
switch $sim_template(sim_type) {
dev_sim {
@@ -813,3 +812,41 @@
return $state
}
+
+ad_proc -public simulation::template::get_state_pretty {
+ -state:required
+} {
+ Get pretty version of state.
+} {
+ array set pretty {
+ none "Not started"
+ roles_complete "Roles completed"
+ tasks_complete "Tasks completed"
+ settings_complete "Settings completed"
+ enrollment_complete "Enrollment completed"
+ participants_complete "Participants completed"
+ }
+
+ return $pretty($state)
+}
+
+ad_proc -public simulation::template::pretty_name_unique_p {
+ -package_id:required
+ -pretty_name:required
+ {-workflow_id {}}
+} {
+ Check if suggested pretty_name is unique.
+
+ @return 1 if unique, 0 if not unique.
+} {
+ set exists_p [db_string name_exists {
+ select count(*)
+ from workflows
+ where package_key = 'simulation'
+ and object_id = :package_id
+ and pretty_name = :pretty_name
+ and (:workflow_id is null or workflow_id != :workflow_id)
+ }]
+ return [expr !$exists_p]
+}
+
Index: openacs-4/contrib/packages/simulation/www/siminst/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/index.adp,v
diff -u -r1.13 -r1.14
--- openacs-4/contrib/packages/simulation/www/siminst/index.adp 5 Jan 2004 10:31:41 -0000 1.13
+++ openacs-4/contrib/packages/simulation/www/siminst/index.adp 7 Jan 2004 12:22:40 -0000 1.14
@@ -2,6 +2,8 @@
- You haven't picked any groups yet. -
- Pick groups now -+ Pick which groups can be cast in which roles below. +
+
TODO: Display the actor list and group size in parallel columns
instead of in pairs of rows
Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-3.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-casting-3.tcl,v
diff -u -r1.11 -r1.12
--- openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-3.tcl 6 Jan 2004 18:36:28 -0000 1.11
+++ openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-3.tcl 7 Jan 2004 12:22:40 -0000 1.12
@@ -13,26 +13,50 @@
set form [list]
-set eligible_groups [simulation::casting_groups -enrolled_only -workflow_id $workflow_id]
+lappend form {casting_type:text(radio)
+ {label "Casting type"}
+ {options {{Automatic auto} {Group group} {Open open}}}
+ {section "Casting type"}
+}
-set pick_groups_url [export_vars -base simulation-casting-2 { workflow_id }]
+set eligible_groups [simulation::casting_groups -workflow_id $workflow_id]
+
foreach role_id [workflow::get_roles -workflow_id $workflow_id] {
set role_${role_id}_pretty_name [workflow::role::get_element -role_id $role_id -element pretty_name]
lappend form [list parties_${role_id}:text(checkbox),multiple,optional \
- [list help_text "Only users in these groups can be cast in this role"] \
[list label \$role_${role_id}_pretty_name] \
- [list options $eligible_groups]
- ]
- lappend form [list users_per_case_${role_id}:integer [list label "Target number of users for this role per case"] [list value 1] [list html {size 2}]]
+ {options $eligible_groups} \
+ {section "Roles"}
+ ]
+ lappend form [list \
+ users_per_case_${role_id}:integer \
+ {label "Number of users per role"} \
+ {value 1} \
+ {html {size 2}} \
+ {section "Roles"}
+ ]
+
}
ad_form \
-name actors \
-export { workflow_id } \
-form $form \
-on_request {
+ simulation::template::get -workflow_id $workflow_id -array sim_template
+
+ foreach elm {
+ casting_type
+ } {
+ set $elm $sim_template($elm)
+ }
+
+ if { [empty_string_p $casting_type] } {
+ set casting_type "auto"
+ }
+
simulation::template::role_party_mappings -workflow_id $workflow_id -array roles
foreach role_id [array names roles] {
@@ -41,43 +65,53 @@
element::set_values actors parties_${role_id} $one_role(parties)
element set_properties actors users_per_case_${role_id} -value $one_role(users_per_case)
}
+
+
} -on_submit {
# Validation
# Make sure the number of users per case does not exceed the total number of users
# in the selected parties
- array set groups [simulation::casting_groups_with_counts -enrolled_only -workflow_id $workflow_id]
+ array set groups [simulation::casting_groups_with_counts -workflow_id $workflow_id]
set error_p 0
foreach role_id [workflow::get_roles -workflow_id $workflow_id] {
set users_per_case [set users_per_case_$role_id]
- set n_members 0
- foreach party_id [set parties_$role_id] {
- set n_members [expr $n_members + [lindex $groups($party_id) 1]]
- }
+ if { [llength [set parties_$role_id]] > 0 } {
+ set n_members 0
+ foreach party_id [set parties_$role_id] {
+ set n_members [expr $n_members + [lindex $groups($party_id) 1]]
+ }
- if { $users_per_case > $n_members } {
- template::form::set_error actors users_per_case_$role_id "Number of users per case is larger than the number of users in the selected groups: $n_members"
- set error_p 1
- break
+ if { $users_per_case > $n_members } {
+ template::form::set_error actors users_per_case_$role_id "Number of users per case is larger than the number of users in the selected groups: $n_members"
+ set error_p 1
+ }
}
}
if { $error_p } {
break
}
- simulation::template::delete_role_party_mappings -workflow_id $workflow_id
- foreach role_id [workflow::get_roles -workflow_id $workflow_id] {
- set role_edit(users_per_case) [set users_per_case_$role_id]
- simulation::role::edit -role_id $role_id -array role_edit
-
- simulation::template::new_role_party_mappings \
- -role_id $role_id \
- -parties [set parties_$role_id] \
- }
+ db_transaction {
+ set row(casting_type) $casting_type
+ simulation::template::edit \
+ -workflow_id $workflow_id \
+ -array row
+
+ simulation::template::delete_role_party_mappings -workflow_id $workflow_id
+ foreach role_id [workflow::get_roles -workflow_id $workflow_id] {
+ set role_edit(users_per_case) [set users_per_case_$role_id]
+ simulation::role::edit -role_id $role_id -array role_edit
+
+ simulation::template::new_role_party_mappings \
+ -role_id $role_id \
+ -parties [set parties_$role_id] \
+ }
+ }
wizard forward
}
-wizard submit actors -buttons { back next }
+wizard submit actors -buttons { back next finish }
Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-edit.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/contrib/packages/simulation/www/siminst/simulation-edit.tcl 6 Jan 2004 18:36:28 -0000 1.3
+++ openacs-4/contrib/packages/simulation/www/siminst/simulation-edit.tcl 7 Jan 2004 12:22:40 -0000 1.4
@@ -9,7 +9,7 @@
ad_form -export { workflow_id } -name simulation -form {
{pretty_name:text
{label "Simulation Name"}
- {html {size 40}}
+ {html {size 60}}
}
{send_start_note_date:date,to_sql(ansi),from_sql(ansi),optional
{label "Date to send start notification (mockup only)"}
@@ -45,6 +45,16 @@
set case_end [clock format [expr [clock seconds] + 4*$one_month] -format "%Y-%m-%d"]
}
} -on_submit {
+ set unique_p [simulation::template::pretty_name_unique_p \
+ -workflow_id $workflow_id \
+ -package_id [ad_conn package_id] \
+ -pretty_name $pretty_name]
+
+ if { !$unique_p } {
+ form set_error simulation pretty_name "This name is already used by another simulation"
+ break
+ }
+
foreach elm { send_start_note_date case_start case_end pretty_name } {
set row($elm) [set $elm]
}
Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-participants.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-participants.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/simulation/www/siminst/simulation-participants.tcl 6 Jan 2004 18:36:28 -0000 1.1
+++ openacs-4/contrib/packages/simulation/www/siminst/simulation-participants.tcl 7 Jan 2004 12:22:40 -0000 1.2
@@ -46,7 +46,7 @@
where ar.object_id_one = :subsite_group_id
and ar.object_id_two = g.group_id
and g.group_name <> :permission_group_name
- order by g.group_name
+ order by lower(g.group_name)
} {
ad_form -extend -name simulation -form \
[list [list __auto_enroll_$group_id:text,optional]]
@@ -80,6 +80,7 @@
}
html { align center }
+ hide_p {[ad_decode $sim_template(enroll_type) "closed" 1 0]}
}
auto_enroll_p {
label "Auto-Enroll"
@@ -110,6 +111,13 @@
} \
-on_submit {
+ # First, drop all "invited" check marks if the user is also auto-enrolled
+ foreach group_id $groups {
+ if { [exists_and_equal __invited_${group_id} "t"] && [exists_and_equal __auto_enroll_${group_id} "t"] } {
+ unset __invited_${group_id}
+ }
+ }
+
db_transaction {
foreach group_id $groups {
foreach type { invited auto_enroll } {
Index: openacs-4/contrib/packages/simulation/www/siminst/wizard.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/wizard.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/contrib/packages/simulation/www/siminst/wizard.tcl 6 Jan 2004 18:36:28 -0000 1.3
+++ openacs-4/contrib/packages/simulation/www/siminst/wizard.tcl 7 Jan 2004 12:22:40 -0000 1.4
@@ -19,6 +19,8 @@
workflow_id
}
+wizard set_finish_url [export_vars -base "simulation-casting" { workflow_id }]
+
array set title {
1 "Assign Roles to Characters"
2 "Populate Tasks"
Index: openacs-4/packages/simulation/tcl/simulation-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/tcl/simulation-procs.tcl,v
diff -u -r1.21 -r1.22
--- openacs-4/packages/simulation/tcl/simulation-procs.tcl 6 Jan 2004 18:36:27 -0000 1.21
+++ openacs-4/packages/simulation/tcl/simulation-procs.tcl 7 Jan 2004 12:22:40 -0000 1.22
@@ -153,9 +153,9 @@
set options_list [list]
# We only want the label and the id, i.e. strip off the count
- array set groups [casting_groups_with_counts -enrolled_only=$enrolled_only_p -workflow_id $workflow_id]
- foreach group_id [array names groups] {
- lappend options_list [list "[lindex $groups($group_id) 0] ([lindex $groups($group_id) 1] users)" $group_id]
+ set groups [casting_groups_with_counts -enrolled_only=$enrolled_only_p -workflow_id $workflow_id]
+ foreach { group_id val } $groups {
+ lappend options_list [list "[lindex $val 0] ([lindex $val 1] users)" $group_id]
}
return $options_list
@@ -190,6 +190,7 @@
)"]
set groups_list [list]
set permission_group_name [permission_group_name]
+
db_foreach subsite_group_options "
select g.group_name,
g.group_id,
@@ -200,7 +201,7 @@
and pamm.member_id = u.user_id
) as n_users
from acs_rels ar,
- groups g
+ groups g
where ar.object_id_one = :subsite_group_id
and ar.object_id_two = g.group_id
and exists (select 1
@@ -211,6 +212,7 @@
)
and g.group_name <> :permission_group_name
$enrollment_clause
+ order by lower(g.group_name)
" {
lappend groups_list $group_id [list $group_name $n_users]
}
Index: openacs-4/packages/simulation/tcl/template-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/tcl/template-procs.tcl,v
diff -u -r1.32 -r1.33
--- openacs-4/packages/simulation/tcl/template-procs.tcl 6 Jan 2004 18:36:27 -0000 1.32
+++ openacs-4/packages/simulation/tcl/template-procs.tcl 7 Jan 2004 12:22:40 -0000 1.33
@@ -761,7 +761,6 @@
} {
simulation::template::get -workflow_id $workflow_id -array sim_template
-
switch $sim_template(sim_type) {
dev_sim {
@@ -813,3 +812,41 @@
return $state
}
+
+ad_proc -public simulation::template::get_state_pretty {
+ -state:required
+} {
+ Get pretty version of state.
+} {
+ array set pretty {
+ none "Not started"
+ roles_complete "Roles completed"
+ tasks_complete "Tasks completed"
+ settings_complete "Settings completed"
+ enrollment_complete "Enrollment completed"
+ participants_complete "Participants completed"
+ }
+
+ return $pretty($state)
+}
+
+ad_proc -public simulation::template::pretty_name_unique_p {
+ -package_id:required
+ -pretty_name:required
+ {-workflow_id {}}
+} {
+ Check if suggested pretty_name is unique.
+
+ @return 1 if unique, 0 if not unique.
+} {
+ set exists_p [db_string name_exists {
+ select count(*)
+ from workflows
+ where package_key = 'simulation'
+ and object_id = :package_id
+ and pretty_name = :pretty_name
+ and (:workflow_id is null or workflow_id != :workflow_id)
+ }]
+ return [expr !$exists_p]
+}
+
Index: openacs-4/packages/simulation/www/siminst/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/index.adp,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/simulation/www/siminst/index.adp 5 Jan 2004 10:31:41 -0000 1.13
+++ openacs-4/packages/simulation/www/siminst/index.adp 7 Jan 2004 12:22:40 -0000 1.14
@@ -2,6 +2,8 @@
- You haven't picked any groups yet. -
- Pick groups now -+ Pick which groups can be cast in which roles below. +
+TODO: Display the actor list and group size in parallel columns instead of in pairs of rows Index: openacs-4/packages/simulation/www/siminst/simulation-casting-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/simulation-casting-3.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/simulation/www/siminst/simulation-casting-3.tcl 6 Jan 2004 18:36:28 -0000 1.11 +++ openacs-4/packages/simulation/www/siminst/simulation-casting-3.tcl 7 Jan 2004 12:22:40 -0000 1.12 @@ -13,26 +13,50 @@ set form [list] -set eligible_groups [simulation::casting_groups -enrolled_only -workflow_id $workflow_id] +lappend form {casting_type:text(radio) + {label "Casting type"} + {options {{Automatic auto} {Group group} {Open open}}} + {section "Casting type"} +} -set pick_groups_url [export_vars -base simulation-casting-2 { workflow_id }] +set eligible_groups [simulation::casting_groups -workflow_id $workflow_id] + foreach role_id [workflow::get_roles -workflow_id $workflow_id] { set role_${role_id}_pretty_name [workflow::role::get_element -role_id $role_id -element pretty_name] lappend form [list parties_${role_id}:text(checkbox),multiple,optional \ - [list help_text "Only users in these groups can be cast in this role"] \ [list label \$role_${role_id}_pretty_name] \ - [list options $eligible_groups] - ] - lappend form [list users_per_case_${role_id}:integer [list label "Target number of users for this role per case"] [list value 1] [list html {size 2}]] + {options $eligible_groups} \ + {section "Roles"} + ] + lappend form [list \ + users_per_case_${role_id}:integer \ + {label "Number of users per role"} \ + {value 1} \ + {html {size 2}} \ + {section "Roles"} + ] + } ad_form \ -name actors \ -export { workflow_id } \ -form $form \ -on_request { + simulation::template::get -workflow_id $workflow_id -array sim_template + + foreach elm { + casting_type + } { + set $elm $sim_template($elm) + } + + if { [empty_string_p $casting_type] } { + set casting_type "auto" + } + simulation::template::role_party_mappings -workflow_id $workflow_id -array roles foreach role_id [array names roles] { @@ -41,43 +65,53 @@ element::set_values actors parties_${role_id} $one_role(parties) element set_properties actors users_per_case_${role_id} -value $one_role(users_per_case) } + + } -on_submit { # Validation # Make sure the number of users per case does not exceed the total number of users # in the selected parties - array set groups [simulation::casting_groups_with_counts -enrolled_only -workflow_id $workflow_id] + array set groups [simulation::casting_groups_with_counts -workflow_id $workflow_id] set error_p 0 foreach role_id [workflow::get_roles -workflow_id $workflow_id] { set users_per_case [set users_per_case_$role_id] - set n_members 0 - foreach party_id [set parties_$role_id] { - set n_members [expr $n_members + [lindex $groups($party_id) 1]] - } + if { [llength [set parties_$role_id]] > 0 } { + set n_members 0 + foreach party_id [set parties_$role_id] { + set n_members [expr $n_members + [lindex $groups($party_id) 1]] + } - if { $users_per_case > $n_members } { - template::form::set_error actors users_per_case_$role_id "Number of users per case is larger than the number of users in the selected groups: $n_members" - set error_p 1 - break + if { $users_per_case > $n_members } { + template::form::set_error actors users_per_case_$role_id "Number of users per case is larger than the number of users in the selected groups: $n_members" + set error_p 1 + } } } if { $error_p } { break } - simulation::template::delete_role_party_mappings -workflow_id $workflow_id - foreach role_id [workflow::get_roles -workflow_id $workflow_id] { - set role_edit(users_per_case) [set users_per_case_$role_id] - simulation::role::edit -role_id $role_id -array role_edit - - simulation::template::new_role_party_mappings \ - -role_id $role_id \ - -parties [set parties_$role_id] \ - } + db_transaction { + set row(casting_type) $casting_type + simulation::template::edit \ + -workflow_id $workflow_id \ + -array row + + simulation::template::delete_role_party_mappings -workflow_id $workflow_id + foreach role_id [workflow::get_roles -workflow_id $workflow_id] { + set role_edit(users_per_case) [set users_per_case_$role_id] + simulation::role::edit -role_id $role_id -array role_edit + + simulation::template::new_role_party_mappings \ + -role_id $role_id \ + -parties [set parties_$role_id] \ + } + } wizard forward } -wizard submit actors -buttons { back next } +wizard submit actors -buttons { back next finish } Index: openacs-4/packages/simulation/www/siminst/simulation-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/simulation-edit.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/simulation/www/siminst/simulation-edit.tcl 6 Jan 2004 18:36:28 -0000 1.3 +++ openacs-4/packages/simulation/www/siminst/simulation-edit.tcl 7 Jan 2004 12:22:40 -0000 1.4 @@ -9,7 +9,7 @@ ad_form -export { workflow_id } -name simulation -form { {pretty_name:text {label "Simulation Name"} - {html {size 40}} + {html {size 60}} } {send_start_note_date:date,to_sql(ansi),from_sql(ansi),optional {label "Date to send start notification (mockup only)"} @@ -45,6 +45,16 @@ set case_end [clock format [expr [clock seconds] + 4*$one_month] -format "%Y-%m-%d"] } } -on_submit { + set unique_p [simulation::template::pretty_name_unique_p \ + -workflow_id $workflow_id \ + -package_id [ad_conn package_id] \ + -pretty_name $pretty_name] + + if { !$unique_p } { + form set_error simulation pretty_name "This name is already used by another simulation" + break + } + foreach elm { send_start_note_date case_start case_end pretty_name } { set row($elm) [set $elm] } Index: openacs-4/packages/simulation/www/siminst/simulation-participants.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/simulation-participants.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simulation/www/siminst/simulation-participants.tcl 6 Jan 2004 18:36:28 -0000 1.1 +++ openacs-4/packages/simulation/www/siminst/simulation-participants.tcl 7 Jan 2004 12:22:40 -0000 1.2 @@ -46,7 +46,7 @@ where ar.object_id_one = :subsite_group_id and ar.object_id_two = g.group_id and g.group_name <> :permission_group_name - order by g.group_name + order by lower(g.group_name) } { ad_form -extend -name simulation -form \ [list [list __auto_enroll_$group_id:text,optional]] @@ -80,6 +80,7 @@ } html { align center } + hide_p {[ad_decode $sim_template(enroll_type) "closed" 1 0]} } auto_enroll_p { label "Auto-Enroll" @@ -110,6 +111,13 @@ } \ -on_submit { + # First, drop all "invited" check marks if the user is also auto-enrolled + foreach group_id $groups { + if { [exists_and_equal __invited_${group_id} "t"] && [exists_and_equal __auto_enroll_${group_id} "t"] } { + unset __invited_${group_id} + } + } + db_transaction { foreach group_id $groups { foreach type { invited auto_enroll } { Index: openacs-4/packages/simulation/www/siminst/wizard.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/wizard.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/simulation/www/siminst/wizard.tcl 6 Jan 2004 18:36:28 -0000 1.3 +++ openacs-4/packages/simulation/www/siminst/wizard.tcl 7 Jan 2004 12:22:40 -0000 1.4 @@ -19,6 +19,8 @@ workflow_id } +wizard set_finish_url [export_vars -base "simulation-casting" { workflow_id }] + array set title { 1 "Assign Roles to Characters" 2 "Populate Tasks"