You are here

function is_sizable_multimedia in Quiz 6.6

Same name and namespace in other branches
  1. 6.5 includes/moodle/question/format/qti2/qt_common.php \is_sizable_multimedia()

determines whether or not a file is a multimedia file of a type php can get the dimension for, based on the file extension

Parameters

string $file the filename:

Return value

boolean

1 call to is_sizable_multimedia()
get_media_tag in includes/moodle/question/format/qti2/qt_common.php
creates a media tag to use for choice media

File

includes/moodle/question/format/qti2/qt_common.php, line 83

Code

function is_sizable_multimedia($file) {
  $extensionsregex = '/\\.(swf)$/';
  if (preg_match($extensionsregex, $file)) {
    return true;
  }
  return false;
}