Skip to content

Commit

Permalink
feat(retain-old-grading-data-option): only show option if collected s…
Browse files Browse the repository at this point in the history
…ubmission exists
  • Loading branch information
pranavrao145 committed Oct 14, 2024
1 parent 1605f0a commit 9cb0a2d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
25 changes: 14 additions & 11 deletions app/assets/javascripts/Components/repo_browser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class RepoBrowser extends React.Component {
late_penalty={this.props.late_penalty}
grouping_id={this.props.grouping_id}
revision_identifier={this.state.revision_identifier}
collected_revision_id={this.props.collected_revision_id}
/>
);
}
Expand Down Expand Up @@ -175,17 +176,19 @@ class ManualCollectionForm extends React.Component {
{I18n.t("submissions.collect.apply_late_penalty")}
</label>
</p>
<div className="inline-labels" style={{marginBottom: "1em"}}>
<input
type="checkbox"
name="retain_existing_grading"
checked={this.state.retainExistingGrading}
onChange={e => {
this.setState({retainExistingGrading: e.target.checked});
}}
/>
<label>{I18n.t("submissions.collect.retain_existing_grading")}</label>
</div>
{this.props.collected_revision_id && (
<div className="inline-labels" style={{marginBottom: "1em"}}>
<input
type="checkbox"
name="retain_existing_grading"
checked={this.state.retainExistingGrading}
onChange={e => {
this.setState({retainExistingGrading: e.target.checked});
}}
/>
<label>{I18n.t("submissions.collect.retain_existing_grading")}</label>
</div>
)}
<button
type="submit"
name="commit"
Expand Down
6 changes: 3 additions & 3 deletions config/locales/views/submissions/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ en:
full_overwrite_warning: Collecting and grading this revision will overwrite any previous collections/grading done for this group on this assignment. Are you sure you want to do this?
manual_collection: Manual Collection
override_existing: Recollect previously collected submissions?
partial_overwrite_warning: Original marks, annotations, and test results will be retained upon collecting this revision, but all remark data from previous collections/grading will still be lost for this group on this assignment. Are you sure you want to do this?
partial_overwrite_warning: Original marks, annotations, feedback files, and test results will be retained upon collecting this revision, but all remark data from previous collections/grading will still be lost for this group on this assignment. Are you sure you want to do this?
progress: "%{count}/%{size} submissions collected"
results_loss_warning: This action identifies the version of files to grade for each selected group. Instructors and TAs can begin grading after files are collected.
retain_existing_grading: Retain existing grading data (marks, annotations, and test results)
retain_existing_grading: Retain existing grading data (marks, annotations, feedback files, and test results)
retain_existing_grading_warning_html: 'Retain existing grading data <strong>(Warning: without selecting this option, all old grading data for the collected submissions will be lost)</strong>'
scanned_exam_latest_warning: For scanned exams, the latest submitted file version for each selected group is used regardless of the due date.
status:
Expand Down Expand Up @@ -52,7 +52,7 @@ en:
help:
browse:
instructors: 'Check the status of the student submissions. Before grading can begin, the student assignments must be collected. This associates each group with the version of their files that should be graded. This means that when the grader adds annotations and marks, they belong to this particular submission. There are three different ways of collecting submissions: Collect All Submissions, which automatically collects all submissions, based on the due date and late penalties; clicking on an individual group name triggers automatic collection for that group; clicking on the Repository name takes you the Repository view, where you can manually choose a revision to collect.<br>Rows in green have been collected and are ready to begin marking. Clicking on the group name takes you to the Grader view. When a grader sets the Marking State to Complete and you are ready to allow students to view the results, select the students and press "Release Marks".<br>CSV Report and Detailed CSV Report are two different ways of downloading the marks in csv format. Repository List downloads a text file that maps group name to repository path. Repository Checkout File downloads a text file where each line is a repository checkout command for the collected version of each student submission. Download all submissions downloads a zip file containing repositories for all of the students.'
tas: 'Click on assignments to grade them. Rows in green have been collected and are ready to begin marking. If your assigned submissions haven''t been collected, you can click on the group name to collect them. <strong>Warning</strong>: collection will delete any previous annoations or marks.'
tas: 'Click on assignments to grade them. Rows in green have been collected and are ready to begin marking. If your assigned submissions haven''t been collected, you can click on the group name to collect them.'
how_many_marked: "%{num_marked}/%{num_assigned} completed"
how_many_marked_in_collected: "%{num_marked}/%{num_collected} completed"
invalid_url: "%{item} is not a valid HTTP/HTTPS URL"
Expand Down

0 comments on commit 9cb0a2d

Please sign in to comment.