mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
only display "Excel" option, if an Excel library is available
This commit is contained in:
parent
ca61cb465c
commit
b74d340762
@ -472,11 +472,14 @@ function hotpot_print_report_selector(&$course, &$hotpot, &$formdata) {
|
||||
print '<input type="submit" value="'.get_string('reportbutton', 'hotpot').'"></td></tr>';
|
||||
|
||||
$menus = array();
|
||||
$menus['reportformat'] = array(
|
||||
'htm' => get_string('reportformathtml', 'hotpot'),
|
||||
'xls' => get_string('reportformatexcel', 'hotpot'),
|
||||
'txt' => get_string('reportformattext', 'hotpot'),
|
||||
);
|
||||
|
||||
$menus['reportformat'] = array();
|
||||
$menus['reportformat']['htm'] = get_string('reportformathtml', 'hotpot');
|
||||
if (file_exists("$CFG->libdir/excel") || file_exists("$CFG->libdir/excellib.class.php")) {
|
||||
$menus['reportformat']['xls'] = get_string('reportformatexcel', 'hotpot');
|
||||
}
|
||||
$menus['reportformat']['txt'] = get_string('reportformattext', 'hotpot');
|
||||
|
||||
if (trim($CFG->hotpot_excelencodings)) {
|
||||
$menus['reportencoding'] = array(get_string('none')=>'');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user