Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moodle 4.3 and Snap 4.3.4 (2024061702) #284

Open
TedMLC opened this issue Aug 6, 2024 · 2 comments
Open

Moodle 4.3 and Snap 4.3.4 (2024061702) #284

TedMLC opened this issue Aug 6, 2024 · 2 comments

Comments

@TedMLC
Copy link

TedMLC commented Aug 6, 2024

The method in question is deprecated since Moodle 3.11 and should not be used. This is the method in the theme.
public function course_section_cm_completion($course, &$completioninfo, cm_info $mod, $displayoptions = []) {

And this is moodle 4.3
/** * @deprecated since Moodle 3.11 */ public function course_section_cm_completion() { throw new coding_exception(__FUNCTION__ . ' is deprecated. Use the activity_completion output component instead.'); }

@EdTechSavvy
Copy link

I am having the same problem with Snap theme PHP 8.1 Moodle version 4.3.

Snap is using a method (core_course_renderer::course_section_cm_completion) that has been removed from core Moodle in 4.3+
From Moodle documentation:

=== 4.3 ===

  • The core_course_renderer::course_section_cm_completion method has been removed, and can no longer be used
  • External function core_course_external::get_course_contents() now returns a new field activitybadge with the data to display
    the activity badge when the module implements it.
  • prepare_new_moduleinfo_data() now accepts a parameter "suffix" that will be added to the name of the completion rules.
  • The method core_course_bulk_activity_completion_renderer:: edit_default_completion() has been deprecated and will be removed.
  • The core_course\output\activity_information output class has been deprecated. Use core_course\output\activity_completion
    and core_course\output\activity_dates instead.

Alongside with that, the following methods have been deprecated too:

  • core_course_renderer::render_activity_information()
  • renderer_base::activity_information()

@lvidgen
Copy link

lvidgen commented Dec 8, 2024

Yeah, I don't know how this one got past testing. There have been debugging warnings about course_section_cm_completion since Moodle 3.11

I can upgrade to Moodle 4.1 and use snap 4.1 because course_section_cm_completion still works there, but if you look in course\renderer.php you see that it says:

     * @deprecated since Moodle 3.11
     * @todo MDL-71183 Final deprecation in Moodle 4.3.
     * @see \core_renderer::activity_information

What's weird is that this isn't a little edge case - you can't even log in without going to /login/index.php without getting this error:
Fatal error: Declaration of theme_snap\output\core\course_renderer::course_section_cm_completion($course, &$completioninfo, cm_info $mod, $displayoptions = []) must be compatible with core_course_renderer::course_section_cm_completion() in /home/frostyer/upgradetest.frostyer.com/theme/snap/classes/output/core/course_renderer.php on line 293

and even then clicking into any course generates that same error. Again, how this got past testing is a mystery.

I love Snap and I appreciate that it is open source and developed by volunteers, but it seems a little irresponsible to be releasing upgrades that are fundamentally broken, setting aside the fact that we are stuck at 4.1 (an unsupported version while the latest Moodle is at 4.5)

Devs, if we could know if you are planning on fixing this for 4.3 or are focusing on support for 4.5 it would be much appreciated and help us in developing workarounds at our end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants