brownfield-team / anacapa-github-linker

A tool for managing students in computer science courses. Deployed at:
https://ucsb-cs-github-linker.herokuapp.com
MIT License
4 stars 6 forks source link

Redirect to home page(not courses) on unsuccessful join #504

Closed pconrad closed 2 years ago

pconrad commented 2 years ago

When a user tries to join a course and is not successful, redirect them to the home page, not the courses page.

Details

In the file app/controllers/courses_controller.rb we see this code:

    if roster_student.nil?
      message = 'Your email did not match the email of any student on the course roster. Please check that your github email is correctly configured to match your school email and that you have verified your email address. '
      return redirect_to courses_path, alert: message
    end

The line return redirect_to courses_path, alert: message may be the only change needed.