Skip to content

CTP-6502: Add support for report_rubricgrading to work with coursework activities. - #301

Open
cwarwicker wants to merge 1 commit into
ucl-isd:mainfrom
cwarwicker:CTP-6502
Open

CTP-6502: Add support for report_rubricgrading to work with coursework activities.#301
cwarwicker wants to merge 1 commit into
ucl-isd:mainfrom
cwarwicker:CTP-6502

Conversation

@cwarwicker

Copy link
Copy Markdown
Collaborator

NOTE: This depends on two things:

  1. The PR I have open on report_rubricgrading to be merged in, with support for other plugins
  2. The report_rubricgrading plugin to be installed in your codebase (can replace report_advancedgrading)

Copilot AI review requested due to automatic review settings July 22, 2026 09:22
@cwarwicker cwarwicker added the do not merge For some reasons this change is not ready to be considered label Jul 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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\coursework adapter 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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge For some reasons this change is not ready to be considered

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants