class Api::V2::StudentSessionsController

Public Instance Methods

show() click to toggle source
GET /api/student_sessions/:id

Returns the list of the students registered to an exam

  • Args :

    • id -> the exam id

    • timestamp -> epoch time in milliseconds

    • nonce -> random number unique between the api calls made in the previous 24 hours

    • api_token -> the user api_token

    • signature -> HMAC sha256 hex encoded hash, using the user secret_key as key, of the query string build with all the other parameters in the format “name=value” joined by “?” and ordered alphabethically by name. Do not use encoding scheme on the values you use to calculate the string

  • Returns :

    • a json of the student_session:

      • student_session_id -> the id of the student

      • name -> the name of the student

      • email -> the email of the student

      • exam_id -> the id of the exam

      • status -> the status of the student

      • individual_info -> information that is displayed to this student at the beginning of the exam

      • attempt -> the attempt number of the student

      • open_time -> epoch time in seconds of opening time for the student

      • close_time -> epoch time in seconds of closing time for the student

      • start_time -> epoch time in seconds of start time for the student

      • end_time -> epoch time in seconds of end time for the student

      • token -> the token used for accessing the students test and requirements check

    • http status 200

# File app/controllers/api/v2/student_sessions_controller.rb, line 29
def show
  save_request
  render json: { student_session: (build_student_session_json_response @student_session) }, status: :ok and return
end