1. Goulwen Reboux
  2. chamilo

Commits

Goulwen Reboux  committed cec6d6d

Support of SCORM2004 sequencing debugged.

  • Participants
  • Parent commits 523c307
  • Branches goulwen

Comments (0)

Files changed (3)

File application/weblcms/tool/learning_path/resources/javascript/scorm/chamilo_api.js

View file
  • Ignore whitespace
 	{
 		url = previous_url;
 	}
+	
+	var re = new RegExp('{target=.*}choice');
+	if(request.match(re))
+	{
+		var re = new RegExp('{.*}');
+		var m = re.exec(request);
+		var identifier = m[0];
+		identifier = identifier.substr(8, identifier.length - 9);
+		url = jump_urls[identifier];
+	 }
 
-	 var re = new RegExp('{target=.*}jump');
-	 if(request.match(re))
-	 {
-		 var re = new RegExp('{.*}');
-		 var m = re.exec(request);
-		 var identifier = m[0];
-		 identifier = identifier.substr(8, identifier.length - 9);
-		 url = jump_urls[identifier];
-	 }
+	var re = new RegExp('{target=.*}jump');
+	if(request.match(re))
+	{
+		var re = new RegExp('{.*}');
+		var m = re.exec(request);
+		var identifier = m[0];
+		identifier = identifier.substr(8, identifier.length - 9);
+		url = jump_urls[identifier];
+	}
 	
 	if(url)
 	{
 
 function check_for_special_requests(variable)
 {
-	console.log('ON PASSE DEDANS CHECK SPECIAL REQUEST') ;
 	 if(variable == "adl.nav.request_valid.continue")
 	 {
 		 if (continue_url != null)

File repository/content_object/learning_path/php/display/content_object_display/scorm_item.class.php

View file
  • Ignore whitespace
             $html[] = 'var previous_url = "' . $previous_url . '";';
             
             $html[] = 'var jump_urls = new Array();';
-            
             foreach ($jump_urls as $identifier => $jump_url)
             {
-                $html[] = 'jump_urls["' . $identifier . '"] = "' . $jump_urls . '";';
+                $html[] = 'jump_urls["' . $identifier . '"] = "' . $jump_url . '";';
             }
             
             $html[] = '</script>';

File repository/content_object/learning_path/php/display/learning_path_tree.class.php

View file
  • Ignore whitespace
             }
             else
             {
-
                 $this->step_urls[$this->step] = $this->get_url($this->step);
                 $status = 'enabled';
-
-                if ($lo instanceof ScormItem)
+                
+                // in PHP5.3, getInstance returns the fully namespaced name so 
+                // we need this little hack
+                if (strpos(get_class($lo), 'ScormItem') !== FALSE)
                 {
+                    // Why the veresion is SCORM1  ==> in the DB ==> at import???
                     if ($this->lp->get_version() == 'SCORM2004')
                     {
                         $this->jump_urls[$lo->get_identifier()] = $this->step_urls[$this->step];