src/UI/Lessons.php
public function renderAll($buffer=false)
    {
        ob_start();
        echo('<div typeof="Course">'."\n");
        echo('<h1>'.$this->lessons->title."</h1>\n");
        echo('<p property="description">'.$this->lessons->description."</p>\n");
        echo('<div id="box">'."\n");
        $count = 0;
        foreach($this->lessons->modules as $module) {
	    if ( isset($module->login) && $module->login && !isset($_SESSION['id']) ) continue;
            $count++;
            echo('<div class="card"><div>'."\n");
            $href = U::get_rest_path() . '/' . urlencode($module->anchor);
            if ( isset($module->icon) ) {
                echo('<i class="fa '.$module->icon.' fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i>');
            }
            echo('<a href="'.$href.'">'."\n");
            echo($count.': '.$module->title."<br clear=\"all\"/>\n");
            if ( isset($module->description) ) {
                $desc = $module->description;
                if ( strlen($desc) > 1000 ) $desc = substr($desc, 0, 1000);
                echo('<br/>'.$desc."\n");
            }
            echo("</a></div></div>\n");
        }
        echo('</div> <!-- box -->'."\n");
        echo('</div> <!-- typeof="Course" -->'."\n");
        $ob_output = ob_get_contents();
        ob_end_clean();
        if ( $buffer ) return $ob_output;
        echo($ob_output);
    }
public function renderAll($buffer=false)
    {
        ob_start();
        echo('<div typeof="Course">'."\n");
        echo('<h1>'.$this->lessons->title."</h1>\n");
        echo('<p property="description">'.$this->lessons->description."</p>\n");
        echo('<div id="box">'."\n");
        $count = 0;
        foreach($this->lessons->modules as $module) {
	    if ( isset($module->login) && $module->login && !isset($_SESSION['id']) ) continue;
            $count++;
            echo('<div class="card"><div>'."\n");
            $href = U::get_rest_path() . '/' . urlencode($module->anchor);
            if ( isset($module->icon) ) {
                echo('<i class="fa '.$module->icon.' fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i>');
            }
            echo('<a href="'.$href.'">'."\n");
            echo($count.': '.$module->title."<br clear=\"all\"/>\n");
            if ( isset($module->description) ) {
                $desc = $module->description;
                if ( strlen($desc) > 1000 ) $desc = substr($desc, 0, 1000);
                echo('<br/>'.$desc."\n");
            }
            echo("</a></div></div>\n");
        }
        echo('</div> <!-- box -->'."\n");
        echo('</div> <!-- typeof="Course" -->'."\n");
        $ob_output = ob_get_contents();
        ob_end_clean();
        if ( $buffer ) return $ob_output;
        echo($ob_output);
    }
public function renderAll ( $ buffer = false ) { ob_start ( ) ; echo ( '<div typeof="Course">' . "\n" ) ; echo ( '<h1>' . $ this -> lessons -> title . "</h1>\n" ) ; echo ( '<p property="description">' . $ this -> lessons -> description . "</p>\n" ) ; echo ( '<div id="box">' . "\n" ) ; $ count = 0 ; foreach ( $ this -> lessons -> modules as $ module ) { if ( isset ( $ module -> login ) && $ module -> login && ! isset ( $ _SESSION [ 'id' ] ) ) continue ; $ count ++ ; echo ( '<div class="card"><div>' . "\n" ) ; $ href = U :: get_rest_path ( ) . '/' . urlencode ( $ module -> anchor ) ; if ( isset ( $ module -> icon ) ) { echo ( '<i class="fa ' . $ module -> icon . ' fa-2x" aria-hidden="true" style="float: left; padding-right: 5px;"></i>' ) ; } echo ( '<a href="' . $ href . '">' . "\n" ) ; echo ( $ count . ': ' . $ module -> title . "<br clear=\"all\"/>\n" ) ; if ( isset ( $ module -> description ) ) { $ desc = $ module -> description ; if ( strlen ( $ desc ) > 1000 ) $ desc = substr ( $ desc , 0 , 1000 ) ; echo ( '<br/>' . $ desc . "\n" ) ; } echo ( "</a></div></div>\n" ) ; } echo ( '</div> <!-- box -->' . "\n" ) ; echo ( '</div> <!-- typeof="Course" -->' . "\n" ) ; $ ob_output = ob_get_contents ( ) ; ob_end_clean ( ) ; if ( $ buffer ) return $ ob_output ; echo ( $ ob_output ) ; }
End of renderSingle
End of renderSingle