moodleou / moodle-mod_subpage

Subpage module allows you to add Moodle activities onto inner page within course
21 stars 15 forks source link

Moodle 2.4 issue. #2

Closed vaughany closed 11 years ago

vaughany commented 11 years ago

I know you may not be concerned with Moodle 2.4 yet, but I have been testing the Subpage mod in 2.4.1+ and happened across the following when clicking on a Subpage added to a course:

Function get_course_section() is deprecated. Please use course_create_sections_if_missing() and get_fast_modinfo() instead.
line 3032 of /lib/deprecatedlib.php: call to debugging()
line 247 of /mod/subpage/locallib.php: call to get_course_section()
line 237 of /mod/subpage/view.php: call to mod_subpage->add_section()

Function get_all_mods() is deprecated. Use get_fast_modinfo() and get_module_types_names() instead. See phpdocs for details
line 3004 of /lib/deprecatedlib.php: call to debugging()
line 64 of /mod/subpage/renderer.php: call to get_all_mods()
line 244 of /mod/subpage/view.php: call to mod_subpage_renderer->render_subpage()

It appears to prevent the mod from working properly as the 'add an activity or resource' link is not active (although it might be unrelated).

I'd look into fixing this myself but don't have the time at present (sorry).

sammarshallou commented 11 years ago

Thanks for this report.

We are going to start Moodle 2.4 development in a week or two - that will involve checking all our modules including subpage! So we'll hopefully fix those issues (and others if any) in our master version fairly soon. There won't be a stable 2.4 version until about June because that's when we first release it..

vaughany commented 11 years ago

Cool, will keep an eye on your branches then, and will test as and when something 2.4-ish appears. :)

ejdb commented 11 years ago

I can confirm this issue from our side. We have upgraded just last week and found out unpleasantly that we couldn't change anything to existing or new subpages anymore. Does this indeed mean we're stuck until about june?

sammarshallou commented 11 years ago

This issue has now been fixed - both deprecated functions listed above are no longer called anywhere in subpage module. (The commits are the ones with OU internal issue numbers 5864 and 6209.)

The subpage now works on OU moodle 2.4, however there may be remaining different issues which prevent it working on other 2.4 platforms, we haven't tested. For example, it works when using our course format (which does not support AJAX) and it works when the 'add activity' button is turned off so that the old dropdowns are in use - but I'm not sure it works in other formats or with those buttons.

nickvarney commented 11 years ago

I can confirm that the add activity/resource link in a subpage does not work in Moodle 2.4.4 (Build: 20130513). The link is unresponsive.

Could I ask if you are planning to develop subpage to work with the standard add activity/resource button in the future and secondly, if you are, is this likely to be this Summer and for 2.5 as well as 2.4.x?

sammarshallou commented 11 years ago

Regarding support for the default add activity/resource button (instead or the 'old-style' dropdown which should now work) - we would like to develop this at some point, but it is not a priority at present and will not be developed this summer. If somebody else figures out the code for this, we'd welcome a patch.

In general regarding 2.5 support (this is true for all our modules), see my blog post http://learn.open.ac.uk/mod/oublog/viewpost.php?post=144632

nickvarney commented 11 years ago

Thanks very much for the reply and your very informative blog post.