obj-course.js
Summary
No overview generated for 'obj-course.js'
function Course(p) {
this.objname = "course";
this.par = p;
this.title = "";
this.subtitle = "";
this.lang = "";
this.oid = null;
this.chapters = new Array();
this.chaptersID = new Array();
}
Course.prototype.getData = function() {
sendCommand("coursedata");
}
Course.prototype.setData = function(d) {
var darray = d.split("<#>");
for (i=0; i<darray.length; i++) {
eval(darray[i]);
}
this.dump();
eventobj.eventprop = "courseready";
}
Course.prototype.getChapterByID = function(i) {
var r = this.chaptersID[i];
return r;
}
Course.prototype.dump = function() {
var d = "Course Dump\n";
d += "\tthis.objname: "+this.objname+"\n";
d += "\tthis.oid: "+this.oid+"\n";
d += "\tthis.par: "+this.par+"\n";
d += "\tthis.title: "+this.title+"\n";
d += "\tthis.subtitle: "+this.subtitle+"\n";
d += "\tthis.lang: "+this.lang+"\n";
for (i=0; i<this.chapters.length; i++) {
d += "\t\tchapter.oid: "+this.chapters[i].oid+"\n";
for (j=0; j<this.chapters[i].sections.length; j++) {
d += "\t\t\tsection.oid: "+this.chapters[i].sections[j].oid+"\n";
for (k=0; k<this.chapters[i].sections[j].topics.length; k++) {
d += "\t\t\t\ttopic.oid: "+this.chapters[i].sections[j].topics[k].oid+"\n";
for (l=0; l<this.chapters[i].sections[j].topics[k].pages.length; l++) {
d += "\t\t\t\t\tpage.oid: "+this.chapters[i].sections[j].topics[k].pages[l].oid+"\n";
d += "\t\t\t\t\tmedia.oid: "+this.chapters[i].sections[j].topics[k].pages[l].media.filtertype+"\n";
}
}
}
}
dump(d);
}
Documentation generated by
JSDoc on Tue Mar 4 12:01:48 2008