Skip to main content Link Search Menu Expand Document (external link)

student.application.go

  • Contains student related functions for application.

#1

func getApplicationHandler
  • Used to get application questions’ answers using proforma id.

First, Student RCID is fetched using the function:

func getStudentRCID(ctx)
  • Mentioned in application/util.student.middleware.

Here SID refers to Student RCID.

Then, a check is done to ensure that SID isn’t zero.

Finally, the response to application questions is fetched using the function:

func fetchApplicationQuestionsAnswers(ctx, pid, sid, &questions)
  • This takes pid, sid, and an empty array of type getApplicationResponse as parameters.

#2

func postApplicationHandler
  • Used to post application using proforma id.

First, the application event ID is fetched using the function:

func fetchApplicationEventID(ctx, pid)
  • This takes PID as a parameter.

Then, Student RCID is fetched using the function:

func getStudentRCID(ctx)
  • Mentioned in application/util.student.middleware.

Here SID refers to Student RCID.

Also, a check is done to ensure that SID isn’t zero.

Proforma eligibility, CPI eligibility, Company ID and deadline are fetched from PID using the function:

func getEligibility(ctx, pid)
  • This takes PID as a parameter.

Then, final student eligibilty is checked using the function:

func GetStudentEligible(ctx, sid, proformaEligibility, cpiEligibility)
  • This takes Student RCID , Proforma eligibility, CPI eligibilityas parameters.

Then, total number of applications are obtained using the function:

func getCurrentApplicationCount(ctx, sid)

A check is done so that the total application count is less than maximum which is obtained using the function:

func GetMaxCountfromRC(ctx)

Also, the time is checked to confirm that the deadline hasn’t passed.

Application Question answers are filled in an array of type ApplicationQuestionAnswer.

Resume link is fetched using the function:

func FetchResume(ctx, request.ResumeID, sid)

Here, request is a struct of type postApplicationRequest and sid refers to Student RCID.

Finally, application is created using the function:’

func createApplication(ctx, &application, &answers, &resume)
  • This takes a struct of type EventStudent, an array of type ApplicationQuestionAnswer and a struct of type ApplicationResume as parameters.

#3

func postApplicationHandler
  • Used to delete application using proforma id.

Deadline is fetched from PID using the function:

func getEligibility(ctx, pid)
  • This takes PID as a parameter.

A check is made to ensure that the deadline hasn’t passed.

Then, Student RCID is fetched using the function:

func getStudentRCID(ctx)

Here SID refers to Student RCID.

Then, the application is deleted using the function:

func deleteApplication(ctx, pid, sid)

#4

func getEventHandler
  • Used to get event using event id.

Event is fetched using the function:

func fetchEvent(ctx, eid, &event)
  • This takes EID and an empty array of type ProformaEvent as parameters.

Here, EID refers to event ID.

#5

func viewApplicationsHandler
  • Used to view application using student RCID.

Student RCID is fetched using the function:

func getStudentRCID(ctx)

Here SID refers to Student RCID.

Then, applications are fetched using the function:

func fetchApplications(ctx, sid, &response)
  • This takes SID and an empty array of type ViewApplicationsResponse as parameters.

Here, SID refers to student RCID.