[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/quiz/report/statistics/tests/ -> stats_from_steps_walkthrough_test.php (summary)

Quiz attempt walk through using data from csv file. The quiz stats below and the question stats found in qstats00.csv were calculated independently in a spreadsheet which is available in open document or excel format here : https://github.com/jamiepratt/moodle-quiz-tools/tree/master/statsspreadsheet

Author: Jamie Pratt <me@jamiep.org>
Copyright: 2013 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 397 lines (20 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

quiz_report_statistics_from_steps_testcase:: (10 methods):
  get_full_path_of_csv_file()
  test_walkthrough_from_csv()
  check_question_stats()
  assert_stat_equals()
  assert_response_count_equals()
  get_response_subpart_and_class_id()
  check_response_counts()
  check_variants_count_for_quiz_00()
  check_quiz_stats_for_quiz_00()
  check_stats_calculations_and_response_analysis()


Class: quiz_report_statistics_from_steps_testcase  - X-Ref

Quiz attempt walk through using data from csv file.

get_full_path_of_csv_file($setname, $test)   X-Ref


test_walkthrough_from_csv($quizsettings, $csvdata)   X-Ref
Create a quiz add questions to it, walk through quiz attempts and then check results.

param: PHPUnit_Extensions_Database_DataSet_ITable[] of data read from csv file "questionsXX.csv",

check_question_stats($qstats, $questionstats)   X-Ref
Check actual question stats are the same as that found in csv file.

param: $qstats         PHPUnit_Extensions_Database_DataSet_ITable data from csv file.
param: $questionstats  \core_question\statistics\questions\all_calculated_for_qubaid_condition Calculated stats.

assert_stat_equals($expected, $questionstats, $slot, $subqname, $variant, $statname)   X-Ref
Check that the stat is as expected within a reasonable tolerance.

param: float|string|bool $expected expected value of stat.
param: \core_question\statistics\questions\all_calculated_for_qubaid_condition $questionstats
param: int $slot
param: string $subqname if empty string then not an item stat.
param: int|string $variant if empty string then not a variantstat.
param: string $statname

assert_response_count_equals($question, $qubaids, $expected, $whichtries)   X-Ref
No description

get_response_subpart_and_class_id($question, $subpart, $modelresponse)   X-Ref
No description

check_response_counts($responsecounts, $qubaids, $questions, $whichtries)   X-Ref

param: $responsecounts
param: $qubaids
param: $questions
param: $whichtries

check_variants_count_for_quiz_00($questions, $questionstats, $whichtries, $qubaids)   X-Ref

param: $questions
param: $questionstats
param: $whichtries
param: $qubaids

check_quiz_stats_for_quiz_00($quizstats)   X-Ref

param: $quizstats

check_stats_calculations_and_response_analysis($csvdata, $whichattempts, $whichtries, $groupstudents)   X-Ref
Check the question stats and the response counts used in the statistics report. If the appropriate files exist in fixtures/.

param: PHPUnit_Extensions_Database_DataSet_ITable[] $csvdata Data loaded from csv files for this test.
param: string $whichattempts
param: string $whichtries
param: int[] $groupstudents
return: array with contents 0 => $questions, 1 => $quizstats, 2=> $questionstats, 3=> $qubaids Might be needed for further



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1