Index: openacs-4/packages/acs-tcl/lib/static-progress-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/lib/static-progress-bar.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-tcl/lib/static-progress-bar.tcl 17 Jul 2018 13:32:18 -0000 1.5 +++ openacs-4/packages/acs-tcl/lib/static-progress-bar.tcl 3 Dec 2018 17:25:01 -0000 1.6 @@ -1,48 +1,31 @@ -# packages/acs-tcl/lib/static-progress-bar.tcl -# -# The OTHER progress-bar.adp is animated. -# include this to show a progress bar for an assessment (or other multi-page -# flow) -# -# @author Deds Castillo (deds@i-manila.com.ph) -# @creation-date 2004-11-08 -# -# params: total (int) - number of pages in entire assessment -# current (int) - current page being shown -# finish (optional,boolean) - if supplied, then this is the final page -# bgcolor background color -# fontcolor color of text -# bgimage URL of background image -# +ad_include_contract { + packages/acs-tcl/lib/static-progress-bar.tcl -# NOTE: shows progress in terms of pages, NOT questions + The OTHER progress-bar.adp is animated. + include this to show a progress bar for an assessment (or other multi-page + flow) -foreach required_param {total current} { - if {![info exists $required_param]} { - return -code error "$required_param is a required parameter." - } -} + @author Deds Castillo (deds@i-manila.com.ph) + @creation-date 2004-11-08 -if {![info exists finish]} { - set finish 0 -} + params: total (int) - number of pages in entire assessment + current (int) - current page being shown + finish (optional,boolean) - if supplied, then this is the final page + bgcolor background color + fontcolor color of text + bgimage URL of background image -if {![info exists bgcolor]} { - set bgcolor "\#aaaaaa" + NOTE: shows progress in terms of pages, NOT questions +} { + total:naturalnum + current:naturalnum + {finish:boolean false} + {bgcolor:nohtml "\#aaaaaa"} + {fontcolor:nohtml "white"} + {bgimage:path "/resources/acs-subsite/pb-bg.gif"} + {header_color:nohtml "black"} } -if {![info exists fontcolor]} { - set fontcolor "white" -} - -if {![info exists bgimage]} { - set bgimage "/resources/acs-subsite/pb-bg.gif" -} - -if {![info exists header_color]} { - set header_color "black" -} - if { $total == 0 || [string is true $finish] } { set percentage_done 100 } elseif {[info exists finished_page] && $finished_page == $current} {