Personality Quiz - increase max answers from 10 to 20
I'm wondering if anybody knows how to increase the max answers for the personality quiz from 10 to 20?
In the "semantics.json" file I can clearly see that on line 119 is the number limit, however if I increase it and then us the upload option when creating new content it doesn't seem to make a difference. My coding knowledge is minimal and I've only ever made tweaks to code like this.
Now another thing I tried that actually did get the additional answers to was manually entering the answers into the "content.json" file. When I did it this way the answers show in the Edit Interactive content however when I click save they disappear.
Any help would be appreciated. I feel like I'm so close but something small is in the way.
Tue, 11/14/2017 - 12:55
Hi Steven, changing the
Hi Steven, changing the semantics should do the trick but you will also have to increase the library version. Try that and let me know how it goes.
Wed, 11/15/2017 - 00:10
Sorry I don't know how to do
Sorry I don't know how to do a library increase change. I had originally tinkered with the code in "library.json" but didn't make much progress. Would you be able to point out which code I need to change below?
Wed, 11/15/2017 - 15:51
If you change the minor
If you change the minor version to '1' it should work. I recommend taking some time to read up on the documentation to figure out how library development works for H5P:
Thu, 11/16/2017 - 07:38
Thanks for getting back to me
Thanks for getting back to me Tim. Unfortunately changing minor version had no effect.
I had a crack at reading the library development documentation and I can't see where I'm going wrong. Again apologies my coding knowledge is very little hence why I stuck to some "easy" like just increasing a max value. Hasn't worked out that way but I'm very keen to use this module.
Thu, 11/16/2017 - 13:02
Hi Steven no worries! Just as
Hi Steven no worries! Just as a preliminary check, could you try clearing your cache (it's found under configuration -> performance)
Your coding knowledge shouldn't hold you back. You just need to take the time to do the following things:
1. Enable the development directory for H5P. It's under configuration
2. Navigate to it in your file system. yourdrupalsite/sites/default/files/h5p/development
3. Use git to clone the source code into the development directory
4. Adjust semantics as you mentioned
These specific details can be found in the documentation I linked above and using Google.
Let me know if you get stuck!
Tue, 03/27/2018 - 16:30
Hi Tim!I inserted the changes
I inserted the changes you mentioned here, but i can't get the 20 personalities either... i edited the semantics.json and library.json files.
Wed, 03/28/2018 - 07:55
HI Yannick,What seems to be
What seems to be happening? And would you mind sharing the code that you changed?
Wed, 03/28/2018 - 11:31
I want to be able to add more
I want to be able to add more personalities to the personality quiz. I inserted my code here. :-)
Wed, 03/28/2018 - 11:52
Hi Yannick,Everything seems
Everything seems to be in order and I even tried copying your code to my system and it works. Clearing cache should work if it doesn't check your browser console for error logs which should give us a clue on what is going on.
Wed, 03/28/2018 - 12:03
Clear my browser cache doesn
Clear my browser cache doesn't work. Is there another place to clear the H5P cache?
There are no error logs.
Wed, 03/28/2018 - 13:18
Hi Yannick,Sorry I wasn't
Sorry I wasn't clear about that it is Drupal's cache. It's found in configuration -> development -> performance.
Wed, 03/28/2018 - 14:05
I'm using Wordpress, does
I'm using Wordpress, does that matter?
Wed, 03/28/2018 - 15:08
Hi Yanick,In WP it is located
In WP it is located in wp-content/upload/h5p/cachedassets. This thread is also a good read for changes such as this.
Wed, 03/28/2018 - 15:16
I removed the cached files
I removed the cached files and tried it again. No luck unfortunatly. Kinda weird right?
Thu, 03/29/2018 - 08:27
Hi Yannick,I tested this in
I tested this in WP and we are actually getting the same result. Although I found another way thanks to some hints from a colleague. Here are the steps:
Please note that this will not change the values in existing content, but just replace the default values for new content and exported content will not include the changes.