Index: openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl,v
diff -u -r1.23 -r1.24
--- openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl 12 Jul 2018 09:02:29 -0000 1.23
+++ openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl 3 Sep 2024 15:37:35 -0000 1.24
@@ -12,7 +12,7 @@
}
set user_id [ad_conn user_id]
-array set config $cf
+array set config $cf
set shaded_p $config(shaded_p)
set list_of_package_ids $config(package_id)
@@ -41,9 +41,9 @@
}
if {[llength $list_of_package_ids]==1} {
set admin_p [permission::permission_p \
- -party_id $user_id \
- -privilege admin \
- -object_id $list_of_package_ids]
+ -party_id $user_id \
+ -privilege admin \
+ -object_id $list_of_package_ids]
} else {
set admin_p 0
}
@@ -57,7 +57,7 @@
lappend elements session \
[list \
label "[_ assessment.Review]" \
- display_template {[_ assessment.Review]}]
+ display_template {[_ assessment.Review]}]
lappend elements admin {
label "[_ acs-kernel.common_Administration]"
@@ -67,7 +67,7 @@
lappend elements results {
label "[_ assessment.Results]"
display_template {\#assessment.Results\#}
- }
+ }
# create a list with all open assessments
template::list::create \
@@ -81,24 +81,24 @@
template::multirow create assessments assessment_id title description assessment_url community_url community_name anonymous_p in_progress_p completed_p status number_tries admin_p
set old_comm_node_id 0
db_foreach open_assessments {} {
- if {$comm_node_id == $old_comm_node_id} {
- set community_name ""
- }
- set community_url [site_node::get_url -node_id $comm_node_id]
- set assessment_url [site_node::get_url -node_id $as_node_id]
- set old_comm_node_id $comm_node_id
+ if {$comm_node_id == $old_comm_node_id} {
+ set community_name ""
+ }
+ set community_url [site_node::get_url -node_id $comm_node_id]
+ set assessment_url [site_node::get_url -node_id $as_node_id]
+ set old_comm_node_id $comm_node_id
- if {$password eq ""} {
- append assessment_url [export_vars -base "instructions" {assessment_id}]
- } else {
- append assessment_url [export_vars -base "assessment-password" {assessment_id}]
- }
+ if {$password eq ""} {
+ append assessment_url [export_vars -base "instructions" {assessment_id}]
+ } else {
+ append assessment_url [export_vars -base "assessment-password" {assessment_id}]
+ }
if {$in_progress_p > 0 } {
- set status in_progress
+ set status in_progress
} elseif {$completed_p >0} {
- set status finished
+ set status finished
} else {
- set status untaken
+ set status untaken
}
template::multirow append assessments $assessment_id $title $description $assessment_url $community_url $community_name $anonymous_p $in_progress_p $completed_p $status $number_tries $admin_p
}
@@ -107,25 +107,25 @@
set elements [list]
if {!$one_instance_p} {
set elements [list community_name \
- [list \
- label "[_ dotlrn.Community]" \
- display_template {@sessions.community_name@ }]]
+ [list \
+ label "[_ dotlrn.Community]" \
+ display_template {@sessions.community_name@ }]]
set package_id_sql ""
} else {
-# set package_id_sql "and cf.package_id in ([join $list_of_package_ids ", "])"
+# set package_id_sql "and cf.package_id in ([ns_dbquotelist $list_of_package_ids])"
set package_id_sql ""
}
lappend elements title \
[list \
- label "[_ assessment.Title]"]
-
+ label "[_ assessment.Title]"]
+
lappend elements session \
[list \
- label "[_ assessment.Review]" \
- display_template {[_ assessment.Review]}]
+ label "[_ assessment.Review]" \
+ display_template {[_ assessment.Review]}]
lappend elements admin {
label "[_ acs-kernel.common_Administration]"
@@ -135,7 +135,7 @@
lappend elements results {
label "[_ assessment.Results]"
display_template {\#assessment.Results\#}
- }
+ }
# create a list with all answered assessments and their sessions
template::list::create \
@@ -149,7 +149,7 @@
set old_comm_node_id 0
db_multirow -extend { session_url community_url } sessions answered_assessments {} {
if {$comm_node_id == $old_comm_node_id} {
- set community_name ""
+ set community_name ""
}
set community_url [site_node::get_url -node_id $comm_node_id]
set session_url "[site_node::get_url -node_id $as_node_id][export_vars -base session {assessment_id}]"