protected static function OpignoTincanQuestionTypeResponse::saveRegistrationFromSession in Opigno TinCan Question Type 7
This method will save the registration UUID.
It will save the one that is in the PHPSESSION variable to the database.
Parameters
int $result_id: The result ID to associate with the registration UUID.
Return value
bool|string The registration UUID saved. FALSE if not found.
1 call to OpignoTincanQuestionTypeResponse::saveRegistrationFromSession()
- OpignoTincanQuestionTypeResponse::getRegistration in includes/
opigno_tincan_question_type.response.inc - This method get the registration UUID.
File
- includes/
opigno_tincan_question_type.response.inc, line 144 - This file contains the class OpignoTincanQuestionTypeResponse.
Class
- OpignoTincanQuestionTypeResponse
- This class goal is to manage the user's answer(s).
Code
protected static function saveRegistrationFromSession($result_id) {
if (isset($_SESSION[OpignoTincanQuestionTypeQuestion::SESSIONKEY_REGISTRATION])) {
$registration = $_SESSION[OpignoTincanQuestionTypeQuestion::SESSIONKEY_REGISTRATION];
self::saveRegistration($registration, $result_id);
unset($_SESSION[OpignoTincanQuestionTypeQuestion::SESSIONKEY_REGISTRATION]);
return $registration;
}
return FALSE;
}