function _opigno_tincan_api_context_set_language in Opigno TinCan API 7
Parameters
\TinCan\Context $context The context to edit for the statement:
string $language The language to add:
5 calls to _opigno_tincan_api_context_set_language()
- opigno_tincan_api_in_house_training_statements_opigno_in_house_training_finished in modules/
opigno_tincan_api_in_house_training_statements/ opigno_tincan_api_in_house_training_statements.module - Implements hook_opigno_in_house_training_finished().
- opigno_tincan_api_opigno_statements_opigno_course_passed in modules/
opigno_tincan_api_opigno_statements/ opigno_tincan_api_opigno_statements.module - opigno_tincan_api_quiz_begin in modules/
opigno_tincan_api_quiz_statements/ opigno_tincan_api_quiz_statements.module - _opigno_tincan_api_send_questions_results in modules/
opigno_tincan_api_quiz_statements/ opigno_tincan_api_quiz_statements.module - _opigno_tincan_api_send_quiz_results in modules/
opigno_tincan_api_quiz_statements/ opigno_tincan_api_quiz_statements.module
File
- includes/
opigno_tincan_api.statements_func.inc, line 94
Code
function _opigno_tincan_api_context_set_language(TinCan\Context &$context, $language) {
if (!_opigno_tincan_api_tincanphp_is_installed()) {
return false;
}
if (!empty($language) && $language != LANGUAGE_NONE) {
$context
->setLanguage($language);
}
}