[LP] [SCORM] change default behavior for LMS not to update SCO status if it has been set at least once by the SCO -refs BT#18955

pull/3932/head
NicoDucou 4 years ago
parent 345cb74052
commit 5360b2d12d
  1. 3
      main/install/configuration.dist.php
  2. 8
      main/lp/lp_ajax_save_item.php

@ -1512,6 +1512,9 @@ ALTER TABLE notification_event ADD COLUMN event_id INT NULL;
// In Scorm comunication use a specific extra field instead of the user_id
//$_configuration['scorm_api_extrafield_to_use_as_student_id'] = '';
// LMS will try to update SCO status every time the status is not sent by the SCO
//$_configuration['scorm_LMS_update_sco_status_all_time'] = false;
// Show online user only to Administrators
//$_configuration['whoisonline_only_for_admin'] = false;

@ -334,8 +334,12 @@ function save_item(
* However, the SCORM does not force the SCO to set the
* cmi.core.lesson_status. There is some additional requirements
* that must be adhered to successfully handle these cases:.
*/
if (!$statusIsSet && empty($status) && !$statusSignalReceived) {
*/
$LMSUpdateStatus = true;
if (!api_get_configuration_value('scorm_LMS_update_status_all_time') && $myLPI->get_status() !== "not attempted") {
$LMSUpdateStatus = false;
}
if (!$statusIsSet && empty($status) && !$statusSignalReceived && $LMSUpdateStatus) {
/**
* Upon initial launch the LMS should set the
* cmi.core.lesson_status to "not attempted".

Loading…
Cancel
Save