| Línea 444... |
Línea 444... |
| 444 |
*
|
444 |
*
|
| 445 |
* @return int id of the created gradeitem
|
445 |
* @return int id of the created gradeitem
|
| 446 |
*/
|
446 |
*/
|
| 447 |
public function add_standalone_lineitem(string $courseid, string $label, float $maximumscore,
|
447 |
public function add_standalone_lineitem(string $courseid, string $label, float $maximumscore,
|
| 448 |
string $baseurl, ?int $ltilinkid, ?string $resourceid, ?string $tag, int $typeid,
|
448 |
string $baseurl, ?int $ltilinkid, ?string $resourceid, ?string $tag, int $typeid,
|
| 449 |
int $toolproxyid = null): int {
|
449 |
?int $toolproxyid = null): int {
|
| 450 |
global $DB;
|
450 |
global $DB;
|
| 451 |
$params = array();
|
451 |
$params = array();
|
| 452 |
$params['itemname'] = $label;
|
452 |
$params['itemname'] = $label;
|
| 453 |
$params['gradetype'] = GRADE_TYPE_VALUE;
|
453 |
$params['gradetype'] = GRADE_TYPE_VALUE;
|
| 454 |
$params['grademax'] = $maximumscore;
|
454 |
$params['grademax'] = $maximumscore;
|
| Línea 539... |
Línea 539... |
| 539 |
$grade->rawgrademax = $score->scoreMaximum;
|
539 |
$grade->rawgrademax = $score->scoreMaximum;
|
| 540 |
$grade->timemodified = $timemodified;
|
540 |
$grade->timemodified = $timemodified;
|
| 541 |
$grade->feedbackformat = $feedbackformat;
|
541 |
$grade->feedbackformat = $feedbackformat;
|
| 542 |
$grade->feedback = $feedback;
|
542 |
$grade->feedback = $feedback;
|
| 543 |
$grade->rawgrade = $finalgrade;
|
543 |
$grade->rawgrade = $finalgrade;
|
| - |
|
544 |
$grade->dategraded = $timemodified;
|
| 544 |
$status = grade_update($source, $gradeitem->courseid,
|
545 |
$status = grade_update($source, $gradeitem->courseid,
|
| 545 |
$gradeitem->itemtype, $gradeitem->itemmodule,
|
546 |
$gradeitem->itemtype, $gradeitem->itemmodule,
|
| 546 |
$gradeitem->iteminstance, $gradeitem->itemnumber, $grade);
|
547 |
$gradeitem->iteminstance, $gradeitem->itemnumber, $grade);
|
| Línea 547... |
Línea 548... |
| 547 |
|
548 |
|