api/verification

api/verification

Classes

VerificationRequestCollection

Members

(static, constant) exports.ProcessedSchema

Source:

Schema for the processed information of VerificationRequests.

(static, constant) exports.processPendingVerificationMethod

Source:

This Meteor Method processes a command from the Pending Verification Request widget.
The method is passed a verificationRequestID, a command (ACCEPTED or REJECTED), and an optional feedback string.
The method returns a string indicating what happened.
Processing this request involves the following:

  • Make sure user is a faculty, advisor, or admin. Otherwise throw error.
  • If verificationRequestID is not a valid ID, then throw error.
  • If command is not VerificationRequests.ACCEPTED or VerificationRequests.REJECTED, then returns an error string.
  • Creates a process object to record this command.
  • Updates the VerificationRequest with the new process object and the new status.
  • Creates a new Feed instance only if the request was accepted.

Only faculty, advisors, and admins can invoke this method.

(static, constant) exports.processVerificationEventMethod

Source:

This Meteor Method processes a request to verify an opportunity for a given user from the VerificationEvent page.
The method is passed a student, opportunity, and semester, which should normally be valid.
Processing this request involves the following:

  • If the student does not have an Opportunity Instance for this opportunity and semester, then one is created
    for them.
  • If the student has not already submitted a Verification Request for their Opportunity Instance, then one is
    created for them.
  • If the student has already been verified for this Opportunity, then nothing more is done.
  • Once the OpportunityInstance and VerificationRequest exist, then they are updated to indicate that they have
    been verified if they are not already verified.
  • A status string is returned to the caller to indicate the result of processing.
    Only faculty, advisors, and admins can invoke this method.

(static, constant) exports.VerificationRequests :api/verification.VerificationRequestCollection

Source:

Provides the singleton instance of this class to all other entities.

Type:

(static, constant) exports.verificationRequestsUpdateStatusMethod

Source:

The ValidatedMethod for updating the status of VerificationRequests.
Passed an object with fields:
id: the verificationRequestID
status: boolean
processed: a project object.

Methods

(static) getOpportunityInstanceID(student, opportunity, semester)

Source:

Returns the opportunityInstanceID associated with the student and opportunity, or null if not found.

Parameters:
Name Type Description
student

The student.

opportunity

The opportunity.

semester

The semester

Returns:

The opportunityInstanceID, or null if it wasn't found.