/**
  * Returns a list of help links the user is permitted to see.
  *
  * @return array Array of HTML link fragments.
  */
 protected function get_help_links()
 {
     // Must be configured site level.
     if (!$this->displayhelplinks) {
         return array();
     }
     // Get the Help urls if enabled.
     $helpurls = block_mhaairs_connect::get_help_urls();
     if ($helpurls === false) {
         return array();
     }
     $helplinks = array();
     $context = $this->page->context;
     // Admin help link.
     $adminhelp = has_capability('block/mhaairs:viewadmindoc', $context);
     if ($adminhelp) {
         $targetw = array('target' => '__mhaairs_adminhelp_window');
         $adminhelplink = html_writer::link($helpurls['AdminHelpUrl'], get_string('adminhelplabel', __CLASS__), $targetw);
         $helplinks[] = $adminhelplink;
     }
     // Teacher help link.
     $teacherhelp = has_capability('block/mhaairs:viewteacherdoc', $context);
     if ($teacherhelp) {
         $targetw = array('target' => '__mhaairs_teacherhelp_window');
         $instrhelplink = html_writer::link($helpurls['InstructorHelpUrl'], get_string('instructorhelplabel', __CLASS__), $targetw);
         $helplinks[] = $instrhelplink;
     }
     return $helplinks;
 }