Skip to content

Commit

Permalink
show warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
coder6583 committed Sep 22, 2024
1 parent 234f8e3 commit 2fb8c46
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/controllers/courses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,10 @@ def upload_roster
begin
save_uploaded_roster
flash[:success] = "Successfully updated roster!"
unless @roster_warnings.nil?
w = @roster_warnings.keys.join('\n')
flash[:error] = w
end
redirect_to(action: "users") && return
rescue StandardError => e
if e != "Roster validation error"
Expand Down Expand Up @@ -953,6 +957,8 @@ def write_cuds(cuds)
rosterWarnings[msg].push(cud)
end

@roster_warnings = rosterWarnings

return if rosterErrors.empty?

@roster_error = rosterErrors
Expand Down

0 comments on commit 2fb8c46

Please sign in to comment.