-
-#assessment.currently# @result_points@ / @max_points@ #assessment.points#
+
#assessment.currently# @result_points@ / @max_points@ #assessment.points#
#assessment.not_yet_reviewed#
-
+
Index: openacs-4/packages/assessment/www/asm-admin/results-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-edit.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/assessment/www/asm-admin/results-edit.tcl 7 Apr 2006 23:16:58 -0000 1.3
+++ openacs-4/packages/assessment/www/asm-admin/results-edit.tcl 26 Sep 2006 00:22:46 -0000 1.4
@@ -34,26 +34,38 @@
set page_title "[_ assessment.Results_edit]"
set context [list [list index [_ assessment.admin]] [list [export_vars -base one-a {assessment_id}] $assessment_data(title)] [list [export_vars -base results-users {assessment_id}] [_ assessment.Results_by_user]] [list [export_vars -base results-session {session_id}] [_ assessment.View_Results]] $page_title]
-
-ad_form -name results_edit -action results-edit -export { session_id section_id as_item_id } -form {
+# DAVEB removed title, doesn't make sense.
+ad_form -name results-edit -action results-edit -export { session_id section_id as_item_id } -form {
{result_id:key}
- {title:text,nospell,optional {label "[_ assessment.Title]"} {html {size 80 maxlength 1000}} {help_text "[_ assessment.Results_edit_Title_help]"}}
{description:text(textarea),optional {label "[_ assessment.Results_edit_Description]"} {html {rows 5 cols 80}} {help_text "[_ assessment.Results_edit_Description_help]"}}
- {points:integer,nospell {label "[_ assessment.points_answer]"} {html {size 10 maxlength 10}} {help_text "[_ assessment.points_answer_help]"}}
-} -new_request {
- set title ""
+}
+
+# check for type to see if we set points
+if {0} {
+ ad_form -extend -form {
+ {points:integer,nospell {label "[_ assessment.points_answer]"} {html {size 10 maxlength 10}} {help_text "[_ assessment.points_answer_help]"}}
+ }
+}
+ad_form -extend -new_request {
set description ""
set points ""
} -new_data {
+ if {![info exists points]} {
+ set points ""
+ }
db_transaction {
- as::session_results::new -target_id $item_data_id -title $title -description $description -points $points
- db_dml update_item_data {}
- as::section::calculate -section_id $section_id -assessment_id $assessment_rev_id -session_id $session_id
- as::assessment::calculate -assessment_id $assessment_rev_id -session_id $session_id
+ as::session_results::new -target_id $item_data_id -title "" -description $description -points $points
+ if {$points ne ""} {
+ db_dml update_item_points {}
+ as::section::calculate -section_id $section_id -assessment_id $assessment_rev_id -session_id $session_id
+ as::assessment::calculate -assessment_id $assessment_rev_id -session_id $session_id
+ }
}
+ ns_log notice "DONE results edit new_data"
} -after_submit {
+ ns_log notice "DONE results edit after_submit"
ad_returnredirect [export_vars -base results-session {session_id}]
ad_script_abort
}
-
+ ns_log notice "DONE results edit return template"
ad_return_template
Index: openacs-4/packages/assessment/www/asm-admin/results-edit.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-edit.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/assessment/www/asm-admin/results-edit.xql 21 Feb 2005 14:32:56 -0000 1.1
+++ openacs-4/packages/assessment/www/asm-admin/results-edit.xql 26 Sep 2006 00:22:46 -0000 1.2
@@ -43,7 +43,7 @@
-
+
update as_item_data
set points = :points
Index: openacs-4/packages/assessment/www/asm-admin/results-session-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-session-postgresql.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/assessment/www/asm-admin/results-session-postgresql.xql 21 Feb 2005 14:32:56 -0000 1.1
+++ openacs-4/packages/assessment/www/asm-admin/results-session-postgresql.xql 26 Sep 2006 00:22:46 -0000 1.2
@@ -4,8 +4,7 @@
- SELECT percent_score, to_char(creation_datetime, :format) AS session_start,
- to_char(completed_datetime, :format) AS session_finish,
+ SELECT percent_score, creation_datetime, completed_datetime,
round(date_part('epoch', completed_datetime - creation_datetime)) as session_time
FROM as_sessions s
WHERE s.session_id = :session_id
Index: openacs-4/packages/assessment/www/asm-admin/results-session.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-session.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/assessment/www/asm-admin/results-session.adp 19 Jul 2006 13:58:13 -0000 1.4
+++ openacs-4/packages/assessment/www/asm-admin/results-session.adp 26 Sep 2006 00:22:46 -0000 1.5
@@ -2,55 +2,28 @@
@page_title;noquote@
@context;noquote@
-
-
-#assessment.Assessment#: @assessment_data.title@ |
-#assessment.User_ID#: @first_names@ @last_name@#assessment.anonymous_name# |
-#assessment.Attempt#: @session_attempt@ / @assessment_data.number_tries@ |
-#assessment.Percent_Score#: @assessment_score@ |
+
+
@assessment_data.title@
+
#acs-subsite.Name#: @first_names@ @last_name@#assessment.anonymous_name#
+ #assessment.Attempt#: @session_attempt@ / @assessment_data.number_tries@
+ #assessment.Percent_Score#: @assessment_score@
+ #assessment.Started#: @session_start@
+ #assessment.Finished#: @session_finish@
+ #assessment.Time_spent#: @session_time@
+
-
#assessment.Started#: @session_start@ |
-#assessment.Finished#: @session_finish@ |
-#assessment.Time_spent#: @session_time@ |
-
- |
-
-
-
-
-
-
-
-
-
-
-
-#assessment.section# @sections.title@
+
+ @sections.title@
(#assessment.max_time# @sections.max_time_to_complete@)
- (@sections.points@ / @sections.max_points@ #assessment.points#)
- |
-
- @sections.description@
|
-@sections.feedback_text@ |
-
-
-
-
-
-
+@sections.description@
+@sections.feedback_text@
+
+
- |
-
-
- |
-
-
-#assessment.Total_score#: @session_score@ / @assessment_score@ = @percent_score@%
-
+#assessment.Total_score#: @session_score@ / @assessment_score@ = @percent_score@%
-
-
+
\ No newline at end of file
Index: openacs-4/packages/assessment/www/asm-admin/results-session.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-session.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/assessment/www/asm-admin/results-session.tcl 12 Jun 2006 02:49:51 -0000 1.3
+++ openacs-4/packages/assessment/www/asm-admin/results-session.tcl 26 Sep 2006 00:22:46 -0000 1.4
@@ -33,12 +33,14 @@
set page_title "[_ assessment.View_Results]"
set context [list [list index [_ assessment.admin]] [list [export_vars -base one-a {assessment_id}] $assessment_data(title)] [list [export_vars -base results-users {assessment_id}] [_ assessment.Results_by_user]] $page_title]
-set format "[lc_get formbuilder_date_format], [lc_get formbuilder_time_format]"
+set format "[lc_get d_fmt], [lc_get t_fmt]"
set session_user_url [acs_community_member_url -user_id $subject_id]
# get start and end times
db_1row session_data {}
set session_time [as::assessment::pretty_time -seconds $session_time -hours]
+set session_start [lc_time_fmt $creation_datetime $format]
+set session_finish [lc_time_fmt $completed_datetime $format]
# get the number of attempts
set session_attempt [db_string session_attempt {}]
Index: openacs-4/packages/assessment/www/asm-admin/results-users.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-users.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/assessment/www/asm-admin/results-users.tcl 6 Dec 2005 14:24:34 -0000 1.6
+++ openacs-4/packages/assessment/www/asm-admin/results-users.tcl 26 Sep 2006 00:22:46 -0000 1.7
@@ -13,6 +13,11 @@
page_title:onevalue
}
+permission::require_permission \
+ -object_id $assessment_id \
+ -party_id [ad_conn user_id] \
+ -privilege "admin"
+
# Get the assessment data
as::assessment::data -assessment_id $assessment_id
@@ -64,11 +69,11 @@
-elements {
session_id {
label {[_ assessment.Session]}
- display_template {@results.session_id@}
+ display_template {View}
}
subject_name {
label {[_ assessment.Subject_Name]}
- display_template {@results.subject_name@@results.subject_name@}
+ display_template {@results.subject_name@}
}
completed_datetime {
label {[_ assessment.Finish_Time]}
Index: openacs-4/packages/assessment/www/asm-admin/sessions.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/sessions.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/assessment/www/asm-admin/sessions.adp 12 Jun 2006 12:14:58 -0000 1.1
+++ openacs-4/packages/assessment/www/asm-admin/sessions.adp 26 Sep 2006 00:22:46 -0000 1.2
@@ -1,6 +1,5 @@
#assessment.All_Users#
-
#assessment.lt_Responses_for_assessm#
#assessment.lt_Responses_of_user_per#
Index: openacs-4/packages/assessment/www/asm-admin/swap-actions.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/swap-actions.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/assessment/www/asm-admin/swap-actions.tcl 1 Feb 2005 22:00:10 -0000 1.1
+++ openacs-4/packages/assessment/www/asm-admin/swap-actions.tcl 26 Sep 2006 00:22:46 -0000 1.2
@@ -12,6 +12,12 @@
direction
assessment_id:integer
}
+
+permission::require_permission \
+ -object_id $assessment_id \
+ -party_id [ad_conn user_id] \
+ -privilege "admin"
+
as::assessment::check::swap_actions -check_id $check_id -action_perform $action_perform -section_id $section_id -direction $direction -order_by $order_by
Index: openacs-4/packages/assessment/www/asm-admin/unsubscribe.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/unsubscribe.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/assessment/www/asm-admin/unsubscribe.tcl 1 Feb 2005 22:00:10 -0000 1.1
+++ openacs-4/packages/assessment/www/asm-admin/unsubscribe.tcl 26 Sep 2006 00:22:46 -0000 1.2
@@ -11,6 +11,11 @@
section_id
}
+permission::require_permission \
+ -object_id $assessment_id \
+ -party_id [ad_conn user_id] \
+ -privilege "admin"
+
set request_count [llength $request_id]
for { set i 0} { $i < $request_count } { incr i } {
db_transaction {
Index: openacs-4/packages/assessment/www/asm-admin/unzip-file.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/unzip-file.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/assessment/www/asm-admin/unzip-file.tcl 1 Feb 2005 22:00:10 -0000 1.1
+++ openacs-4/packages/assessment/www/asm-admin/unzip-file.tcl 26 Sep 2006 00:22:46 -0000 1.2
@@ -9,6 +9,10 @@
qti_items_imported_number
context:onevalue
}
+permission::require_permission \
+ -object_id [ad_conn package_id] \
+ -party_id [ad_conn user_id] \
+ -privilege "admin"
set context [list "[_ assessment.Import_Results]"]