Skip to content

Commit

Permalink
Merge pull request #205 from avantifellows/main
Browse files Browse the repository at this point in the history
Prod deployment
  • Loading branch information
Bahugunajii authored Jul 29, 2024
2 parents 15a09e8 + 023a0a8 commit 54beed6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 6 additions & 3 deletions lib/dbservice_web/controllers/student_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ defmodule DbserviceWeb.StudentController do
alias Dbservice.Users
alias Dbservice.Users.Student
alias Dbservice.EnrollmentRecords.EnrollmentRecord
alias Dbservice.Groups.GroupUser
alias Dbservice.Statuses.Status
alias Dbservice.Groups.Group
alias Dbservice.EnrollmentRecords
Expand Down Expand Up @@ -225,8 +224,12 @@ defmodule DbserviceWeb.StudentController do
EnrollmentRecords.create_enrollment_record(new_enrollment_attrs)

# Delete all group-user entries for the user
from(gu in GroupUser, where: gu.user_id == ^user_id)
|> Repo.delete_all()
# NOTE: Commenting these lines because we don't want to stop
# students from logging in once they are marked as dropout(s)
# in case they want to re-enroll in the future.
#
# from(gu in GroupUser, where: gu.user_id == ^user_id)
# |> Repo.delete_all()

# Update the student's status to 'dropout' using update_student/2
with {:ok, %Student{} = updated_student} <-
Expand Down

This file was deleted.

0 comments on commit 54beed6

Please sign in to comment.