Project

General

Profile

« Previous | Next » 

Revision 3019

Added by Samuel MONSARRAT 6 months ago

Debug gen SCORM

View differences:

branches/4.5-sc50/model/sources/dkTraining/genScorm/svc/scorm.uiservice
3 3
	<sm:physicalStorageLayer>
4 4
		<sm:scorm12/>
5 5
		<sm:scorm2k4/>
6
		<sm:html5StorageApi/>
7 6
	</sm:physicalStorageLayer>
8 7
	<sm:logicalStorageLayer>
9 8
		<sm:suspendDataStorage/>
......
12 11
		</sm:locationStorage>
13 12
		<sm:completionStorage storeProgression="yes"/>
14 13
		<sm:exitModeStorage>
15
			<sm:sessionTime/>
14
			<sm:sessionTime>
15
				<sm:addTriggerInTemplates codeTemplates="tutorial eval"/>
16
			</sm:sessionTime>
16 17
			<sm:exitStatus/>
17 18
		</sm:exitModeStorage>
18 19
	</sm:logicalStorageLayer>
branches/4.5-sc50/model/sources/dkTraining/genScorm/svc/scormConf.uiservice
1
<?xml version="1.0" encoding="UTF-8"?>
2
<sm:freeUiService code="scormConf" xmlns:sc="http://www.utc.fr/ics/scenari/v3/core" xmlns:sm="http://www.utc.fr/ics/scenari/v3/modeling">
3
	<sm:scriptAfterLinksForDeclaringService>// Paramétrage du service completionStorage :
1
<?xml version="1.0"?>
2
<sm:freeUiService xmlns:sm="http://www.utc.fr/ics/scenari/v3/modeling" code="scormConf">
3
	<sm:scriptAfterLinksForDeclaringService xml:space="preserve">// Paramétrage du service completionStorage :
4 4
//   - pas de commit auto sur un changement de valeur
5 5
scServices.completionStorage._SendDataOnSave = false;
6 6

  
7
// - Complétion gérée par le service &quot;markedPages&quot;
7
// - Complétion gérée par le service "markedPages"
8 8
scServices.completionStorage.getCurrentCompletionStatus = function(){
9
	return scServices.completionStorage.getSavedCompletionStatus()==&quot;completed&quot; ? &quot;completed&quot; : &quot;incomplete&quot;;
9
	return scServices.completionStorage.getSavedCompletionStatus()=="completed" ? "completed" : "incomplete";
10 10
}
11 11
// - Pas de surcharge de current progression
12
// scServices.completionStorage.getCurrentProgression = function(){}
12
scServices.completionStorage.getCurrentProgression = function(){}
13 13

  
14 14
// Paramétrage du service exitModeStorage:
15 15
//   - pas de commit auto sur un changement de valeur
16
scServices.exitModeStorage._SendDataOnSet = false;
16 17
scServices.exitModeStorage._SendDataOnTerminate = false;
17
//   - exit : &quot;suspend&quot; tant que l'utilisateur n'a pas cliqué sur terminé, et &quot;&quot; (terminé) quand l'utilisateur a cliqué
18
//   - exit : "suspend" tant que l'utilisateur n'a pas fini tout le module, et "" (terminé) quand l'utilisateur a tout vu.
18 19
scServices.exitModeStorage.getExitMode = function(){
19
	return scServices.completionStorage.getCurrentCompletionStatus()==&quot;completed&quot; ? &quot;&quot; : &quot;suspend&quot; ;
20
	return scServices.completionStorage.getCurrentCompletionStatus()=="completed" ? "" : "suspend" ;
20 21
}
21 22

  
22 23
// Paramétrage duservice suspendDataStorage :
branches/4.5-sc50/model/sources/dkTraining/genScorm/transf/root/tutorialRoot@genExtras.transf
1
<?xml version="1.0"?>
2
<sm:compositionXhtmlTransf xmlns:sm="http://www.utc.fr/ics/scenari/v3/modeling" xmlns:sc="http://www.utc.fr/ics/scenari/v3/core" xmlns="http://www.w3.org/1999/xhtml">
3
	<sm:model sc:refUri="/dkTraining/model/root/tutorialRoot.model"/>
4
	<sm:axis code="genExtras"/>
5
	<sm:content format="xhtml">
6
		<sm:callModel>
7
			<sm:root axis="optStats"/>
8
		</sm:callModel>
9
		<sm:WFreeBlock>
10
			<!--<comment xmlns="scenari.eu:comment:1.0" type="thread"><comment creationTime="1584962934749">Commit scorm lors de la fermeture des pages</comment></comment>-->
11
			<script>scOnUnloads[scOnUnloads.length] = {
12
	onUnload: function() {
13
		if(scServices.scorm2k4 &amp;&amp; scServices.scorm2k4.isScorm2k4Active()) {
14
			scServices.scorm2k4.getScorm2k4API().Commit("");
15
		} else if(scServices.scorm12 &amp;&amp; scServices.scorm12.isScorm12Active()) {
16
			scServices.scorm12.getScorm12API().LMSCommit("");
17
		}
18
	}
19
}</script>
20
		</sm:WFreeBlock>
21
	</sm:content>
22
</sm:compositionXhtmlTransf>
branches/4.5-sc50/model/sources/dkTraining/genScorm/transf/root.transflist
2 2
<sm:transformerList xmlns:sm="http://www.utc.fr/ics/scenari/v3/modeling" xmlns:sc="http://www.utc.fr/ics/scenari/v3/core">
3 3
	<sm:transformer sc:refUri="/dkTraining/genScorm/transf/root/tutorialRoot@cam.transf"/>
4 4
	<sm:transformer sc:refUri="/dkTraining/genScorm/transf/root/tutorialRoot@extraButtons.transf"/>
5
	<sm:transformer sc:refUri="/dkTraining/genScorm/transf/root/tutorialRoot@genExtras.transf"/>
5 6
</sm:transformerList>

Also available in: Unified diff