Index: openacs-4/packages/imsld/www/admin/imsld-admin-roles.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-admin-roles.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/imsld/www/admin/imsld-admin-roles.adp 31 May 2006 16:20:54 -0000 1.2
+++ openacs-4/packages/imsld/www/admin/imsld-admin-roles.adp 21 Jul 2006 13:12:10 -0000 1.3
@@ -14,10 +14,17 @@
-
-
-
+
+
+
|
+
+
+
+
+
+ |
+
Index: openacs-4/packages/imsld/www/admin/imsld-admin-roles.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-admin-roles.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/imsld/www/admin/imsld-admin-roles.tcl 31 May 2006 16:20:54 -0000 1.3
+++ openacs-4/packages/imsld/www/admin/imsld-admin-roles.tcl 21 Jul 2006 13:12:10 -0000 1.4
@@ -10,6 +10,7 @@
{group_instance 0}
run_id
members_list:optional
+ {finishable 0}
}
#check if the run is waiting
@@ -57,3 +58,11 @@
if {![info exists role]} {
set role 0
}
+
+ad_form -name finish_management \
+ -form {
+ {submit:text(submit) {label "Finish role management"}}
+ } \
+ -action imsld-finish \
+ -export {imsld_id run_id}
+
Index: openacs-4/packages/imsld/www/admin/imsld-finish.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-finish.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/imsld/www/admin/imsld-finish.adp 31 May 2006 16:20:54 -0000 1.1
+++ openacs-4/packages/imsld/www/admin/imsld-finish.adp 21 Jul 2006 13:12:10 -0000 1.2
@@ -2,12 +2,14 @@
Some warnings has been found
- @warnings@
+
Some errors has been found
- @errors@
+
Go back
Index: openacs-4/packages/imsld/www/admin/imsld-finish.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-finish.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/imsld/www/admin/imsld-finish.tcl 31 May 2006 16:20:54 -0000 1.1
+++ openacs-4/packages/imsld/www/admin/imsld-finish.tcl 21 Jul 2006 13:12:10 -0000 1.2
@@ -26,6 +26,12 @@
set min_persons [lindex $role_info 1]
set match_persons_p [lindex $role_info 3]
+ db_1row get_role_name {
+ select coalesce(title,role_type) as role_name,item_id as role_item_id
+ from imsld_rolesi
+ where role_id=:role
+ }
+
#para cada instancia del role, el maximo, minimo y demas es para cada grupo
set role_groups [db_list get_groups_in_run {
@@ -44,29 +50,32 @@
}]
if {![llength $role_groups]} {
#warning, there's a role without instances
- lappend warnings "[llength $role_groups]WARNING: Role $role has no groups. Having a group is not mandatory, but may be you forgot assigning one...\
"
+ lappend warnings "\WARNING: Role $role_name has no groups. Having a group is not mandatory, but may be you forgot assigning one...\<\/li\>"
set warning_flag 1
} else {
foreach group $role_groups {
+ db_1row get_group_name {
+ select group_name from groups where group_id=:group
+ }
set members_list [db_list get_members_list {select member_id from group_member_map where group_id=:group group by member_id}]
if {[llength $members_list] == 0} {
- lappend warnings "WARNING: Group $group in role $role has no members. A empty group is not forbiden, but may be you forgot assigning members...\
"
+ lappend warnings "\WARNING: Group $group_name in role $role_name has no members. A empty group is not forbiden, but may be you forgot assigning members...\<\/li\>"
set warning_flag 1
}
#numero maximo
if {![string eq "" $max_persons] && ([llength $members_list] > $max_persons)} {
#error porque hay demasiada gente
- lappend errors "ERROR: Group $group in role $role has too much members. Is must have no more than $max_persons. \
Please go back and modify this.\
"
+ lappend errors "\ERROR: Group $group_name in role $role_name has too much members. Is must have no more than $max_persons. \
Please go back and modify this.\<\/li\>"
set error_flag 1
}
#numero minimo
if { ![string eq "" $min_persons] && ([llength $members_list] < $min_persons)} {
#error porque no hay gente suficiente en el grupo
- lappend errors "ERROR: Group $group in role $role has too much members. Is must have at least $min_persons. \
Please go back and modify this.\
"
+ lappend errors "\ERROR: Group $group_name in role $role_name has too much members. Is must have at least $min_persons. \
Please go back and modify this.\<\/li\>"
set error_flag 1
}
#match person
@@ -75,7 +84,8 @@
}
}
}
-
}
+set warnings [join $warnings ""]
+set errors [join $errors ""]
set back [export_vars -base imsld-admin-roles {run_id}]
set confirm [export_vars -base imsld-confirm-finish {imsld_id run_id}]
Index: openacs-4/packages/imsld/www/admin/imsld-groups.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-groups.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/imsld/www/admin/imsld-groups.tcl 16 May 2006 09:24:36 -0000 1.2
+++ openacs-4/packages/imsld/www/admin/imsld-groups.tcl 21 Jul 2006 13:12:10 -0000 1.3
@@ -34,7 +34,6 @@
}
}
-
db_multirow -extend { manage_roles delete } role_groups get_groups_list {} {
set manage_roles [export_vars -base imsld-admin-roles {imsld_id run_id role {group_instance $group_id}}]
set delete ""
Index: openacs-4/packages/imsld/www/admin/imsld-groups.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-groups.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/imsld/www/admin/imsld-groups.xql 19 May 2006 17:26:03 -0000 1.2
+++ openacs-4/packages/imsld/www/admin/imsld-groups.xql 21 Jul 2006 13:12:10 -0000 1.3
@@ -2,16 +2,21 @@
- select gr.group_id,
- gr.group_name
- from groups gr,
- acs_rels ar,
- imsld_run_users_group_ext iruge
- where ar.rel_type='imsld_roleinstance_run_rel'
- and ar.object_id_one=gr.group_id
- and ar.object_id_two=iruge.group_id
- and iruge.run_id=:run_id
- and group_name like ('%' || :role || '%')
+ select gr.group_id,
+ gr.group_name
+ from groups gr,
+ acs_rels ar1,
+ acs_rels ar2,
+ imsld_run_users_group_ext iruge,
+ imsld_rolesi iri
+ where ar1.rel_type='imsld_roleinstance_run_rel'
+ and ar1.object_id_one=gr.group_id
+ and ar1.object_id_two=iruge.group_id
+ and iruge.run_id=:run_id
+ and iri.role_id=:role
+ and iri.item_id=ar2.object_id_one
+ and ar2.rel_type='imsld_role_group_rel'
+ and ar2.object_id_two=gr.group_id
Index: openacs-4/packages/imsld/www/admin/imsld-role-confirm.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-role-confirm.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/imsld/www/admin/imsld-role-confirm.tcl 16 May 2006 09:24:36 -0000 1.4
+++ openacs-4/packages/imsld/www/admin/imsld-role-confirm.tcl 21 Jul 2006 13:12:10 -0000 1.5
@@ -19,9 +19,10 @@
set max_persons [lindex $role_info 0]
set min_persons [lindex $role_info 1]
set match_persons_p [lindex $role_info 3]
+set finishable 1
set return_url [export_vars -base imsld-admin-roles {role imsld_id run_id group_instance members_list}]
-set return_url2 [export_vars -base imsld-admin-roles {role imsld_id run_id group_instance}]
+set return_url2 [export_vars -base imsld-admin-roles {role imsld_id run_id finishable}]
if {![string eq "-1" [lsearch $members_list 0]] } {
Index: openacs-4/packages/imsld/www/admin/imsld-role-members.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-role-members.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/imsld/www/admin/imsld-role-members.adp 31 May 2006 16:20:54 -0000 1.2
+++ openacs-4/packages/imsld/www/admin/imsld-role-members.adp 21 Jul 2006 13:12:10 -0000 1.3
@@ -20,7 +20,6 @@
-
|
Index: openacs-4/packages/imsld/www/admin/imsld-role-members.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-role-members.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/imsld/www/admin/imsld-role-members.tcl 10 Jul 2006 13:45:29 -0000 1.6
+++ openacs-4/packages/imsld/www/admin/imsld-role-members.tcl 21 Jul 2006 13:12:10 -0000 1.7
@@ -126,12 +126,3 @@
-action imsld-role-confirm \
-export {imsld_id run_id role group_instance members_list}
-ad_form -name finish_management \
- -form {
- {submit:text(submit) {label "Finish role management"}}
- } \
- -action imsld-finish \
- -export {imsld_id run_id}
-
-
-