Showing 164 of 238 total issues
Method get_event_function_map
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function get_event_function_map() { $availableevents = [ '\core\event\course_category_created' => 'core\course_category_created', '\core\event\badge_awarded' => 'core\badge_awarded', '\core\event\badge_updated' => 'core\badge_updated',
- Create a ticketCreate a ticket
Method lesson_question_page
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function lesson_question_page(array $config, \stdClass $course, \stdClass $lesson, \stdClass $page, int $cmid) { $repo = $config['repo']; $courselang = utils\get_course_lang($course); $entryurl = $config['app_url'].'/mod/lesson/view.php?id='.$cmid.'&pageid='.$page->id;
- Create a ticketCreate a ticket
File replayevents.js
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// This file is part of Moodle - http://moodle.org///// Moodle is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or
- Create a ticketCreate a ticket
Method get_verb
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function get_verb(string $verb, array $config, string $lang) { $verb = strtolower($verb); $output = array(); switch ($verb) { case 'completed':
- Create a ticketCreate a ticket
Method definition
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function definition() { $mform = $this->_form; // Set filters contents and set defaults. $reportid = $this->_customdata['reportid'];
- Create a ticketCreate a ticket
Method assignment_graded
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function assignment_graded(array $config, \stdClass $event) { $repo = $config['repo']; $grade = $repo->read_record_by_id($event->objecttable, $event->objectid); $user = $repo->read_record_by_id('user', $grade->userid); $course = $repo->read_record_by_id('course', $event->courseid);
- Create a ticketCreate a ticket
Function definition
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
Open
public function definition() { $mform = $this->_form; // Set filters contents and set defaults. $reportid = $this->_customdata['reportid'];
- Read upRead up
- Create a ticketCreate a ticket
Method question_manually_graded
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function question_manually_graded(array $config, \stdClass $event) { $repo = $config['repo']; $instructor = $repo->read_record_by_id('user', $event->userid); $course = $repo->read_record_by_id('course', $event->courseid); $lang = utils\get_course_lang($course);
- Create a ticketCreate a ticket
Method multichoicerated
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function multichoicerated( array $config, \stdClass $event, \stdClass $feedbackvalue, \stdClass $feedbackitem,
- Create a ticketCreate a ticket
Method matching
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function matching(array $config, \stdClass $event, \stdClass $questionattempt, \stdClass $question) { $repo = $config['repo']; $user = $repo->read_record_by_id('user', $event->relateduserid); $course = $repo->read_record_by_id('course', $event->courseid); $attempt = $repo->read_record('quiz_attempts', ['uniqueid' => $questionattempt->questionusageid]);
- Create a ticketCreate a ticket
Method randomsamatch
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function randomsamatch(array $config, \stdClass $event, \stdClass $questionattempt, \stdClass $question) { $repo = $config['repo']; $user = $repo->read_record_by_id('user', $event->relateduserid); $course = $repo->read_record_by_id('course', $event->courseid); $attempt = $repo->read_record('quiz_attempts', ['uniqueid' => $questionattempt->questionusageid]);
- Create a ticketCreate a ticket
Method multichoice
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function multichoice(array $config, \stdClass $event, \stdClass $questionattempt, \stdClass $question) { $repo = $config['repo']; $user = $repo->read_record_by_id('user', $event->relateduserid); $course = $repo->read_record_by_id('course', $event->courseid); $attempt = $repo->read_record('quiz_attempts', ['uniqueid' => $questionattempt->questionusageid]);
- Create a ticketCreate a ticket
Method gapselect
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function gapselect(array $config, \stdClass $event, \stdClass $questionattempt, \stdClass $question) { $repo = $config['repo']; $user = $repo->read_record_by_id('user', $event->relateduserid); $course = $repo->read_record_by_id('course', $event->courseid); $attempt = $repo->read_record('quiz_attempts', ['uniqueid' => $questionattempt->questionusageid]);
- Create a ticketCreate a ticket
Method get_event_id
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function get_event_id($event) { global $DB; $sqlparams = array(); $where = array('1 = 1');
- Create a ticketCreate a ticket
Method take_attendance
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function take_attendance(array $config, \stdClass $event) { $repo = $config['repo']; $user = $repo->read_record_by_id('user', $event->userid); $course = $repo->read_record_by_id('course', $event->courseid); $lang = utils\get_course_lang($course);
- Create a ticketCreate a ticket
Method comment_deleted
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function comment_deleted(array $config, \stdClass $event) { $repo = $config['repo']; $user = $repo->read_record_by_id('user', $event->userid); $course = $repo->read_record_by_id('course', $event->courseid); $wikipage = $repo->read_record_by_id(
- Create a ticketCreate a ticket
Method badge_awarded
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function badge_awarded(array $config, \stdClass $event) { global $CFG; $repo = $config['repo']; if (isset($event->objecttable) && isset($event->objectid)) { $event_object = $repo->read_record_by_id($event->objecttable, $event->objectid);
- Create a ticketCreate a ticket
Method numerical
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function numerical(array $config, \stdClass $event, \stdClass $questionattempt, \stdClass $question) { $repo = $config['repo']; $user = $repo->read_record_by_id('user', $event->relateduserid); $course = $repo->read_record_by_id('course', $event->courseid); $attempt = $repo->read_record('quiz_attempts', ['uniqueid' => $questionattempt->questionusageid]);
- Create a ticketCreate a ticket
Method get_handler_config
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function get_handler_config() { global $DB, $CFG; $plugin = core_plugin_manager::instance()->get_plugin_info('logstore_xapi');
- Create a ticketCreate a ticket
Method essay_assessed
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function essay_assessed(array $config, \stdClass $event) { $repo = $config['repo']; $user = $repo->read_record_by_id('user', $event->userid); $course = $repo->read_record_by_id('course', $event->courseid);
- Create a ticketCreate a ticket