ILIAS
Release_4_4_x_branch Revision 61816
|
A class defining mark schemas for assessment test objects. More...
Public Member Functions | |
__construct () | |
ASS_MarkSchema constructor. | |
createSimpleSchema ($txt_failed_short="failed", $txt_failed_official="failed", $percentage_failed=0, $failed_passed=0, $txt_passed_short="passed", $txt_passed_official="passed", $percentage_passed=50, $passed_passed=1) | |
Creates a simple mark schema for two mark steps: failed and passed. | |
addMarkStep ($txt_short="", $txt_official="", $percentage=0, $passed=0) | |
Adds a mark step to the mark schema. | |
saveToDb ($test_id) | |
Saves an ASS_MarkSchema object to a database. | |
loadFromDb ($test_id) | |
Loads an ASS_MarkSchema object from a database. | |
flush () | |
Empties the mark schema and removes all mark steps. | |
sort () | |
Sorts the mark schema using the minimum level values. | |
deleteMarkStep ($index=0) | |
Deletes the mark step with a given index. | |
deleteMarkSteps ($indexes) | |
Deletes multiple mark steps using their index positions. | |
getMatchingMark ($percentage) | |
Returns the matching mark for a given percentage. | |
_getMatchingMark ($test_id, $percentage) | |
Returns the matching mark for a given percentage. | |
_getMatchingMarkFromObjId ($a_obj_id, $percentage) | |
Returns the matching mark for a given percentage. | |
checkMarks () | |
Check the marks for consistency. |
Data Fields | |
$mark_steps |
A class defining mark schemas for assessment test objects.
Definition at line 16 of file class.assMarkSchema.php.
ASS_MarkSchema::__construct | ( | ) |
ASS_MarkSchema constructor.
The constructor takes possible arguments an creates an instance of the ASS_MarkSchema object.
Definition at line 28 of file class.assMarkSchema.php.
ASS_MarkSchema::_getMatchingMark | ( | $test_id, | |
$percentage | |||
) |
Returns the matching mark for a given percentage.
integer | $test_id | The database id of the test. |
double | $percentage | A percentage value between 0 and 100. |
PhpAssignmentInConditionInspection
Definition at line 326 of file class.assMarkSchema.php.
ASS_MarkSchema::_getMatchingMarkFromObjId | ( | $a_obj_id, | |
$percentage | |||
) |
Returns the matching mark for a given percentage.
integer | $a_obj_id | The database id of the test. |
double | $percentage | A percentage value between 0 and 100. |
Definition at line 355 of file class.assMarkSchema.php.
Referenced by ilObjTestAccess\_isPassed().
ASS_MarkSchema::addMarkStep | ( | $txt_short = "" , |
|
$txt_official = "" , |
|||
$percentage = 0 , |
|||
$passed = 0 |
|||
) |
Adds a mark step to the mark schema.
A new ASS_Mark object will be created and stored in the $mark_steps array.
string | $txt_short | The short text of the mark. |
string | $txt_official | The official text of the mark. |
float | integer | $percentage | The minimum percentage level reaching the mark. |
integer | $passed | The passed status of the mark (0 = failed, 1 = passed). |
Definition at line 75 of file class.assMarkSchema.php.
Referenced by createSimpleSchema(), and loadFromDb().
ASS_MarkSchema::checkMarks | ( | ) |
Check the marks for consistency.
Definition at line 409 of file class.assMarkSchema.php.
ASS_MarkSchema::createSimpleSchema | ( | $txt_failed_short = "failed" , |
|
$txt_failed_official = "failed" , |
|||
$percentage_failed = 0 , |
|||
$failed_passed = 0 , |
|||
$txt_passed_short = "passed" , |
|||
$txt_passed_official = "passed" , |
|||
$percentage_passed = 50 , |
|||
$passed_passed = 1 |
|||
) |
Creates a simple mark schema for two mark steps: failed and passed.
string | $txt_failed_short | The short text of the failed mark. |
string | $txt_failed_official | The official text of the failed mark. |
float | int | $percentage_failed | The minimum percentage level reaching the failed mark. |
integer | $failed_passed | Indicates the passed status of the failed mark (0 = failed, 1 = passed). |
string | $txt_passed_short | The short text of the passed mark. |
string | $txt_passed_official | The official text of the passed mark. |
float | int | $percentage_passed | The minimum percentage level reaching the passed mark. |
integer | $passed_passed | Indicates the passed status of the passed mark (0 = failed, 1 = passed). |
Definition at line 48 of file class.assMarkSchema.php.
References addMarkStep(), and flush().
ASS_MarkSchema::deleteMarkStep | ( | $index = 0 | ) |
Deletes the mark step with a given index.
integer | $index | The index of the mark step to delete. |
Definition at line 265 of file class.assMarkSchema.php.
ASS_MarkSchema::deleteMarkSteps | ( | $indexes | ) |
Deletes multiple mark steps using their index positions.
array | $indexes | An array with all the index positions to delete. |
Definition at line 281 of file class.assMarkSchema.php.
ASS_MarkSchema::flush | ( | ) |
Empties the mark schema and removes all mark steps.
Definition at line 227 of file class.assMarkSchema.php.
Referenced by createSimpleSchema().
ASS_MarkSchema::getMatchingMark | ( | $percentage | ) |
Returns the matching mark for a given percentage.
double | $percentage | A percentage value between 0 and 100. |
Definition at line 302 of file class.assMarkSchema.php.
ASS_MarkSchema::loadFromDb | ( | $test_id | ) |
Loads an ASS_MarkSchema object from a database.
integer | $test_id | A unique key which defines the test in the database. |
PhpAssignmentInConditionInspection
Definition at line 203 of file class.assMarkSchema.php.
References $result, and addMarkStep().
ASS_MarkSchema::saveToDb | ( | $test_id | ) |
Saves an ASS_MarkSchema object to a database.
integer | $test_id | The database id of the related test. |
PhpAssignmentInConditionInspection
PhpAssignmentInConditionInspection
Definition at line 87 of file class.assMarkSchema.php.
References $lng, $result, $row, ilObjAssessmentFolder\_enabledAssessmentLogging(), and ilObjAssessmentFolder\_getLogLanguage().
ASS_MarkSchema::sort | ( | ) |
Sorts the mark schema using the minimum level values.
Definition at line 237 of file class.assMarkSchema.php.
References $res.
ASS_MarkSchema::$mark_steps |
Definition at line 19 of file class.assMarkSchema.php.