ILIAS
release_4-3 Revision
|
A class defining mark schemas for assessment test objects. More...
Public Member Functions | |
ASS_MarkSchema () | |
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 a ASS_MarkSchema object to a database. | |
loadFromDb ($test_id) | |
Loads a 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. | |
_getMatchingMarkFromActiveId ($active_id, $percentage) | |
Returns the matching mark for a given percentage. | |
checkMarks () | |
Check the marks for consistency. | |
logAction ($test_id, $logtext="") | |
Logs an action into the Test&Assessment log. |
Data Fields | |
$mark_steps |
A class defining mark schemas for assessment test objects.
Definition at line 33 of file class.assMarkSchema.php.
ASS_MarkSchema::_getMatchingMark | ( | $test_id, | |
$percentage | |||
) |
Returns the matching mark for a given percentage.
int | $test_id | The database id of the test |
double | $percentage | A percentage value between 0 and 100 |
Definition at line 351 of file class.assMarkSchema.php.
ASS_MarkSchema::_getMatchingMarkFromActiveId | ( | $active_id, | |
$percentage | |||
) |
Returns the matching mark for a given percentage.
int | $test_id | The database id of the test |
double | $percentage | A percentage value between 0 and 100 |
Definition at line 403 of file class.assMarkSchema.php.
Referenced by assQuestion\_updateTestResultCache().
ASS_MarkSchema::_getMatchingMarkFromObjId | ( | $a_obj_id, | |
$percentage | |||
) |
Returns the matching mark for a given percentage.
int | $test_id | The database id of the test |
double | $percentage | A percentage value between 0 and 100 |
Definition at line 377 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 |
double | $percentage | The minimum percentage level reaching the mark |
integer | $passed | The passed status of the mark (0 = failed, 1 = passed) public |
Definition at line 96 of file class.assMarkSchema.php.
Referenced by createSimpleSchema(), and loadFromDb().
ASS_MarkSchema::ASS_MarkSchema | ( | ) |
ASS_MarkSchema constructor.
The constructor takes possible arguments an creates an instance of the ASS_MarkSchema object.
public
Definition at line 49 of file class.assMarkSchema.php.
ASS_MarkSchema::checkMarks | ( | ) |
Check the marks for consistency.
Definition at line 427 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 |
double | $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 |
double | $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) public |
Definition at line 69 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 public |
Definition at line 292 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 public |
Definition at line 308 of file class.assMarkSchema.php.
ASS_MarkSchema::flush | ( | ) |
Empties the mark schema and removes all mark steps.
public
Definition at line 253 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 328 of file class.assMarkSchema.php.
ASS_MarkSchema::loadFromDb | ( | $test_id | ) |
Loads a ASS_MarkSchema object from a database.
integer | $test_id | A unique key which defines the test in the database public |
Definition at line 229 of file class.assMarkSchema.php.
References $data, $result, and addMarkStep().
ASS_MarkSchema::logAction | ( | $test_id, | |
$logtext = "" |
|||
) |
Logs an action into the Test&Assessment log.
integer | $test_id | The database id of the test |
string | $logtext | The log text public |
Definition at line 460 of file class.assMarkSchema.php.
References $_GET, $ilUser, ilObjAssessmentFolder\_addLog(), and ilObjTest\_getObjectIDFromTestID().
Referenced by saveToDb().
ASS_MarkSchema::saveToDb | ( | $test_id | ) |
Saves a ASS_MarkSchema object to a database.
integer | $test_id | The database id of the related test public |
Definition at line 114 of file class.assMarkSchema.php.
References $lng, $result, $row, ilObjAssessmentFolder\_enabledAssessmentLogging(), ilObjAssessmentFolder\_getLogLanguage(), and logAction().
ASS_MarkSchema::sort | ( | ) |
Sorts the mark schema using the minimum level values.
public
Definition at line 264 of file class.assMarkSchema.php.
References $res.
ASS_MarkSchema::$mark_steps |
Definition at line 40 of file class.assMarkSchema.php.