Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

by Hartmut Scherer -
Number of replies: 18

Hi all,

I enjoy using Collapsed Topics in Moodle 2.2 and I got the impression that our students also like it. Having the current topic/week always on top makes it very easy for them.

Recently, I enabled device detection. As I don’t own an iPad or tablet, I can only test the MyMobile theme on my laptop. When Collapsed topics and the MyMobile theme are selected, topics cannot be opened on my laptop. It may be different on a handheld device. Therefore, I am asking whether someone else observed this.

With kind regards,
Hartmut

Average of ratings: -
In reply to Hartmut Scherer

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

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

Dear Hartmut,

I bought myself an iPod Touch (cheaper than an iPhone and same functionality!) for my MSc project to test things, so will have a go on that.

In the mean time, I used to use this:

http://labs.blackbaud.com/NetCommunity/article?artid=662

To test, but the link does not work, a quick Google gives:

http://www.softpedia.com/get/Programming/Other-Programming-Files/iBBDemo2.shtml

and

http://code.google.com/p/ibbdemo2/

which also links to

http://www.electricplum.com/simulator.aspx

where they have a 'lite' version to use.

I also have the downloaded code from 2010 - but not sure if I can redistribute it.  So this is something to test things on you laptop.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

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

Also in the Theme Settings you can choose to have user / course themes so it would be possible to have a dummy student account that had the 'MyMobile' as the standard theme to test with.

I can replicate what you are experiencing, just now need to figure out what is going on.

There is now so much to test whenever I make a change!!!!

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

by John St -

I did some modifications to get it to work with col topics and it was working, but with the recent changes to coltopics it seems to be broken now... 

I see what I can do to fix it on my end. 

In reply to John St

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

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

Dear John,

As I have said below, if only I'd known then I would have helped / kept you informed / made changes to help you.  I'm mostly making changes to keep up with all of the core changes!

Was I had to find contact details for?  If so I'll improve this.

Cheers smile,

Gareth

In reply to Hartmut Scherer

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

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

Dear Hartmut,

Investigation reveals that the MyMobile theme has some custom code to cope with my format (which I did not know about!!!!) and sacrillage is written in jQuery despite the huge argument about it on the developers forum.

At first glance I think there is a coding issue with the theme as I removed 'lib.js' from my code and replaced it with 'module.js' in line with core formats.  So, in '/theme/mymobile/javascript/custom.js' around line 254 you should find:

        $.getScript('../course/format/topcoll/lib.js');

which needs to be replaced with

        $.getScript('../course/format/topcoll/module.js');

as it adds an extra event to the 'tr.cps' tag for its version of the toggle.  I still rely on this for activating my code.

If this works for you, I'll raise a Moodle Tracker for a core code change.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

by John St -

Yep, that is it... ;) I have a revamp almost ready, so this will be included. Good find. 

In reply to John St

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

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

Dear John,

Are you working on this?

If so, then:

  • The border does not work when the section is shown.
  • The 'opencps' toggle image is wrong when the page refreshes and the section is open - looking at the jQuery it is not reacting to my change of the image when my JavaScript runs at the bottom of the page.  I'd be quite happy to provide a custom function in my 'module.js' that reads the state of the toggles like the existing 'reloadToggles()' funtion that added / removed the 'opencps' class as appropriate.
  • When a toggle has a name, then the shaded box with 'Topic x' in it overlays the word 'Toggle'.

Is / will there be a Moodle tracker for this?

And I'm always willing to help with development in future if asked!  Plus can keep you informed of developments before they go live.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

by Hartmut Scherer -

Hi Gareth,

Thankyou for your fast reply and for the changed line of code. It works now. Out of curiosity I went to the results of a choice activity. I could see them, but I also saw a warning message at the bottom of the same choice activity (although debug was not activated).

Coding error detected, it must be fixed by a programmer: Unknown method called against plugin_renderer_base

I can only mention this observation and hope that it will make sense to you or others.

With kind regards,

Hartmut

In reply to Hartmut Scherer

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

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

Dear Hartmut,

No worries.  Thanks for reporting the issue, I'll look into it.

Cheers,

Gareth

In reply to Hartmut Scherer

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

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

Dear Hartmut,

I've tried to replicate but cannot.  Please would you be so kind as to post a screen shot of the issue so I can get an idea of what is going on?

Thanks,

Gareth

In reply to Hartmut Scherer

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

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

That is a theme problem

Are you using a copy of MyMobile?

Looks like you forgot to change something.

Look in the layout files frontpage.php and  general.php because the main content token has changed from...

<?php echo core_renderer::MAIN_CONTENT_TOKEN ?>

to

<?php echo $OUTPUT->main_content() ?>

The ERROR is looking for the core_renderer that does not exist.

Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

by John St -

Actually, that is probably not it (also the current version already does this). An old version of the theme used a renderer to override the style of the choice activity. The choice activity then changed, and then the renderer no longer worked right (which seems to be kind of a danger with using parts of them). 

It was updated here and fixed a while ago (unless the choice activity has been update again breaking this again that is): 

http://tracker.moodle.org/browse/MDL-30600

Average of ratings: Useful (1)
In reply to John St

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

by Hartmut Scherer -

To John, Mary and Gareth,

Thank you for your replies. I should have mentioned the Moodle version that I am using - Moodle 2.2+ (Build: 20111223). The tracker helped me to find the updated renderers.;php file. Now, the error message is gone. Thanks a lot for your help.

With kind regards,

Hartmut

In reply to John St

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

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

Hi John,

Than may be so but on checking I found the MAIN_CONTENT_TOKEN in mymobile/layout/embedded.php

I have just created MDL-33118 to fix it.

I can do this as it is straight forward.

Cheers

Mary

In reply to Mary Evans

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

by John St -

I see, I did not look at that as that would not be the problem here of course. I have a major update for the theme in general so no need to fix, it will be taken care of in the update.  

In reply to John St

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

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

too late...I have already fixed it and in for Integration with a bit of luck it will get pulled today (Monday).

Cheers

Mary

In reply to Hartmut Scherer

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

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

Dear Hartmut,

I have created MDL-33115 and CONTRIB-3655 to solve the issue you experienced on a more permenent basis.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Topics cannot be opened in MyMobile with Collapsed topics selected (M2.2)

by Hartmut Scherer -

Thank you, Gareth. I am looking forward to the updated version of Collapsed Topics for Moodle 2.3 or higher.

With kind regards,

Hartmut