Inicio › Forums › Desarrolladores / Desenvolupadors / Garatzaileak / Desenvolvedores / Developers › Javascript -> Add Page / Structure / Content
This topic contains 10 respuestas, has 2 voices, and was last updated by Anónimo Hace 4 años, 1 mes.
-
AuthorEntradas
-
14 enero, 2020 at 19:47 #32707
AnónimoHello. I am working with hundreds of courses that need to be updated regularly and it is taking a huge amount of time to copy and paste each section of the book into eXe.
I would like to build the eXe course automatically using Javascript. I will actually run an automation script in the console with eXe open and it will build the course, section by section.
Scraping the data from my course and formatting it into an array is no problem.. the real issue comes when I want to create the eXe course structure (the Ext.grid.tree treeview) and add content to the course.
So here are my questions:
- Using javascript, how can I add a new page to my eXe project?
- Using javascript, how can I promote or demote that page in the treeview heirarchy? For example I want to change it from a “Unit” to a “Chapter”.
- Using javascript, how can I create a text iDevice on the specified page, and insert a string into that iDevice?
-
16 enero, 2020 at 9:54 #32735
Hi,
There are no defined methods to do those things out of eXe. You could trigger the click event of the different elements to do so, but you’ll have to open each elp anyway…
Changing the contentv3.xml file of the elp file might be easier. Making big changes might be quite difficult, but it should work if you do them properly.
Yo can create a SCRIPT to do that in any server language. If you use Python, you might want to check exe_do (using eXe through command line), but those options are not implemented. Please share your code if you find a good solution…
Thanks.
-
11 noviembre, 2020 at 16:18 #36269
AnónimoWell it is far from a perfect solution, but I have developed this userscript for eXe 2.5 which is called cBuilder 0.12.1. There is an accompanying script called cScraper which can scrape an HTML file (assuming, for example, that you converted a MS Word file to HTML and set all headings as H1, H2, etc) and produces output in the form of two arrays that you can save into your cScraper script. Note: The cScraper script must be modified and setup before it can build a particular course – you must change the @match line as well as add in the course data arrays myStructure and myStructureText.
We are still working on both improving cBuilder (it just barely works) as well as developing a new method of automating course creation in line with Ignacio’s suggestion where we simply generate the output of eXe on our own without using the eXe web interface at all. That being said, even this early rudimentary automation script has saved my team hundreds if not thousands of labor hours.
To get it to work, you need to save an eXe project in Advanced Mode and then change this line to match that name:
// @match http://localhost:51235/SAMPLE_COURSE
For example, if your elp was saved as “DOGS_ARE_AWESOME” then the line above would read:
// @match http://localhost:51235/DOGS_ARE_AWESOME
Next you simply add the script to Greasemonkey (firefox add-on) or Tampermonkey (Chrome add-on) and enable it. Save and refresh your elp in the eXe web editor and the automation script should activate automatically.
There are a few known issues and limitations.. cBuilder does not recognize the hierarchical structure of courses and instead promotes each unit at the “Chapter” level – this is actually due to a limitation in the LMS that we use. For now please report any issues or improvements in this thread and do give credit if you use this in your own project. Also feel free to reach out to me if you have any questions about the script.
See attached file(s).
-
11 noviembre, 2020 at 16:37 #36274
AnónimoWell it is far from a perfect solution, but I have developed this userscript for eXe 2.5 which is called cBuilder 0.12.1. There is an accompanying script called cScraper which can scrape an HTML file (assuming, for example, that you converted a MS Word file to HTML and set all headings as H1, H2, etc) and produces output in the form of two arrays that you can save into your cScraper script. Note: The cScraper script must be modified and setup before it can build a particular course – you must change the @match line as well as add in the course data arrays myStructure and myStructureText.
We are still working on both improving cBuilder (it just barely works) as well as developing a new method of automating course creation in line with Ignacio’s suggestion where we simply generate the output of eXe on our own without using the eXe web interface at all. That being said, even this early rudimentary automation script has saved my team hundreds if not thousands of labor hours.
To get it to work, you need to save an eXe project in Advanced Mode and then change this line to match that name:
// @match http://localhost:51235/SAMPLE_COURSE
For example, if your elp was saved as “DOGS_ARE_AWESOME” then the line above would read:
// @match http://localhost:51235/DOGS_ARE_AWESOME
Next you simply add the script to Greasemonkey (firefox add-on) or Tampermonkey (Chrome add-on) and enable it. Save and refresh your elp in the eXe web editor and the automation script should activate automatically.
There are a few known issues and limitations.. cBuilder does not recognize the hierarchical structure of courses and instead promotes each unit at the “Chapter” level – this is actually due to a limitation in the LMS that we use. For now please report any issues or improvements in this thread and do give credit if you use this in your own project. Also feel free to reach out to me if you have any questions about the script.
See attached files.
Archivos adjuntos:
You must be logged in to view attached files. -
11 noviembre, 2020 at 16:38 #36277
AnónimoWell it is far from a perfect solution, but I have developed this userscript for eXe 2.5 which is called cBuilder 0.12.1. There is an accompanying script called cScraper which can scrape an HTML file (assuming, for example, that you converted a MS Word file to HTML and set all headings as H1, H2, etc) and produces output in the form of two arrays that you can save into your cBuilder script. Note: The cBuilder script must be modified and setup before it can build a particular course – you must change the @match line as well as add in the course data arrays myStructure and myStructureText.
We are still working on both improving cBuilder (it just barely works) as well as developing a new method of automating course creation in line with Ignacio’s suggestion where we simply generate the output of eXe on our own without using the eXe web interface at all. That being said, even this early rudimentary automation script has saved my team hundreds if not thousands of labor hours.
To get it to work, you need to save an eXe project in Advanced Mode and then change this line to match that name:
// @match http://localhost:51235/SAMPLE_COURSE
For example, if your elp was saved as “DOGS_ARE_AWESOME” then the line above would read:
// @match http://localhost:51235/DOGS_ARE_AWESOME
Next you simply add the script to Greasemonkey (firefox add-on) or Tampermonkey (Chrome add-on) and enable it. Save and refresh your elp in the eXe web editor and the automation script should activate automatically.
There are a few known issues and limitations.. cBuilder does not recognize the hierarchical structure of courses and instead promotes each unit at the “Chapter” level – this is actually due to a limitation in the LMS that we use. For now please report any issues or improvements in this thread and do give credit if you use this in your own project. Also feel free to reach out to me if you have any questions about the script.
See attached files.
Edit: I am having some trouble posting my reply.. it keep disappearing. -
11 noviembre, 2020 at 16:40 #36279
AnónimoDisregard this reply.
(Please delete this extra reply) -
11 noviembre, 2020 at 16:48 #36287
AnónimoWell it is far from a perfect solution, but I have developed this userscript for eXe 2.5 which is called cBuilder 0.12.1. There is an accompanying script called cScraper which can scrape an HTML file (assuming, for example, that you converted a MS Word file to HTML and set all headings as H1, H2, etc) and produces output in the form of two arrays that you can save into your cBuilder script. Note: The cBuilder script must be modified and setup before it can build a particular course – you must change the @match line as well as add in the course data arrays myStructure and myStructureText.
We are still working on both improving cBuilder (it just barely works) as well as developing a new method of automating course creation in line with Ignacio’s suggestion where we simply generate the output of eXe on our own without using the eXe web interface at all. That being said, even this early rudimentary automation script has saved my team hundreds if not thousands of labor hours.
To get it to work, you need to save an eXe project in Advanced Mode and then change this line to match that name:
// @match http://localhost:51235/SAMPLE_COURSE
For example, if your elp was saved as “DOGS_ARE_AWESOME” then the line above would read:
// @match http://localhost:51235/DOGS_ARE_AWESOME
Next you simply add the script to Greasemonkey (firefox add-on) or Tampermonkey (Chrome add-on) and enable it. Save and refresh your elp in the eXe web editor and the automation script should activate automatically.
There are a few known issues and limitations.. cBuilder does not recognize the hierarchical structure of courses and instead promotes each unit at the “Chapter” level – this is actually due to a limitation in the LMS that we use. For now please report any issues or improvements in this thread and do give credit if you use this in your own project. Also feel free to reach out to me if you have any questions about the script.
I have also attached the accompanying cScraper 0.1.5 script mentioned above. This one isn’t a userscript, you simply paste it into the console in your web browser after converting your entire course to a single HTML file.
See attached files.
-
12 noviembre, 2020 at 14:13 #36317
Hi @gregoryn,
Thank you for sharing the scripts.
Sorry, but I couldn’t make them work. Maybe I’m doing something wrong or I just didn’t understand their objective. Could you provide a short video to see them working? Thank you very much! -
12 noviembre, 2020 at 18:18 #36319
AnónimoThe objective is to automatically build an eXe course out of an existing document.
In my case we have a course book in the form of an MS Word document. We save the MS Word document as HTML and then open that HTML file in our web browser and paste in the cScraper script. cScraper returns its output which are two variables consisting of all of the contents of the book in the form of two arrays which can be plugged into the cBuilder script so that it can convert the book into an eXe course.
We then setup and run the cBuilder script which automatically builds the entire course in eXe.
I created a video/turorial going over this process which may be easier to understand:
https://youtu.be/nkWAeSaz580(I apologize that the screen ended up a bit cut off.)
(At the time of posting, the video is still processing but it should be available soon.) -
13 noviembre, 2020 at 16:30 #36352
Yes! Word to HTML. HTML to elp.
It’s a great start for a better HTML import.
eXe’s code will be renewed in the near future. There’s still no date, and it won’t be in less than a year. I guess you’d like to know that before improving your solution.
Good idea! Thank you!
-
13 noviembre, 2020 at 17:11 #36355
AnónimoIf you like that I would also like to show you some of the various mod scripts I have made to extend some features of eXe to meet our requirements. For example we made a script to add features to the SCORM QUIZ iDevice, such as:
– Do not let the user go on until they achieve a passing score.
– Display Feedback for each question after the user submits the review quiz (correct feedback in green and incorrect feedback in red).
– Ask the user a set number of questions from a question bank (for example, display 4 out of 10 questions).
– Shuffle the order of questions.And another which is simpler.. it displays a countdown timer for the user and will not allow the user to advance until the timer reaches zero. The countdown time for an individual unit can either be determined automatically based on the word count or manually set to a specific duration.
I will probably create a GitHub sooner or later to put some of this stuff on.
-
AuthorEntradas
You must be logged in to reply to this topic.