Support » Plugin: QuizMaster » Quiz shortcode and error

  • Resolved larnoult

    (@larnoult)


    Hello,

    I tried to make your plugin work.
    First, once a quiz created, its id doesn’t show up. So I can’t embed the quiz in a post with a shortcode. I tried [QuizMaster 1] (since it was the first quiz created).

    Second, when I follow the permalink of the quiz, I get a fatal error:
    Fatal error: Call to undefined function twentyseventeen_get_svg() in /home/parlemon/www/wp-content/plugins/quizmaster/templates/quiz.php on line 33

    Thanks for your support,

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author goldhat

    (@goldhat)

    Shortcode name is “quizmaster” not “QuizMaster”, putting the ID of your quiz “loosely” in the shortcode will usually work but it’s more reliable and correct to write it as shown below as this will later allow further settings without editing the way the ID is entered:

    [quizmaster id=”1″]

    Next issue, you can’t find the correct ID for your quiz. QuizMaster uses WP custom posts so the ID definitely is wrong in your attempt. Even at install there is a few posts, you should expect the ID to be higher such as 87. You can see the ID on the edit page for your quiz, it’s written in the browser address bar. It also shows up at the bottom of the browser bar if you hover over a link to edit for instance. We’ll add a shortcode generator function later to the sidebar on the quiz add page, there is already a ticket about that.

    Bear in mind that unlike WP Pro Quiz, QuizMaster uses posts and quizzes have their own slug/url. You can always run the quiz just by visiting it. We did this because having to add the shortcode to a page is often a waste of time, the quiz itself is a post. You may however have to flush permalinks if your quiz posts are not loading.

    The twentyseventeen theme is used on all our test sites so unfortunately we never noticed this error, it comes from one of the templates (templates/quiz.php) that were copied/edited from twentyseventeen theme. If you can handle editing that template, just remove the call to that function. Otherwise wait for a release with that fixed. For testing purposes, you can setup a test site and make the twentyseventeen theme the active theme.

    Plugin Author goldhat

    (@goldhat)

    v0.6.4 just released should resolve the twentyseventeen error, no progress yet regarding translation.

    Plugin Author goldhat

    (@goldhat)

    @larnoult have you had a chance to try your install or the language translation?

    larnoult

    (@larnoult)

    Hello,
    Sorry for the delay of my answer, I was on vacation 🙂
    v0.6.4 fixes both the theme related error and the translation issue. Great!

    Yet, I now face other bugs/, that I list in order of importance to my mind:

    1. I set up a simple single choice, and single answer quiz.. When I try, and check the right answer, I get a message saying ‘Sorry, You Failed the Quiz’. Try yourself. http://pelico.parlemonde.org/mediateur/2017/08/essai-quiz/
    Right answer is “Bolivie”.

    Nevertheless, when I click on “see all questions” (voir les questions in french), my answer is marked as correct
    See this capture.

    2. The hint button is displayed before the quiz starts.. which makes no sense.

    3. For shortcode insertion, I really think you should include a column in the “quiz” table with the corresponding the custom post id. [quizmaster id=”XXX”] … For “regular” users, you can not expect them to fetch the id in the URL (at least french teachers and kids I’m working with will never manage).

    4. Now, in my case, I will not use the direct link to the quiz post; but for the record, in my site, if I try that, it breaks the page layout (the lateral column). Compare http://pelico.parlemonde.org/quiz/enigme-2/ with the shortcode version http://pelico.parlemonde.org/mediateur/2017/08/essai-quiz/.

    Thanks for your support.

    Plugin Author goldhat

    (@goldhat)

    We just released v0.7.0 please try it to see if it does resolve a couple of those issues.

    I think there is no sidebar (which you called the lateral column) in the template shipped with QuizMaster, but all templates can be overridden in your theme and they are generally based on twentyseventeen. I’ll look into whether we might inject the content into the page rather than offering a full template, or adding the sidebar… but one benefit of a full column is that developers can make adjustments to the entire page and have it be different from the rest of the site.

    larnoult

    (@larnoult)

    Hello,

    1. Unfortunately, the quizz still doesn’t work; try yourslef here: http://pelico.parlemonde.org/mediateur/2017/08/essai-quiz/

    All answers are said to be wrong. Right answer should be Bolivia.

    2. V 0.7.0 corrects the ‘hint’ being displayed before the start of the quizz (although it seems to javascript hide it, since it first appears on my screen, before disappearing).

    3. No trace of [quizmaster id=”XXX”] in the quizz table 🙁

    4. Ok. Anyway, I’m using the shortcode insertion 🙂

    Thanks. I really want to switch from WP-Pro-Quiz to QuizMaster.. but it needs to work at least as well!

    Plugin Author goldhat

    (@goldhat)

    Can you try adding 2 or more questions to the quiz? And share a screenshot of that question (from the question edit page, answers tab) so I can see how that is setup?

    larnoult

    (@larnoult)

    Just did that: same URL http://pelico.parlemonde.org/mediateur/2017/08/essai-quiz/
    Same issue.
    Moreover, I see that the correct answer is always .. the first one! Questions are not reshuffled, even if I check the “Randomize Answers” option in the quizz.
    Here is a screenshot of the question edit page, tab answer.

    Best,

    Plugin Author goldhat

    (@goldhat)

    We’re working on a 0.7.x release to resolve these issues. I think we’ve got the answer check fixed, it was caused by the finish quiz event firing before the answer check is completed. I only recently (in the jquery plugin for the quiz taking) switched the answer checks so they are done server-side, which makes it much harder for students to cheat. Finish quiz has to happen after that check is done to show the right score.

    Randomization setting might not be factored in, we’ll see if we can fix that in the next release.

    Plugin Author goldhat

    (@goldhat)

    v0.7.3 was just released if you update to that it should fix marking issues and randomization. No changes regarding quiz id.

    Plugin Author goldhat

    (@goldhat)

    v0.7.4 just released it has 2 placements of the shortcode for the quiz, the quiz list table and the sidebar if you’re on the quiz edit page.

    Plugin Author goldhat

    (@goldhat)

    QuizMaster is now at v0.8.3, no activity on this ticket so marking resolved. If you need further help please open a new ticket anytime. Thanks.

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.