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
E1778 OSS project Purple: UI fixes for assignment creation #1033
Conversation
@@ -118,6 +123,7 @@ def update | |||
unless params.key?(:assignment_form) | |||
@assignment = Assignment.find(params[:id]) | |||
@assignment.course_id = params[:course_id] | |||
puts "Perry1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not write to stdout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use "logger.debug" instead. and print messages that make sense e.g., @assignment.course_id instead of senseless strings.
2cc51d9
to
a1b78e0
Compare
965f660
to
d08c1cb
Compare
e813e60
to
3eafd4b
Compare
# Deleting Due date info from table if meta-review is unchecked. - UNITY ID: ralwan and vsreeni | ||
|
||
@due_date_info = DueDate.find_each(parent_id: params[:id]) | ||
puts @due_date_info.inspect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use log
flash[:note] = 'The assignment was successfully saved....' | ||
|
||
if params[:set_pressed][:bool] == 'false' | ||
flash[:error] = "Submissions count greater than rounds of reviews. Please set the value before saving." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the error msg would be more useful if it's:
The available submissions for this assignment indicate that there are X rounds of review. Are you sure that you want to change it to Y rounds of review?
you have to calculate X first
app/models/assignment_form.rb
Outdated
@@ -186,7 +186,7 @@ def set_up_assignment_review | |||
|
|||
submissions = @assignment.find_due_dates('submission') | |||
reviews = @assignment.find_due_dates('review') | |||
@assignment.rounds_of_reviews = [@assignment.rounds_of_reviews, submissions.count, reviews.count].max | |||
# @assignment.rounds_of_reviews = [@assignment.rounds_of_reviews, submissions.count, reviews.count].max |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either delete this, or add comment why you deactivate this LoC.
var original_round_count = <%= @assignment_form.assignment.rounds_of_reviews%>; | ||
|
||
if(new_round_count < submissions_count){ | ||
if(!confirm("Submissions count greater than rounds of reviews. Are you sure you want to change rounds of reviews?")){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big fan of confirm, alert and all blocking popup window. it's fine for now. but try to avoid them in the future.
New pull request for this project can be found here. |
Fixed issues #961 and #972.
By:
Vidhyalakshimi Sreenivasan - vsreeni
Rajan Alwan - ralwan