xAPI-vle/moodle-logstore_xapi

View on GitHub
src/transformer/events/mod_assign/submission_locked.php

Summary

Maintainability
A
3 hrs
Test Coverage

Showing 2 of 2 total issues

Method submission_locked has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function submission_locked(array $config, \stdClass $event) {
$repo = $config['repo'];
$instructor = $repo->read_record_by_id('user', $event->userid);
$learner = $repo->read_record_by_id('user', $event->relateduserid);
$course = $repo->read_record_by_id('course', $event->courseid);
Severity: Minor
Found in src/transformer/events/mod_assign/submission_locked.php - About 1 hr to fix

Identical blocks of code found in 2 locations. Consider refactoring.
Open

'context' => [
...utils\get_context_base($config, $event, $lang, $course),
'extensions' => [
'https://yetanalytics.com/profiles/prepositions/concepts/context-extensions/for'
=> utils\get_user($config, $learner),
Severity: Major
Found in src/transformer/events/mod_assign/submission_locked.php and 1 other location - About 1 hr to fix
src/transformer/events/mod_assign/submission_viewed.php on lines 56..73

There are no issues that match your filters.

Category
Status