src/UI/Lessons.php
public static function adjustArray(&$entry) {
        global $CFG;
        if ( isset($entry) && !is_array($entry) ) {
            $entry = array($entry);
        }
        for($i=0; $i < count($entry); $i++ ) {
            if ( is_string($entry[$i]) ) U::absolute_url_ref($entry[$i]);
            if ( isset($entry[$i]->href) && is_string($entry[$i]->href) ) U::absolute_url_ref($entry[$i]->href);
            if ( isset($entry[$i]->launch) && is_string($entry[$i]->launch) ) U::absolute_url_ref($entry[$i]->launch);
        }
    }
public static function adjustArray(&$entry) {
        global $CFG;
        if ( isset($entry) && !is_array($entry) ) {
            $entry = array($entry);
        }
        for($i=0; $i < count($entry); $i++ ) {
            if ( is_string($entry[$i]) ) U::absolute_url_ref($entry[$i]);
            if ( isset($entry[$i]->href) && is_string($entry[$i]->href) ) U::absolute_url_ref($entry[$i]->href);
            if ( isset($entry[$i]->launch) && is_string($entry[$i]->launch) ) U::absolute_url_ref($entry[$i]->launch);
        }
    }
public static function adjustArray ( & $ entry ) { global $ CFG ; if ( isset ( $ entry ) && ! is_array ( $ entry ) ) { $ entry = array ( $ entry ) ; } for ( $ i = 0 ; $ i < count ( $ entry ) ; $ i ++ ) { if ( is_string ( $ entry [ $ i ] ) ) U :: absolute_url_ref ( $ entry [ $ i ] ) ; if ( isset ( $ entry [ $ i ] -> href ) && is_string ( $ entry [ $ i ] -> href ) ) U :: absolute_url_ref ( $ entry [ $ i ] -> href ) ; if ( isset ( $ entry [ $ i ] -> launch ) && is_string ( $ entry [ $ i ] -> launch ) ) U :: absolute_url_ref ( $ entry [ $ i ] -> launch ) ; } }
Make non-array into an array and adjust paths
Make non - array into an array and adjust paths