@@ 930-939 (lines=10) @@ | ||
927 | * @param string $filePath The absolute filepath |
|
928 | * @return bool Whether it is an IMS/QTI question bank or not |
|
929 | */ |
|
930 | function isQtiQuestionBank($filePath) |
|
931 | { |
|
932 | $data = file_get_contents($filePath); |
|
933 | if (!empty($data)) { |
|
934 | $match = preg_match('/ims_qtiasiv(\d)p(\d)/', $data); |
|
935 | if ($match) { |
|
936 | return true; |
|
937 | } |
|
938 | } |
|
939 | ||
940 | return false; |
|
941 | } |
|
942 | ||
@@ 948-957 (lines=10) @@ | ||
945 | * @param string $filePath The absolute filepath |
|
946 | * @return bool Whether it is an IMS/QTI manifest file or not |
|
947 | */ |
|
948 | function isQtiManifest($filePath) |
|
949 | { |
|
950 | $data = file_get_contents($filePath); |
|
951 | if (!empty($data)) { |
|
952 | $match = preg_match('/imsccv(\d)p(\d)/', $data); |
|
953 | if ($match) { |
|
954 | return true; |
|
955 | } |
|
956 | } |
|
957 | ||
958 | return false; |
|
959 | } |
|
960 |