You are here

function lti_tool_provider_info in LTI Tool Provider 7

Menu page callback for the LTI Info menu items.

Return value

array The conent for the page.

1 string reference to 'lti_tool_provider_info'
lti_tool_provider_menu in ./lti_tool_provider.module
Implements hook_menu().

File

./lti_tool_provider.operations.inc, line 177
Menu page callbacks for the lti operations launch, return as well as home and info.

Code

function lti_tool_provider_info() {

  // Display all the key/value pairs in the ltitp_context_info.
  $content = array();
  $content[] = array(
    '#type' => 'item',
    '#markup' => t('LTI Context Session Variables'),
  );
  $info = $_SESSION['lti_tool_provider_context_info'];
  $rows = array();
  $loop_counter = 0;
  foreach ($info as $key => $value) {
    $rows[$loop_counter]['data']['key'] = $key;
    $rows[$loop_counter]['data']['value'] = $value;
    $loop_counter++;
  }
  $content['table'] = array(
    '#theme' => 'table',
    '#rows' => $rows,
    '#header' => array(
      t('Key'),
      t('Value'),
    ),
    '#empty' => t('There are no LTI Context variables.'),
  );
  return $content;
}