Add-ons
  1. Add-ons
  2. CONTRIB-3475

Certificate : fails to display if email teachers is set to yes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: Module: Certificate
    • Labels:
      None
    • Workaround:
      Hide

      set email teachers to no.

      Show
      set email teachers to no.
    • Affected Branches:
      MOODLE_22_STABLE
    • Rank:
      38284

      Description

      Certificates won't display if email teachers is set to yes.
      With debugging enabled the error message is :
      Coding error detected, it must be fixed by a programmer: PHP catchable fatal error

      Debug info: Argument 1 passed to get_users_by_capability() must be an instance of context, boolean given, called in /data/apache/htdocs/moodle/mod/certificate/lib.php on line 335 and defined
      Stack trace:
      line 365 of /lib/setuplib.php: coding_exception thrown
      line 3374 of /lib/accesslib.php: call to default_error_handler()
      line 335 of /mod/certificate/lib.php: call to get_users_by_capability()
      line 394 of /mod/certificate/lib.php: call to certificate_get_teachers()
      line 878 of /mod/certificate/lib.php: call to certificate_email_teachers()
      line 121 of /mod/certificate/view.php: call to certificate_issue()

        Activity

        Hide
        Chris Gibson added a comment -

        I should add I'm using the latest version downloaded from the plugin page - version.php says 2011110106

        Show
        Chris Gibson added a comment - I should add I'm using the latest version downloaded from the plugin page - version.php says 2011110106
        Hide
        Mark Nelson added a comment -

        Hi Chris,

        Where did you download the certificate plugin from? Version 2011110106 is not the latest version. Please download the zip package from https://github.com/PukunuiAustralia/moodle-mod_certificate

        Regards,

        Mark

        Show
        Mark Nelson added a comment - Hi Chris, Where did you download the certificate plugin from? Version 2011110106 is not the latest version. Please download the zip package from https://github.com/PukunuiAustralia/moodle-mod_certificate Regards, Mark
        Hide
        Chris Gibson added a comment -

        It's the version you get from the plugins database : http://moodle.org/plugins/pluginversion.php?id=188&action=download

        Show
        Chris Gibson added a comment - It's the version you get from the plugins database : http://moodle.org/plugins/pluginversion.php?id=188&action=download
        Hide
        Mark Nelson added a comment -

        Hi Chris, that is very strange as the version you stated is in your version.php file you received is an older version than the last few updates. Can you please re-download and try again?

        Show
        Mark Nelson added a comment - Hi Chris, that is very strange as the version you stated is in your version.php file you received is an older version than the last few updates. Can you please re-download and try again?
        Hide
        Chris Gibson added a comment -

        Hi Mark,

        I've just downloaded from the plugins DB again - it's definitely the older version.

        I can confirm that the version from your git link fixes the this bug.

        Thanks,
        Chris

        Show
        Chris Gibson added a comment - Hi Mark, I've just downloaded from the plugins DB again - it's definitely the older version. I can confirm that the version from your git link fixes the this bug. Thanks, Chris

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development