Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion guide.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
$data = $DB->get_records_sql("SELECT ggf.id AS ggfid, crs.shortname AS course, asg.name AS assignment, gd.name AS guide,
ggc.shortname, ggf.score, ggf.remark, ggf.criterionid, rubm.username AS grader,
stu.id AS userid, stu.idnumber AS idnumber, stu.firstname, stu.lastname,
stu.username AS student, gin.timemodified AS modified
stu.username AS student, gin.timemodified AS modified, ag.grade AS grade,
afc.commenttext AS feedback
FROM {course} crs
JOIN {course_modules} cm ON crs.id = cm.course
JOIN {assign} asg ON asg.id = cm.instance
Expand All @@ -67,6 +68,7 @@
JOIN {gradingform_guide_criteria} ggc ON (ggc.definitionid = gd.id)
JOIN {grading_instances} gin ON gin.definitionid = gd.id
JOIN {assign_grades} ag ON ag.id = gin.itemid
JOIN {assignfeedback_comments} AS afc ON ag.id = afc.grade
JOIN {user} stu ON stu.id = ag.userid
JOIN {user} rubm ON rubm.id = gin.raterid
JOIN {gradingform_guide_fillings} ggf ON (ggf.instanceid = gin.id)
Expand Down
8 changes: 8 additions & 0 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ function report_componentgrades_finish_colheaders($workbook, $sheet, $pos) {
$sheet->set_column($pos, $pos++, 10); // Set column width to 10.
$sheet->write_string(5, $pos, get_string('timegraded', 'report_componentgrades'), $format2);
$sheet->set_column($pos, $pos, 17.5); // Set column width to 17.5.
$sheet->write_string(5, $pos, get_string('grade', 'report_componentgrades'), $format2);
$sheet->set_column($pos, $pos++, 10); // Set column width to 10
$sheet->write_string(5, $pos, get_string('feedback', 'report_componentgrades'), $format2);
$sheet->set_column($pos, $pos++, 17.5); // Set column width to 17.5
$sheet->merge_cells(4, $pos - 1, 4, $pos);

$sheet->set_row(4, 15, $format);
Expand Down Expand Up @@ -174,6 +178,10 @@ function report_componentgrades_add_data(MoodleExcelWorksheet $sheet, array $stu
$sheet->write_string($row, $col++, $line->grader);
$sheet->set_column($col, $col, 35);
$sheet->write_string($row, $col, userdate($line->modified));
$sheet->set_column($col, $col, 13);
$sheet->write_string($row, $col++, $line->grade);
$sheet->set_column($col, $col, 14);
$sheet->write_string($row, $col++, strip_tags($line->feedback));
}
}
}
Expand Down