[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/quiz/tests/ -> external_test.php (summary)

Quiz module external functions tests.

Copyright: 2016 Juan Leyva <juan@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 1605 lines (71 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

testable_mod_quiz_external:: (2 methods):
  validate_attempt()
  validate_attempt_review()

mod_quiz_external_testcase:: (22 methods):
  setUp()
  create_quiz_with_questions()
  test_mod_quiz_get_quizzes_by_courses()
  test_view_quiz()
  test_get_user_attempts()
  test_get_user_best_grade()
  test_get_combined_review_options()
  test_start_attempt()
  test_validate_attempt()
  test_get_attempt_data()
  test_get_attempt_summary()
  test_save_attempt()
  test_process_attempt()
  test_validate_attempt_review()
  test_get_attempt_review()
  test_view_attempt()
  test_view_attempt_summary()
  test_view_attempt_review()
  test_get_quiz_feedback_for_grade()
  test_get_quiz_access_information()
  test_get_attempt_access_information()
  test_get_quiz_required_qtypes()


Class: testable_mod_quiz_external  - X-Ref

Silly class to access mod_quiz_external internal methods.

validate_attempt($params, $checkaccessrules = true, $failifoverdue = true)   X-Ref
Public accessor.

param: array $params Array of parameters including the attemptid and preflight data
param: bool $checkaccessrules whether to check the quiz access rules or not
param: bool $failifoverdue whether to return error if the attempt is overdue
return: array containing the attempt object and access messages

validate_attempt_review($params)   X-Ref
Public accessor.

param: array $params Array of parameters including the attemptid
return: array containing the attempt object and display options

Class: mod_quiz_external_testcase  - X-Ref

Quiz module external functions tests

setUp()   X-Ref
Set up for every test


create_quiz_with_questions($startattempt = false, $finishattempt = false)   X-Ref
Create a quiz with questions including a started or finished attempt optionally

param: boolean $startattempt whether to start a new attempt
param: boolean $finishattempt whether to finish the new attempt
return: array array containing the quiz, context and the attempt

test_mod_quiz_get_quizzes_by_courses()   X-Ref
No description

test_view_quiz()   X-Ref
Test test_view_quiz


test_get_user_attempts()   X-Ref
Test get_user_attempts


test_get_user_best_grade()   X-Ref
Test get_user_best_grade


test_get_combined_review_options()   X-Ref
Test get_combined_review_options.
This is a basic test, this is already tested in mod_quiz_display_options_testcase.


test_start_attempt()   X-Ref
Test start_attempt


test_validate_attempt()   X-Ref
Test validate_attempt


test_get_attempt_data()   X-Ref
Test get_attempt_data


test_get_attempt_summary()   X-Ref
Test get_attempt_summary


test_save_attempt()   X-Ref
Test save_attempt


test_process_attempt()   X-Ref
Test process_attempt


test_validate_attempt_review()   X-Ref
Test validate_attempt_review


test_get_attempt_review()   X-Ref
Test get_attempt_review


test_view_attempt()   X-Ref
Test test_view_attempt


test_view_attempt_summary()   X-Ref
Test test_view_attempt_summary


test_view_attempt_review()   X-Ref
Test test_view_attempt_summary


test_get_quiz_feedback_for_grade()   X-Ref
Test get_quiz_feedback_for_grade


test_get_quiz_access_information()   X-Ref
Test get_quiz_access_information


test_get_attempt_access_information()   X-Ref
Test get_attempt_access_information


test_get_quiz_required_qtypes()   X-Ref
Test get_quiz_required_qtypes




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