CTP-6502: Add support for report_rubricgrading to work with coursework activities. - #301
Open
cwarwicker wants to merge 1 commit into
Open
CTP-6502: Add support for report_rubricgrading to work with coursework activities.#301cwarwicker wants to merge 1 commit into
cwarwicker wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds integration hooks and a report adapter so mod_coursework can be consumed by the report_rubricgrading plugin for rubric/guide grading reporting.
Changes:
- Bumped plugin version.
- Added a
mod_coursework_supports_report_rubricgrading()support callback. - Added a
mod_coursework\local\report_rubricgrading\courseworkadapter class (SQL + pivoting/columns) and a supporting language string.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
version.php |
Plugin version bump to ship the new integration. |
lib.php |
Adds a support callback for report_rubricgrading discovery. |
lang/en/coursework.php |
Adds type string used as a report column header. |
classes/local/report_rubricgrading/coursework.php |
Implements the report adapter (grading manager + SQL + reportbuilder columns). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+17
to
+26
| /** | ||
| * Implementation of coursework support for rubricgrading report. | ||
| * | ||
| * This assumes the rubricgrading plugin is installed, but this class won't ever be loaded if that plugin is not | ||
| * installed, so we don't need a hard dependency on it. | ||
| * | ||
| * @package report_rubricgrading | ||
| * @copyright 2025 Marcus Green | ||
| * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
| */ |
Comment on lines
+30
to
+37
| use core\lang_string; | ||
| use core_reportbuilder\local\report\column; | ||
| use stdClass; | ||
| use xmldb_table; | ||
|
|
||
| // Not included when exporting a reportbuilder report. | ||
| require_once $CFG->dirroot . '/grade/grading/lib.php'; | ||
|
|
Comment on lines
+49
to
+54
| cw.grade AS gradeoutof, | ||
| cwf.feedbackcomment AS overallfeedback, | ||
| cwf.markernumber, | ||
| cwf.stageidentifier, | ||
| cws.timemodified AS timegraded, | ||
| stu.firstname, |
Comment on lines
+94
to
+99
| cw.grade AS gradeoutof, | ||
| cwf.feedbackcomment AS overallfeedback, | ||
| cwf.markernumber, | ||
| cwf.stageidentifier, | ||
| cws.timemodified AS timegraded, | ||
| stu.firstname, |
Comment on lines
+138
to
+143
| cw.grade AS gradeoutof, | ||
| cwf.feedbackcomment AS overallfeedback, | ||
| cwf.markernumber, | ||
| cwf.stageidentifier, | ||
| cws.timemodified AS timegraded, | ||
| stu.firstname, |
Comment on lines
+188
to
+194
| if (preg_match('/^assessor_(\d+)$/', $row->stageidentifier, $matches)) { | ||
| $pivotrow->stageidentifier = get_string('markernumber', 'mod_coursework', $matches[1]); | ||
| } else if (preg_match('/^final_agreed_(\d+)$/', $row->stageidentifier)) { | ||
| $pivotrow->stageidentifier = get_string('finalagreed', 'mod_coursework'); | ||
| } else { | ||
| $pivotrow->stageidentifier = $row->stageidentifier; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: This depends on two things: