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
(defaults to "false") (optional)
Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc question_count xowf::test_item::Question_manager instproc question_count test_create_test_items->xowf::test_item::Question_manager instproc question_count

Testcases:
create_test_items
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: