Moodle  2.2.1
http://www.collinsharper.com
grade_test Class Reference
Inheritance diagram for grade_test:
Collaboration diagram for grade_test:

Public Member Functions

 setUp ()
 tearDown ()
 load_scale ()
 load_grade_categories ()
 load_modules ()
 load_course_modules ()
 load_quiz_activities ()
 load_grade_items ()
 load_grade_grades ()
 load_grade_outcomes ()

Data Fields

 $grade_tables
 $grade_items = array()
 $grade_categories = array()
 $grade_grades = array()
 $grade_outcomes = array()
 $scale = array()
 $activities = array()
 $courseid = 1
 $userid = 1

Detailed Description

Shared code for all grade related tests.

Here is a brief explanation of the test data set up in these unit tests. category1 => array(category2 => array(grade_item1, grade_item2), category3 => array(grade_item3)) 3 users for 3 grade_items

Definition at line 38 of file gradetest.php.


Member Function Documentation

Load module instance entries in course_modules table

Definition at line 290 of file gradetest.php.

Load grade_category data into the database, and adds the corresponding objects to this class' variable. category structure: course category | +--------+-------------+ | | unittestcategory1 level1category | +--------+-------------+ | | unittestcategory2 unittestcategory3

Definition at line 186 of file gradetest.php.

Here is the call graph for this function:

Load grade_grades data into the database, and adds the corresponding objects to this class' variable.

Definition at line 599 of file gradetest.php.

Load grade_item data into the database, and adds the corresponding objects to this class' variable.

Definition at line 361 of file gradetest.php.

Here is the call graph for this function:

Load grade_outcome data into the database, and adds the corresponding objects to this class' variable.

Definition at line 829 of file gradetest.php.

Load module entries in modules table

Definition at line 269 of file gradetest.php.

Load test quiz data into the database

Definition at line 339 of file gradetest.php.

Load scale data into the database, and adds the corresponding objects to this class' variable.

Definition at line 98 of file gradetest.php.

setUp ( )

Create temporary test tables and entries in the database for these tests. These tests have to work on a brand new site.

Definition at line 66 of file gradetest.php.

Here is the call graph for this function:

tearDown ( )

Reimplemented from UnitTestCaseUsingDatabase.

Definition at line 91 of file gradetest.php.


Field Documentation

$activities = array()

Definition at line 58 of file gradetest.php.

$courseid = 1

Definition at line 59 of file gradetest.php.

$grade_categories = array()

Definition at line 53 of file gradetest.php.

$grade_grades = array()

Definition at line 54 of file gradetest.php.

$grade_items = array()

Definition at line 52 of file gradetest.php.

$grade_outcomes = array()

Definition at line 55 of file gradetest.php.

$grade_tables
Initial value:
 array('lib' => array(
                                     'grade_categories', 'grade_categories_history',
                                     'scale', 'scale_history',
                                     'grade_items', 'grade_items_history',
                                     'grade_grades', 'grade_grades_history',
                                     'grade_outcomes', 'grade_outcomes_history','grade_outcomes_courses',
                                     'files',
                                     'modules',
                                     'course_modules'),
                                 'mod/quiz' => array('quiz')
                            )

Definition at line 40 of file gradetest.php.

$scale = array()

Definition at line 56 of file gradetest.php.

$userid = 1

Definition at line 60 of file gradetest.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations