xowf::test_item::Question_manager method question_count (public)

 <instance of xowf::test_item::Question_manager[i]> question_count \
    [ -all ] obj

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

Return the number questions in an exam. It is either the number of defined questions, or it might be restricted by the property max_items (if defined for "obj").

Switches:
-all (optional, defaults to "false")
Parameters:
obj (required, object)

Testcases:
No testcase defined.
Source code:
set nr_questions [llength [:question_names $obj]]
if {!$all} {
  set max_items [$obj property max_items ""]
  if {$max_items ne ""} {
    if {$max_items < $nr_questions} {
      set nr_questions $max_items
    }
  }
}
return $nr_questions
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: