public function display_edit_collapsed(lesson $lesson, $pageid) {
        global $DB, $CFG;

        $manager = lesson_page_type_manager::get($lesson);
        $qtypes = $manager->get_page_type_strings();
        $npages = count($lesson->load_all_pages());

        $table = new html_table();
        $table->head = array(get_string('pagetitle', 'lesson'), get_string('qtype', 'lesson'), get_string('jumps', 'lesson'), get_string('actions', 'lesson'));
        $table->align = array('left', 'left', 'left', 'center');
        $table->wrap = array('', 'nowrap', '', 'nowrap');
        $table->tablealign = 'center';
        $table->cellspacing = 0;
        $table->cellpadding = '2px';
        $table->width = '80%';
        $table->data = array();

        $canedit = has_capability('mod/lesson:edit', context_module::instance($this->page->cm->id));

        while ($pageid != 0) {
            $page = $lesson->load_page($pageid);
            $data = array();
            $url = new moodle_url('/mod/lesson/edit.php', array(
                'id'     => $this->page->cm->id,
                'mode'   => 'single',
                'pageid' => $page->id
            ));
            $data[] = html_writer::link($url, format_string($page->title, true), array('id' => 'lesson-' . $page->id));
            $data[] = $qtypes[$page->qtype];
            $data[] = implode("<br />\n", $page->jumps);
            if ($canedit) {
                $data[] = $this->page_action_links($page, $npages, true);
            } else {
                $data[] = '';
            }
            $table->data[] = $data;
            $pageid = $page->nextpageid;
        }

        return html_writer::table($table);
    }
public function display_edit_collapsed(lesson $lesson, $pageid) {
        global $DB, $CFG;

        $manager = lesson_page_type_manager::get($lesson);
        $qtypes = $manager->get_page_type_strings();
        $npages = count($lesson->load_all_pages());

        $table = new html_table();
        $table->head = array(get_string('pagetitle', 'lesson'), get_string('qtype', 'lesson'), get_string('jumps', 'lesson'), get_string('actions', 'lesson'));
        $table->align = array('left', 'left', 'left', 'center');
        $table->wrap = array('', 'nowrap', '', 'nowrap');
        $table->tablealign = 'center';
        $table->cellspacing = 0;
        $table->cellpadding = '2px';
        $table->width = '80%';
        $table->data = array();

        $canedit = has_capability('mod/lesson:edit', context_module::instance($this->page->cm->id));

        while ($pageid != 0) {
            $page = $lesson->load_page($pageid);
            $data = array();
            $url = new moodle_url('/mod/lesson/edit.php', array(
                'id'     => $this->page->cm->id,
                'mode'   => 'single',
                'pageid' => $page->id
            ));
            $data[] = html_writer::link($url, format_string($page->title, true), array('id' => 'lesson-' . $page->id));
            $data[] = $qtypes[$page->qtype];
            $data[] = implode("<br />\n", $page->jumps);
            if ($canedit) {
                $data[] = $this->page_action_links($page, $npages, true);
            } else {
                $data[] = '';
            }
            $table->data[] = $data;
            $pageid = $page->nextpageid;
        }

        return html_writer::table($table);
    }
public function display_edit_collapsed ( lesson $ lesson , $ pageid ) { global $ DB , $ CFG ; $ manager = lesson_page_type_manager :: get ( $ lesson ) ; $ qtypes = $ manager -> get_page_type_strings ( ) ; $ npages = count ( $ lesson -> load_all_pages ( ) ) ; $ table = new html_table ( ) ; $ table -> head = array ( get_string ( 'pagetitle' , 'lesson' ) , get_string ( 'qtype' , 'lesson' ) , get_string ( 'jumps' , 'lesson' ) , get_string ( 'actions' , 'lesson' ) ) ; $ table -> align = array ( 'left' , 'left' , 'left' , 'center' ) ; $ table -> wrap = array ( '' , 'nowrap' , '' , 'nowrap' ) ; $ table -> tablealign = 'center' ; $ table -> cellspacing = 0 ; $ table -> cellpadding = '2px' ; $ table -> width = '80%' ; $ table -> data = array ( ) ; $ canedit = has_capability ( 'mod/lesson:edit' , context_module :: instance ( $ this -> page -> cm -> id ) ) ; while ( $ pageid != 0 ) { $ page = $ lesson -> load_page ( $ pageid ) ; $ data = array ( ) ; $ url = new moodle_url ( '/mod/lesson/edit.php' , array ( 'id' => $ this -> page -> cm -> id , 'mode' => 'single' , 'pageid' => $ page -> id ) ) ; $ data [ ] = html_writer :: link ( $ url , format_string ( $ page -> title , true ) , array ( 'id' => 'lesson-' . $ page -> id ) ) ; $ data [ ] = $ qtypes [ $ page -> qtype ] ; $ data [ ] = implode ( "<br />\n" , $ page -> jumps ) ; if ( $ canedit ) { $ data [ ] = $ this -> page_action_links ( $ page , $ npages , true ) ; } else { $ data [ ] = '' ; } $ table -> data [ ] = $ data ; $ pageid = $ page -> nextpageid ; } return html_writer :: table ( $ table ) ; }
Returns HTML to display a collapsed edit form

@param lesson $lesson
@param int $pageid
@return string
Returns HTML to display a collapsed edit form