MDL-15859 [PATCH] Fixes for tests of '' on Oracle. Backport 1.8.

This commit is contained in:
piers
2008-08-20 23:15:21 +00:00
parent 1282d92329
commit e0260731dc
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -419,7 +419,7 @@ function scorm_grades($scormid) {
}
if (($scorm->grademethod % 10) == 0) { // GRADESCOES
if (!$return->maxgrade = count_records_select('scorm_scoes',"scorm='$scormid' AND launch<>''")) {
if (!$return->maxgrade = count_records_select('scorm_scoes',"scorm='$scormid' AND launch<>'".sql_empty()."'")) {
return NULL;
}
} else {
+2 -2
View File
@@ -40,7 +40,7 @@
if ($sco = scorm_get_sco($scoid)) {
if ($sco->launch == '') {
// Search for the next launchable sco
if ($scoes = get_records_select('scorm_scoes','scorm='.$scorm->id." AND launch<>'' AND id>".$sco->id,'id ASC')) {
if ($scoes = get_records_select('scorm_scoes','scorm='.$scorm->id." AND launch<>'".sql_empty()."' AND id>".$sco->id,'id ASC')) {
$sco = current($scoes);
}
}
@@ -50,7 +50,7 @@
// If no sco was found get the first of SCORM package
//
if (!isset($sco)) {
$scoes = get_records_select('scorm_scoes','scorm='.$scorm->id." AND launch<>''",'id ASC');
$scoes = get_records_select('scorm_scoes','scorm='.$scorm->id." AND launch<>'".sql_empty()."'",'id ASC');
$sco = current($scoes);
}
+2 -2
View File
@@ -468,7 +468,7 @@ function scorm_count_launchable($scormid,$organization='') {
if (!empty($organization)) {
$strorganization = " AND organization='$organization'";
}
return count_records_select('scorm_scoes',"scorm=$scormid$strorganization AND launch<>''");
return count_records_select('scorm_scoes',"scorm=$scormid$strorganization AND launch<>'".sql_empty()."'");
}
function scorm_get_last_attempt($scormid, $userid) {
@@ -625,7 +625,7 @@ function scorm_view_display ($user, $scorm, $action, $cm, $boxwidth='') {
function scorm_simple_play($scorm,$user) {
$result = false;
$scoes = get_records_select('scorm_scoes','scorm='.$scorm->id.' AND launch<>\'\'');
$scoes = get_records_select('scorm_scoes','scorm='.$scorm->id.' AND launch<>\''.sql_empty().'\'');
if (count($scoes) == 1) {
if ($scorm->skipview >= 1) {