public function contextAction() { $context = $this->getDI()->getShared('ltiContext'); // Send a statement tracking that they viewed this page $statementHelper = new StatementHelper(); $statement = $statementHelper->buildStatement(["statementName" => "dashboardLaunched", "dashboardID" => "dashboard_select", "dashboardName" => "Dashboard Selector", "verbName" => "launched"], $context); if ($statement) { echo "working\n"; $res = $statementHelper->sendStatements("visualization", [$statement]); echo $res; } echo $this->getDI()->getShared('ltiContext')->getCourseKey(); }
public function consentAction() { $this->tag->setTitle('Consent Required'); // Get our context (this takes care of starting the session, too) $context = $this->getDI()->getShared('ltiContext'); $this->view->ltiContext = $context; $this->view->userAuthorized = $context->valid; $this->view->consentEmail = $this->getDI()->getShared('config')->consent_email; // Send a statement tracking that they viewed this page $statementHelper = new StatementHelper(); $statement = $statementHelper->buildStatement(["statementName" => "interacted", "dashboardID" => "info", "dashboardName" => "Info", "verbName" => "launched", "objectName" => "consentRequired"], $context); if ($statement) { $statementHelper->sendStatements("visualization", [$statement]); } }
public function indexAction() { // Get our context (this takes care of starting the session, too) $context = $this->getDI()->getShared('ltiContext'); $this->view->disable(); // Use the StatementHelper class $statementHelper = new StatementHelper(); // Make an actual xAPI statement from the post params $statement = $statementHelper->buildStatement($_POST, $context); if ($statement) { // If we've got a valid statement, send it to the visualization LRS (endpoint, username, password are defined in config.php) echo $statementHelper->sendStatements("visualization", [$statement]); } else { echo "Invalid statement parameters"; } }
public function selectAction() { $this->tag->setTitle('Dashboard Selection'); $this->view->pageTitle = 'Dashboard Selection'; // Get our context (this takes care of starting the session, too) $context = $this->getDI()->getShared('ltiContext'); // Send a statement tracking that they viewed this page $statementHelper = new StatementHelper(); $statement = $statementHelper->buildStatement(["statementName" => "dashboardLaunched", "dashboardID" => "dashboard_select", "dashboardName" => "Dashboard Selector", "verbName" => "launched"], $context); if ($statement) { $statementHelper->sendStatements("visualization", [$statement]); } }