Lectora Desktop 17 versus Lectora Online 4

Several contacts i got work with Lectora Online. Me, myself and I prefer Lectora Desktop 16 or 17. So now im trying to develop a generic setup that works flawlessly with both the desktop version and the online version. So i can develop in my desktop version...package it, and all should work 1-on-1 in the Online version.

Well, with most default options inside both Lectora versions it works without an issue. You can package stuff and get your courses into Online. When you use custom Javascript however, as i do a lot as many of you know... you run into trouble.

What issues are these and how to tackle them ?

For one, and thats a big one, the HTML-names of the desktop version are changed when packaging it to an online version. I dont know why Trivantis does that, but well they do.

Imagine you have a picture in L17 with a HTML-name of 'image12665'.

When you package that and import it into LO the HTML-name will change to 'tobj12665'

If you aint aware of that, none of your scripts will work anymore.

So in my Javascript i test for desktop or online like this, and use a pretext for the HTML-names...

something like this:

// to develop and use JS both in Lectora desktop and in Lectora Online

if(window.location.host == "lectoraonline.com"){

Lpre = "tobj";

}else{

Lpre = "image";

}

Then i can target my pageelements both in Lectora online and Lectora desktop the same way.

logoD1 = getDisplayDocument().getElementById(Lpre+"12665");

TweenMax.to(logoD1, 2.5, {scale:0.3,autoAlpha:1 ,ease:easeArray[4]});

When using this on a LMS, you probably need an extra check.

One other thing to notice is that LO actually allready has a version of JQuery embedded.

jquery-1.10.2.min.js is the version used. If you need a higher version make sure it is added.

One other thing i noticed is LO adds JS-scripts for each view....

device_Desktop/a001_chapter1_textpage.js

device_PhonePortrait/a001_chapter1_textpage.js

device_PhoneLandscape/a001_chapter1_textpage.js

this a short sample of the data in those javascript files ..

image12665.rcdData.att_Desktop =

{

innerHtml: "",

cssText: "visibility: inherit; position: absolute; left: 0px; top: 0px; width: 1009px; height: 662px; z-index: 2;",

cssClasses: "",

htmlId: "tobj12665",

bInsAnc: 0,

cwObj: {

"name": "ALL"

},

objData: {"a":[0,288,0,[0,0,1009,662]],"rcdOvr":{"res":0},"borderEffect":{"outline":0,"outlineColor":"#000000","borderWeight":0,"lineStyle":0,"borderColor":"#000000"},"rotateEffect":{"angle":0,"anchorX":50,"anchorY":50},"desktopRect":{"x":0,"y":0,"width":1009,"height":662}}

};

undefined

As you can see the HTML-id for the element is indeed renamed to 'tobj' whereas the original 'image' still is available. If any Trivantis developer can explain me why it is renamed to 'tobj' ?

And how i can access and edit those JS-files ? Or overwrite parts of it, to make either my PhonePortrait or whatever view do something exactly the way i want ?

Kind regards,

Math Notermans

Discussion (3)

Another difference i just discovered is the way Actiongroups are called inside Lectora Online.

In Lectora 16/17 you can use this to call an Actiongroup from Javascript:

runGroup_og80030(); // Runs an Actiongroup inside Lectora Desktop

This fails when packaging the Lectora 17 file...and your group never gets called.

In Lectora Online you need to convert this to the following syntax:

og80030.issueActions(1001); // Runs an Actiongroup inside Lectora Online

Although this is not too difficult to change, its not good that there aint no reference anywhere on the Trivantis site(s) to find these differences.

I use the desktop software as well and luckily have not needed to convert projects to an online version. Nevertheless, I feel your pain.

Thanks for posting this information; I'm sure it will come in handy some time in the future.

Maura

Most of the default stuff in Inspire will package as is fine to Online. If you use Javascript then it wont. Also be aware of HTML-names they change...

Discussions have been disabled for this post