H5P - SQL, Python, ....
Hello,
I have created several SQL content types:
* Based on the work of Degrange here https://h5p.org/node/1134219 I have developed a simple SQL IDE and a SQL question type. These are also based on Skulpt, also support Turtle graphics and p5.js.
* An SQL question type compares SQL queries on a sqlite database against a result relation using sql.js.
* Both content types are based on a codequestion content type, which should make it easier to query other languages with the same code base in the future.
Feedback would be greatly appreciated as this is the very first time I have developed H5P content types.
Demo: https://www.opencoding.de/course/view.php?id=2#section-2
Repositories:
- SQL-Question: https://codeberg.org/a_siebel/h5p-content-sql-question
- Python-Question: https://codeberg.org/a_siebel/h5p-content-python-question
- Python-IDE: https://codeberg.org/a_siebel/h5p-content-python-ide
- Code-Question: https://codeberg.org/a_siebel/h5p-content-code-question
- Skulpt: https://codeberg.org/a_siebel/H5P-lib-skulpt
- Markdown: https://codeberg.org/a_siebel/H5P-lib-markdown
- Ace-Editor: https://codeberg.org/a_siebel/H5P-lib-ace
- SQL.js: https://codeberg.org/a_siebel/h5p_lib_sql
otacke
Mon, 03/06/2023 - 17:10
Permalink
Hi!I'll gladly have a look
Hi!
I'll gladly have a look when I find some time, but it was great if you checked for common issues such as violations of the H5P coding style guide that can easily be avoided.
Cheers,
Oliver
otacke
Mon, 03/06/2023 - 18:21
Permalink
Hey!I thought: Why not.
Hey!
I thought: Why not. Please note that this is not a thorough code review (so there may be more that I didn't spot right away as I didn't try to understand what the code was doing) and I have not looked at the running instance, at the code only.
Starting with H5P.CodeQuestion seemed like a good starting point, although I later noticed that this was just a non-runnable library.
entries/h5p-code-question.js
scripts/h5p-code-question.js
styles/h5p-code-question.css
I then quickly glanced at some other repository and wondered: are those libraries copies of npm modules? If yes: Why bother to create H5P libraries out of them (that need their own maintenance, wrapping code, etc) if you could simply use them as dependencies?
a_sbl
Mon, 03/06/2023 - 19:33
Permalink
Thanks!
Whoa! - Thanks!
I am very grateful for the feedback. As this is the first time I have programmed an H5P module (and to be honest, so much javascript), it helps me a lot.
As soon as I have some free time again, I will work through the feedback and update the modules.
a_sbl
Mon, 03/06/2023 - 19:33
Permalink
Thanks!
Whoa! - Thanks!
I am very grateful for the feedback. As this is the first time I have programmed an H5P module (and to be honest, so much javascript), it helps me a lot.
As soon as I have some free time again, I will work through the feedback and update the modules.
otacke
Mon, 03/06/2023 - 20:18
Permalink
You're welcome! And don't
You're welcome! And don't feel intimidated. Every coder started small ...
I just with there was a way to review a whole repository like one could with pull requests. That would make things easier.
a_sbl
Mon, 03/06/2023 - 21:28
Permalink
> Every coder started small .
> Every coder started small ...
:-) Glad to hear it :-D - Even though I've already done a lot of programming. But I've never been good friends with Javascript, because the approach to solve problems is often very different from what I'm used to in other languages.
For example, I wanted to declare the methods outside the constructor, but then ran into problems with `this` when I then passed these functions as callbacks in Promises, which I could only solve by using this strange way of declaring functions inside the constructor.
otacke
Mon, 03/06/2023 - 21:59
Permalink
Oh, one could notice that you
Oh, one could notice that you've been coding before ...
Not sure what exactly your issue with `this` was, but I assume some of the usual confusion that arises if one uses `function () {}` declarations which in fact all come with their own local `this` reference. Have a look at https://github.com/otacke/snordian-h5p-boilerplate/blob/master/src/scripts/h5p-boilerplate-snordian.js for instance. Using class notation and `this` is what one expects it to be if one is used to Java or similar languages. Throw in using arrow functions only, and all is fine.
a_sbl
Tue, 04/11/2023 - 22:05
Permalink
I wanted to say thank you
I wanted to say thank you again for your feedback. Due to illness and personal circumstances, it will take me a while to work through the feedback (it will probably be a few weeks before I find the time again) - but I will definitely use it!
otacke
Tue, 04/11/2023 - 22:36
Permalink
Don't mention it. Sometimes a
Don't mention it. Sometimes a review by someone else can feel weird, but if it's useful to you, I am glad.
a_sbl
Sun, 08/20/2023 - 18:47
Permalink
I made a major rewrite of the
I made a major rewrite of the plugins.I restructured some things (plugin dependencies and class structure), used the linter plugin to improve overall code quality.
The plugins can be found here https://codeberg.org/a_siebel/h5p-content-python-question and https://codeberg.org/a_siebel/h5p-content-sql-question . I produced a short introduction (language: german): https://youtu.be/Kb346xXr7f8
There is still work to do (especially translation which is still do be done) but I will now continue to test the plugin when creating Moodle courses.