Personality Quiz - increase max answers from 10 to 20
Hi guys,
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.
Thanks,
Steven
tim
Tue, 11/14/2017 - 12:55
Permalink
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.
steven.swanepoel
Wed, 11/15/2017 - 00:10
Permalink
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?
tim
Wed, 11/15/2017 - 15:51
Permalink
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:
https://h5p.org/library-development
steven.swanepoel
Thu, 11/16/2017 - 07:38
Permalink
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.
tim
Thu, 11/16/2017 - 13:02
Permalink
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!
Referred
Tue, 03/27/2018 - 16:30
Permalink
Hi Tim!I inserted the changes
Hi Tim!
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.
Yannick
BV52
Wed, 03/28/2018 - 07:55
Permalink
HI Yannick,What seems to be
HI Yannick,
What seems to be happening? And would you mind sharing the code that you changed?
-BV52
Referred
Wed, 03/28/2018 - 11:31
Permalink
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. :-)
BV52
Wed, 03/28/2018 - 11:52
Permalink
Hi Yannick,Everything seems
Hi Yannick,
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.
-BV52
Referred
Wed, 03/28/2018 - 12:03
Permalink
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.
BV52
Wed, 03/28/2018 - 13:18
Permalink
Hi Yannick,Sorry I wasn't
Hi Yannick,
Sorry I wasn't clear about that it is Drupal's cache. It's found in configuration -> development -> performance.
-BV52
Referred
Wed, 03/28/2018 - 14:05
Permalink
I'm using Wordpress, does
I'm using Wordpress, does that matter?
BV52
Wed, 03/28/2018 - 15:08
Permalink
Hi Yanick,In WP it is located
Hi Yanick,
In WP it is located in wp-content/upload/h5p/cachedassets. This thread is also a good read for changes such as this.
-BV52
Referred
Wed, 03/28/2018 - 15:16
Permalink
I removed the cached files
I removed the cached files and tried it again. No luck unfortunatly. Kinda weird right?
BV52
Thu, 03/29/2018 - 08:27
Permalink
Hi Yannick,I tested this in
Hi Yannick,
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.
-BV52