public function get_remote_list_of_languages() {
        $source = 'https://download.moodle.org/langpack/' . $this->version . '/languages.md5';
        $availablelangs = array();

        if ($content = download_file_content($source)) {
            $alllines = explode("\n", $content);
            foreach($alllines as $line) {
                if (!empty($line)){
                    $availablelangs[] = explode(',', $line);
                }
            }
            return $availablelangs;

        } else {
            return false;
        }
    }
public function get_remote_list_of_languages() {
        $source = 'https://download.moodle.org/langpack/' . $this->version . '/languages.md5';
        $availablelangs = array();

        if ($content = download_file_content($source)) {
            $alllines = explode("\n", $content);
            foreach($alllines as $line) {
                if (!empty($line)){
                    $availablelangs[] = explode(',', $line);
                }
            }
            return $availablelangs;

        } else {
            return false;
        }
    }
public function get_remote_list_of_languages ( ) { $ source = 'https://download.moodle.org/langpack/' . $ this -> version . '/languages.md5' ; $ availablelangs = array ( ) ; if ( $ content = download_file_content ( $ source ) ) { $ alllines = explode ( "\n" , $ content ) ; foreach ( $ alllines as $ line ) { if ( ! empty ( $ line ) ) { $ availablelangs [ ] = explode ( ',' , $ line ) ; } } return $ availablelangs ; } else { return false ; } }
Returns the list of available language packs from download.moodle.org

@return array|bool false if can not download
Returns the list of available language packs from download . moodle . org