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

The 'Show Answer' option in Advanced settings doesn't affect the 'Show Answer' option for a specific Unit. #401

Closed
DmytroAlipov opened this issue Oct 6, 2023 · 0 comments · Fixed by #403

Comments

@DmytroAlipov
Copy link
Contributor

Description:

If the Show Answer field has been changed in the Advance settings, then the Finished state will still remain on the Editor page.

Advanced Settings:

2

Editor Page:

1

But the inscription Default is correctly attributed:

3

If you save without changing anything, the value of the Show answer field for the course will be set to Finished. And this problem is not only with this field. The same behavior for the Show reset option field.

Perhaps the problem is that the state is being used (frontend-lib-content-components/src/editors/data/redux/problem/reducers.js):

const initialState = {
  rawOLX: '',
  problemType: null,
  question: '',
  answers: [],
  correctAnswerCount: 0,
  groupFeedbackList: [],
  generalFeedback: '',
  additionalAttributes: {},
  defaultSettings: {},
  settings: {
    randomization: null,
    scoring: {
      weight: 1,
      attempts: {
        unlimited: true,
        number: '',
      },
    },
    hints: [],
    timeBetween: 0,
    showAnswer: {
      on: ShowAnswerTypesKeys.FINISHED,
      afterAttempts: 0,
    },
    showResetButton: false,
    solutionExplanation: '',
    tolerance: {
      value: null,
      type: ToleranceTypes.none.type,
    },
  },
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants