original_string: public function add_page_links(lesson $lesson, $prevpageid=false) {
          global $CFG;
  
          $links = array();
  
          $importquestionsurl = new moodle_url('/mod/lesson/import.php',array('id'=>$this->page->cm->id, 'pageid'=>$prevpageid));
          $links[] = html_writer::link($importquestionsurl, get_string('importquestions', 'lesson'));
  
          $manager = lesson_page_type_manager::get($lesson);
          foreach($manager->get_add_page_type_links($prevpageid) as $link) {
              $links[] = html_writer::link($link['addurl'], $link['name']);
          }
  
          $addquestionurl = new moodle_url('/mod/lesson/editpage.php', array('id'=>$this->page->cm->id, 'pageid'=>$prevpageid));
          $links[] = html_writer::link($addquestionurl, get_string('addaquestionpagehere', 'lesson'));
  
          return $this->output->box(implode(" | \n", $links), 'addlinks');
      }
code: public function add_page_links(lesson $lesson, $prevpageid=false) {
          global $CFG;
  
          $links = array();
  
          $importquestionsurl = new moodle_url('/mod/lesson/import.php',array('id'=>$this->page->cm->id, 'pageid'=>$prevpageid));
          $links[] = html_writer::link($importquestionsurl, get_string('importquestions', 'lesson'));
  
          $manager = lesson_page_type_manager::get($lesson);
          foreach($manager->get_add_page_type_links($prevpageid) as $link) {
              $links[] = html_writer::link($link['addurl'], $link['name']);
          }
  
          $addquestionurl = new moodle_url('/mod/lesson/editpage.php', array('id'=>$this->page->cm->id, 'pageid'=>$prevpageid));
          $links[] = html_writer::link($addquestionurl, get_string('addaquestionpagehere', 'lesson'));
  
          return $this->output->box(implode(" | \n", $links), 'addlinks');
      }
code_tokens: public function add_page_links ( lesson $ lesson , $ prevpageid = false ) { global $ CFG ; $ links = array ( ) ; $ importquestionsurl = new moodle_url ( '/mod/lesson/import.php' , array ( 'id' => $ this -> page -> cm -> id , 'pageid' => $ prevpageid ) ) ; $ links [ ] = html_writer :: link ( $ importquestionsurl , get_string ( 'importquestions' , 'lesson' ) ) ; $ manager = lesson_page_type_manager :: get ( $ lesson ) ; foreach ( $ manager -> get_add_page_type_links ( $ prevpageid ) as $ link ) { $ links [ ] = html_writer :: link ( $ link [ 'addurl' ] , $ link [ 'name' ] ) ; } $ addquestionurl = new moodle_url ( '/mod/lesson/editpage.php' , array ( 'id' => $ this -> page -> cm -> id , 'pageid' => $ prevpageid ) ) ; $ links [ ] = html_writer :: link ( $ addquestionurl , get_string ( 'addaquestionpagehere' , 'lesson' ) ) ; return $ this -> output -> box ( implode ( " | \n" , $ links ) , 'addlinks' ) ; }
docstring: Returns HTML to display the add page links
  
  @param lesson $lesson
  @param int $prevpageid
  @return string
docstring_tokens: Returns HTML to display the add page links