Index: openacs-4/packages/xowf/lib/inclass-exam.wf =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/Attic/inclass-exam.wf,v diff -u -N -r1.1.2.51 -r1.1.2.52 --- openacs-4/packages/xowf/lib/inclass-exam.wf 1 Nov 2020 21:05:54 -0000 1.1.2.51 +++ openacs-4/packages/xowf/lib/inclass-exam.wf 8 Dec 2020 19:53:01 -0000 1.1.2.52 @@ -560,6 +560,24 @@ set examTitle ${:title} set do_stream [expr {[llength [$items children]] > 100}] + # + # Add a simple print button for the unaware that makes it easy + # to print the exam protocol to PDF and use e.g. a pdf-tool to + # annotate free text answers. + # + set HTML { + + } + + template::add_event_listener \ + -id print-button \ + -event click \ + -preventdefault=false \ + -script "window.print();" + append HTML [template::collect_body_scripts] + ::xo::cc set_parameter template_file view-plain-master ::xo::cc set_parameter MenuBar 0 template::head::add_link -rel stylesheet -href /resources/xowf/test-item.css @@ -568,9 +586,9 @@ set userName [acs_user::get_element -user_id [ad_conn user_id] -element username] set fullName [::xo::get_user_name [ad_conn user_id]] set heading "$userName - $fullName" - set HTML "

#xowf.online-exam-review-protocol# - $heading

\n" + append HTML "

#xowf.online-exam-review-protocol# - $heading

\n" } else { - set HTML "

#xowf.online-exam-protocol#

\n" + append HTML "

#xowf.online-exam-protocol#

\n" } if {$do_stream} {