Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

opitz
Copy link
Collaborator

@opitz opitz commented Jan 7, 2025

  • showing turinitin parts separately

@opitz opitz requested review from stuartlamour and leonstr January 7, 2025 17:16
@opitz opitz self-assigned this Jan 7, 2025
@opitz opitz force-pushed the CTP-4123-4128-quiz-turnitin branch from df0b905 to 0cc28ba Compare January 7, 2025 17:19
Copy link
Collaborator

@stuartlamour stuartlamour left a 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).

@opitz
Copy link
Collaborator Author

opitz commented Jan 8, 2025

@stuartlamour Now refactored to use methods from report_feedback_tracker.

@opitz opitz requested a review from stuartlamour January 8, 2025 12:28
block_my_feedback.php Outdated Show resolved Hide resolved
block_my_feedback.php Outdated Show resolved Hide resolved
@opitz opitz requested a review from aspark21 January 8, 2025 16:20
@opitz opitz force-pushed the CTP-4123-4128-quiz-turnitin branch from ed9c7f7 to 7b44e91 Compare January 9, 2025 15:13
@aspark21
Copy link
Collaborator

merge conflict is likely due to https://github.com/ucl-isd/moodle-block_my_feedback/pull/14/files

@stuartlamour
Copy link
Collaborator

I think the quiz X to mark url should be mod/quiz/report.php?id=558&mode=grading

block_my_feedback.php Outdated Show resolved Hide resolved
block_my_feedback.php Outdated Show resolved Hide resolved
block_my_feedback.php Outdated Show resolved Hide resolved
block_my_feedback.php Outdated Show resolved Hide resolved
block_my_feedback.php Show resolved Hide resolved
Comment on lines 243 to 245
$assess->markingurl = new moodle_url('/mod/'. $mod->modname. '/view.php',
['id' => $assess->cmid, 'action' => 'grader']
);
Copy link

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 Show resolved Hide resolved
block_my_feedback.php Outdated Show resolved Hide resolved
block_my_feedback.php Outdated Show resolved Hide resolved
Comment on lines 339 to 345
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);
Copy link

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);

@opitz
Copy link
Collaborator Author

opitz commented Jan 10, 2025

merge conflict is likely due to https://github.com/ucl-isd/moodle-block_my_feedback/pull/14/files

rebased get_duedate() function in feedback_tracker to reflect changes here: https://github.com/ucl-isd/moodle-report_feedback_tracker/pull/65/commits/a98de64083decdf64fa1011e54f1b9fdb749805a

Copy link
Collaborator

@stuartlamour stuartlamour left a 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...

block_my_feedback.php Outdated Show resolved Hide resolved
block_my_feedback.php Show resolved Hide resolved
@stuartlamour stuartlamour force-pushed the CTP-4123-4128-quiz-turnitin branch from d22946d to aac8536 Compare January 10, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants