mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-10544 basic support for outcomes grading in modules - implemented in assignment popup grading (TODO: fix html and css there)
This commit is contained in:
parent
56c28adb97
commit
3a5ae6602b
3 changed files with 128 additions and 19 deletions
|
@ -988,14 +988,14 @@ class grade_item extends grade_object {
|
|||
* @param int $userid
|
||||
* @return object grade_grade object instance
|
||||
*/
|
||||
function get_grade($userid) {
|
||||
function get_grade($userid, $create=true) {
|
||||
if (empty($this->id)) {
|
||||
debugging('Can not use before insert');
|
||||
return false;
|
||||
}
|
||||
|
||||
$grade = new grade_grade(array('userid'=>$userid, 'itemid'=>$this->id));
|
||||
if (empty($grade->id)) {
|
||||
if (empty($grade->id) and $create) {
|
||||
$grade->insert();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue