Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

fixed regrade all bug if autograde job fails#70

Open
Searay-330 wants to merge 1 commit into
devfrom
fix_regrade
Open

fixed regrade all bug if autograde job fails#70
Searay-330 wants to merge 1 commit into
devfrom
fix_regrade

Conversation

@Searay-330

Copy link
Copy Markdown
Collaborator

No description provided.

@Searay-330
Searay-330 requested a review from daviddob May 23, 2020 18:13
@Searay-330 Searay-330 self-assigned this May 23, 2020
elsif job < 0 # autograding failed
failed_jobs += 1
failed_list += "#{@submission.filename}: autograding error.<br>"
failed_list += "#{submission.filename}: #{flash[:error]}.<br>"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this behavior look like? Is it necessary to have a flash inside of a message that will be itself flashed on line 132?

end

flash[:error] = "Warning: Could not regrade #{failed_jobs} submission(s):<br>" + failed_list if failed_jobs > 0
flash[:error] = "Error: Could not regrade #{failed_jobs} submission(s):<br>" + failed_list if failed_jobs > 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should likely still be a warning as it has regraded all other jobs successfully.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants