Coursemology/coursemology2

View on GitHub

Showing 1,205 of 1,252 total issues

Function duplicateItems has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  destinationCourseId,
  selectedItems,
  successMessage,
  pendingMessage,
  failureMessage,
Severity: Minor
Found in client/app/bundles/course/duplication/operations.js - About 35 mins to fix

Method perform_tracked has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def perform_tracked(unsubmitter, submission_ids, assessment, question = nil, redirect_to_path = nil)
Severity: Minor
Found in app/jobs/course/assessment/submission/unsubmitting_job.rb - About 35 mins to fix

Method create_with_codes has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def self.create_with_codes(assessment_id, question_id, user, feedback_id, files)
Severity: Minor
Found in app/models/course/assessment/live_feedback.rb - About 35 mins to fix

Method parse_invitation_result has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def parse_invitation_result(new_invitations, existing_invitations, new_course_users,
                              existing_course_users, duplicate_users)
Severity: Minor
Found in app/controllers/course/user_invitations_controller.rb - About 35 mins to fix

Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def initialize(assessment, questions, workspace_id, monitoring_object, seb_config_key)
Severity: Minor
Found in app/services/course/assessment/koditsu_assessment_service.rb - About 35 mins to fix

Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def initialize(assessment, question, answer, require_token, feedback_config)

Method explanations_for_points_summary_incorrect has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def explanations_for_points_summary_incorrect(question, answer_text_array,
                                                answer_text_lemma_status, correct_points, hash_point_serial)

Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def initialize(user, course = nil, course_user = nil, instance_user = nil, session_id = nil)
Severity: Minor
Found in app/models/ability.rb - About 35 mins to fix

Method parse_invitation_result has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def parse_invitation_result(new_invitations, existing_invitations, new_instance_users,
                              existing_instance_users, duplicate_users)
Severity: Minor
Found in app/controllers/system/admin/instance/user_invitations_controller.rb - About 35 mins to fix

Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def initialize(assessment, custom_prompt, language, version, difficulty)

Method explanations_for has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def explanations_for(question, grade, answer_text_array, answer_text_lemma_status, correct_points)

Function updateMilestone has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  id,
  values,
  successMessage,
  failureMessage,
  setError,
Severity: Minor
Found in client/app/bundles/course/lesson-plan/operations.ts - About 35 mins to fix

Function updateEvent has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  eventId,
  values,
  successMessage,
  failureMessage,
  setError,
Severity: Minor
Found in client/app/bundles/course/lesson-plan/operations.ts - About 35 mins to fix

Function filterSubmissions has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  categoryId: number | null,
  assessmentId: number | null,
  groupId: number | null,
  userId: number | null,
  pageNum: number | null,
Severity: Minor
Found in client/app/bundles/course/assessment/submissions/operations.ts - About 35 mins to fix

Function default has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

export default function (state = initialState, action) {
  switch (action.type) {
    case actions.FETCH_SUBMISSION_SUCCESS:
      return {
        ...state,
Severity: Minor
Found in client/app/bundles/course/assessment/submission/reducers/commentForms.js - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function computeLimits has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

export const computeLimits = (assessments, submissions) => {
  if (assessments == null || assessments.length === 0) {
    return {};
  }
  const endAts = assessments.map((a) => a.endAt);

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function renderBody has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  renderBody() {
    const {
      isLoading,
      isCourseSelected,
      duplicationMode,
Severity: Minor
Found in client/app/bundles/course/duplication/pages/Duplication/index.jsx - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function getAvailableUserInOtherGroups has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

const getAvailableUserInOtherGroups = (courseUsers, groups, group) => {
  const otherGroups = groups.filter((x) => x !== group);
  const mapStudentToGroups = {};

  for (let i = 0; i < otherGroups.length; i++) {

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function Category has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

const Category = ({
  dispatch,
  groupCategory,
  groups,
  isFetching,
Severity: Minor
Found in client/app/bundles/course/group/pages/GroupShow/index.jsx - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function ResponseEdit has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

const ResponseEdit = (props) => {
  const {
    dispatch,
    flags,
    match: {
Severity: Minor
Found in client/app/bundles/course/survey/pages/ResponseEdit/index.jsx - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Severity
Category
Status
Source
Language