
mgnl-resources.mgnllms.js.at2.diff Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openutils-mgnllms Show documentation
Show all versions of openutils-mgnllms Show documentation
A module for Magnolia CMS to build a simple Learning Management System.
The newest version!
Index: ActivityTree.js
===================================================================
--- ActivityTree.js (revisione 3419)
+++ ActivityTree.js (copia locale)
@@ -129,7 +129,7 @@
*/
/* Continue Sequencing Request Process [SB.2.7] */
- continueSequencingRequestProcess: function() {
+ continueSequencingRequestProcess: function(target,dontTerminate) {
/*
* The Continue Sequencing Request Subprocess assumes the current
@@ -145,8 +145,9 @@
if (this.current!=this.root) /* 2 */
if (!this.current.owner.getControlMode().flow) /* 2.1 */
return {activity: null, exception: "SB.2.7-2"};
- var fsp = this.flowSubprocess(this.current, "forward", false); /* 3 */
- if (fsp.deliverable == false){
+ var fsp = this.flowSubprocess(this.current, "forward", false, dontTerminate); /* 3 */
+ //if (fsp.deliverable == false){
+ if (fsp.activity == false){
return {activity: null, endSs: fsp.endSs, exception: fsp.exception};
}else {
return {activity: fsp.activity, exception: null};
@@ -154,14 +155,14 @@
},
/* Previous Sequencing Request Process [SB.2.8] */
- previousSequencingRequestProcess: function() {
+ previousSequencingRequestProcess: function(target,dontTerminate) {
if (!this.current) /* 1 */
return {activity: null, exception: "SB.2.8-1"};
if (this.current!=this.root) /* 2 */
if (this.current.owner.getControlMode().flow == false) /* 2.1 */
return {activity: null, exception: "SB.2.8-2"};
var fsp = this.flowSubprocess(this.current, "backward", false); /* 3 */
- if (fsp.deliverable == false){
+ if (fsp.deliverable==false){
return {activity: null, exception: fsp.exception};
}else {
return {activity: fsp.activity, exception: null};
@@ -180,7 +181,7 @@
/* 3 */
}else{
var fs = this.flowSubprocess(this.root,'forward',true);
- if (!fs.deliverable){
+ if (fs.activity==null){
return{
activity: null,
endSs: fs.endSs,
@@ -199,6 +200,7 @@
choiceSequencingRequestProcess: function(target,dontTerminate){
var temp = {activity: null, exception: null}
var traverse;
+
if (!target){
temp.exception = 'SB.2.9-1';
return temp;
@@ -243,23 +245,23 @@
}
/* 7 */
if (this.current == target){
-
+
}else
/* 8 */
if(this.current && this.current.owner == target.owner){
- var s = this.preorder.indexOf(this.current);
- var e = this.preorder.indexOf(target);
+ var s = this.current.owner.nodes.indexOf(this.current);
+ var e = this.current.owner.nodes.indexOf(target);
var actPath = new Array();
if (e>s) {
- actPath = this.preorder.slice(s,e+1);
+ actPath = this.current.owner.nodes.slice(s,e+1);
}else{
- actPath = this.preorder.slice(e+1,s+1).reverse();
+ actPath = this.current.owner.nodes.slice(e+1,s+1).reverse();
}
if (actPath.length == 0){
- temp.exception = 'SB.2.9-4';
+ temp.exception = 'SB.2.9-5';
return temp;
}
- if (e>s){
+ if (this.preorderFull.indexOf(target)>this.preorderFull.indexOf(this.current)){
traverse = 'forward';
}else{
traverse = 'backward';
@@ -321,16 +323,33 @@
i++
}while(i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy