en_bcv_parser and you.js directly in the page.

en_bcv_parser and you.js directly in the page.

by john attwood -
Number of replies: 2

If you look at https://test.iteechu.org/reflib/vsfembed.htmI even go further – that page embeds both en_bcv_parser and you.js directly in the page.

I was trying to make an “all in one” page that I could put in moodle and see if the script were actually part of the lesson if it would make the transfer over to mobile before I invested time into learning how to write a mobile module.  But our installs of moodle will not let me copy/paste the contents of this linked page – they throw errors about writing to the database, size, and all kinds of crap.

Any ideas, gentlemen?  This is not a large page – total lines are a few hundred even with the scripts and it is only about 250K (should not be tripping mysql block limits or things like that).  The scripts DO use UTF-8 special characters to display stuff for hindi and other 3 and 4-byte languages but MySQL is using UTF8MB4-Unicode for the moodle database just for that reason.

I’m having a GRRRR  moment because Moodle’s design choices are just making this absolutely miserable.  I know lots of people use javascript heavily to control look and feel of their content.  We are NOT the only ones using javascript within courses.  How in the world do they do it?

This is not me but a developer I'm working with. 

Average of ratings: -
In reply to john attwood

Re: en_bcv_parser and you.js directly in the page.

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Its clear that you want to put the page you linked to inside Moodle. But Its not clear what you are doing to make that happen. And its not clear what errors or issues you are running into. 

Are you hacking an existing PHP moodle file? Which one? 

Are you just copying and pasting a bunch of code into an HTML editor field? Where? ... Probably not going to work because Moodle works hard to remove scripts from user generated content.

Why not show us some of the errors you get?

Without a more step by step explanation of the problem, all you are going to get as responses are links to documentation pages. Like this one for how to use javascript in Moodle.

https://docs.moodle.org/dev/Javascript_Modules

If you really want to prototype a javascript solution in Moodle without making a whole plugin, you might use Generico. I always say that. But it also has a bit of a learning curve. See this post:
https://moodle.org/mod/forum/discuss.php?d=384512#p1551706

In reply to Justin Hunt

Re: en_bcv_parser and you.js directly in the page.

by john attwood -

Justin,

Thank you for your response. I forwarded it to my friend who is working on this. He's been using a piece of software called versifier. The basic idea is to get the links to verses to work offline on mobile device. I think he has combined it with the App YouVersion. 

Hope you are doing well.

John