Example #1
0
/**
 * Returns a string containing a link to the user documentation for the current page.
 *
 * Also contains an icon by default. Shown to teachers and admin only.
 *
 * @param string $text The text to be displayed for the link
 * @return string The link to user documentation for this current page
 */
function page_doc_link($text = '')
{
    global $OUTPUT, $PAGE;
    $path = page_get_doc_link_path($PAGE);
    if (!$path) {
        return '';
    }
    return $OUTPUT->doc_link($path, $text);
}
Example #2
0
 /**
  * Returns the Moodle docs link to use for this page.
  *
  * @since Moodle 2.5.1 2.6
  * @param string $text
  * @return string
  */
 public function page_doc_link($text = null) {
     if ($text === null) {
         $text = get_string('moodledocslink');
     }
     $path = page_get_doc_link_path($this->page);
     if (!$path) {
         return '';
     }
     return $this->doc_link($path, $text);
 }
Example #3
0
 /**
  * Returns the Moodle docs link to use for this page.
  *
  * @since 2.5.1 2.6
  * @param string $text
  * @return string
  */
 public function page_doc_link($footext = null)
 {
     $title = get_string('moodledocslink');
     $path = page_get_doc_link_path($this->page);
     if (!$path) {
         return '';
     }
     return $this->doc_link($path, '', $title);
 }