Coursemology/coursemology2

View on GitHub
client/app/bundles/course/assessment/submission/reducers/answers.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function default has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function (state = initialState, action) {
  switch (action.type) {
    case actions.SAVE_GRADE_SUCCESS: {
      const initialValues = convertAnswersDataToInitialValues(
        action.payload.answers,
Severity: Major
Found in client/app/bundles/course/assessment/submission/reducers/answers.js - About 2 hrs to fix

Avoid too many return statements within this function.
Open

      return state;
Severity: Major
Found in client/app/bundles/course/assessment/submission/reducers/answers.js - About 30 mins to fix

Avoid too many return statements within this function.
Open

      return produce(state, (draft) => {
        draft.clientVersionByAnswerId[answerId] = clientVersion;
      });
Severity: Major
Found in client/app/bundles/course/assessment/submission/reducers/answers.js - About 30 mins to fix

There are no issues that match your filters.

Category
Status