Under which conditions should the feedback associated with <br>
@@ -361,7 +361,7 @@
Allow Multiple Answers
Allo Multiple Answers?
Name
- Assessment name of the new coppy
+ Assessment name of the new copy
The name of the trigger.
Name is already used.
New Assessment
@@ -418,7 +418,7 @@
Password
Enter assessment password
Percent Score
- Percentage of the points of the question this choice gives. May be larger than 100 and lower than -100.
+ Percentage of the points of the question this choice gives. May be larger than 100 and lower than -100.
Performed
Permissions
points
@@ -480,7 +480,7 @@
Search and add sections to assessment "%assessment_data.title%"
Description of this section display type
Title of the section display type. It will be used to select the display type when creating new sections.
- How many questions will be displayed on a page in a section of this type. Leave empty for all questions on one page, use "1" for one question per page.
+ How many questions will be displayed on a page in a section of this type. Leave empty for all questions on one page, use "1" for one question per page.
SECTION
Branched section
Is this a branched section?
Index: openacs-4/packages/assessment/lib/comments-chunk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/comments-chunk.tcl,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/assessment/lib/comments-chunk.tcl 16 Aug 2005 14:14:54 -0000 1.1.2.1
+++ openacs-4/packages/assessment/lib/comments-chunk.tcl 21 Feb 2006 18:09:33 -0000 1.1.2.2
@@ -21,7 +21,9 @@
set return_url [ad_return_url]
set general_comments_url [apm_package_url_from_key "general-comments"]
-set comment_add_url [export_vars -base "${general_comments_url}comment-add" {object_id return_url}]
+if {[permission::permission_p -object_id $object_id -privilege "general_comments_create"]} {
+ set comment_add_url [export_vars -base "${general_comments_url}comment-add" {object_id return_url}]
+}
db_multirow -extend { html_content edit_url } comments comments {
select g.comment_id,
Index: openacs-4/packages/assessment/lib/session-items.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/session-items.adp,v
diff -u -r1.7.2.2 -r1.7.2.3
--- openacs-4/packages/assessment/lib/session-items.adp 28 Jul 2005 04:32:21 -0000 1.7.2.2
+++ openacs-4/packages/assessment/lib/session-items.adp 21 Feb 2006 18:09:33 -0000 1.7.2.3
@@ -66,11 +66,19 @@
@items.description;noquote@
- @items.result_points@ / @items.points@ #assessment.points#
-
- : @items.feedback;noquote@
+
+ @items.result_points@ / @items.points@ #assessment.points#
+
+ : @items.feedback;noquote@
+
+
-
+
+ #assessment.not_yet_reviewed#
+ #assessment.not_answered#
+
+ #assessment.Edit#
+
#assessment.not_yet_reviewed#
Index: openacs-4/packages/assessment/lib/session-items.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/session-items.tcl,v
diff -u -r1.7.2.2 -r1.7.2.3
--- openacs-4/packages/assessment/lib/session-items.tcl 28 Jul 2005 04:32:21 -0000 1.7.2.2
+++ openacs-4/packages/assessment/lib/session-items.tcl 21 Feb 2006 18:09:33 -0000 1.7.2.3
@@ -7,7 +7,7 @@
}
# todo: display feedback text
-db_multirow -extend { presentation_type html result_points feedback answered_p choice_orientation next_title num view} items session_items {} {
+db_multirow -extend { presentation_type html result_points feedback answered_p choice_orientation next_title next_pr_type num } items session_items {} {
set default_value [as::item_data::get -subject_id $subject_id -as_item_id $as_item_id -session_id $session_id]
set presentation_type [as::item_form::add_item_to_form -name session_results_$section_id -section_id $section_id -item_id $as_item_id -session_id $session_id -default_value $default_value -show_feedback $show_feedback]
@@ -63,11 +63,13 @@
if {$i < ${items:rowcount}} {
upvar 0 items:$j next
set this(next_title) $next(title)
+ set this(next_pr_type) $next(presentation_type)
if {$this(title) != $next(title)} {
incr counter
}
} else {
set this(next_title) ""
+ set this(next_pr_type) ""
}
}
Index: openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.17-0.18.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.17-0.18.sql,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.17-0.18.sql 14 Feb 2006 18:02:57 -0000 1.1.2.1
+++ openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.17-0.18.sql 21 Feb 2006 18:09:33 -0000 1.1.2.2
@@ -1,7 +1,20 @@
-- upgrade the column size
drop view as_assessmentsx;
drop view as_assessmentsi;
-alter table as_assessments alter column entry_page type varchar(4000);
-alter table as_assessments alter column exit_page type varchar(4000);
-alter table as_assessments alter column return_url type varchar(4000);
+
+alter table as_assessments rename entry_page to entry_page_old;
+alter table as_assessments add entry_page varchar(4000);
+update as_assessments set entry_page = entry_page_old;
+alter table as_assessments drop entry_page_old;
+
+alter table as_assessments rename exit_page to exit_page_old;
+alter table as_assessments add exit_page varchar(4000);
+update as_assessments set exit_page = exit_page_old;
+alter table as_assessments drop exit_page_old;
+
+alter table as_assessments rename return_url to return_url_old;
+alter table as_assessments add return_url varchar(4000);
+update as_assessments set return_url = return_url_old;
+alter table as_assessments drop return_url_old;
+
select content_type__refresh_view('as_assessments');
\ No newline at end of file
Index: openacs-4/packages/assessment/tcl/as-assessment-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-assessment-procs.tcl,v
diff -u -r1.26.2.7 -r1.26.2.8
--- openacs-4/packages/assessment/tcl/as-assessment-procs.tcl 23 Jan 2006 16:32:51 -0000 1.26.2.7
+++ openacs-4/packages/assessment/tcl/as-assessment-procs.tcl 21 Feb 2006 18:09:33 -0000 1.26.2.8
@@ -572,7 +572,6 @@
}
}
-
ad_proc -private as::assessment::title {
-title
} {
Index: openacs-4/packages/assessment/tcl/as-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-callback-procs.tcl,v
diff -u -r1.1.2.10 -r1.1.2.11
--- openacs-4/packages/assessment/tcl/as-callback-procs.tcl 2 Feb 2006 14:02:36 -0000 1.1.2.10
+++ openacs-4/packages/assessment/tcl/as-callback-procs.tcl 21 Feb 2006 18:09:33 -0000 1.1.2.11
@@ -1,18 +1,18 @@
ad_library {
- assessment -- callback routines
- @author eduardo.perez@uc3m.es
- @creation-date 2005-05-23
- @cvs-id $Id$
+ assessment -- callback routines
+ @author eduardo.perez@uc3m.es
+ @creation-date 2005-05-23
+ @cvs-id $Id$
}
-ad_proc -public -callback lors::import -impl qti {} {
- this is the lors qti importer
+ad_proc -public -callback imsld::import -impl qti {} {
+ this is the imsld qti importer
} {
- if {$res_type == "imsqti_xmlv1p0" || $res_type == "imsqti_xmlv1p1" || $res_type =="imsqti_item_xmlv2p0"} {
- return [as::qti::register \
- -tmp_dir $tmp_dir/$res_href \
- -community_id $community_id]
- }
+ if {$res_type == "imsqti_xmlv1p0" || $res_type == "imsqti_xmlv1p1" || $res_type =="imsqti_item_xmlv2p0"} {
+ return [as::qti::register_xml_object_id \
+ -xml_file $tmp_dir/$res_href \
+ -community_id $community_id]
+ }
}
ad_proc -public -callback imsld::import -impl qti {} {
Index: openacs-4/packages/assessment/tcl/as-checks-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-checks-procs.xql,v
diff -u -r1.19.2.7 -r1.19.2.8
--- openacs-4/packages/assessment/tcl/as-checks-procs.xql 8 Sep 2005 09:11:52 -0000 1.19.2.7
+++ openacs-4/packages/assessment/tcl/as-checks-procs.xql 21 Feb 2006 18:09:33 -0000 1.19.2.8
@@ -375,6 +375,4 @@
-
-
Index: openacs-4/packages/assessment/tcl/as-install-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-install-procs.tcl,v
diff -u -r1.30.2.13 -r1.30.2.14
--- openacs-4/packages/assessment/tcl/as-install-procs.tcl 27 Jan 2006 09:41:09 -0000 1.30.2.13
+++ openacs-4/packages/assessment/tcl/as-install-procs.tcl 21 Feb 2006 18:09:33 -0000 1.30.2.14
@@ -19,7 +19,11 @@
inter_item_checks::apm_callback::package_install
+set value [parameter::get -parameter "AsmForRegisterId" -package_id [subsite::main_site_id]]
+if {[empty_string_p $value]} {
+ apm_parameter_register "AsmForRegisterId" "Assessment used on the registration process." "acs-subsite" "0" "number" "user-login"
+}
content::type::new -content_type {as_item_choices} -supertype {content_revision} -pretty_name {Assessment Item Choice} -pretty_plural {Assessment Item Choices} -table_name {as_item_choices} -id_column {choice_id}
content::type::new -content_type {as_item_sa_answers} -supertype {content_revision} -pretty_name {Assessment Item Answer} -pretty_plural {Assessment Item Answer} -table_name {as_item_sa_answers} -id_column {choice_id}
@@ -377,7 +381,7 @@
0.10d11 0.10d12 {
content::type::attribute::new -content_type {as_items} -attribute_name {field_name} -datatype {string} -pretty_name {Item Field Name} -column_spec {varchar(500)}
}
-
+
0.11 0.12 {
#File Upload new type
content::type::new -content_type {as_item_type_fu} -supertype {content_revision} -pretty_name {Assessment Item Type File Upload} -pretty_plural {Assessment Item Type File Upload} -table_name {as_item_type_fu} -id_column {as_item_type_id}
Index: openacs-4/packages/assessment/tcl/as-item-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-procs.xql,v
diff -u -r1.6.2.1 -r1.6.2.2
--- openacs-4/packages/assessment/tcl/as-item-procs.xql 27 Jan 2006 09:41:09 -0000 1.6.2.1
+++ openacs-4/packages/assessment/tcl/as-item-procs.xql 21 Feb 2006 18:09:33 -0000 1.6.2.2
@@ -42,7 +42,7 @@
select i.subtext, i.field_code, i.required_p, i.data_type,
i.max_time_to_complete, i.feedback_right,
- i.feedback_wrong, i.points
+ i.feedback_wrong, i.points, i.validate_block
from cr_revisions cr, as_items i
where cr.revision_id = :as_item_id
and i.as_item_id = cr.revision_id
Index: openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl,v
diff -u -r1.17.2.3 -r1.17.2.4
--- openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl 1 Aug 2005 15:54:46 -0000 1.17.2.3
+++ openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl 21 Feb 2006 18:09:33 -0000 1.17.2.4
@@ -352,14 +352,15 @@
ad_proc -public as::item_type_mc::results {
-as_item_item_id:required
-section_item_id:required
- -data_type:required
+ {-data_type ""}
-sessions:required
} {
@author Timo Hentschel (timo@timohentschel.de)
@creation-date 2005-01-26
Return the results of a given item in a given list of sessions as an array
} {
+
db_foreach get_results {} {
if {[empty_string_p $text_value]} {
lappend results($session_id) [as::assessment::quote_export -text $title]
Index: openacs-4/packages/assessment/tcl/as-item-type-sa-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-type-sa-procs.xql,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/packages/assessment/tcl/as-item-type-sa-procs.xql 26 Jan 2005 11:06:45 -0000 1.2
+++ openacs-4/packages/assessment/tcl/as-item-type-sa-procs.xql 21 Feb 2006 18:09:33 -0000 1.2.2.1
@@ -29,9 +29,9 @@
from as_item_data d, as_session_item_map m, cr_revisions ri, cr_revisions rs
where d.session_id in ([join $sessions ,])
and d.as_item_id = ri.revision_id
- and ri.item_id = :as_item_item_id
+ and ri.item_id = $as_item_item_id
and d.section_id = rs.revision_id
- and rs.item_id = :section_item_id
+ and rs.item_id = $section_item_id
and m.session_id = d.session_id
and m.item_data_id = d.item_data_id
Index: openacs-4/packages/assessment/tcl/as-qti-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-qti-procs.tcl,v
diff -u -r1.35.2.5 -r1.35.2.6
--- openacs-4/packages/assessment/tcl/as-qti-procs.tcl 18 Nov 2005 10:58:24 -0000 1.35.2.5
+++ openacs-4/packages/assessment/tcl/as-qti-procs.tcl 21 Feb 2006 18:09:33 -0000 1.35.2.6
@@ -3,7 +3,6 @@
@author eperez@it.uc3m.es
@creation-date 2004-04-16
@cvs-id $Id$
-
}
namespace eval as::qti {}
Index: openacs-4/packages/assessment/www/assessment-section-submit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/assessment-section-submit.adp,v
diff -u -r1.8.2.5 -r1.8.2.6
--- openacs-4/packages/assessment/www/assessment-section-submit.adp 29 Jul 2005 06:44:25 -0000 1.8.2.5
+++ openacs-4/packages/assessment/www/assessment-section-submit.adp 21 Feb 2006 18:09:33 -0000 1.8.2.6
@@ -44,11 +44,13 @@
- |
-
- @formgroup.label;noquote@ |
-
-
+
+ |
+
+ @formgroup.label;noquote@ |
+
+
+
@items.description;noquote@ |
Index: openacs-4/packages/assessment/www/assessment-single-submit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/assessment-single-submit.adp,v
diff -u -r1.6.2.4 -r1.6.2.5
--- openacs-4/packages/assessment/www/assessment-single-submit.adp 29 Jul 2005 06:44:26 -0000 1.6.2.4
+++ openacs-4/packages/assessment/www/assessment-single-submit.adp 21 Feb 2006 18:09:33 -0000 1.6.2.5
@@ -1,6 +1,6 @@
@assessment_data.html_title;noquote@
-@context_bar;noquote@
+@context;noquote@
|
Index: openacs-4/packages/assessment/www/assessment.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/Attic/assessment.tcl,v
diff -u -r1.47.2.9 -r1.47.2.10
--- openacs-4/packages/assessment/www/assessment.tcl 7 Feb 2006 10:42:47 -0000 1.47.2.9
+++ openacs-4/packages/assessment/www/assessment.tcl 21 Feb 2006 18:09:33 -0000 1.47.2.10
@@ -263,7 +263,7 @@
{session_id:text(hidden) {value $session_id}}
}
-multirow create items as_item_id name title description subtext required_p max_time_to_complete presentation_type html submitted_p content as_item_type_id choice_orientation next_title validate_block
+multirow create items as_item_id name title description subtext required_p max_time_to_complete presentation_type html submitted_p content as_item_type_id choice_orientation next_title validate_block next_pr_type
set unsubmitted_list [list]
set validate_list [list]
@@ -377,16 +377,18 @@
set choice_orientation ""
}
- multirow append items $as_item_id $name $title $description $subtext $required_p $max_time_to_complete $presentation_type "" $submitted_p [as::assessment::display_content -content_id $content_rev_id -filename $content_filename -content_type $content_type] $as_item_type_id $choice_orientation ""
+ multirow append items $as_item_id $name $title $description $subtext $required_p $max_time_to_complete $presentation_type "" $submitted_p [as::assessment::display_content -content_id $content_rev_id -filename $content_filename -content_type $content_type] $as_item_type_id $choice_orientation "" ""
}
for {set i 1; set j 2} {$i <= ${items:rowcount}} {incr i; incr j} {
upvar 0 items:$i this
if {$i < ${items:rowcount}} {
upvar 0 items:$j next
set this(next_title) $next(title)
+ set this(next_pr_type) $next(presentation_type)
} else {
set this(next_title) ""
+ set this(next_pr_type) ""
}
}
@@ -430,7 +432,7 @@
if {\$section_order != \$new_section_order} {
# calculate section points at end of section
- as::section::calculate -section_id \$section_id -assessment_id \$assessment_rev_id -session_id \$session_id
+ # as::section::calculate -section_id \$section_id -assessment_id \$assessment_rev_id -session_id \$session_id
# immediate checks execution
as::assessment::check::eval_i_checks -session_id $session_id -section_id $section_id
set section_to_tmp \[as::assessment::check::branch_checks -session_id $session_id -assessment_id $assessment_id\ -section_id $section_id]
@@ -499,7 +501,7 @@
if {$section_order != $new_section_order} {
# calculate section points at end of section
- as::section::calculate -section_id $section_id -assessment_id $assessment_rev_id -session_id $session_id
+ # as::section::calculate -section_id $section_id -assessment_id $assessment_rev_id -session_id $session_id
# immediate checks execution
as::assessment::check::eval_i_checks -session_id $session_id -section_id $section_id
}
Index: openacs-4/packages/assessment/www/index-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/index-oracle.xql,v
diff -u -r1.4 -r1.4.2.1
--- openacs-4/packages/assessment/www/index-oracle.xql 22 Apr 2005 15:16:52 -0000 1.4
+++ openacs-4/packages/assessment/www/index-oracle.xql 21 Feb 2006 18:09:33 -0000 1.4.2.1
@@ -4,20 +4,24 @@
- select cr.item_id as assessment_id, cr.title, cr.description, a.password,
- to_char(a.start_time, 'YYYY-MM-DD HH24:MI:SS') as start_time,
- to_char(a.end_time, 'YYYY-MM-DD HH24:MI:SS') as end_time,
- to_char(sysdate, 'YYYY-MM-DD HH24:MI:SS') as cur_time
- from as_assessments a, cr_revisions cr, cr_items ci
- where a.assessment_id = cr.revision_id
- and cr.revision_id = ci.latest_revision
- and ci.parent_id = :folder_id
- and exists (select 1
- from as_assessment_section_map asm, as_item_section_map ism
- where asm.assessment_id = a.assessment_id
- and ism.section_id = asm.section_id)
- and acs_permission.permission_p (a.assessment_id, :user_id, 'read') = 't'
- order by lower(cr.title)
+
+select cr.item_id as assessment_id, cr.title, cr.description, a.password,
+ to_char(a.start_time, 'YYYY-MM-DD HH24:MI:SS') as start_time,
+ to_char(a.end_time, 'YYYY-MM-DD HH24:MI:SS') as end_time,
+ to_char(sysdate, 'YYYY-MM-DD HH24:MI:SS') as cur_time
+from as_assessments a, cr_revisions cr, cr_items ci
+where a.assessment_id = cr.revision_id
+and cr.revision_id = ci.latest_revision
+and ci.parent_id = :folder_id
+and exists (select 1
+ from as_assessment_section_map asm, as_item_section_map ism
+ where asm.assessment_id = a.assessment_id
+ and ism.section_id = asm.section_id)
+ and exists (select 1 from acs_object_party_privilege_map ppm
+ where ppm.object_id = a.assessment_id
+ and ppm.privilege = 'read'
+ and ppm.party_id = :user_id)
+order by lower(cr.title)
Index: openacs-4/packages/assessment/www/session.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/session.adp,v
diff -u -r1.27.2.4 -r1.27.2.5
--- openacs-4/packages/assessment/www/session.adp 21 Sep 2005 08:57:30 -0000 1.27.2.4
+++ openacs-4/packages/assessment/www/session.adp 21 Feb 2006 18:09:33 -0000 1.27.2.5
@@ -48,4 +48,7 @@
#assessment.Total_score#: @session_score@ / @assessment_score@ = @percent_score@%
+
+
+
Index: openacs-4/packages/assessment/www/session.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/session.tcl,v
diff -u -r1.34.2.2 -r1.34.2.3
--- openacs-4/packages/assessment/www/session.tcl 28 Jul 2005 05:40:36 -0000 1.34.2.2
+++ openacs-4/packages/assessment/www/session.tcl 21 Feb 2006 18:09:33 -0000 1.34.2.3
@@ -69,4 +69,6 @@
set showpoints [parameter::get -parameter "ShowPoints" -default 1 ]
+set comments_installed_p [apm_package_enabled_p "general-comments"]
+
ad_return_template
Index: openacs-4/packages/assessment/www/admin/asm-action-param-admin.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/admin/asm-action-param-admin.tcl,v
diff -u -r1.5.2.2 -r1.5.2.3
--- openacs-4/packages/assessment/www/admin/asm-action-param-admin.tcl 10 Jun 2005 18:53:31 -0000 1.5.2.2
+++ openacs-4/packages/assessment/www/admin/asm-action-param-admin.tcl 21 Feb 2006 18:09:34 -0000 1.5.2.3
@@ -19,7 +19,6 @@
set context [list [list [export_vars -base asm-action-new {action_id} ] [_ assessment.action_admin] ] $page_title]
set user_id [ad_conn user_id]
-
set type_options [list [list "[_ assessment.query]" q] [list "[_ assessment.var ]" n]]
Index: openacs-4/packages/assessment/www/asm-admin/assessment-copy-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/assessment-copy-oracle.xql,v
diff -u -r1.1 -r1.1.2.1
--- openacs-4/packages/assessment/www/asm-admin/assessment-copy-oracle.xql 2 May 2005 10:11:22 -0000 1.1
+++ openacs-4/packages/assessment/www/asm-admin/assessment-copy-oracle.xql 21 Feb 2006 18:09:34 -0000 1.1.2.1
@@ -13,8 +13,10 @@
and na.object_id = pa.package_id
and nc.node_id = na.parent_id
and pc.package_id = nc.object_id
- and acs_permission.permission_p (pa.package_id, :user_id, 'admin') = 't'
-
+ and exists (select 1 from acs_object_party_privilege_map ppm
+ where ppm.object_id = pa.package_id
+ and ppm.privilege = 'admin'
+ and ppm.party_id = :user_id)
Index: openacs-4/packages/assessment/www/asm-admin/assessment-form.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/assessment-form.tcl,v
diff -u -r1.9.2.11 -r1.9.2.12
--- openacs-4/packages/assessment/www/asm-admin/assessment-form.tcl 14 Feb 2006 18:02:57 -0000 1.9.2.11
+++ openacs-4/packages/assessment/www/asm-admin/assessment-form.tcl 21 Feb 2006 18:09:34 -0000 1.9.2.12
@@ -98,7 +98,7 @@
}
}
-if { $type == 2 && [empty_string_p $edit_f]} {
+if { $type == 2 && [empty_string_p $edit_p]} {
ad_form -extend -name assessment_form -form {
{secure_access_p:text(select) {label "[_ assessment.Secure_Access_1]"} {options $boolean_options} {help_text "[_ assessment.as_Secure_Access_help]"}}
{reuse_responses_p:text(select) {label "[_ assessment.Reuse_Responses_1]"} {options $boolean_options} {help_text "[_ assessment.as_Reuse_Responses_help]"}}
Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `openacs-4/packages/assessment/www/asm-admin/change-timing.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `openacs-4/packages/assessment/www/asm-admin/change-timing.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `openacs-4/packages/assessment/www/asm-admin/change-timing.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/assessment/www/asm-admin/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/index.tcl,v
diff -u -r1.6.2.7 -r1.6.2.8
--- openacs-4/packages/assessment/www/asm-admin/index.tcl 6 Sep 2005 05:54:15 -0000 1.6.2.7
+++ openacs-4/packages/assessment/www/asm-admin/index.tcl 21 Feb 2006 18:09:34 -0000 1.6.2.8
@@ -17,6 +17,7 @@
set title "[_ assessment.Administration]"
set context [list "[_ assessment.admin]"]
set package_id [ad_conn package_id]
+set folder_id [as::assessment::folder_id -package_id $package_id]
set categories_url [db_string get_category_url {}]
set user_id [ad_conn user_id]
set sw_admin [acs_user::site_wide_admin_p -user_id $user_id]
@@ -56,6 +57,12 @@
set admin_request "[_ assessment.Request] [_ assessment.Administration]"
}
+# Bulk action for mass setting the start and endtime of assessments.
+set bulk_actions [list \
+ "[_ assessment.Change_timings]" \
+ "change-timing" \
+ "[_ assessment.Change_multiple_timings]"]
+
#list all assessments
list::create \
-name assessments \
@@ -79,7 +86,8 @@
link_url_eval "[export_vars -base admin-request { {assessment $assessment_id} }]"
}
-
- } -actions $actions
+
+ } -actions $actions \
+ -bulk_actions $bulk_actions
ad_return_template
Index: openacs-4/packages/assessment/www/asm-admin/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/index.xql,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/packages/assessment/www/asm-admin/index.xql 2 Feb 2005 19:04:46 -0000 1.2
+++ openacs-4/packages/assessment/www/asm-admin/index.xql 21 Feb 2006 18:09:34 -0000 1.2.2.1
@@ -5,10 +5,10 @@
select ci.item_id as assessment_id, cr.title
- from cr_folders cf, cr_items ci, cr_revisions cr, as_assessments a
+ from cr_items ci, cr_revisions cr
where cr.revision_id = ci.latest_revision
- and a.assessment_id = cr.revision_id
- and ci.parent_id = cf.folder_id and cf.package_id = :package_id
+ and ci.content_type = 'as_assessments'
+ and ci.parent_id = :folder_id
order by cr.title
@@ -18,12 +18,12 @@
select ci.item_id as assessment_id, cr.title
- from cr_folders cf, cr_items ci, cr_revisions cr, as_assessments a
+ from cr_items ci, cr_revisions cr
where cr.revision_id = ci.latest_revision
- and a.assessment_id = cr.revision_id
- and ci.parent_id = cf.folder_id
+ and ci.content_type = 'as_assessments'
+ and ci.parent_id = :folder_id
and ci.item_id in (select object_id from acs_permissions where
- grantee_id=:user_id and privilege='admin') and cf.package_id = :package_id
+ grantee_id=:user_id and privilege='admin')
order by cr.title
Index: openacs-4/packages/assessment/www/asm-admin/results-export.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-export.tcl,v
diff -u -r1.6.2.1 -r1.6.2.2
--- openacs-4/packages/assessment/www/asm-admin/results-export.tcl 16 Aug 2005 10:20:57 -0000 1.6.2.1
+++ openacs-4/packages/assessment/www/asm-admin/results-export.tcl 21 Feb 2006 18:09:34 -0000 1.6.2.2
@@ -48,25 +48,11 @@
}
if {$assessment_data(anonymous_p) == "t"} {
- set csv_first_row [list score submission_date]
+ set csv_first_row_list [list score submission_date]
} else {
- set csv_first_row [list score submission_date user_id email first_names last_name]
+ set csv_first_row_list [list score submission_date user_id email name]
}
- set column_list ""
- db_foreach all_items {} {
- lappend item_list [list $as_item_item_id $section_item_id [string range $object_type end-1 end] $data_type]
- if {$column_format == "name"} {
- lappend csv_first_row [as::assessment::quote_export -text $field_name]
- } else {
- if {[empty_string_p $description]} {
- lappend csv_first_row [as::assessment::quote_export -text $title]
- } else {
- lappend csv_first_row [as::assessment::quote_export -text "$title / $description"]
- }
- }
- }
-
set start_date_sql ""
set end_date_sql ""
if {![empty_string_p $start_time]} {
@@ -81,36 +67,94 @@
lappend session_list $session_id
if {$assessment_data(anonymous_p) == "t"} {
- set csv($session_id) [list $percent_score $submission_date]
+ set csv_result_list($session_id) [list $percent_score $submission_date]
} else {
- set csv($session_id) [list $percent_score $submission_date $subject_id [as::assessment::quote_export -text $email] [as::assessment::quote_export -text $first_names] [as::assessment::quote_export -text $last_name]]
+ set subject_mail [db_string get-email "select email from parties where party_id = :subject_id"]
+ set csv_result_list($session_id) [list $percent_score $submission_date $subject_id [as::assessment::quote_export -text $subject_mail] [as::assessment::quote_export -text [person::name -person_id $subject_id]]]
}
}
-
+
+ set item_list [list]
if {![empty_string_p $session_list]} {
- foreach one_item $item_list {
- util_unlist $one_item as_item_item_id section_item_id item_type data_type
- array set results [as::item_type_$item_type\::results -as_item_item_id $as_item_item_id -section_item_id $section_item_id -data_type $data_type -sessions $session_list]
-
- foreach session_id $session_list {
- if {[info exists results($session_id)]} {
- lappend csv($session_id) [as::assessment::quote_export -text $results($session_id)]
+
+ set section_list [db_list_of_lists all_sections {}]
+
+ foreach one_section $section_list {
+ util_unlist $one_section section_id section_item_id
+ set mc_item_list [list]
+ db_foreach all_section_items {} {
+ lappend item_list $as_item_item_id
+ if {$column_format == "name"} {
+ set csv_first_row($as_item_item_id) [as::assessment::quote_export -text $field_name]
} else {
- lappend csv($session_id) ""
+ if {[empty_string_p $description]} {
+ set csv_first_row($as_item_item_id) [as::assessment::quote_export -text $title]
+ } else {
+ set csv_first_row($as_item_item_id) [as::assessment::quote_export -text "$title / $description"]
+ }
}
+ set item_type [string range $object_type end-1 end]
+ if {$item_type == "mc"} {
+ lappend mc_item_list $as_item_item_id
+ } else {
+ array set results [as::item_type_$item_type\::results -as_item_item_id $as_item_item_id -section_item_id $section_item_id -data_type $data_type -sessions $session_list]
+ foreach session_id $session_list {
+ if {[info exists results($session_id)]} {
+ set csv_${as_item_item_id}($session_id) [as::assessment::quote_export -text $results($session_id)]
+ } else {
+ set csv_${as_item_item_id}($session_id) ""
+ }
+ }
+ array unset results
+ }
}
-
- array unset results
+
+ # Now get all MC items in one go
+ if {![empty_string_p $mc_item_list]} {
+ db_foreach mc_items {} {
+ if {[empty_string_p $text_value]} {
+ if {[exists_and_not_null csv_${mc_item_id}($session_id)]} {
+ # append list of choices seperated with comma
+ append csv_${mc_item_id}($session_id) ",[as::assessment::quote_export -text $title]"
+ } else {
+ # just set the choice value
+ set csv_${mc_item_id}($session_id) [as::assessment::quote_export -text $title]
+ }
+ } else {
+ set csv_${mc_item_id}($session_id) [as::assessment::quote_export -text $text_value]
+ }
+ }
+ array unset results
+ }
}
}
-
- set csv_text "[join $csv_first_row ","]\r\n"
+
+ foreach item_id $item_list {
+ lappend csv_first_row_list $csv_first_row($item_id)
+ }
+ set csv_text "[join $csv_first_row_list ";"]\r\n"
+
foreach session_id $session_list {
- append csv_text "[join $csv($session_id) ","]\r\n"
+ foreach item_id $item_list {
+ if {[exists_and_not_null csv_${item_id}($session_id)]} {
+ lappend csv_result_list($session_id) "[set csv_${item_id}($session_id)]"
+ } else {
+ lappend csv_result_list($session_id) ""
+ }
+ }
+ append csv_text "[join $csv_result_list($session_id) ";"]\r\n"
}
+ set csv_text [string map {\xe4 � \xfc � \xf6 � \xdf � \xc4 � \xdc � \xd6 �} $csv_text]
} -after_submit {
- ns_set put [ad_conn outputheaders] Content-Disposition "attachment;filename=results.csv"
- ns_return 200 "text/plain" "$csv_text"
+ set tmp_filename [ns_tmpnam]
+ set tmp_csv_filename "$tmp_filename.csv"
+ set fp [open $tmp_csv_filename w]
+ puts $fp "$csv_text"
+ close $fp
+ ns_set put [ad_conn outputheaders] Content-Disposition "attachment;filename=results.csv"
+ ns_return 200 "text/plain" [encoding convertfrom iso8859-1 "$csv_text"]
+ ns_returnfile 200 text/csv $tmp_csv_filename
+ # iso-8859-1
}
ad_return_template
Index: openacs-4/packages/assessment/www/asm-admin/results-export.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-export.xql,v
diff -u -r1.4 -r1.4.2.1
--- openacs-4/packages/assessment/www/asm-admin/results-export.xql 18 Apr 2005 11:02:28 -0000 1.4
+++ openacs-4/packages/assessment/www/asm-admin/results-export.xql 21 Feb 2006 18:09:34 -0000 1.4.2.1
@@ -1,47 +1,75 @@
-
+
+ select asm.section_id, cr.item_id
+ from as_assessment_section_map asm, cr_revisions cr
+ where asm.assessment_id = :assessment_rev_id
+ and asm.section_id = cr.revision_id
+ order by asm.sort_order
+
+
+
+
+
+
+
select cr.title, cr.description, o.object_type, i.data_type, i.field_name,
- cr.item_id as as_item_item_id, rs.item_id as section_item_id
- from as_assessment_section_map asm, as_item_section_map ism, cr_revisions cr,
- as_items i, as_item_rels ir, acs_objects o, cr_revisions rs
- where asm.assessment_id = :assessment_rev_id
- and ism.section_id = asm.section_id
+ cr.item_id as as_item_item_id
+ from as_item_section_map ism, cr_revisions cr,
+ as_items i, as_item_rels ir, acs_objects o
+ where ism.section_id = :section_id
and cr.revision_id = ism.as_item_id
and i.as_item_id = ism.as_item_id
and ir.item_rev_id = i.as_item_id
and ir.rel_type = 'as_item_type_rel'
and o.object_id = ir.target_rev_id
- and rs.revision_id = ism.section_id
- order by asm.sort_order, ism.sort_order
+ order by ism.sort_order, o.object_type
-
-
- select s.session_id, s.percent_score, s.subject_id, p.first_names, p.last_name,
- to_char(s.completed_datetime, 'YYYY-MM-DD HH24:MI:SS') as submission_date,
- y.email
- from as_sessions s, persons p, parties y,
+
+ select s.session_id, s.percent_score, s.subject_id,
+ to_char(s.completed_datetime, 'YYYY-MM-DD HH24:MI:SS') as submission_date
+ from as_sessions s,
(select max(s2.session_id) as session_id, s2.subject_id
from as_sessions s2, cr_revisions r
where r.item_id = :assessment_id
and s2.assessment_id = r.revision_id
and s2.completed_datetime is not null
group by s2.subject_id) sub
where s.session_id = sub.session_id
- and sub.subject_id = p.person_id
- and sub.subject_id = y.party_id
$start_date_sql
$end_date_sql
order by s.session_id
+
+
+
+ select d.session_id, d.item_data_id, c.text_value, rc.title, ri.item_id as mc_item_id
+ from as_item_data d, as_session_item_map m, cr_revisions ri,
+ as_item_data_choices dc, as_item_choices c, cr_revisions rc,
+ as_session_sections s, cr_revisions rs
+ where s.session_id in ([join $session_list ,])
+ and s.section_id = rs.revision_id
+ and rs.item_id = :section_item_id
+ and d.session_id = s.session_id
+ and d.as_item_id = ri.revision_id
+ and d.section_id = s.section_id
+ and m.session_id = d.session_id
+ and m.item_data_id = d.item_data_id
+ and dc.item_data_id = d.item_data_id
+ and c.choice_id = dc.choice_id
+ and c.choice_id = rc.revision_id
+
+
+
+
Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `openacs-4/packages/assessment/www/asm-admin/results-users-oracle.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `openacs-4/packages/assessment/www/asm-admin/results-users-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/assessment/www/asm-admin/results-users.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-users.adp,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/packages/assessment/www/asm-admin/results-users.adp 15 Apr 2005 17:26:46 -0000 1.2
+++ openacs-4/packages/assessment/www/asm-admin/results-users.adp 21 Feb 2006 18:09:34 -0000 1.2.2.1
@@ -2,6 +2,10 @@
@page_title;noquote@
@context;noquote@
+
+
+
+
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.5 -r1.5.2.1
--- openacs-4/packages/assessment/www/asm-admin/results-users.tcl 18 Apr 2005 07:12:26 -0000 1.5
+++ openacs-4/packages/assessment/www/asm-admin/results-users.tcl 21 Feb 2006 18:09:34 -0000 1.5.2.1
@@ -6,6 +6,8 @@
@creation-date 2005-01-24
} {
assessment_id
+ {start_time:optional ""}
+ {end_time:optional ""}
} -properties {
context:onevalue
page_title:onevalue
@@ -24,7 +26,37 @@
set page_title "[_ assessment.Results_by_user]"
set context [list [list index [_ assessment.admin]] [list [export_vars -base one-a {assessment_id}] $assessment_data(title)] $page_title]
set format "[lc_get formbuilder_date_format], [lc_get formbuilder_time_format]"
+set form_format [lc_get formbuilder_date_format]
+set start_date_sql ""
+set end_date_sql ""
+
+ad_form -name assessment_results -action results-users -form {
+ {assessment_id:key}
+ {start_time:date,to_sql(sql_date),to_html(display_date),optional {label "[_ assessment.csv_Start_Time]"} {format $form_format} {help} {help_text "[_ assessment.csv_Start_Time_help]"}}
+ {end_time:date,to_sql(sql_date),to_html(display_date),optional {label "[_ assessment.csv_End_Time]"} {format $form_format} {help} {help_text "[_ assessment.csv_End_Time_help]"}}
+} -edit_request {
+} -on_submit {
+ if {$start_time == "NULL"} {
+ set start_time ""
+ }
+ if {$end_time == "NULL"} {
+ set end_time ""
+ }
+ if {[db_type] == "postgresql"} {
+ regsub -all -- {to_date} $start_time {to_timestamp} start_time
+ regsub -all -- {to_date} $end_time {to_timestamp} end_time
+ }
+
+ if {![empty_string_p $start_time]} {
+ set start_date_sql [db_map restrict_start_date]
+ }
+ if {![empty_string_p $end_time]} {
+ set end_date_sql [db_map restrict_end_date]
+ }
+ #ad_returnredirect [export_vars -base results-users {assessment_id start_time end_time}]
+}
+
template::list::create \
-name results \
-multirow results \
Index: openacs-4/packages/assessment/www/asm-admin/results-users.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-users.xql,v
diff -u -r1.1 -r1.1.2.1
--- openacs-4/packages/assessment/www/asm-admin/results-users.xql 1 Feb 2005 22:00:10 -0000 1.1
+++ openacs-4/packages/assessment/www/asm-admin/results-users.xql 21 Feb 2006 18:09:34 -0000 1.1.2.1
@@ -5,7 +5,7 @@
select s.session_id, s.subject_id, s.percent_score,
to_char(s.completed_datetime, :format) as completed_datetime,
- p.first_names || ' ' || p.last_name AS subject_name,
+ p.last_name || ', ' || p.first_names AS subject_name,
:assessment_id as assessment_id
from as_sessions s, persons p,
(select max(s2.session_id) as session_id, s2.subject_id
@@ -16,6 +16,8 @@
group by s2.subject_id) sub
where s.session_id = sub.session_id
and sub.subject_id = p.person_id
+ $start_date_sql
+ $end_date_sql
order by s.completed_datetime
Index: openacs-4/packages/assessment/www/asm-admin/section-delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/section-delete.tcl,v
diff -u -r1.3.2.2 -r1.3.2.3
--- openacs-4/packages/assessment/www/asm-admin/section-delete.tcl 18 Jul 2005 18:01:01 -0000 1.3.2.2
+++ openacs-4/packages/assessment/www/asm-admin/section-delete.tcl 21 Feb 2006 18:09:34 -0000 1.3.2.3
@@ -38,7 +38,9 @@
if {$confirmation} {
db_transaction {
set new_assessment_rev_id [as::assessment::new_revision -assessment_id $assessment_id]
- set section_id [as::section::latest -section_id $section_id -assessment_rev_id $new_assessment_rev_id]
+ # This needs to be fixed. The call is useful if we are dealing with the fact that someone edits the assessment
+ # While the section is being deleted.
+ # set section_id [as::section::latest -section_id $section_id -assessment_rev_id $new_assessment_rev_id]
db_1row get_sort_order_to_be_removed {}
db_dml remove_section_from_assessment {}
Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `openacs-4/packages/assessment/www/asm-admin/sqlnet.log'.
Fisheye: No comparison available. Pass `N' to diff?
|