Onetopic format section 0 has incorrect URL

Onetopic format section 0 has incorrect URL

by Fiona Watts -
Number of replies: 22

Hello,

We have just upgraded to moodle 2.3.2 and the onetopic format is giving us an issue. Instead of displaying as:

http://moodle2.wit.tafensw.edu.au/course/view.php?id=56&section=0

it is coming up as:

http://moodle2.wit.tafensw.edu.au/course/view.php?id=56#section-0

The & seems to be a # and the = seems to be a -

Does anyone have a fix for this?

Fe

Average of ratings: -
In reply to Fiona Watts

Re: Onetopic format section 0 has incorrect URL

by philippe petitqueux -

Hello

Same for me. After upgrading to 2.3.2. Latest download for onetopic.

Phil

In reply to philippe petitqueux

Re: Onetopic format section 0 has incorrect URL

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Phil,

So does it work for you or are you getting the URL issue?

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Onetopic format section 0 has incorrect URL

by philippe petitqueux -

Sorry it was'nt clear. URL issue.

phil

In reply to philippe petitqueux

Re: Onetopic format section 0 has incorrect URL

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Fe and Phil,

Ta.  Just in case I just did a 'Purge All Caches' and tested again and still could not replicate.  Please could you kindly post a screen shot of the issue and state the version number in the format's 'version.php' file.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Onetopic format section 0 has incorrect URL

by philippe petitqueux -

I went on Fiona's site and noticed she had almost the same theme as mine. I have usr nav from newschool learning.

Si I changed my theme and the issue disapeared.

I've just written to newschool learning's support.

I'll let you know.

Salut.

In reply to philippe petitqueux

Re: Onetopic format section 0 has incorrect URL

by John St -

Fiona is not using Usrnav, that is Fadeback. I just tested this and it works fine for me in both. 

In reply to John St

Re: Onetopic format section 0 has incorrect URL

by philippe petitqueux -

I'm sorry, it's not a theme issue, and couldn't be I guess.

Maybe a hint with this debug report.

 

Attachment onetopic.jpg
In reply to philippe petitqueux

Re: Onetopic format section 0 has incorrect URL

by John St -

I thought perhaps the jquery in usrnav was causing the issue, but Fadeback doesn't use jquery, and I can't seem to replicate the problem. 

In reply to philippe petitqueux

Re: Onetopic format section 0 has incorrect URL

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Phil,

I can't replicate that but I think cm_info is a part of the course format refactorings going on at the moment.  What branch do you have.

Plus, I have just upgraded to the very latest:

Moodle 2.3.2+, version 2012062502.05 (Build: 20121005)

And noticed that MDL-31976 and MDL-35276 have changed something so can now replicate the issue.  Now in a position to look for a fix.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Onetopic format section 0 has incorrect URL

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear all,

The issue is caused by changes made to the function 'course_get_url' in '/course/lib.php' because of MDL-35276 - and an issue to reverse the changes should not be made because of what the changes solve.

Therefore I have made changes OneTopic's 'renderer.php' to cope (attached) and tested.  This should solve the problem if you have "Moodle 2.3.2+, version 2012062502.05 (Build: 20121005)" or above.

Please test the replacement 'renderer.php' (after making a backup) and if you think I'm 'awesome' and it works, please rate this post as 'Useful'.

Cheers,

Gareth

Average of ratings: Useful (4)
In reply to Gareth J Barnard

Re: Onetopic format section 0 has incorrect URL

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I have not tested this yet, but have every faith in you that it works, and I also think you are awesome, so have given this my +1 smile

In reply to Mary Evans

Re: Onetopic format section 0 has incorrect URL

by Fiona Watts -

Thanks you all for your input and ideas. I have sent onto our IT department to see if they can fix it. I'll let you know how we get on.

Fe

In reply to Fiona Watts

Re: Onetopic format section 0 has incorrect URL

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Fe,

But I have fixed it!  Please see above 'renderer.php' to save your IT department lots of time.

And thank you Mary smile

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Onetopic format section 0 has incorrect URL

by Fiona Watts -

Thanks Gareth your link did work, our IT installed it this morning and I can now navigate.

http://moodle.org/mod/forum/discuss.php?d=213046#p929265

One little thing I did notice was that if I use the TABS across the top I can navigate but if I use the little arrows at the bottom it will go between all topics except section 0. Not a major issue but I thought you would like to know.

 

In reply to Fiona Watts

Re: Onetopic format section 0 has incorrect URL

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Fe et al,

Please find attached a direct replacement 'renderer.php' that solves 'little arrows at the bottom it will go between all topics except section 0' too.

Cheers,

Gareth

Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Onetopic format section 0 has incorrect URL

by Fiona Watts -

Wow, you were quick. Thanks again Gareth.

Fe

In reply to Gareth J Barnard

Re: Onetopic format section 0 has incorrect URL

by Mark Picker -

Thanks Gareth, this replacement renderer.php fixes the problem.

In reply to Fiona Watts

Re: Onetopic format section 0 has incorrect URL

by marisa caria -

I have the same error. If I want to go from section n to section 0,  the page rimains in the same page, because the url is wrong. The & is a # and the = is a -  

Do you resolved the problem?

Thank you for your answer

In reply to marisa caria

Re: Onetopic format section 0 has incorrect URL

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Marisa,

Yup!  Please use 'renderer.php' as a replacement for OneTopic's in my post of 'Monday, October 8, 2012, 8:58 PM' above.

Cheers,

Gareth

In reply to marisa caria

Re: Onetopic format section 0 has incorrect URL

by David Herney -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

the format was updated in october 27 to correct this bug, do you have the new version?