Skip to content

Commit

Permalink
fix(retain-old-grading-data-option): fixed inconsistent override chec…
Browse files Browse the repository at this point in the history
…kbox behaviour
  • Loading branch information
pranavrao145 committed Oct 14, 2024
1 parent 2346280 commit 1605f0a
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class CollectSubmissionsModal extends React.Component {
this.state.collect_time === "collect_current",
// Always apply late penalty when collecting based on due date
this.state.apply_late_penalty || this.state.collect_time === "collect_due_date",
this.state.retain_existing_grading
this.state.override && this.state.retain_existing_grading
);
};

Expand Down Expand Up @@ -102,7 +102,12 @@ class CollectSubmissionsModal extends React.Component {
<legend>{I18n.t("submissions.collect.collection_options")}</legend>
<p>
<label>
<input type="checkbox" name="override" onChange={this.handleOverrideChange} />
<input
type="checkbox"
defaultChecked={this.state.override}
name="override"
onChange={this.handleOverrideChange}
/>
&nbsp;
<span>{I18n.t("submissions.collect.override_existing")}</span>
</label>
Expand Down

0 comments on commit 1605f0a

Please sign in to comment.