Hi Matt & sivaji - thank you both again for your solutions regarding Pathauto & anonymous users/quiz takers #460550: Quiz URLs/Paths using Pathauto for Logged-in and Non-logged in users - this is working great and is greatly appreciated!

My new question - I was wondering about the feasibility of having the "Results/Report page" utilize a unique path - different from the "questions" pages (e.g. maybe something like a "results" token for both anonymous and logged-in users?).

My thinking here is that by distinguishing "questions" pages from the final "results/report" page (based on URL/path) - Drupal will allow themers to assign unique page templates for each. For instance, one could easily assign a "multi-column" template for "questions" and a "single-column" template for the final "results/report" page.

With the understanding that the path for logged-in users has no token applied (whereas paths for anonymous users does) I am not certain if this is even possible without a lot of "leg work." Any thoughts?

Comments

FWE’s picture

Just following up to see if anyone has any suggestions - thank you!

FWE’s picture

Bump...

Just following up to see if anyone might have some insight - thanks!

FWE’s picture

Bump...

Just hoping to break the silence :-).

anilo’s picture

Hi,

I felt bad about the Bump's

I'm stuck at the same point, maybe worse... if that makes you feel any better :)

I've PathAutho'd the true/false questions to be /truefalse/*
and the quiz to be /quiz/*

However when I take the quiz, the path still shows as quiz/* and it completely ignores the truefalsequestion/* -- making life miserable.

I think the solution you find will work for me as well.

Maybe there's a way to check the content of the page .. and then shows blocks based on the existence of certain text. In your case, it would mean looking for text: "Question Results"

FWE’s picture

Hi anilo,

My apologies for not replying sooner. I actually gave up on this thread due to the lack of input - but checked back last night and saw your post - thank you! From an end-user/user experience point of view - it would be beneficial to be able to to have more control over the URL's (e.g. theming would be a breeze!). With the patch used from my opening comment on this page (e.g. #460550: Quiz URLs/Paths using Pathauto for Logged-in and Non-logged in users) I am able to generate URL's like the following for anonymous users - have you tried this yet?:

quiz/title-of-quiz <<< This is the first page the user lands on for taking each specific quiz.

quiz/title-of-quiz?quizkey=8x92xw5... (e.g. random key - 32 characters) <<< all successive quiz questions have a unique key appended to the URL.

quiz/title-of-quiz?quizkey=7r45q5x... (e.g. random key - 32 characters) <<< final quiz report page - follows the same URL format as each question.

For my situation I am hoping to be able to change the last example to "quiz/title-of-quiz?quizresult=7r45q5x..." so that I can theme the results page separately from the actual questions.

I gotta believe that this is not too difficult to do - however, not being the greatest coder...I am at a loss for where to start.

aaronbauman’s picture

Version: 6.x-3.0-beta1 » 7.x-4.x-dev
Component: Code » Code - Quiz core
Issue summary: View changes

necro-bump

djdevin’s picture

Version: 7.x-4.x-dev » 7.x-5.x-dev
Status: Active » Closed (fixed)

We did a lot of work on this in 5.x. Most of Quiz is now REST-compliant, with the quiz, questions, feedback, and result pages having their own unique URLs.

Quiz - node/X
Question/Page - node/X/take/Y
Question/Page feedback - node/X/take/Y/feedback
Quiz result (for the user) - node/X/quiz-results/Y

So you would be able to place blocks on any of these URLs. You could even override these URLs with views/panels and create your own layouts. For example, "Y" after quiz-results is the result ID, and with the result ID, you could use views to generate the list of questions, etc.

The core issue here was "unique path for results/reports page" which is definitely done as part of the 5.x refactoring. I'd give 5.x a shot if you are looking into this as it's pretty stable and almost ready to be the "recommended" release.

aaronbauman’s picture

5.x seems to be working great for me so far.
Thank you for all your effort!