function _opigno_tincan_api_statement_base_creation in Opigno TinCan API 7
This function will add the current user as the actor, the verb selected in parameter, the object based on the node given in parameter and the timestamp based on the current time.
Parameters
array(name, id) $verb The verb name and ID. Use TinCanVerbs:
string $activity_definition_type The activity definition name and ID. Use TinCanActivityDefinitionTypes:
object $node The node to use as object:
Return value
\TinCan\Statement
Throws
Exception
6 calls to _opigno_tincan_api_statement_base_creation()
- 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_node_views_statements_node_view in modules/
opigno_tincan_api_node_views_statements/ opigno_tincan_api_node_views_statements.module - Implements hook_node_view(). This implementation will track every node that are viewed to the LRS
- 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
File
- includes/
opigno_tincan_api.statements_func.inc, line 248
Code
function _opigno_tincan_api_statement_base_creation($verb, $activity_definition_type, $node) {
if (!_opigno_tincan_api_tincanphp_is_installed()) {
return false;
}
$statement = new TinCan\Statement();
_opigno_tincan_api_set_actor($statement);
_opigno_tincan_api_set_verb($statement, $verb);
_opigno_tincan_api_set_object_activity($statement, $activity_definition_type, $node);
$statement
->stamp();
return $statement;
}