-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CTP-4123, CTP-4128 : add support for quiz and turnitin modules #13
base: main
Are you sure you want to change the base?
Conversation
opitz
commented
Jan 7, 2025
- showing turinitin parts separately
df0b905
to
0cc28ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like you have just duplicated the code from feedback tracker (WET), rather than calling functions in feedback tracker (DRY).
@stuartlamour Now refactored to use methods from report_feedback_tracker. |
ed9c7f7
to
7b44e91
Compare
merge conflict is likely due to https://github.com/ucl-isd/moodle-block_my_feedback/pull/14/files |
I think the quiz X to mark url should be mod/quiz/report.php?id=558&mode=grading |
block_my_feedback.php
Outdated
$assess->markingurl = new moodle_url('/mod/'. $mod->modname. '/view.php', | ||
['id' => $assess->cmid, 'action' => 'grader'] | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work with all supported modules?
block_my_feedback.php
Outdated
public static function get_turnitin_parts(cm_info $mod) { | ||
global $DB; | ||
|
||
$sql = "SELECT * FROM {turnitintooltwo_parts} WHERE turnitintooltwoid = :iteminstance"; | ||
$params = ['iteminstance' => $mod->instance]; | ||
// Execute the query and return the result. | ||
return $DB->get_records_sql($sql, $params); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have report_feedback_tracker\local\helper::get_turnitin_parts($gradeitem)
. Why not instead make $iteminstance
the parameter and in report_feedback_tracker call it with:
$tttparts = helper::get_turnitin_parts($gradeitem->iteminstance);
and here call it with:
$turnitinparts = \report_feedback_tracker\local\helper::get_turnitin_parts($mod->instance);
rebased get_duedate() function in feedback_tracker to reflect changes here: https://github.com/ucl-isd/moodle-report_feedback_tracker/pull/65/commits/a98de64083decdf64fa1011e54f1b9fdb749805a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial refactor done, will continue...
d22946d
to
aac8536
Compare