Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 146... Línea 146...
146
            default:
146
            default:
147
                $status = COMPLETION_INCOMPLETE;
147
                $status = COMPLETION_INCOMPLETE;
148
                break;
148
                break;
149
        }
149
        }
Línea 150... Línea -...
150
 
-
 
151
        // If not yet meeting the requirement and no attempts remain to complete it, mark it as failed.
-
 
152
        if ($status === COMPLETION_INCOMPLETE) {
-
 
153
            $scorm = $DB->get_record('scorm', ['id' => $this->cm->instance]);
-
 
154
            $attemptcount = scorm_get_attempt_count($this->userid, $scorm);
-
 
155
 
-
 
156
            if ($scorm->maxattempt > 0 && $attemptcount >= $scorm->maxattempt) {
-
 
157
                $status = COMPLETION_COMPLETE_FAIL;
-
 
158
            }
-
 
159
        }
-
 
160
 
150
 
161
        return $status;
151
        return $status;
Línea 162... Línea 152...
162
    }
152
    }
163
 
153
 
Línea 215... Línea 205...
215
            'completionpassgrade',
205
            'completionpassgrade',
216
            'completionscorerequired',
206
            'completionscorerequired',
217
        ];
207
        ];
218
    }
208
    }
219
}
209
}
220
 
-