You are here

function opigno_tincan_activity_help in Opigno module 8

Same name and namespace in other branches
  1. 3.x ActivityTypes/opigno_tincan_activity/opigno_tincan_activity.module \opigno_tincan_activity_help()

Implements hook_help().

File

ActivityTypes/opigno_tincan_activity/opigno_tincan_activity.module, line 63
The main module file which contains the main drupal hooks.

Code

function opigno_tincan_activity_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {

    // Main module help for the opigno_tincan_modules module.
    case 'help.page.opigno_tincan_activity':

      // --- The ABOUT section.
      $output = '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The Opigno TinCan Activity module adds a new activity type.
    With this new activity type, you will be able to upload an TinCan Package
    and use it as an activity inside a module.') . '</p>';

      // --- The USES section.
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Install Tincan PHP library') . '</dt>';
      $output .= '<dd>' . t('First of all, for using Tincan Package activity you need to check if @tincan_library is installed.', [
        '@tincan_library' => Link::fromTextAndUrl(t('TinCan PHP library'), Url::fromUri('https://github.com/RusticiSoftware/TinCanPHP'))
          ->toString(),
      ]) . '</dd>';
      $output .= '<dd>' . t('If not, install it with the command:') . ' ' . '<em>composer require rusticisoftware/tincan:@stable</em></dd>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Create a new activity type') . '</dt>';
      $output .= '<dd>' . t('When you create a activity type, you will be able to choose the TinCan Package type of activity. Then, you will be asked to choose a title and to upload a TinCan Package. You can find some on the @tincan_packages_site.', [
        '@tincan_packages_site' => Link::fromTextAndUrl(t('TinCan Website'), Url::fromUri('https://xapi.com/download-prototypes/'))
          ->toString(),
      ]) . '</dd>';
      $output .= '<dt>' . t('Answer a TinCan activity') . '</dt>';
      $output .= '<dd>' . t('To answer a TinCan activity, you just have to start the module that contains the activity previously created. The TinCan Package will appear in an iFrame.');
      $output .= '<dt>' . t('Get the score') . '</dt>';
      $output .= '<dd>' . t('The score is taken directly from the LRS. The TinCan Package must provide the score in the way described in the README.md file or on the @module_page to the LRS. Then, this module will get the score back from the LRS and register it to this Opigno LMS instance.', [
        '@module_page' => Link::fromTextAndUrl(t('module page'), Url::fromUri('https://www.drupal.org/sandbox/amermod/2705191'))
          ->toString(),
      ]) . '</dd>';
      $output .= '<dt>' . t('TinCan Package specifications') . '</dt>';
      $output .= '<dd>' . t('The TinCan Package must follow, at least, the specifications written in the README.md file or on the @module_page. A good TinCan Package should follow the specifications written on the official @github_page.', [
        '@module_page' => Link::fromTextAndUrl(t('module page'), Url::fromUri('https://www.drupal.org/sandbox/amermod/2705191'))
          ->toString(),
        '@github_page' => Link::fromTextAndUrl(t('Github page'), Url::fromUri('https://github.com/RusticiSoftware/launch/blob/master/lms_lrs.md'))
          ->toString(),
      ]) . '</dd>';
      $output .= '</dl>';
      return $output;
  }
}