xowf::test_item::Question_manager method total (protected)

 <instance of xowf::test_item::Question_manager[i]> total \
    -property property  title_infos

Defined in packages/xowf/tcl/test-item-procs.tcl

Sum up the values of the provided property from title_infos

Switches:
-property (required)
Parameters:
title_infos (required)

Testcases:
No testcase defined.
Source code:
set total 0
foreach title_info $title_infos {
  if {[dict exists $title_info $property]} {
    set value [dict get $title_info $property]
    if {$value eq ""} {
      ns_log notice "missing property '$property' in '$title_info'"
      set value 0
    }
    set total [expr {$total + $value}]
  }
}
return $total
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: