oohoo / moodle-block_tts

OOHOO Text to Speech is a Moodle block that gives the possibility to read outloud the content of a resource.
http://oohoo.biz/index.php/en/plug-ins/language-learning/tts-text-to-speech/
1 stars 1 forks source link

fix for: PHP Fatal error: Call to undefined function moodle_major_version() #5

Closed elchappo closed 10 years ago

elchappo commented 10 years ago

/var/www/websites/assessment.excelr8learning.co.uk/moodle/blocks/tts/block_tts.php:179

function load_jQuery() { global $PAGE; $PAGE->requires->css('/blocks/tts/app/_css/jquery.ui.core.css'); $PAGE->requires->css('/blocks/tts/app/_css/jquery.ui.slider.css'); $PAGE->requires->css('/blocks/tts/app/_css/jquery.ui.theme.css');

    $PAGE->requires->js('/blocks/tts/app/_scripts/jquery-1.6.1.min.js');
    $PAGE->requires->js('/blocks/tts/app/_scripts/jquery.ui.core.js');
    $PAGE->requires->js('/blocks/tts/app/_scripts/jquery.ui.widget.js');
    $PAGE->requires->js('/blocks/tts/app/_scripts/jquery.ui.mouse.js');
    $PAGE->requires->js('/blocks/tts/app/_scripts/jquery.ui.slider.js');

}

elchappo commented 10 years ago

On moodle version 2.2.11 -> "moodle_major_version" function doesn't exist and you please add check for function maybe http://uk3.php.net/function_exists ?

bretin commented 10 years ago

Hi, Thank you for the notification. I updated the code and submitted a new version on moodle.org

elchappo commented 10 years ago

Thanks!