summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevian <devianleong@gmail.com>2021-06-30 10:06:41 +0800
committerDevian <devianleong@gmail.com>2021-06-30 10:06:41 +0800
commitdbc3319c2c4dac461af3d6d452d2f3e950300d75 (patch)
treeacac202ff9d91b2bc923e13dc90cf806d47be7e9
parentbb425b79cebfd64819d295571992dc2328090964 (diff)
Fixed scorm version reader2.0.4
-rw-r--r--.idea/.gitignore8
-rw-r--r--.idea/laravel-scorm.iml27
-rw-r--r--.idea/modules.xml8
-rw-r--r--.idea/php.xml24
-rw-r--r--.idea/vcs.xml6
-rw-r--r--composer.json4
-rw-r--r--src/Manager/ScormManager.php2
7 files changed, 77 insertions, 2 deletions
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..73f69e0
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/.idea/laravel-scorm.iml b/.idea/laravel-scorm.iml
new file mode 100644
index 0000000..cc847a5
--- /dev/null
+++ b/.idea/laravel-scorm.iml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+ <component name="NewModuleRootManager">
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation-contracts" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/deprecation-contracts" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/collections" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/cache" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/annotations" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/lexer" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/event-manager" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/deprecations" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/common" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/nesbot/carbon" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/psr/cache" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/persistence" />
+ <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php80" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module> \ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..92ede4a
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/.idea/laravel-scorm.iml" filepath="$PROJECT_DIR$/.idea/laravel-scorm.iml" />
+ </modules>
+ </component>
+</project> \ No newline at end of file
diff --git a/.idea/php.xml b/.idea/php.xml
new file mode 100644
index 0000000..d2643c4
--- /dev/null
+++ b/.idea/php.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="PhpIncludePathManager">
+ <include_path>
+ <path value="$PROJECT_DIR$/vendor/symfony/translation-contracts" />
+ <path value="$PROJECT_DIR$/vendor/symfony/translation" />
+ <path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
+ <path value="$PROJECT_DIR$/vendor/symfony/deprecation-contracts" />
+ <path value="$PROJECT_DIR$/vendor/doctrine/collections" />
+ <path value="$PROJECT_DIR$/vendor/doctrine/cache" />
+ <path value="$PROJECT_DIR$/vendor/doctrine/annotations" />
+ <path value="$PROJECT_DIR$/vendor/doctrine/lexer" />
+ <path value="$PROJECT_DIR$/vendor/doctrine/event-manager" />
+ <path value="$PROJECT_DIR$/vendor/composer" />
+ <path value="$PROJECT_DIR$/vendor/doctrine/deprecations" />
+ <path value="$PROJECT_DIR$/vendor/doctrine/common" />
+ <path value="$PROJECT_DIR$/vendor/nesbot/carbon" />
+ <path value="$PROJECT_DIR$/vendor/psr/cache" />
+ <path value="$PROJECT_DIR$/vendor/doctrine/persistence" />
+ <path value="$PROJECT_DIR$/vendor/symfony/polyfill-php80" />
+ </include_path>
+ </component>
+ <component name="PhpProjectSharedConfiguration" php_language_level="7.4" />
+</project> \ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
+ </component>
+</project> \ No newline at end of file
diff --git a/composer.json b/composer.json
index 641d05a..7e69279 100644
--- a/composer.json
+++ b/composer.json
@@ -12,7 +12,9 @@
"require": {
"php": "^7.4 || ^8.0",
"doctrine/common": "^3.1",
- "nesbot/carbon": "^2.42"
+ "nesbot/carbon": "^2.42",
+ "ext-zip": "*",
+ "ext-dom": "*"
},
"autoload": {
"psr-4": {
diff --git a/src/Manager/ScormManager.php b/src/Manager/ScormManager.php
index 085284d..d4268c2 100644
--- a/src/Manager/ScormManager.php
+++ b/src/Manager/ScormManager.php
@@ -131,7 +131,7 @@ class ScormManager
$scormVersionElements = $dom->getElementsByTagName('schemaversion');
- if (1 === $scormVersionElements->length) {
+ if ($scormVersionElements->length > 0) {
switch ($scormVersionElements->item(0)->textContent) {
case '1.2':
$data['version'] = Scorm::SCORM_12;