You are here

protected static function OpignoTincanQuestionTypeResponse::saveRegistration in Opigno TinCan Question Type 7

This method will save the given registration UUID to the database.

Parameters

string $registration: The UUID to save.

int $result_id: The result ID given by Quiz.

Throws

\Exception If an error occurred while inserting to the database.

1 call to OpignoTincanQuestionTypeResponse::saveRegistration()
OpignoTincanQuestionTypeResponse::saveRegistrationFromSession in includes/opigno_tincan_question_type.response.inc
This method will save the registration UUID.

File

includes/opigno_tincan_question_type.response.inc, line 169
This file contains the class OpignoTincanQuestionTypeResponse.

Class

OpignoTincanQuestionTypeResponse
This class goal is to manage the user's answer(s).

Code

protected static function saveRegistration($registration, $result_id) {
  db_insert(OpignoTincanQuestionTypeAnswersDatabase::NAME)
    ->fields(array(
    'rid' => $result_id,
    'registration' => $registration,
  ))
    ->execute();
}