Feature Requests

Please do NOT use this section of the forum to request help if Joomdle does not work for you in some particular way. Your post will be deleted.

[Closed] Re-direction to Moodle Quiz

More
15 years 8 months ago - 13 years 2 months ago #1 by Omar
So far so good, everything seems to be working out fine. A question I had was along the lines of this:

Once user is logged in their Joomla account and can see the moodle courses present, how can I make it so that if I had a course that contained a quiz, I would be able to forward them to the quiz directly without having them go to the course screen first.

so for ex:

They click on the course listing in Joomla and in a new window the url sends them to:
http://**********/course/view.php?id=2

and instead of this URL i wanted them to go to :

http://***********/mod/quiz/view.php?id=2

So i want them to go directly to a quiz instead of the course.
Last edit: 13 years 2 months ago by Antonio Durán.

Please Log in or Create an account to join the conversation.

More
15 years 8 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic Re: Re-direction to Moodle Quiz
Hi.

You would need to modify Joomdle code to do that. Especifically, you would need to modify the module and the moodle auth land file.

Most difficult task is finding out if ha course has a quiz, for changing URL only in those cases.

Please Log in or Create an account to join the conversation.

More
15 years 8 months ago #3 by Omar
Replied by Omar on topic Re: Re-direction to Moodle Quiz
So if i'm absolutely sure of the landing URL for my quiz, then what files would i begin to look at to replace the current landing page with the one i need?

Please Log in or Create an account to join the conversation.

More
15 years 8 months ago #4 by Antonio Durán
Replied by Antonio Durán on topic Re: Re-direction to Moodle Quiz
As I said you would need to modify:
a) the courses module, which links to moodle land.php page
b) the land.php in moodle plugin, which redirects the user to the appropiate place

In fact, I think it would be enough to modify b), to change $redirect_url for the courses case.

Please Log in or Create an account to join the conversation.

More
15 years 8 months ago #5 by Chris
Replied by Chris on topic Re: Re-direction to Moodle Quiz
I have moved this to Features Request

Please Log in or Create an account to join the conversation.

More
15 years 8 months ago #6 by Omar
Replied by Omar on topic Re:Re-direction to Moodle Quiz
Thank you for clarifying!

option b worked out perfectly. I just put /mod/quiz/view.php?id=2 in place of the previous line and the redirect works like butter! A million thank yous!

Please Log in or Create an account to join the conversation.

More
15 years 8 months ago #7 by Chris
Replied by Chris on topic Re:Re-direction to Moodle Quiz
Hi there,

What will you do if the course contains more than one quiz?

Please Log in or Create an account to join the conversation.

More
15 years 8 months ago #8 by Omar
Replied by Omar on topic Re:Re-direction to Moodle Quiz
only working with one quiz now. I'll have to take a closer look at the code to see how i can work it to the quiz links instead of just courses. But you have a valid point, if I am to add more quizzes on the backend i'll have to figure out a way to redirect them...

Please Log in or Create an account to join the conversation.