Project

General

Profile

Bug #2471 » scorm-sequencing.patch

Goulwen Reboux, 03/02/2011 11:09

View differences:

application/weblcms/tool/learning_path/resources/javascript/scorm/chamilo_api.js Wed Feb 02 15:33:21 2011 +0100 → application/weblcms/tool/learning_path/resources/javascript/scorm/chamilo_api.js Wed Feb 02 17:18:18 2011 +0100
91 91
	{
92 92
		url = previous_url;
93 93
	}
94
	
95
	var re = new RegExp('{target=.*}choice');
96
	if(request.match(re))
97
	{
98
		var re = new RegExp('{.*}');
99
		var m = re.exec(request);
100
		var identifier = m[0];
101
		identifier = identifier.substr(8, identifier.length - 9);
102
		url = jump_urls[identifier];
103
	 }
94 104

  
95
	 var re = new RegExp('{target=.*}jump');
96
	 if(request.match(re))
97
	 {
98
		 var re = new RegExp('{.*}');
99
		 var m = re.exec(request);
100
		 var identifier = m[0];
101
		 identifier = identifier.substr(8, identifier.length - 9);
102
		 url = jump_urls[identifier];
103
	 }
105
	var re = new RegExp('{target=.*}jump');
106
	if(request.match(re))
107
	{
108
		var re = new RegExp('{.*}');
109
		var m = re.exec(request);
110
		var identifier = m[0];
111
		identifier = identifier.substr(8, identifier.length - 9);
112
		url = jump_urls[identifier];
113
	}
104 114
	
105 115
	if(url)
106 116
	{
......
145 155

  
146 156
function check_for_special_requests(variable)
147 157
{
148
	console.log('ON PASSE DEDANS CHECK SPECIAL REQUEST') ;
149 158
	 if(variable == "adl.nav.request_valid.continue")
150 159
	 {
151 160
		 if (continue_url != null)
repository/content_object/learning_path/php/display/content_object_display/scorm_item.class.php Wed Feb 02 15:33:21 2011 +0100 → repository/content_object/learning_path/php/display/content_object_display/scorm_item.class.php Wed Feb 02 17:18:18 2011 +0100
27 27
            $html[] = 'var previous_url = "' . $previous_url . '";';
28 28
            
29 29
            $html[] = 'var jump_urls = new Array();';
30
            
31 30
            foreach ($jump_urls as $identifier => $jump_url)
32 31
            {
33
                $html[] = 'jump_urls["' . $identifier . '"] = "' . $jump_urls . '";';
32
                $html[] = 'jump_urls["' . $identifier . '"] = "' . $jump_url . '";';
34 33
            }
35 34
            
36 35
            $html[] = '</script>';
repository/content_object/learning_path/php/display/learning_path_tree.class.php Wed Feb 02 15:33:21 2011 +0100 → repository/content_object/learning_path/php/display/learning_path_tree.class.php Wed Feb 02 17:18:18 2011 +0100
168 168
            }
169 169
            else
170 170
            {
171

  
172 171
                $this->step_urls[$this->step] = $this->get_url($this->step);
173 172
                $status = 'enabled';
174

  
175
                if ($lo instanceof ScormItem)
173
                
174
                // in PHP5.3, getInstance returns the fully namespaced name so 
175
                // we need this little hack
176
                if (strpos(get_class($lo), 'ScormItem') !== FALSE)
176 177
                {
178
                    // Why the veresion is SCORM1  ==> in the DB ==> at import???
177 179
                    if ($this->lp->get_version() == 'SCORM2004')
178 180
                    {
179 181
                        $this->jump_urls[$lo->get_identifier()] = $this->step_urls[$this->step];
(5-5/5)