Fixed a problem with packages validation and PHP5

This commit is contained in:
bobopinna
2004-12-02 10:41:43 +00:00
parent 9fba045d1a
commit 04c39c8ded
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
<?php
unset($choices);
$choices[""] = get_string("none");
if (extension_loaded('domxml')) {
if (extension_loaded('domxml') && version_compare(phpversion(),"5.0.0","<")) {
$choices["domxml"] = get_string("domxml","scorm");
}
if (version_compare(phpversion(),"5.0.0",">=")) {
+1 -1
View File
@@ -21,7 +21,7 @@ if (!isset($CFG->scorm_validate)) {
$scorm_validate = 'none';
//I've commented this out for Moodle 1.4, as I've seen errors in
//SCORM packages even though the actual package worked fine. -- Martin Dougiamas
//if (extension_loaded('domxml')) {
//if (extension_loaded('domxml') && version_compare(phpversion(),'5.0.0','<')) {
// $scorm_validate = 'domxml';
//}
//if (version_compare(phpversion(),'5.0.0','>=')) {
+5
View File
@@ -149,6 +149,11 @@
} else {
echo " <img src=\"pix/spacer.gif\" />\n";
}
print_r ($sco->title);
if ($sco->title == "") {
$sco->title = get_string('notitle','scorm');
echo '-'.$sco->title.'-';
}
if ($sco->launch) {
$score = "";
if ($sco_user=get_record("scorm_sco_users","scoid",$sco->id,"userid",$USER->id)) {