ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilSCORM2004Sequencing.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
4
16require_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
17
18
20{
21
22
23// **********************
24// ATTRIBUTE DECLARATION
25// **********************
26
33var $choice = true;
34var $choiceExit = true;
36var $constrainChoice = false;
37var $seqNodeId = null;
38var $endTimeLimit = null ;
39var $flow = false;
40var $forwardOnly = false;
41var $id = 0;
45var $preventActivation = false;
46var $randomizationTiming = "never";
47var $reorderChildren = false;
48var $requiredForCompleted = "always";
49var $requiredForIncomplete = "always";
51var $requiredForSatisfied ="always";
54var $selectCount = 0;
55var $selectionTiming = false;
56var $sequencingId = null;
57var $tracked = true;
60var $importid = null;
61var $node = null;
62
63// **********************
64// CONSTRUCTOR METHOD
65// **********************
66
71function ilSCORM2004Sequencing($a_treeid = null,$a_rootlevel=false)
72{
73 parent::ilSCORM2004Item($a_treeid, $a_rootlevel);
74
75 if ($a_treeid != null) {
76 $xpath_obj = new DOMXPath($this->dom);
77 $obj_node_list = $xpath_obj->query('//controlMode');
78 $this->setNode($obj_node_list->item(0));
79 if ($obj_node_list->length!=1 ) {
80 $obj_con = $this->dom->createElement("controlMode");
81 $root = $this->dom->getElementsByTagName("sequencing")->item(0);
82 $root->appendChild($obj_con);
83 $this->node =$this->dom->getElementsByTagName("controlMode")->item(0);
84 $this->setFlow(true);
85 $this->setChoice(true);
86 $this->setForwardOnly(false);
87 }
88 }
89}
90
91
92// **********************
93// GETTER METHODS
94// **********************
95
96
98{
100}
101
103{
105}
106
108{
110}
111
113{
115}
116
118{
119 return $this->attemptLimit;
120}
121
123{
125}
126
127function getChoice()
128{
129 return self::convertStringToBool($this->node->getAttribute("choice"));
130}
131
133{
134 return self::convertStringToBool($this->node->getAttribute("choiceExit"));
135}
136
138{
140}
141
143{
145}
146
147function getSeqNodeId()
148{
149 return $this->seqNodeId;
150}
151
153{
154 return $this->endTimeLimit;
155}
156
157function getFlow()
158{
159 return self::convertStringToBool($this->node->getAttribute("flow"));
160}
161
163{
164 return self::convertStringToBool($this->node->getAttribute("forwardOnly"));
165}
166
167function getId()
168{
169return $this->id;
170}
171
173{
175}
176
178{
180}
181
183{
185}
186
188{
190}
191
193{
195}
196
198{
200}
201
203{
205}
206
208{
210}
211
213{
215}
216
218{
220}
221
223{
225}
226
228{
230}
231
233{
234 return $this->selectCount;
235}
236
238{
240}
241
243{
244 return $this->sequencingId;
245}
246
247function getTracked()
248{
249 return $this->tracked;
250}
251
253{
255}
256
258{
260}
261
262// **********************
263// SETTER METHODS
264// **********************
265
266
268{
269 $this->activityAbsoluteDurationLimit = $val;
270}
271
273{
274 $this->activityExperiencedDurationLimit = $val;
275}
276
278{
279 $this->attemptAbsoluteDurationLimit = $val;
280}
281
283{
284 $this->attemptExperiencedDurationLimit = $val;
285}
286
287function setAttemptLimit($val)
288{
289 $this->attemptLimit = $val;
290}
291
292function setBeginTimeLimit($val)
293{
294 $this->beginTimeLimit = $val;
295}
296
297function setChoice($a_choice)
298{
299 $this->node->setAttribute("choice",$a_choice ? "true": "false");
300}
301
302function setChoiceExit($a_choicexit)
303{
304 $this->node->setAttribute("choiceExit",$a_choicexit ? "true": "false");
305}
306
308{
309 $this->completionSetByContent = $val;
310}
311
312function setConstrainChoice($val)
313{
314 $this->constrainChoice = $val;
315}
316
317function setSeqNodeId($a_seqnodeid)
318{
319 $this->seqNodeId = $a_seqnodeid;
320}
321
322function setEndTimeLimit($val)
323{
324 $this->endTimeLimit = $val;
325}
326
327function setFlow($a_flow)
328{
329 $this->node->setAttribute("flow",$a_flow ? "true": "false");
330}
331
332function setForwardOnly($a_forwardonly)
333{
334 $this->node->setAttribute("forwardOnly",$a_forwardonly ? "true": "false");
335}
336
337function setId($val)
338{
339 $this->id = $val;
340}
341
343{
344 $this->measureSatisfactionIfActive = $val;
345}
346
348{
349 $this->objectiveMeasureWeight = $val;
350}
351
353{
354 $this->objectiveSetByContent = $val;
355}
356
358{
359 $this->preventActivation = $val;
360}
361
363{
364 $this->randomizationTiming = $val;
365}
366
367function setReorderChildren($val)
368{
369 $this->reorderChildren = $val;
370}
371
373{
374 $this->requiredForCompleted = $val;
375}
376
378{
379 $this->requiredForIncomplete = $val;
380}
381
383{
384 $this->requiredForNotSatisfied = $val;
385}
386
388{
389 $this->requiredForSatisfied = $val;
390}
391
393{
394 $this->rollupObjectiveSatisfied = $val;
395}
396
398{
399 $this->rollupProgressCompletion = $val;
400}
401
402function setSelectCount($val)
403{
404 $this->selectCount = $val;
405}
406
407function setSelectionTiming($val)
408{
409 $this->selectionTiming = $val;
410}
411
412function setSequencingId($val)
413{
414 $this->sequencingId = $val;
415}
416
417function setTracked($val)
418{
419 $this->tracked = $val;
420}
421
423{
424 $this->useCurrentAttemptObjectiveInfo = $val;
425}
426
428{
429 $this->useCurrentAttemptProgressInfo = $val;
430}
431
432
433public function setImportid($a_importid)
434{
435 $this->importid = $a_importid;
436}
437
438
439public function setNode($a_node)
440{
441 $this->node = $a_node;
442}
443
444public function setDom($a_dom)
445{
446 $this->dom = $a_dom;
447}
448
449//helper
450private static function convertStringToBool($a_string){
451 switch ($a_string) {
452 case 'true':
453 return true;
454 break;
455
456 case 'false':
457 return false;
458 break;
459
460 default:
461 # code...
462 break;
463 }
464}
465
466
467} // class : end
468
469?>
Class ilSCORM2004Condition.
Class ilSCORM2004Sequencing.
ilSCORM2004Sequencing($a_treeid=null, $a_rootlevel=false)
Constructor @access public.