Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Module: Certificate
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Rank:
      21137

      Description

      I'm creating issues for the top ten most popular blocks and modules to ensure that they are ready for Moodle 2.0. Hopefully we will be able to divide and conquer. If you are unable to work on this, please feel free to reassign as needed. Do not hesitate to let me know how I can be helpful. Peace - Anthony

      Update: I have fixed the issue with the certificate module not upgrading correctly from 1.9 -> 2.0 and currently plan on adding much more functionality to the certificate module in the future after I have resolved all the known issues. The link is https://github.com/PukunuiAustralia/moodle-mod_certificate - it is recommended you create a github account (it is very quick) and 'watch' this package for future updates. To install the plugin using git the command is "git clone git://github.com/PukunuiAustralia/moodle-mod_certificate.git certificate" when in the mod/certificate folder - Mark

      Update: Installation issues - if you are using the above repository the folder downloaded will be called something like 'PukunuiAustralia-moodle-mod_certificate-d12b41b', please rename this to 'certificate' before placing it into the mod folder in your Moodle install. Due to the infancy of the changes I am doing to the certificate module, I recommend using git to download and update the module, as I plan on upgrading the module frequently. Please see http://help.github.com/set-up-git-redirect/ for instructions on how to set up GIT on your OS. You can ignore the part about setting up SSH keys if you do not plan on pushing any of your own code to a github account.

      1. C2006_100930.patch
        6 kB
        Jay Knight
      2. certificate_reset.php
        2 kB
        Jean-Michel Vedrine
      3. certificate.php
        13 kB
        Ralf Hilgenstock

        Activity

        Hide
        Jay Knight added a comment -

        Is there any progress on this? We are planning to launch moodle 2 as soon as possible after it is released, but we will need this first. Is there code for the certificate module in 2.0 somewhere? I'd be willing to at least test, and maybe submit some code changes. Let me know.

        Show
        Jay Knight added a comment - Is there any progress on this? We are planning to launch moodle 2 as soon as possible after it is released, but we will need this first. Is there code for the certificate module in 2.0 somewhere? I'd be willing to at least test, and maybe submit some code changes. Let me know.
        Hide
        Chardelle Busch added a comment - - edited

        I haven't looked at the 2.0 certificate code for several months. At that time, I had updated most of the code to 2.0, however it certainly isn't completely up to date. There may have been some context/output changes since then.

        Also, I do know that I did not update the code for saving the certificate as a file--this needs to be done, and I do know that the code to count the number of issued certs needs fixed or deleted. The latest code is in head Jay, if you would do some testing, that would be great.

        Show
        Chardelle Busch added a comment - - edited I haven't looked at the 2.0 certificate code for several months. At that time, I had updated most of the code to 2.0, however it certainly isn't completely up to date. There may have been some context/output changes since then. Also, I do know that I did not update the code for saving the certificate as a file--this needs to be done, and I do know that the code to count the number of issued certs needs fixed or deleted. The latest code is in head Jay, if you would do some testing, that would be great.
        Hide
        Jay Knight added a comment - - edited

        Finally getting a chance to look at this. There are many lang/string issues and lots of deprecated function warnings (I have all warnings turned on). Here is a small patch that got me to the point of being able to view and save the edit form and generated and view a certificate.

        Patch
        diff --git a/lib.php b/lib.php
        index 01339bf..3ac2887 100644
        --- a/lib.php
        +++ b/lib.php
        @@ -1242,4 +1242,15 @@ function certificate_generate_date($certificate, $course) {
         function certificate_generate_code() {
             return (random_string(10));
         }
        -?>
        \ No newline at end of file
        +
        +/************************************************************************
        + * "To support the completion system, your module must include a        *
        + * modulename_supports function in its lib.php"                         *
        + ************************************************************************/
        +function certificate_supports($feature) {
        +    switch($feature) {
        +        case FEATURE_COMPLETION_TRACKS_VIEWS: return true;
        +    }
        +    return null;
        +}
        +?>
        diff --git a/version.php b/version.php
        index 7709f30..0522a83 100644
        --- a/version.php
        +++ b/version.php
        @@ -6,7 +6,7 @@
         ///////////////////////////////////////////////////////////////////////////////
        
         $module->version  = 2009062900;  // The current module version (Date: YYYYMMDDXX)
        -$module->requires = 2007101506;  // Requires this Moodle version
        +$module->requires = 2010091500;  // Requires this Moodle version
         $module->cron     = 0;           // Period for cron to check this module (secs)
        
         ?>
        \ No newline at end of file
        diff --git a/view.php b/view.php
        index 8ffd9b0..4f1a3e7 100644
        --- a/view.php
        +++ b/view.php
        @@ -27,8 +27,9 @@ include '../../lib/pdflib.php';
             add_to_log($course->id, 'certificate', 'view', "view.php?id=$cm->id", $certificate->id, $cm->id);
        
         // Initialize $PAGE, compute blocks
        -    $PAGE->set_url('mod/certificate/view.php', array('id' => $cm->id));
        +    $PAGE->set_url('/mod/certificate/view.php', array('id' => $cm->id));
             $PAGE->set_context($context);
        +    $PAGE->set_cm($cm);
        
             if (($edit != -1) and $PAGE->user_allowed_editing()) {
                 $USER->editing = $edit;
        @@ -112,9 +113,8 @@ include '../../lib/pdflib.php';
                     $linkname = $strgetcertificate;
                     $name = 'popup';
                     $options= array('width' => 600, 'height' => 800);
        -            $link = html_link::make($url, $linkname);
        -            $link->add_action(new popup_action('click', $link->url, $name, $options));
        -            echo $OUTPUT->link($link);
        +            $link = new moodle_url('/mod/certificate/view.php', array('id'=>$cm->id,'action'=>'get'));
        +            echo $OUTPUT->action_link($link,$linkname);
                     echo '</center>';
                     add_to_log($course->id, 'certificate', 'received', "view.php?id=$cm->id", $certificate->id, $cm->id);
                     echo $OUTPUT->footer($course);
        
        Show
        Jay Knight added a comment - - edited Finally getting a chance to look at this. There are many lang/string issues and lots of deprecated function warnings (I have all warnings turned on). Here is a small patch that got me to the point of being able to view and save the edit form and generated and view a certificate. Patch diff --git a/lib.php b/lib.php index 01339bf..3ac2887 100644 --- a/lib.php +++ b/lib.php @@ -1242,4 +1242,15 @@ function certificate_generate_date($certificate, $course) { function certificate_generate_code() { return (random_string(10)); } -?> \ No newline at end of file + +/************************************************************************ + * "To support the completion system, your module must include a * + * modulename_supports function in its lib.php" * + ************************************************************************/ +function certificate_supports($feature) { + switch ($feature) { + case FEATURE_COMPLETION_TRACKS_VIEWS: return true ; + } + return null ; +} +?> diff --git a/version.php b/version.php index 7709f30..0522a83 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ /////////////////////////////////////////////////////////////////////////////// $module->version = 2009062900; // The current module version (Date: YYYYMMDDXX) -$module->requires = 2007101506; // Requires this Moodle version +$module->requires = 2010091500; // Requires this Moodle version $module->cron = 0; // Period for cron to check this module (secs) ?> \ No newline at end of file diff --git a/view.php b/view.php index 8ffd9b0..4f1a3e7 100644 --- a/view.php +++ b/view.php @@ -27,8 +27,9 @@ include '../../lib/pdflib.php'; add_to_log($course->id, 'certificate', 'view', "view.php?id=$cm->id" , $certificate->id, $cm->id); // Initialize $PAGE, compute blocks - $PAGE->set_url('mod/certificate/view.php', array('id' => $cm->id)); + $PAGE->set_url('/mod/certificate/view.php', array('id' => $cm->id)); $PAGE->set_context($context); + $PAGE->set_cm($cm); if (($edit != -1) and $PAGE->user_allowed_editing()) { $USER->editing = $edit; @@ -112,9 +113,8 @@ include '../../lib/pdflib.php'; $linkname = $strgetcertificate; $name = 'popup'; $options= array('width' => 600, 'height' => 800); - $link = html_link::make($url, $linkname); - $link->add_action( new popup_action('click', $link->url, $name, $options)); - echo $OUTPUT->link($link); + $link = new moodle_url('/mod/certificate/view.php', array('id'=>$cm->id,'action'=>'get')); + echo $OUTPUT->action_link($link,$linkname); echo '</center>'; add_to_log($course->id, 'certificate', 'received', "view.php?id=$cm->id" , $certificate->id, $cm->id); echo $OUTPUT->footer($course);
        Hide
        Chardelle Busch added a comment -

        Okay, I just made all of the lang changes for 2.0-mostly the new help strings. Also made a few changes from your notes above Jay-thanks. Please get the latest files from head.

        Anthony, could you add Mike Churchward to this issue--we'll see if he has some time to look at this.

        Still need the file saving code updated. Also, all of the code for the report needs updated--especially for the new groups sorting code.

        Also, since there are so many changes to the lang file (all help file strings need to be added, and a couple others) is there someplace you can add this for the translators to work on?

        Show
        Chardelle Busch added a comment - Okay, I just made all of the lang changes for 2.0- mostly the new help strings. Also made a few changes from your notes above Jay -thanks. Please get the latest files from head. Anthony, could you add Mike Churchward to this issue--we'll see if he has some time to look at this. Still need the file saving code updated. Also, all of the code for the report needs updated--especially for the new groups sorting code. Also, since there are so many changes to the lang file (all help file strings need to be added, and a couple others) is there someplace you can add this for the translators to work on?
        Hide
        Anthony Borrow added a comment -

        Chardelle - I have added Mike as a watcher. I'm not sure about some of the language changes and how those may affect CONTRIB code. I'll need to check. Peace - Anthony

        Show
        Anthony Borrow added a comment - Chardelle - I have added Mike as a watcher. I'm not sure about some of the language changes and how those may affect CONTRIB code. I'll need to check. Peace - Anthony
        Hide
        Jay Knight added a comment - - edited

        I've uploaded a patch (C2006_100930.patch) that "fixes" several errors that it was throwing. Some things are just hardcoded to make it work, I make no guarantee to its correctness, but maybe it is a useful starting point.

        It looks like all of the cert type scripts will need to be updated with the new coordinate parameters for some of the print_* functions, my patch just updates the one we are using.

        Show
        Jay Knight added a comment - - edited I've uploaded a patch (C2006_100930.patch) that "fixes" several errors that it was throwing. Some things are just hardcoded to make it work, I make no guarantee to its correctness, but maybe it is a useful starting point. It looks like all of the cert type scripts will need to be updated with the new coordinate parameters for some of the print_* functions, my patch just updates the one we are using.
        Hide
        Jay Knight added a comment -

        Looking at this a bit more... there are errors in report.php about the url not starting with a "/". Also, I tried one of our custom borders that we use in 1.9 and it seems to not scale or something, it extends off the page and causes a blank first page and the certificate being on the second page of the pdf file.

        Show
        Jay Knight added a comment - Looking at this a bit more... there are errors in report.php about the url not starting with a "/". Also, I tried one of our custom borders that we use in 1.9 and it seems to not scale or something, it extends off the page and causes a blank first page and the certificate being on the second page of the pdf file.
        Hide
        Pinky Sharma added a comment -

        I have been assigned to migrate certificate module to 2.0 by my company. I have developed 2 modules for 2.0 so I am little familiar with it.

        What is best way to move forward with it? Should I continue resolving errors from latest CVS after applying Jay's patch? Or you can also assign me some specific task.

        Show
        Pinky Sharma added a comment - I have been assigned to migrate certificate module to 2.0 by my company. I have developed 2 modules for 2.0 so I am little familiar with it. What is best way to move forward with it? Should I continue resolving errors from latest CVS after applying Jay's patch? Or you can also assign me some specific task.
        Hide
        Pinky Sharma added a comment - - edited

        I have uploaded backup script for moodle 2.0 and made some changes in installation (DB folder).

        Find attached certificate.zip file.

        Show
        Pinky Sharma added a comment - - edited I have uploaded backup script for moodle 2.0 and made some changes in installation (DB folder). Find attached certificate.zip file.
        Hide
        Scott Tearle added a comment -

        Where exactly is the progress for this and if it is usable how do I install / patch it for 2.0.

        Thanks

        Show
        Scott Tearle added a comment - Where exactly is the progress for this and if it is usable how do I install / patch it for 2.0. Thanks
        Hide
        jai gupta added a comment -

        Scott,

        We were able to get this working by applying Jay's patch and Pinky's attachment in CVS head.

        Show
        jai gupta added a comment - Scott, We were able to get this working by applying Jay's patch and Pinky's attachment in CVS head.
        Hide
        Fred McClurg added a comment -

        Jai or somebody:

        If development has slowed down, could the latest code be made available by uploading a new "certificate-2.0.zip" file with the patch applied?

        That would be much appreciated!

        Show
        Fred McClurg added a comment - Jai or somebody: If development has slowed down, could the latest code be made available by uploading a new "certificate-2.0.zip" file with the patch applied? That would be much appreciated!
        Hide
        Julian Ridden added a comment -

        Hi Chardelle,

        Was just wondering if there is a project timeline for this code development. Many are asking about release schedules and I would like to be able to at least give a rough timeframe.

        Many thanks

        Julian

        Show
        Julian Ridden added a comment - Hi Chardelle, Was just wondering if there is a project timeline for this code development. Many are asking about release schedules and I would like to be able to at least give a rough timeframe. Many thanks Julian
        Hide
        Chardelle Busch added a comment -

        Fred, the latest code is in cvs head. I believe all of my latest changes are there.

        The latest code needs testing, the only remaining issue is the file saving code. Justin Filip at Remote-Learner will be looking into that.

        Show
        Chardelle Busch added a comment - Fred, the latest code is in cvs head. I believe all of my latest changes are there. The latest code needs testing, the only remaining issue is the file saving code. Justin Filip at Remote-Learner will be looking into that.
        Hide
        Guido Hornig added a comment -

        Dear programmers, due to my poor understanding of Jira and the moodle development documentation, I added a new issue http://tracker.moodle.org/browse/CONTRIB-2751. Perhaps it should be a comment in the subtask and not a whole issue. Sorry.

        Please point me to the documentation, if it can be done better.

        Show
        Guido Hornig added a comment - Dear programmers, due to my poor understanding of Jira and the moodle development documentation, I added a new issue http://tracker.moodle.org/browse/CONTRIB-2751 . Perhaps it should be a comment in the subtask and not a whole issue. Sorry. Please point me to the documentation, if it can be done better.
        Hide
        Guido Hornig added a comment -

        Question: Is the AMOS System used for translation in CERTIFICATE?
        How to contribute a translation?

        Show
        Guido Hornig added a comment - Question: Is the AMOS System used for translation in CERTIFICATE? How to contribute a translation?
        Hide
        Anthony Borrow added a comment -

        Guido - It is fine to add your comments and questions here about anything related to getting the certificate module ready for Moodle 2.0. You can create a new issue in the CONTRIB project with the component being Module: Certificate. If you attach the translation for the language you want to provide Chardelle can then evaluate it for inclusion. I do not believe AMOS is being used for CONTRIB code but I would have to verify that. Peace - Anthony

        Show
        Anthony Borrow added a comment - Guido - It is fine to add your comments and questions here about anything related to getting the certificate module ready for Moodle 2.0. You can create a new issue in the CONTRIB project with the component being Module: Certificate. If you attach the translation for the language you want to provide Chardelle can then evaluate it for inclusion. I do not believe AMOS is being used for CONTRIB code but I would have to verify that. Peace - Anthony
        Hide
        Guido Hornig added a comment -

        The lang.zip contains a certificate.php file with german (de) translation, because I needed one.
        the ..._help strings are not translated in this file.

        There are translation for the old module in separated files.
        I contacted Ralph hilgenstock as he maintains the DE translations.

        Show
        Guido Hornig added a comment - The lang.zip contains a certificate.php file with german (de) translation, because I needed one. the ..._help strings are not translated in this file. There are translation for the old module in separated files. I contacted Ralph hilgenstock as he maintains the DE translations.
        Hide
        Anthony Borrow added a comment -

        Guido - Normally for contributed code (like the certificate module), the primary maintainer of that code makes decisions about the language files they want to support. My experience has been that most folks are happy to receive a translation (even a partial one). Peace - Anthony

        Show
        Anthony Borrow added a comment - Guido - Normally for contributed code (like the certificate module), the primary maintainer of that code makes decisions about the language files they want to support. My experience has been that most folks are happy to receive a translation (even a partial one). Peace - Anthony
        Hide
        Ralf Hilgenstock added a comment -

        German lang file based on Guido Hornigs version. Two corrections made: Lehrer->Trainer; deleted 'Theater interkativ'

        Help files have to be translated.

        Show
        Ralf Hilgenstock added a comment - German lang file based on Guido Hornigs version. Two corrections made: Lehrer->Trainer; deleted 'Theater interkativ' Help files have to be translated.
        Hide
        Anthony Borrow added a comment -

        Many thanks Ralf!

        Show
        Anthony Borrow added a comment - Many thanks Ralf!
        Hide
        Guido Hornig added a comment -

        here is the German lang/de/certificate.php with some bug fix and 50% translated ..._help strings.

        Show
        Guido Hornig added a comment - here is the German lang/de/certificate.php with some bug fix and 50% translated ..._help strings.
        Hide
        Guido Hornig added a comment -

        Bug report: I (2.0.1+ Build: 20110209) get "Invalid context specified" when delivery is set to e-Mail

        This is the Debugging message:
        Error: could not insert new context level "70", instance "10". cm with id 10 does not exist
        line 1882 of /lib/accesslib.php: call to debugging()
        line 2218 of /lib/accesslib.php: call to create_context()
        line 230 of /mod/certificate/lib.php: call to get_context_instance()
        line 283 of /mod/certificate/lib.php: call to certificate_get_teachers()
        line 594 of /mod/certificate/lib.php: call to certificate_email_teachers()
        line 133 of /mod/certificate/view.php: call to certificate_issue()
        Stack trace:
        line 4847 of /lib/accesslib.php: coding_exception thrown
        line 231 of /mod/certificate/lib.php: call to get_users_by_capability()
        line 283 of /mod/certificate/lib.php: call to certificate_get_teachers()
        line 594 of /mod/certificate/lib.php: call to certificate_email_teachers()
        line 133 of /mod/certificate/view.php: call to certificate_issue()

        Show
        Guido Hornig added a comment - Bug report: I (2.0.1+ Build: 20110209) get "Invalid context specified" when delivery is set to e-Mail This is the Debugging message: Error: could not insert new context level "70", instance "10". cm with id 10 does not exist line 1882 of /lib/accesslib.php: call to debugging() line 2218 of /lib/accesslib.php: call to create_context() line 230 of /mod/certificate/lib.php: call to get_context_instance() line 283 of /mod/certificate/lib.php: call to certificate_get_teachers() line 594 of /mod/certificate/lib.php: call to certificate_email_teachers() line 133 of /mod/certificate/view.php: call to certificate_issue() Stack trace: line 4847 of /lib/accesslib.php: coding_exception thrown line 231 of /mod/certificate/lib.php: call to get_users_by_capability() line 283 of /mod/certificate/lib.php: call to certificate_get_teachers() line 594 of /mod/certificate/lib.php: call to certificate_email_teachers() line 133 of /mod/certificate/view.php: call to certificate_issue()
        Hide
        Guido Hornig added a comment -

        Teachers name is not printed. The Doc says: Teacher role on module level is necessary, but I was not able to get a teacher on the certificate.

        Show
        Guido Hornig added a comment - Teachers name is not printed. The Doc says: Teacher role on module level is necessary, but I was not able to get a teacher on the certificate.
        Hide
        Ramo Karahasan added a comment -

        i've installed the latest certificate from http://downloads.moodle.org/plugins/mod on my latest official Moodle 2 build. After login in and upgrading, i was prompted to run the cron-job. on the end of the cronjob i got: the following:
        Warning: require_once(/srv/www/htdocs/moodleV2/mod/certificate/backup/moodle2/backup_certificate_settingslib.php): failed to open stream: No such file or directory in /srv/www/htdocs/moodleV2/mod/certificate/backup/moodle2/backup_certificate_activity_task.class.php on line 26

        Fatal error: require_once(): Failed opening required '/srv/www/htdocs/moodleV2/mod/certificate/backup/moodle2/backup_certificate_settingslib.php' (include_path='/srv/www/htdocs/moodleV2/lib/zend:/srv/www/htdocs/moodleV2/lib/pear:.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/htdocs/moodleV2/mod/certificate/backup/moodle2/backup_certificate_activity_task.class.php on line 26

        It seems that some files are missing here...
        The certificate seems to work well... but with the above message, the system is not making any backups/imports anymore, if i click on the backupbutton of the course for example... the next page leaves white.

        Show
        Ramo Karahasan added a comment - i've installed the latest certificate from http://downloads.moodle.org/plugins/mod on my latest official Moodle 2 build. After login in and upgrading, i was prompted to run the cron-job. on the end of the cronjob i got: the following: Warning: require_once(/srv/www/htdocs/moodleV2/mod/certificate/backup/moodle2/backup_certificate_settingslib.php): failed to open stream: No such file or directory in /srv/www/htdocs/moodleV2/mod/certificate/backup/moodle2/backup_certificate_activity_task.class.php on line 26 Fatal error: require_once(): Failed opening required '/srv/www/htdocs/moodleV2/mod/certificate/backup/moodle2/backup_certificate_settingslib.php' (include_path='/srv/www/htdocs/moodleV2/lib/zend:/srv/www/htdocs/moodleV2/lib/pear:.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/htdocs/moodleV2/mod/certificate/backup/moodle2/backup_certificate_activity_task.class.php on line 26 It seems that some files are missing here... The certificate seems to work well... but with the above message, the system is not making any backups/imports anymore, if i click on the backupbutton of the course for example... the next page leaves white.
        Hide
        Ramo Karahasan added a comment - - edited

        one more bug: if a student would like to see his certificate the first time a link like this is generated: http://mydomain/moodleV2/mod/certificate/view.php?id=9 , but if the certificate opens, the name of the student is missing. after a reload of the page the link disappear but a button is rendered "review...". with the linkadress: http://mydomain/moodleV2/mod/certificate/view.php?id=9&action=get . when clicking this link, the certificate is printed correctly with the name. This was tested with FireFox 3.6.
        In the Internet Explorer 8 nothing happens when you click at the link as a Student.
        For the IE8 error, i get the following error:

        Details zum Fehler auf der Webseite

        Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; LEN2)
        Zeitstempel: Wed, 23 Feb 2011 14:18:27 UTC

        Meldung: Ungültiges Argument.
        Zeile/line: 72
        Zeichen/sign: 1
        Code: 0
        URI: http://gvm/moodleV2/lib/javascript.php?file=%2Flib%2Fjavascript-static.js&rev=172

        Show
        Ramo Karahasan added a comment - - edited one more bug: if a student would like to see his certificate the first time a link like this is generated: http://mydomain/moodleV2/mod/certificate/view.php?id=9 , but if the certificate opens, the name of the student is missing. after a reload of the page the link disappear but a button is rendered "review...". with the linkadress: http://mydomain/moodleV2/mod/certificate/view.php?id=9&action=get . when clicking this link, the certificate is printed correctly with the name. This was tested with FireFox 3.6. In the Internet Explorer 8 nothing happens when you click at the link as a Student. For the IE8 error, i get the following error: Details zum Fehler auf der Webseite Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; LEN2) Zeitstempel: Wed, 23 Feb 2011 14:18:27 UTC Meldung: Ungültiges Argument. Zeile/line: 72 Zeichen/sign: 1 Code: 0 URI: http://gvm/moodleV2/lib/javascript.php?file=%2Flib%2Fjavascript-static.js&rev=172
        Hide
        Ramo Karahasan added a comment - - edited

        Hi, i figured out the problem with the first time view... it's in the lib.php of this module... i've added this code:

        /************************************************************************

        • Inserts preliminary user data when a certificate is viewed. *
        • Prevents form from issuing a certificate upon browser refresh. *
          ************************************************************************/
          function certificate_prepare_issue($course, $user, $certificate) {
          global $DB;

        if ($DB->record_exists('certificate_issues', array('certificateid'=>$certificate->id, 'userid'=>$user->id, 'certdate'=>'0')))

        { return; }

        $timecreated = time();
        $code = certificate_generate_code();

        $newrec = new Object();
        $newrec->certificateid = $certificate->id;
        $newrec->userid = $user->id;
        $newrec->studentname = fullname($user); //added
        $newrec->classname = $course->fullname; //added
        $newrec->timecreated = $timecreated;
        $newrec->code = $code;

        $DB->insert_record('certificate_issues', $newrec, false);
        }

        and this solve the issue with the first time no seeind name and classname in the certificate.
        Sorry for posting this code here...
        HTH,
        Ramo

        Show
        Ramo Karahasan added a comment - - edited Hi, i figured out the problem with the first time view... it's in the lib.php of this module... i've added this code: /************************************************************************ Inserts preliminary user data when a certificate is viewed. * Prevents form from issuing a certificate upon browser refresh. * ************************************************************************/ function certificate_prepare_issue($course, $user, $certificate) { global $DB; if ($DB->record_exists('certificate_issues', array('certificateid'=>$certificate->id, 'userid'=>$user->id, 'certdate'=>'0'))) { return; } $timecreated = time(); $code = certificate_generate_code(); $newrec = new Object(); $newrec->certificateid = $certificate->id; $newrec->userid = $user->id; $newrec->studentname = fullname($user); //added $newrec->classname = $course->fullname; //added $newrec->timecreated = $timecreated; $newrec->code = $code; $DB->insert_record('certificate_issues', $newrec, false); } and this solve the issue with the first time no seeind name and classname in the certificate. Sorry for posting this code here... HTH, Ramo
        Hide
        Jay Knight added a comment -

        I've updated to the latest certificate module in cvs and fixed a few things to make it not break. The certificate still doesn't look right, but there are no more errors or warnings (for me). The watermark position is hardcoded for a letter/landscape layout (and isn't really right, I just had to give it some coordinates).

        I've put this into a github repo: https://github.com/jk3us/moodle_certificate ... branch "two" is what is currently in CVS, and "two_fix" has my fixes... Feel free to clone and offer more fixes. I'll try to keep it up to date with any changes from cvs as well.

        Show
        Jay Knight added a comment - I've updated to the latest certificate module in cvs and fixed a few things to make it not break. The certificate still doesn't look right, but there are no more errors or warnings (for me). The watermark position is hardcoded for a letter/landscape layout (and isn't really right, I just had to give it some coordinates). I've put this into a github repo: https://github.com/jk3us/moodle_certificate ... branch "two" is what is currently in CVS, and "two_fix" has my fixes... Feel free to clone and offer more fixes. I'll try to keep it up to date with any changes from cvs as well.
        Hide
        Ramo Karahasan added a comment -

        I resolved the backup issue : Warning: require_once(/srv/www/htdocs/moodleV2/mod/certificate/backup/moodle2/backup_certificate_settingslib.php): failed to open stream: No such file or directory in /srv/www/htdocs/moodleV2/mod/certificate/backup/moodle2/backup_certificate_activity_task.class.php on line 26 , with creating an empty file called backup_certificate_settingslib.php . there are no settings declared, so i'm not sure, if the certificate module needs any specific backup settings or if it inherit default settings from the base class. This resolve the backup issue for the moment to me.

        Show
        Ramo Karahasan added a comment - I resolved the backup issue : Warning: require_once(/srv/www/htdocs/moodleV2/mod/certificate/backup/moodle2/backup_certificate_settingslib.php): failed to open stream: No such file or directory in /srv/www/htdocs/moodleV2/mod/certificate/backup/moodle2/backup_certificate_activity_task.class.php on line 26 , with creating an empty file called backup_certificate_settingslib.php . there are no settings declared, so i'm not sure, if the certificate module needs any specific backup settings or if it inherit default settings from the base class. This resolve the backup issue for the moment to me.
        Hide
        Guido Hornig added a comment -

        I found this in my installation:

        backup_certificate_settingslib.php
        <?php

        // This file is part of Moodle - http://moodle.org/
        //
        // Moodle is free software: you can redistribute it and/or modify
        // it under the terms of the GNU General Public License as published by
        // the Free Software Foundation, either version 3 of the License, or
        // (at your option) any later version.
        //
        // Moodle is distributed in the hope that it will be useful,
        // but WITHOUT ANY WARRANTY; without even the implied warranty of
        // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
        // GNU General Public License for more details.
        //
        // You should have received a copy of the GNU General Public License
        // along with Moodle. If not, see <http://www.gnu.org/licenses/>.

        /**

        • @package moodlecore
        • @subpackage backup-moodle2
        • @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
        • @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
          */

        // This activity has not particular settings but the inherited from the generic
        // backup_activity_task so here there isn't any class definition, like the ones
        // existing in /backup/moodle2/backup_settingslib.php (activities section)

        Show
        Guido Hornig added a comment - I found this in my installation: backup_certificate_settingslib.php <?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see < http://www.gnu.org/licenses/ >. /** @package moodlecore @subpackage backup-moodle2 @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ // This activity has not particular settings but the inherited from the generic // backup_activity_task so here there isn't any class definition, like the ones // existing in /backup/moodle2/backup_settingslib.php (activities section)
        Hide
        Jay Knight added a comment -

        Ramo, I've included both of your fixes in my github repo (for the missing name and course, and the missing backup file): https://github.com/jk3us/moodle_certificate/tree/two_fixes. I'm trying to make sure we have a single place where all the latest updates are.

        I've also done some work today on the layout, which was way out of whack. I've pushed some changes making the letter_landscape cert type print nicely. I doubt I'll get a chance to play with the others since we don't use them here.

        Show
        Jay Knight added a comment - Ramo, I've included both of your fixes in my github repo (for the missing name and course, and the missing backup file): https://github.com/jk3us/moodle_certificate/tree/two_fixes . I'm trying to make sure we have a single place where all the latest updates are. I've also done some work today on the layout, which was way out of whack. I've pushed some changes making the letter_landscape cert type print nicely. I doubt I'll get a chance to play with the others since we don't use them here.
        Hide
        Chardelle Busch added a comment -

        Jay, there is no longer a letter_landscape type, so you might check the type files in head. The new types make use of the new tcpdf font code for embedded or non embedded fonts.

        Show
        Chardelle Busch added a comment - Jay, there is no longer a letter_landscape type, so you might check the type files in head. The new types make use of the new tcpdf font code for embedded or non embedded fonts.
        Hide
        Jay Knight added a comment -

        Ah, that's why nothing worked right :-/

        Somehow, I never got the new db fields, (orientation being one of them, which caused the new cert types to fail)... I had forced introformat, but didn't realize that it was supposed to have done some more work on an upgrade... I'll have to test that out again from our live 1.9 site's data before going live.

        Show
        Jay Knight added a comment - Ah, that's why nothing worked right :-/ Somehow, I never got the new db fields, (orientation being one of them, which caused the new cert types to fail)... I had forced introformat, but didn't realize that it was supposed to have done some more work on an upgrade... I'll have to test that out again from our live 1.9 site's data before going live.
        Hide
        Guido Hornig added a comment -

        Dear Chardelle, Dear Anthony or who has the right to manage attachmants here:
        please delete my first attachment: lang.php from 13. Feb

        Is there a chance to get a hint for the zip file non programmers could install for testing?
        In the forum many people are waiting.
        I am now also confused with Jays approach - will this merge with the code of Chardelle ?

        I am very happy to hear from Chardelle here in the CONTRIB-2006.

        Both attach README.txt which are very old.
        If it is time to test it - please help a little and many people will spend hours on testing and help to make the certificate more usefull.

        should we give feedback and if yes: how? I guess there is a description - but there is such an ocean of developer doc.
        MAy be I am too naive - but I think there are people waiting to help if they get some instructions.

        Show
        Guido Hornig added a comment - Dear Chardelle, Dear Anthony or who has the right to manage attachmants here: please delete my first attachment: lang.php from 13. Feb Is there a chance to get a hint for the zip file non programmers could install for testing? In the forum many people are waiting. I am now also confused with Jays approach - will this merge with the code of Chardelle ? I am very happy to hear from Chardelle here in the CONTRIB-2006 . Both attach README.txt which are very old. If it is time to test it - please help a little and many people will spend hours on testing and help to make the certificate more usefull. should we give feedback and if yes: how? I guess there is a description - but there is such an ocean of developer doc. MAy be I am too naive - but I think there are people waiting to help if they get some instructions.
        Hide
        Jay Knight added a comment - - edited

        Well, you can mostly ignore most of my stuff now, I've been working against old code (I hate cvs... when can we get the contrib code in git like moodle is?) I am going to port some of my tweaks into the new cert types and other little fixes into my github repo for my own ease, though.

        Show
        Jay Knight added a comment - - edited Well, you can mostly ignore most of my stuff now, I've been working against old code (I hate cvs... when can we get the contrib code in git like moodle is?) I am going to port some of my tweaks into the new cert types and other little fixes into my github repo for my own ease, though.
        Hide
        Olumuyiwa Taiwo added a comment -

        Where is the best place to get the latest code for this module? Git or CVS?

        Show
        Olumuyiwa Taiwo added a comment - Where is the best place to get the latest code for this module? Git or CVS?
        Hide
        Olumuyiwa Taiwo added a comment -

        The issue reported by Guido on 16Feb is caused by a wrong call to certificate_issue in view.php. The call as it currently exists is:

        certificate_issue($course, $USER, $certificate, $certrecord, $cm); // update certrecord as issued

        It should be changed to:

        certificate_issue($course, $certrecord, $cm); // update certrecord as issued

        There are two places where this occurs: around line 97 and around line 137

        Show
        Olumuyiwa Taiwo added a comment - The issue reported by Guido on 16Feb is caused by a wrong call to certificate_issue in view.php. The call as it currently exists is: certificate_issue($course, $USER, $certificate, $certrecord, $cm); // update certrecord as issued It should be changed to: certificate_issue($course, $certrecord, $cm); // update certrecord as issued There are two places where this occurs: around line 97 and around line 137
        Hide
        Guido Hornig added a comment -

        Thanks to Taiwo for the new step forward.
        I modified view.php according to your ecommendation. Could you post here, where you got the code from?

        I was not successful ( may be I have a diffrent version)
        stored certificates are still shown. New one not, here are the messages:

        Now I get the following message with debug = no messages and debugdisplay = off

        >> Function get_teacher() was removed, please use capabilities instead!

        With debug on:

        after click on module:

        Capability "mod/certificate:manage" was not found! This should be fixed in code.

        • line 579 of /lib/accesslib.php: call to debugging()
        • line 166 of /mod/certificate/lib.php: call to has_capability()
        • line 64 of /mod/certificate/view.php: call to view_header()

        module seem still to function.
        After "Get Certificate":
        New Window, as expected, but there comes:
        Function get_teacher() was removed, please use capabilities instead!

        Print teacher is off

        Show
        Guido Hornig added a comment - Thanks to Taiwo for the new step forward. I modified view.php according to your ecommendation. Could you post here, where you got the code from? I was not successful ( may be I have a diffrent version) stored certificates are still shown. New one not, here are the messages: Now I get the following message with debug = no messages and debugdisplay = off >> Function get_teacher() was removed, please use capabilities instead! With debug on: after click on module: Capability "mod/certificate:manage" was not found! This should be fixed in code. line 579 of /lib/accesslib.php: call to debugging() line 166 of /mod/certificate/lib.php: call to has_capability() line 64 of /mod/certificate/view.php: call to view_header() module seem still to function. After "Get Certificate": New Window, as expected, but there comes: Function get_teacher() was removed, please use capabilities instead! Print teacher is off
        Hide
        Olumuyiwa Taiwo added a comment - - edited

        I got the code from CVS (contrib/plugins/mod/certificate), whatever was the HEAD revision on 13March2011.

        The error you're currently getting is caused by the call to get_teacher() in the function certificate_email_students() in lib.php (somewhere around line 387 in that file).

        What I did was replace that call with the following:

        $context = get_context_instance(CONTEXT_COURSE, $course->id);
            if ($teachers = get_users_by_capability($context, 'moodle/course:update', 'u.*', 'u.id ASC',
                            '', '', '', '', false, true)) {
                $teachers = sort_by_roleassignment_authority($teachers, $context);
                $teacher = array_shift($teachers);
            } else {
                $teacher = get_admin();
            }
        
        

        I should mention that the work I've done on the Certificate 2.0 module has been done for a client, and I would appreciate it if someone could please let me know how to credit them.

        – Muyi

        Show
        Olumuyiwa Taiwo added a comment - - edited I got the code from CVS (contrib/plugins/mod/certificate), whatever was the HEAD revision on 13March2011. The error you're currently getting is caused by the call to get_teacher() in the function certificate_email_students() in lib.php (somewhere around line 387 in that file). What I did was replace that call with the following: $context = get_context_instance(CONTEXT_COURSE, $course->id); if ($teachers = get_users_by_capability($context, 'moodle/course:update', 'u.*', 'u.id ASC', '', '', '', '', false, true)) { $teachers = sort_by_roleassignment_authority($teachers, $context); $teacher = array_shift($teachers); } else { $teacher = get_admin(); } I should mention that the work I've done on the Certificate 2.0 module has been done for a client, and I would appreciate it if someone could please let me know how to credit them. – Muyi
        Hide
        Guido Hornig added a comment -

        Now I get

        Capability "mod/certificate:manage" was not found! This should be fixed in code.

        • line 579 of /lib/accesslib.php: call to debugging()
        • line 166 of /mod/certificate/lib.php: call to has_capability()
        • line 64 of /mod/certificate/view.php: call to view_header()
          the cert is issued without names and without course title
          mail was sent
        Show
        Guido Hornig added a comment - Now I get Capability "mod/certificate:manage" was not found! This should be fixed in code. line 579 of /lib/accesslib.php: call to debugging() line 166 of /mod/certificate/lib.php: call to has_capability() line 64 of /mod/certificate/view.php: call to view_header() the cert is issued without names and without course title mail was sent
        Hide
        Anthony Borrow added a comment -

        Sorry I have not been around as much lately. Since the issue was assigned to Chardelle I was not following too closely. In any case, the best place for all 2.0 code is Git. We will be moving away from CVS over the next 6 months. Generally speaking we try to avoid deleting files from Moodle.org or the tracker unless there is a serious need to do so. It looks like folks figured out that if you re-upload a file with the same name it overwrites the old version. In any case, let me know how I can be of help or if anything is needed. Peace - Anthony

        Show
        Anthony Borrow added a comment - Sorry I have not been around as much lately. Since the issue was assigned to Chardelle I was not following too closely. In any case, the best place for all 2.0 code is Git. We will be moving away from CVS over the next 6 months. Generally speaking we try to avoid deleting files from Moodle.org or the tracker unless there is a serious need to do so. It looks like folks figured out that if you re-upload a file with the same name it overwrites the old version. In any case, let me know how I can be of help or if anything is needed. Peace - Anthony
        Hide
        Jay Knight added a comment -

        So, I just reran a test upgrade on our moodle site from 1.9 to 2, and I ran into a similar problem as before: The upgrade script didn't add the new database fields (introformat, orientation and reissuecert). The reason is that I had made some customizations to the old 1.9 module, and had given it a new version number (in this case, 2010072900). Since the upgrade script is looking for '< 2009062900', so it doesn't trigger for me.

        Even though it is my own fault that I left the beaten path by changing the version number, I think that this new version should just look for any version less than itself to run those upgrade scripts... does this make sense?

        I've made this change on this git branch: https://github.com/jk3us/moodle_certificate/commit/ca89c301205c42591e24646d73d3736500977b45 . It also checks to make sure the fields don't exist before adding them, so even if it gets run twice, it will be okay...

        Show
        Jay Knight added a comment - So, I just reran a test upgrade on our moodle site from 1.9 to 2, and I ran into a similar problem as before: The upgrade script didn't add the new database fields (introformat, orientation and reissuecert). The reason is that I had made some customizations to the old 1.9 module, and had given it a new version number (in this case, 2010072900). Since the upgrade script is looking for '< 2009062900', so it doesn't trigger for me. Even though it is my own fault that I left the beaten path by changing the version number, I think that this new version should just look for any version less than itself to run those upgrade scripts... does this make sense? I've made this change on this git branch: https://github.com/jk3us/moodle_certificate/commit/ca89c301205c42591e24646d73d3736500977b45 . It also checks to make sure the fields don't exist before adding them, so even if it gets run twice, it will be okay...
        Hide
        Ramo Karahasan added a comment - - edited

        Hi,

        are there any improvements to the certificate? Olumuyiwa posted in the forum, that he fixed some issues here and provided us an updated version of the certificate:

        http://projects.logicexpertise.net/svn/moodle_certificate20/certificate20/certificate20.tar.gz

        What i run into is the IE8 error.... Regardless of which configuration (popup, download, etc.) the first time i visit the certificate page (when the link "Get your certificate" is shown, not the review button) and click the link, i got the error messages above in the ie8 Javascriopt console...

        I figured out that the parameters in the view.php:

        popup_action('click', $link, array('height' => 600, 'width' => 800)));

        is wrong.. you have to delete the array as a parameter so that just:

        popup_action('click', $link)); 

        is invoked.

        Replace this line for each popup_action in view.php and the configured option (popup, download, etc.) will appear.

        I've tested it in FF4, IE8 and Chrome 10, but just with the option, popup and download.

        I still don't know how to upload an attachement here, so if anyone of the certificate maintainers would fix this part in the downloadable version, we'll get a bit closer to be lucky

        HTH,
        Ramo

        Show
        Ramo Karahasan added a comment - - edited Hi, are there any improvements to the certificate? Olumuyiwa posted in the forum, that he fixed some issues here and provided us an updated version of the certificate: http://projects.logicexpertise.net/svn/moodle_certificate20/certificate20/certificate20.tar.gz What i run into is the IE8 error.... Regardless of which configuration (popup, download, etc.) the first time i visit the certificate page (when the link "Get your certificate" is shown, not the review button) and click the link, i got the error messages above in the ie8 Javascriopt console... I figured out that the parameters in the view.php: popup_action('click', $link, array('height' => 600, 'width' => 800))); is wrong.. you have to delete the array as a parameter so that just: popup_action('click', $link)); is invoked. Replace this line for each popup_action in view.php and the configured option (popup, download, etc.) will appear. I've tested it in FF4, IE8 and Chrome 10, but just with the option, popup and download. I still don't know how to upload an attachement here, so if anyone of the certificate maintainers would fix this part in the downloadable version, we'll get a bit closer to be lucky HTH, Ramo
        Hide
        Guido Hornig added a comment -

        @Ramo: If you are logged in, there is a huge + (plus sign) at the end of the text line, that contains the word ATTACHMENT.
        This worked for me to upload some translations.
        But think twice what you upload - there seems to be no function to delete your files and my request to maintainers was ignored. The same filename seems to overwrite older versions - but I didn't test this.

        Show
        Guido Hornig added a comment - @Ramo: If you are logged in, there is a huge + (plus sign) at the end of the text line, that contains the word ATTACHMENT. This worked for me to upload some translations. But think twice what you upload - there seems to be no function to delete your files and my request to maintainers was ignored. The same filename seems to overwrite older versions - but I didn't test this.
        Hide
        Chardelle Busch added a comment - - edited

        I have just uploaded the latest files to cvs head.
        Updated: file save and retrieval
        view.php
        various 2.0 updates
        index.php
        report.php

        I have not read all of the past here, but I did take a cursory look at the attachments and added the code to update for introformat and the backupsettings file--thanks.

        I have not tested this thoroughly-please test-particularly:

        Getting the cert with all options--especially adding the file as an attachment to an email
        All types
        B/U and restore
        Upgrade from 1.9

        Thanks

        Show
        Chardelle Busch added a comment - - edited I have just uploaded the latest files to cvs head. Updated: file save and retrieval view.php various 2.0 updates index.php report.php I have not read all of the past here, but I did take a cursory look at the attachments and added the code to update for introformat and the backupsettings file--thanks. I have not tested this thoroughly-please test-particularly: Getting the cert with all options--especially adding the file as an attachment to an email All types B/U and restore Upgrade from 1.9 Thanks
        Hide
        Urs Hunkler added a comment - - edited

        I found a typo in the "Reissue Certificates" explanation - "availableto" should be 2 words ("Note: No review button will be availableto user's.").

        Show
        Urs Hunkler added a comment - - edited I found a typo in the "Reissue Certificates" explanation - "availableto" should be 2 words ("Note: No review button will be availableto user's.").
        Hide
        Sergey Vidusov added a comment -

        Here's the version working for 2.0 - don't know if you guys have already done it, mine works pretty well for every case I've tried.

        Show
        Sergey Vidusov added a comment - Here's the version working for 2.0 - don't know if you guys have already done it, mine works pretty well for every case I've tried.
        Hide
        Ashley Holman added a comment -

        Is anyone able to test / QA Sergey's code? He has updated the plugin for 2.0. Unfortunately this was done as a separate effort in parallel with the work done by Chardelle because we didn't realise there was already work underway.

        Chardelle - would you care to take a look at this code and see if you would like to use it / merge parts of it?

        Many thanks

        Show
        Ashley Holman added a comment - Is anyone able to test / QA Sergey's code? He has updated the plugin for 2.0. Unfortunately this was done as a separate effort in parallel with the work done by Chardelle because we didn't realise there was already work underway. Chardelle - would you care to take a look at this code and see if you would like to use it / merge parts of it? Many thanks
        Hide
        Ashley Holman added a comment -

        BTW, Sergey's code is the 716 kB zip file called attendance.zip.

        Show
        Ashley Holman added a comment - BTW, Sergey's code is the 716 kB zip file called attendance.zip.
        Hide
        Ashley Holman added a comment -

        correction, it's called certificate.zip

        Show
        Ashley Holman added a comment - correction, it's called certificate.zip
        Hide
        sabrina cooper added a comment -

        I have uploaded the certificate.zip files, extraceted them and logged into Moodle as the admin. When I click notifications, nothing installs. Instead I get a message to turn off the display_error function. Is that hindering my Moodle from trying to install the certificate zip test for 2.0?

        Show
        sabrina cooper added a comment - I have uploaded the certificate.zip files, extraceted them and logged into Moodle as the admin. When I click notifications, nothing installs. Instead I get a message to turn off the display_error function. Is that hindering my Moodle from trying to install the certificate zip test for 2.0?
        Hide
        Sergey Vidusov added a comment -

        Hi sabrina, are you referring to 716 kB zip which I uploaded? I had no problems whatsoever installing it to 2.0.

        Show
        Sergey Vidusov added a comment - Hi sabrina, are you referring to 716 kB zip which I uploaded? I had no problems whatsoever installing it to 2.0.
        Hide
        Justin Parker added a comment -

        I'm also not able to install the 716 kB version from April 5, 2011. I go to my notifications and there's nothing there to update the new version. I completely removed the older version of Certificate 2.0 and added the new one in addition to removing the database entries. Still nothing. Even after replacing those files I can't upgrade and now my Certificates don't work at all.

        Show
        Justin Parker added a comment - I'm also not able to install the 716 kB version from April 5, 2011. I go to my notifications and there's nothing there to update the new version. I completely removed the older version of Certificate 2.0 and added the new one in addition to removing the database entries. Still nothing. Even after replacing those files I can't upgrade and now my Certificates don't work at all.
        Hide
        Ashley Holman added a comment -

        Justin and Sabrina - I just tested the zip and it worked for me when I installed it fresh into a 2.0 instance. Note that the zip file already contains the "mod" directory within it, so you should extract the zip file from within the root of the moodle directory. If you extra it inside mod/ you will end up with mod/mod/certificate and so you will have to move the certificate directory back into the first mod/ dir. Could this be the problem?

        Show
        Ashley Holman added a comment - Justin and Sabrina - I just tested the zip and it worked for me when I installed it fresh into a 2.0 instance. Note that the zip file already contains the "mod" directory within it, so you should extract the zip file from within the root of the moodle directory. If you extra it inside mod/ you will end up with mod/mod/certificate and so you will have to move the certificate directory back into the first mod/ dir. Could this be the problem?
        Hide
        Mark Nelson added a comment -

        There is an issue with the certificate plugin when upgrading from 1.9 to 2.0 (fresh install is fine). The code does not alter the database to reflect the new code with some necessary columns missing, such as orientation.

        Show
        Mark Nelson added a comment - There is an issue with the certificate plugin when upgrading from 1.9 to 2.0 (fresh install is fine). The code does not alter the database to reflect the new code with some necessary columns missing, such as orientation.
        Hide
        Jay Knight added a comment -

        Mark, I had this problem as well. In my case it was because I had made some customizations against the 1.9 version and bumped the version number, so the upgrade script didn't think my database needed upgrading. See my comment from March 15 for a solution.

        Show
        Jay Knight added a comment - Mark, I had this problem as well. In my case it was because I had made some customizations against the 1.9 version and bumped the version number, so the upgrade script didn't think my database needed upgrading. See my comment from March 15 for a solution.
        Hide
        sabrina cooper added a comment -

        I was referring to the 716kb version. Nothing appears in notifications. Ashley, I notice the mod directory was duplicated and moved the certificate to the highest level of mod and that did not fix the problem. So now it is moodle/mod/certificate. I did not upgrade from 1.9. My only installation has been the 2.0 version. I need to have the certificate up like last week so is there any work around anyone has found?

        Show
        sabrina cooper added a comment - I was referring to the 716kb version. Nothing appears in notifications. Ashley, I notice the mod directory was duplicated and moved the certificate to the highest level of mod and that did not fix the problem. So now it is moodle/mod/certificate. I did not upgrade from 1.9. My only installation has been the 2.0 version. I need to have the certificate up like last week so is there any work around anyone has found?
        Hide
        Justin Parker added a comment -

        Ashley, I had an older certificate 2.0 version loaded already on my site prior to attempting to update to the latest version. It worked except that when you initially went to retrieve your certificate it would give you an error page. However, if you returned/refreshed your page you could review the certificate that was issued. Now it gives and error that says "Error reading from database" and when I attempted to update to the latest version I expected the notifications tab to have me install something new, but it didn't recognize any change. Is there a way to completely remove this module and reinstall it? I'm hoping to retain all my database records for the students that have already received a certificate as well.

        Show
        Justin Parker added a comment - Ashley, I had an older certificate 2.0 version loaded already on my site prior to attempting to update to the latest version. It worked except that when you initially went to retrieve your certificate it would give you an error page. However, if you returned/refreshed your page you could review the certificate that was issued. Now it gives and error that says "Error reading from database" and when I attempted to update to the latest version I expected the notifications tab to have me install something new, but it didn't recognize any change. Is there a way to completely remove this module and reinstall it? I'm hoping to retain all my database records for the students that have already received a certificate as well.
        Hide
        Jordan Wolff added a comment -

        I just tried installing "Certificate.zip" 05/apr/11. I am a new user moodle user. I extracted the zip file and see the folder with all the files under moodle/mod/certificate. When I go into my notification, I am getting this error "Non-standard (about to be installed)". Can you please provided support to help resolve this issue!

        Thank you

        Show
        Jordan Wolff added a comment - I just tried installing "Certificate.zip" 05/apr/11. I am a new user moodle user. I extracted the zip file and see the folder with all the files under moodle/mod/certificate. When I go into my notification, I am getting this error "Non-standard (about to be installed)". Can you please provided support to help resolve this issue! Thank you
        Hide
        Jacob added a comment -

        I have installed the Certificate.zip 05/apr/11 above and get the following as well:

        • However, if you returned/refreshed your page you could review the certificate that was issued.
        • I am getting this error "Non-standard (about to be installed)"

        Can we get a clear diretion on which version is going forward, who is actively working on fixes and testing?
        As others on this forum, we needed this 6 months ago and would like to participate helping to bring this to a final version.

        Thanks

        Show
        Jacob added a comment - I have installed the Certificate.zip 05/apr/11 above and get the following as well: However, if you returned/refreshed your page you could review the certificate that was issued. I am getting this error "Non-standard (about to be installed)" Can we get a clear diretion on which version is going forward, who is actively working on fixes and testing? As others on this forum, we needed this 6 months ago and would like to participate helping to bring this to a final version. Thanks
        Hide
        Brent Lee added a comment -

        Anthony: can you re-assign?

        Show
        Brent Lee added a comment - Anthony: can you re-assign?
        Hide
        David Upson added a comment -

        I am also desperate to see some movement on this.

        I am having a problem with the 05/Apr/11 version trying to create a new file when "Review Your Certificate" is clicked. The File API does not allow for overwriting existing files, so an error is thrown. Refreshing has no effect.

        It surprises me that the Review button would attempt to rewrite the file. Is this normal behavior? Is it possible that my database tables didn't fully update? Is there a comprehensive list of required tables and fields somewhere?

        Using Moodle 2.0.2 (Build: 20110221) slightly modified (only the navigation block).

        Show
        David Upson added a comment - I am also desperate to see some movement on this. I am having a problem with the 05/Apr/11 version trying to create a new file when "Review Your Certificate" is clicked. The File API does not allow for overwriting existing files, so an error is thrown. Refreshing has no effect. It surprises me that the Review button would attempt to rewrite the file. Is this normal behavior? Is it possible that my database tables didn't fully update? Is there a comprehensive list of required tables and fields somewhere? Using Moodle 2.0.2 (Build: 20110221) slightly modified (only the navigation block).
        Hide
        Chardelle Busch added a comment -

        The code that I have udpated for 2.0 is in cvs head. If you want to do testing, please try that version and then report issues on it here instead of any of the attached zips.

        Show
        Chardelle Busch added a comment - The code that I have udpated for 2.0 is in cvs head. If you want to do testing, please try that version and then report issues on it here instead of any of the attached zips.
        Hide
        Jacob added a comment -

        Chardelle,

        Can you please clarrify? Where is "cvs head"? What is the title of your updated version and the date?

        Do you have a features document that we can use to test against?

        Thanks
        Jacob

        Show
        Jacob added a comment - Chardelle, Can you please clarrify? Where is "cvs head"? What is the title of your updated version and the date? Do you have a features document that we can use to test against? Thanks Jacob
        Hide
        Chardelle Busch added a comment -

        Cvs is here: http://cvs.moodle.org/moodle/
        Get more info here: http://docs.moodle.org/en/CVS_for_Administrators
        or email me for a zip

        Show
        Chardelle Busch added a comment - Cvs is here: http://cvs.moodle.org/moodle/ Get more info here: http://docs.moodle.org/en/CVS_for_Administrators or email me for a zip
        Hide
        Anthony Borrow added a comment -

        Chardelle - I've fallen behind on following this issue but thanks for your work on getting the Certificate module working for Moodle 2.0. As you may know, currently, Moodle HQ (actually Sam) is redesigning the Modules and Plugins database (see http://tracker.moodle.org/browse/MDLSITE-571 for more information). Since Moodle recently switched from CVS to Git, we are also preparing to make a similar transition of CONTRIB code to Git. If you are familiar with Git or perhaps already using Git, it would be good if we might move the Certificate activity modules code to that you have been maintaining in you could maintain on Moodle's CVS server to a public Git repository such as Github.com or Gitosis. If you are not familiar with Git, I will be contacting you as we begin implementing the new Modules and Plugins database to let you know how we will be proceeding. There is the ability to export Git commits to CVS so that we can have the best of both worlds (folks using CVS for the download will still be able to get updates) and developers get the freedom and advantages that come from using Git. Let me know if you have any questions or concerns. Please do not hesitate to let me know if there is anything I can do to be supportive of your efforts. Peace - Anthony

        Show
        Anthony Borrow added a comment - Chardelle - I've fallen behind on following this issue but thanks for your work on getting the Certificate module working for Moodle 2.0. As you may know, currently, Moodle HQ (actually Sam) is redesigning the Modules and Plugins database (see http://tracker.moodle.org/browse/MDLSITE-571 for more information). Since Moodle recently switched from CVS to Git, we are also preparing to make a similar transition of CONTRIB code to Git. If you are familiar with Git or perhaps already using Git, it would be good if we might move the Certificate activity modules code to that you have been maintaining in you could maintain on Moodle's CVS server to a public Git repository such as Github.com or Gitosis. If you are not familiar with Git, I will be contacting you as we begin implementing the new Modules and Plugins database to let you know how we will be proceeding. There is the ability to export Git commits to CVS so that we can have the best of both worlds (folks using CVS for the download will still be able to get updates) and developers get the freedom and advantages that come from using Git. Let me know if you have any questions or concerns. Please do not hesitate to let me know if there is anything I can do to be supportive of your efforts. Peace - Anthony
        Hide
        Jacob added a comment -

        Chardelle,

        My IT department has not utilized cvs or Git for updates before. I have read the information and will look to get them using this update process in the future.

        Can you please provide me the zip at this time for certificates?

        jacob.westerhof@esfox.com

        Thanks
        Jacob

        Show
        Jacob added a comment - Chardelle, My IT department has not utilized cvs or Git for updates before. I have read the information and will look to get them using this update process in the future. Can you please provide me the zip at this time for certificates? jacob.westerhof@esfox.com Thanks Jacob
        Hide
        Jay Knight added a comment -

        I have a github repo that is mirroring CVS: https://github.com/jk3us/moodle_certificate. The download button can generate a zip file of the latest code.

        Show
        Jay Knight added a comment - I have a github repo that is mirroring CVS: https://github.com/jk3us/moodle_certificate . The download button can generate a zip file of the latest code.
        Hide
        Jay Knight added a comment -

        Just a small bug in the current CVS version, related to the upgrade problems discussed here around March 15: The current version number is set to "2011110101", corresponding to a date in November of this Year (6 months from now). It just made it a little confusing to re-test my upgrade changes.

        Show
        Jay Knight added a comment - Just a small bug in the current CVS version, related to the upgrade problems discussed here around March 15: The current version number is set to "2011110101", corresponding to a date in November of this Year (6 months from now). It just made it a little confusing to re-test my upgrade changes.
        Hide
        Ramo Karahasan added a comment -

        Hi there,

        i've just downloaded the latest from Jays git repo and installed it successfully. If a course creator/teacher tries to add the activity into a course, fill out the mandatory fields and click on "Save and return to course" i got the following message:

        Sorry, but you do not currently have permissions to update calendar event

        More information about this error
        Stack trace:

        line 421 of /lib/setuplib.php: moodle_exception thrown
        line 1969 of /calendar/lib.php: call to print_error()
        line 2379 of /calendar/lib.php: call to calendar_event->update()
        line 3916 of /lib/deprecatedlib.php: call to calendar_event::create()
        line 37 of /mod/certificate/lib.php: call to add_event()
        line 410 of /course/modedit.php: call to certificate_add_instance()

        What's going wrong here? I can't identify where the problem is coming from.
        As an Administrator all is working fine. Can anyone test this, so that i can see if it's a bug in the module or if i have any problems with my role course creator / teacher

        I can't imagine where the certificate is using the calendar event

        That would be great,
        thank you
        Ramo

        Show
        Ramo Karahasan added a comment - Hi there, i've just downloaded the latest from Jays git repo and installed it successfully. If a course creator/teacher tries to add the activity into a course, fill out the mandatory fields and click on "Save and return to course" i got the following message: Sorry, but you do not currently have permissions to update calendar event More information about this error Stack trace: line 421 of /lib/setuplib.php: moodle_exception thrown line 1969 of /calendar/lib.php: call to print_error() line 2379 of /calendar/lib.php: call to calendar_event->update() line 3916 of /lib/deprecatedlib.php: call to calendar_event::create() line 37 of /mod/certificate/lib.php: call to add_event() line 410 of /course/modedit.php: call to certificate_add_instance() What's going wrong here? I can't identify where the problem is coming from. As an Administrator all is working fine. Can anyone test this, so that i can see if it's a bug in the module or if i have any problems with my role course creator / teacher I can't imagine where the certificate is using the calendar event That would be great, thank you Ramo
        Hide
        Debbie McDonald added a comment -

        One of the major selling points of the Moodle system was the certificate module so after our recent upgrade to 2.0 my clients are not happy to say the least.I did not realize there was an issue with the modules transferring into the 2.0 system, yikes. That should be in BIG BOLD letters on the install page.

        The first time I installed it completely locked me out of the admin functions except for the plug-ins page and then I started getting this error:

        mod_certificate

        Field "customtext" already exists

        More information about this error

        Stack trace:

        line 573 of /lib/ddl/database_manager.php: ddl_exception thrown
        line 1004 of /lib/deprecatedlib.php: call to database_manager->add_field()
        line 32 of /mod/certificate/db/upgrade.php: call to add_field()
        line 526 of /lib/upgradelib.php: call to xmldb_certificate_upgrade()
        line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules()
        line 1425 of /lib/upgradelib.php: call to upgrade_plugins()
        line 311 of /admin/index.php: call to upgrade_noncore()

        Is there a working model for 2.0 and tutorial on how to install?

        Show
        Debbie McDonald added a comment - One of the major selling points of the Moodle system was the certificate module so after our recent upgrade to 2.0 my clients are not happy to say the least.I did not realize there was an issue with the modules transferring into the 2.0 system, yikes. That should be in BIG BOLD letters on the install page. The first time I installed it completely locked me out of the admin functions except for the plug-ins page and then I started getting this error: mod_certificate Field "customtext" already exists More information about this error Stack trace: line 573 of /lib/ddl/database_manager.php: ddl_exception thrown line 1004 of /lib/deprecatedlib.php: call to database_manager->add_field() line 32 of /mod/certificate/db/upgrade.php: call to add_field() line 526 of /lib/upgradelib.php: call to xmldb_certificate_upgrade() line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules() line 1425 of /lib/upgradelib.php: call to upgrade_plugins() line 311 of /admin/index.php: call to upgrade_noncore() Is there a working model for 2.0 and tutorial on how to install?
        Hide
        Jacob added a comment -

        Debbie,

        After corresponding directly with Chardelle, I was able to obtain the correct version that works with 2.0 of Moodle. The versions attached to this issue are not fully complete and tested.
        We have been using the one provided to us without issue (ok, a small issue that Chardelle is looking into dealing with e-mails). I suggest you talk with her directly.

        Had to fully remove and delete the other versions and then install the correct version.

        Jacob

        Show
        Jacob added a comment - Debbie, After corresponding directly with Chardelle, I was able to obtain the correct version that works with 2.0 of Moodle. The versions attached to this issue are not fully complete and tested. We have been using the one provided to us without issue (ok, a small issue that Chardelle is looking into dealing with e-mails). I suggest you talk with her directly. Had to fully remove and delete the other versions and then install the correct version. Jacob
        Hide
        Debbie McDonald added a comment -

        Changed the name "customtext" in all of the files within the certificate module to "customtextcert" because the Splash theme uses a "customtext" name for menuing system. Thought I was on to something for a minute but then got the following error:

        Plugin "mod_verify_certificate" is defective or outdated, can not continue, sorry.

        More information about this error
        Debug info: Invalid plugin directory name.
        Stack trace:

        line 426 of /lib/upgradelib.php: plugin_defective_exception thrown
        line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules()
        line 1425 of /lib/upgradelib.php: call to upgrade_plugins()
        line 311 of /admin/index.php: call to upgrade_noncore()

        Show
        Debbie McDonald added a comment - Changed the name "customtext" in all of the files within the certificate module to "customtextcert" because the Splash theme uses a "customtext" name for menuing system. Thought I was on to something for a minute but then got the following error: Plugin "mod_verify_certificate" is defective or outdated, can not continue, sorry. More information about this error Debug info: Invalid plugin directory name. Stack trace: line 426 of /lib/upgradelib.php: plugin_defective_exception thrown line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules() line 1425 of /lib/upgradelib.php: call to upgrade_plugins() line 311 of /admin/index.php: call to upgrade_noncore()
        Hide
        Debbie McDonald added a comment - - edited

        Fix did not work

        Show
        Debbie McDonald added a comment - - edited Fix did not work
        Hide
        Debbie McDonald added a comment -

        Thank you Jacob, I will try it. At this point, my trainers and students are very unhappy with the upgrade because of this. I wish I would have realized this was not working before upgrading

        Show
        Debbie McDonald added a comment - Thank you Jacob, I will try it. At this point, my trainers and students are very unhappy with the upgrade because of this. I wish I would have realized this was not working before upgrading
        Hide
        Mat added a comment -

        I have recently upgraded to 2.0 and have realised that the certificate doesnt work correctly. Why is this not a standard feature in Moodle 2.0

        Show
        Mat added a comment - I have recently upgraded to 2.0 and have realised that the certificate doesnt work correctly. Why is this not a standard feature in Moodle 2.0
        Hide
        Urs Hunkler added a comment -

        Chardelle, I have discovered an issue with the certificate icon - it is not shown correctly. In Moodle 2 the mod icon is located in the pix folder. In my local dev Moodle I moved icon.gif to the pix folder and it gets shown.

        Show
        Urs Hunkler added a comment - Chardelle, I have discovered an issue with the certificate icon - it is not shown correctly. In Moodle 2 the mod icon is located in the pix folder. In my local dev Moodle I moved icon.gif to the pix folder and it gets shown.
        Hide
        kerzah added a comment -

        I am glad to see this tracker is priority ranked; the certificate is a very important module. I will be looking to upgrade our site to Moodle 2.0 very soon. Thanks Moodle team!

        Show
        kerzah added a comment - I am glad to see this tracker is priority ranked; the certificate is a very important module. I will be looking to upgrade our site to Moodle 2.0 very soon. Thanks Moodle team!
        Hide
        Rahul vijayvergiya added a comment -

        Hi Chardelle,

        I've been tasked with integrating moodle certificates into our companies moodle 2.0 installation. Could you please provide me with your latest code, so I can test. The good news is that our company wants to send fixes back to the community - so if there are any pieces of code you would like me to look at - let me know.

        Thanks in advance

        Rahul

        Show
        Rahul vijayvergiya added a comment - Hi Chardelle, I've been tasked with integrating moodle certificates into our companies moodle 2.0 installation. Could you please provide me with your latest code, so I can test. The good news is that our company wants to send fixes back to the community - so if there are any pieces of code you would like me to look at - let me know. Thanks in advance Rahul
        Hide
        Anthony Borrow added a comment -

        I realize that some of the Partners are interested in getting this done. Perhaps Mike Churchward and Mark Nelson might work together via Git to come up with a recommended version for Moodle 2.0. We need to provide some clarity here to folks about which is the best and latest version for 2.0. Let's try and get some clarification for folks as to what code to use for testing. Peace - Anthony

        Show
        Anthony Borrow added a comment - I realize that some of the Partners are interested in getting this done. Perhaps Mike Churchward and Mark Nelson might work together via Git to come up with a recommended version for Moodle 2.0. We need to provide some clarity here to folks about which is the best and latest version for 2.0. Let's try and get some clarification for folks as to what code to use for testing. Peace - Anthony
        Hide
        Anthony Borrow added a comment -

        Mark - I've added you as a watcher as you were indicating you wanted to be more involved with the certificate module. Let's see if we can map out a plan of attack to get this done so that the code is available for 2.0+ - with 37 votes, I am keen on seeing this finished up. Let me know how I can be helpful. Peace - Anthony

        Show
        Anthony Borrow added a comment - Mark - I've added you as a watcher as you were indicating you wanted to be more involved with the certificate module. Let's see if we can map out a plan of attack to get this done so that the code is available for 2.0+ - with 37 votes, I am keen on seeing this finished up. Let me know how I can be helpful. Peace - Anthony
        Hide
        Mark Drechsler added a comment -

        Thanks Anthony - much appreciated - look forward to meeting you in Sydney in a few days!

        Show
        Mark Drechsler added a comment - Thanks Anthony - much appreciated - look forward to meeting you in Sydney in a few days!
        Hide
        Jean-Michel Vedrine added a comment -

        Hello Anthony, Mark and Mike,
        I am very pleased that more people want to be involved in having a clean release of certificate for Moodle 2.0
        Maybe I am asking for too much but a small post from you or from Anthony in the certificate forum would be good. There is now 2 weeks that certificate is no more available in the plugin and modules database and people are feeling somewhat abandonned
        Also but I am sure you already know there are several tracker tickets (some of them with patches) that have never been answered and these issues are still present in the current code both for 1.9 and for 2.0
        Maybe if you created a META I could list and review these issues and give you my opinion on those tickets.
        Also if I can be of any help let me know.

        Show
        Jean-Michel Vedrine added a comment - Hello Anthony, Mark and Mike, I am very pleased that more people want to be involved in having a clean release of certificate for Moodle 2.0 Maybe I am asking for too much but a small post from you or from Anthony in the certificate forum would be good. There is now 2 weeks that certificate is no more available in the plugin and modules database and people are feeling somewhat abandonned Also but I am sure you already know there are several tracker tickets (some of them with patches) that have never been answered and these issues are still present in the current code both for 1.9 and for 2.0 Maybe if you created a META I could list and review these issues and give you my opinion on those tickets. Also if I can be of any help let me know.
        Hide
        Anthony Borrow added a comment -

        I'm going to re-assign this to Mark Nelson as he has expressed interest in helping to maintain this. After various attempts to contact Chardelle, I think it best that Mark take over as primary maintainer. Given the large number of watchers and votes on this issue I would like to get this issue resolved as soon as possible. It seems like we are close but need to push a little bit more to get it done. Let me know know I can be helpful. Peace - Anthony

        Show
        Anthony Borrow added a comment - I'm going to re-assign this to Mark Nelson as he has expressed interest in helping to maintain this. After various attempts to contact Chardelle, I think it best that Mark take over as primary maintainer. Given the large number of watchers and votes on this issue I would like to get this issue resolved as soon as possible. It seems like we are close but need to push a little bit more to get it done. Let me know know I can be helpful. Peace - Anthony
        Hide
        Mark Nelson added a comment -

        Hi All,

        Sorry for the delayed reply, I was away on holiday and am now (sadly ) back at work.

        Anthony, Shane and I have set up a public repository on github for the certificate module. The link is https://github.com/PukunuiAustralia/moodle-mod_certificate

        I have begun re-writing the certificate module for Moodle 2.0, but do not want to continue without communicating with the other contributers as they may have already made a decent start.

        Show
        Mark Nelson added a comment - Hi All, Sorry for the delayed reply, I was away on holiday and am now (sadly ) back at work. Anthony, Shane and I have set up a public repository on github for the certificate module. The link is https://github.com/PukunuiAustralia/moodle-mod_certificate I have begun re-writing the certificate module for Moodle 2.0, but do not want to continue without communicating with the other contributers as they may have already made a decent start.
        Hide
        Jay Knight added a comment -

        Mark, the current cvs version does mostly work for Moodle 2.0, but there are still some problems that are mentioned throughout the comments on this page. I don't know which, if any, have already been addressed. I also have a git repo at https://github.com/jk3us/moodle_certificate. I'll clone yours (since we have a different set of history) and send you some pull requests for some little modifications that I've made, if that's okay with you.

        Show
        Jay Knight added a comment - Mark, the current cvs version does mostly work for Moodle 2.0, but there are still some problems that are mentioned throughout the comments on this page. I don't know which, if any, have already been addressed. I also have a git repo at https://github.com/jk3us/moodle_certificate . I'll clone yours (since we have a different set of history) and send you some pull requests for some little modifications that I've made, if that's okay with you.
        Hide
        Mark Nelson added a comment -

        Hi Jay, that is fine, thanks!

        I am aware that the certificate module works (partly) with Moodle 2.0, but am planning on adding more functionality in the future. I have viewed the code extensively and would like to re-write a lot of it. I would prefer to create a strong foundation to build up on, rather than hacking on extra functionality to the existing code.

        Show
        Mark Nelson added a comment - Hi Jay, that is fine, thanks! I am aware that the certificate module works (partly) with Moodle 2.0, but am planning on adding more functionality in the future. I have viewed the code extensively and would like to re-write a lot of it. I would prefer to create a strong foundation to build up on, rather than hacking on extra functionality to the existing code.
        Hide
        Glen Antonio Montes added a comment -

        When the student(or admin) try to view his certificate for a second time, the module print an error: "storedfilenotcreated"

        [storedfilenotcreated] = "Can not create file \"$a->contextid/$a->filearea/$a->itemid/$a->filepath/$a->filename\"

        This happend always, in a diferents scenes of moodle 2.0 and 2.1

        Great module, Thanks you guys.

        Show
        Glen Antonio Montes added a comment - When the student(or admin) try to view his certificate for a second time, the module print an error: "storedfilenotcreated" [storedfilenotcreated] = "Can not create file \"$a->contextid/$a->filearea/$a->itemid/$a->filepath/$a->filename\" This happend always, in a diferents scenes of moodle 2.0 and 2.1 Great module, Thanks you guys.
        Hide
        Mark Nelson added a comment -

        Hi Guys,

        Just an update. I have tidied up the code quite a bit with numerous bug fixes and hope to have something to push in the git repo either this week or next.

        Regards,

        Mark

        Show
        Mark Nelson added a comment - Hi Guys, Just an update. I have tidied up the code quite a bit with numerous bug fixes and hope to have something to push in the git repo either this week or next. Regards, Mark
        Hide
        Mary Parke added a comment -

        On our test server I recently tried to duplicate a discussion forum and a book and this error message appeared:
        Warning: require_once(/export/home/[local server path]/moodle/mod/certificate/backup/moodle2/backup_certificate_settingslib.php): failed to open stream: No such file or directory in /export/home/[local server path]/moodle/mod/certificate/backup/moodle2/backup_certificate_activity_task.class.php on line 26 Fatal error: require_once(): Failed opening required '/export/home/[local server path]/moodle/mod/certificate/backup/moodle2/backup_certificate_settingslib.php' (include_path='/export/home/[local server path]/moodle/lib/zend:/export/home/[local server path]/moodle/lib/pear:.:/usr/share/pear:/usr/share/php') in /export/home/[local server path]/moodle/mod/certificate/backup/moodle2/backup_certificate_activity_task.class.php on line 26

        (where [local server path is the path to our local server]).

        Why would the Certificate module play a role in duplicating an activity? Just curious. Thanks!

        Show
        Mary Parke added a comment - On our test server I recently tried to duplicate a discussion forum and a book and this error message appeared: Warning: require_once(/export/home/ [local server path] /moodle/mod/certificate/backup/moodle2/backup_certificate_settingslib.php): failed to open stream: No such file or directory in /export/home/ [local server path] /moodle/mod/certificate/backup/moodle2/backup_certificate_activity_task.class.php on line 26 Fatal error: require_once(): Failed opening required '/export/home/ [local server path] /moodle/mod/certificate/backup/moodle2/backup_certificate_settingslib.php' (include_path='/export/home/ [local server path] /moodle/lib/zend:/export/home/ [local server path] /moodle/lib/pear:.:/usr/share/pear:/usr/share/php') in /export/home/ [local server path] /moodle/mod/certificate/backup/moodle2/backup_certificate_activity_task.class.php on line 26 (where [local server path is the path to our local server] ). Why would the Certificate module play a role in duplicating an activity? Just curious. Thanks!
        Hide
        Jean-Michel Vedrine added a comment -

        Hello Mary,
        you should have these files, your version of certificate is either outdated or incomplete.
        Go to the git adress Mark has given in this issue, and even if he has not already put online his updated version you wil find these files.

        Show
        Jean-Michel Vedrine added a comment - Hello Mary, you should have these files, your version of certificate is either outdated or incomplete. Go to the git adress Mark has given in this issue, and even if he has not already put online his updated version you wil find these files.
        Hide
        Mary Parke added a comment -

        Thank you Jean-Michel!!!! I'll do this! I appreciate the quick response, too!

        Show
        Mary Parke added a comment - Thank you Jean-Michel!!!! I'll do this! I appreciate the quick response, too!
        Hide
        Mark Nelson added a comment -

        Hi Mary,

        This is a known issue with the certificate module in version 2.0. There is no backup functionality! This means whenever attempting to back up a course that contains a certificate module you will receive this error. Moodle goes through all the activities that are listed in a course when backing up and looks for that file and executes the code. The quickest solution is to create a blank backup_certificate_settingslib.php file in the location specified in the error, which will bypass it. However, please note this means that the certificate will not be backed up, as the file is left blank so nothing is done.

        Show
        Mark Nelson added a comment - Hi Mary, This is a known issue with the certificate module in version 2.0. There is no backup functionality! This means whenever attempting to back up a course that contains a certificate module you will receive this error. Moodle goes through all the activities that are listed in a course when backing up and looks for that file and executes the code. The quickest solution is to create a blank backup_certificate_settingslib.php file in the location specified in the error, which will bypass it. However, please note this means that the certificate will not be backed up, as the file is left blank so nothing is done.
        Hide
        Mark Nelson added a comment -

        Hi All,

        I added new code to the upgrade script so that the upgrade from the certificate Module in 1.9 should port across to Moodle 2.0. This includes any linked modules you had in the certificate settings in Moodle 1.9 which are now redundant as Moodle 2.0 introduced conditional activities. These settings will be stored as conditional events in the Moodle 2.0 database.

        Show
        Mark Nelson added a comment - Hi All, I added new code to the upgrade script so that the upgrade from the certificate Module in 1.9 should port across to Moodle 2.0. This includes any linked modules you had in the certificate settings in Moodle 1.9 which are now redundant as Moodle 2.0 introduced conditional activities. These settings will be stored as conditional events in the Moodle 2.0 database.
        Hide
        Jean-Michel Vedrine added a comment -

        Hello Mark,
        As I needed it for the new year, I wrote the code to implement reset functions in certificate module.
        The code need to be added to lib.php
        Additionnaly you should define 2 new strings in lang file :
        $string['deletissuedcertificates'] = 'Delete issued certificates';
        $string['removecert'] = 'Issued certificates removed';

        Show
        Jean-Michel Vedrine added a comment - Hello Mark, As I needed it for the new year, I wrote the code to implement reset functions in certificate module. The code need to be added to lib.php Additionnaly you should define 2 new strings in lang file : $string ['deletissuedcertificates'] = 'Delete issued certificates'; $string ['removecert'] = 'Issued certificates removed';
        Hide
        Mark Nelson added a comment -

        Hi Jean,

        Thanks for the code.

        I will incorporate it into my current changes with the lib.php file, and will be included in my next push.

        Show
        Mark Nelson added a comment - Hi Jean, Thanks for the code. I will incorporate it into my current changes with the lib.php file, and will be included in my next push.
        Hide
        Mark Nelson added a comment -

        I have updated the certificate module. There is one fix regarding invalid orientation by FPDF when upgrading from 1.9 -> 2.0 as the orientation field is empty, I have incorporated Jean's code and have tidied up the lib.php php documentation.

        Show
        Mark Nelson added a comment - I have updated the certificate module. There is one fix regarding invalid orientation by FPDF when upgrading from 1.9 -> 2.0 as the orientation field is empty, I have incorporated Jean's code and have tidied up the lib.php php documentation.
        Hide
        Mark Nelson added a comment -

        Next update will contain all the bug fixes I can find on the tracker.

        I plan on in the future re-writing the certificate type API, as there is a lot of redundant code used. I aim to create a parent class that contains functions used that can be over-written by the various types. Makes things much nicer.

        Show
        Mark Nelson added a comment - Next update will contain all the bug fixes I can find on the tracker. I plan on in the future re-writing the certificate type API, as there is a lot of redundant code used. I aim to create a parent class that contains functions used that can be over-written by the various types. Makes things much nicer.
        Hide
        Nicholas Koeppen added a comment -

        Mark,

        What are your thoughts on adding a customdata field to certificates? I have looked through many of the certificates we work on at UW-Madison and at some of the comments made regarding this module and I think customdata field in the db table would be beneficial in giving custom certificate types custom data fields (I'd figured it would all be serialize in 'customdata'). Working through the implementation for our own purposes, I have found that it could be pretty easy given an admin setting to create the custom configuration options or more likely a type specific section for configuration in the mod_form would make this module very adaptable. Let me know what you think and I'm pretty sure I can help make it happen.

        Thanks for your help on the code and porting this to Moodle 2.0.

        Nick Koeppen

        Show
        Nicholas Koeppen added a comment - Mark, What are your thoughts on adding a customdata field to certificates? I have looked through many of the certificates we work on at UW-Madison and at some of the comments made regarding this module and I think customdata field in the db table would be beneficial in giving custom certificate types custom data fields (I'd figured it would all be serialize in 'customdata'). Working through the implementation for our own purposes, I have found that it could be pretty easy given an admin setting to create the custom configuration options or more likely a type specific section for configuration in the mod_form would make this module very adaptable. Let me know what you think and I'm pretty sure I can help make it happen. Thanks for your help on the code and porting this to Moodle 2.0. Nick Koeppen
        Hide
        Jay Knight added a comment -

        I like the custom data field idea. We add "credit hours" or "contact hours" to many of our certificates and right now that means we have to have custom certificate types for many of those, something like this would be nice if done right...

        That said, I'd suggest that this Issue be reserved for getting the module working, stable, and properly released for 2.x. Any new features should probably get their own issue.

        Show
        Jay Knight added a comment - I like the custom data field idea. We add "credit hours" or "contact hours" to many of our certificates and right now that means we have to have custom certificate types for many of those, something like this would be nice if done right... That said, I'd suggest that this Issue be reserved for getting the module working, stable, and properly released for 2.x. Any new features should probably get their own issue.
        Hide
        Mark Nelson added a comment -

        Hi Guys,

        Great idea. I too have had this requirement and have had to create another certificate type, and then write the SQL queries to obtain the custom profile fields. Once all the bug fixes are done I will re-write the type system and include this change in the certificate settings. I also plan on including the ability to alter the text positions without actually having to edit the code, as this can be an issue for some users who aren't computer savvy.

        Show
        Mark Nelson added a comment - Hi Guys, Great idea. I too have had this requirement and have had to create another certificate type, and then write the SQL queries to obtain the custom profile fields. Once all the bug fixes are done I will re-write the type system and include this change in the certificate settings. I also plan on including the ability to alter the text positions without actually having to edit the code, as this can be an issue for some users who aren't computer savvy.
        Hide
        Forrest Gaston added a comment -

        Mark and Everyone, thanks for your hard work, this is a great module.

        I have been testing the following version: 2011110104 in preparation for migrating for production and came across the following issues/ questions.

        1. Certificates saved on Moodle 1.9, in terms of the PDF attachment didn't migrate over, yes the data was fine.
        2. I'm not sure of the sort order when you look up certificates, it was sorted by last name in the 1.9 version.

        Thanks again,
        Forrest Gaston

        Show
        Forrest Gaston added a comment - Mark and Everyone, thanks for your hard work, this is a great module. I have been testing the following version: 2011110104 in preparation for migrating for production and came across the following issues/ questions. 1. Certificates saved on Moodle 1.9, in terms of the PDF attachment didn't migrate over, yes the data was fine. 2. I'm not sure of the sort order when you look up certificates, it was sorted by last name in the 1.9 version. Thanks again, Forrest Gaston
        Hide
        Jacob added a comment -

        Mark,

        1) Testing with version 2011110106 and when the email is sent to the teacher or other, it doesn't contain a valid id number.

        2) Should I be using master or Stable_21 from the https://github.com/PukunuiAustralia/moodle-mod_certificate site?

        Jacob

        Show
        Jacob added a comment - Mark, 1) Testing with version 2011110106 and when the email is sent to the teacher or other, it doesn't contain a valid id number. 2) Should I be using master or Stable_21 from the https://github.com/PukunuiAustralia/moodle-mod_certificate site? Jacob
        Hide
        Jean-Michel Vedrine added a comment -

        Hello Jacob,
        I think that at least part of your problem is related to the bug I reported as CONTRIB-3212. Maybe if you are able to edit mod/certificate/lib.php, you can try the fix I suggested in CONTRIB-3212 and see if it corrects your problem ?

        Show
        Jean-Michel Vedrine added a comment - Hello Jacob, I think that at least part of your problem is related to the bug I reported as CONTRIB-3212 . Maybe if you are able to edit mod/certificate/lib.php, you can try the fix I suggested in CONTRIB-3212 and see if it corrects your problem ?
        Hide
        Dustin Elliott added a comment -

        I have a brand new install (Moodle 2.1.2, PHP 5.3.8, IIS 7.5, SQL Server 2008 R2 SP1 all on Windows Server 2008 R2).

        When I try to create a certificate and save and view or open the certificate after the activity has been created in a course I get this error below. Can anyone help?

        Debug info: SQLState: 42000<br>
        Error Code: 8120<br>
        Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]Column 'mdl_user.auth' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.<br>

        SELECT u.*,u.picture, s.code, s.timecreated, s.certdate, s.studentname, s.reportgrade
        FROM mdl_certificate_issues s,
        mdl_user u
        WHERE s.certificateid = '2'
        AND s.userid = u.id
        AND s.certdate > 0
        GROUP BY u.id
        [array (
        )]

        Stack trace: •line 394 of \lib\dml\moodle_database.php: dml_read_exception thrown
        •line 252 of \lib\dml\sqlsrv_native_moodle_database.php: call to moodle_database->query_end()
        •line 368 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()
        •line 773 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query()
        •line 807 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->get_recordset_sql()
        •line 702 of \mod\certificate\lib.php: call to sqlsrv_native_moodle_database->get_records_sql()
        •line 301 of \mod\certificate\lib.php: call to certificate_get_issues()
        •line 101 of \mod\certificate\view.php: call to view_header()

        Show
        Dustin Elliott added a comment - I have a brand new install (Moodle 2.1.2, PHP 5.3.8, IIS 7.5, SQL Server 2008 R2 SP1 all on Windows Server 2008 R2). When I try to create a certificate and save and view or open the certificate after the activity has been created in a course I get this error below. Can anyone help? Debug info: SQLState: 42000<br> Error Code: 8120<br> Message: [Microsoft] [SQL Server Native Client 10.0] [SQL Server] Column 'mdl_user.auth' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.<br> SELECT u.*,u.picture, s.code, s.timecreated, s.certdate, s.studentname, s.reportgrade FROM mdl_certificate_issues s, mdl_user u WHERE s.certificateid = '2' AND s.userid = u.id AND s.certdate > 0 GROUP BY u.id [array ( )] Stack trace: •line 394 of \lib\dml\moodle_database.php: dml_read_exception thrown •line 252 of \lib\dml\sqlsrv_native_moodle_database.php: call to moodle_database->query_end() •line 368 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end() •line 773 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query() •line 807 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->get_recordset_sql() •line 702 of \mod\certificate\lib.php: call to sqlsrv_native_moodle_database->get_records_sql() •line 301 of \mod\certificate\lib.php: call to certificate_get_issues() •line 101 of \mod\certificate\view.php: call to view_header()
        Hide
        Mark Nelson added a comment -

        Hi Dustin,

        You are using out-dated code - the SQL query did not work for postgres installs, so was re-written. Can you please update your certificate module at https://github.com/PukunuiAustralia/moodle-mod_certificate and let me know if this fixes the issue?

        Regards,

        Mark

        Show
        Mark Nelson added a comment - Hi Dustin, You are using out-dated code - the SQL query did not work for postgres installs, so was re-written. Can you please update your certificate module at https://github.com/PukunuiAustralia/moodle-mod_certificate and let me know if this fixes the issue? Regards, Mark
        Hide
        Nicholas Koeppen added a comment -

        Everyone,

        Sorry to be the guy that rips this migration in two directions, but our needs out of the certificate appeared to be highly divergent. At UW-Madison we use predefined certificate formats that do not utilize many of the content options that were standard in the certificate module. This led to us designing certificates where we scrolled until 'Certificate Type' and ignored many of the other options.

        Originally (14 Sep 11) I had attempted using a customdata field for our different content options and custom mod_form definitions to include those options in the mod_form (while using the disabledIf options to simply disable invalid options). What I came to realize is that the certificate module is designed with a lot of the core code mixed in with formatting and content. e.g. Date and grade formats were attributed to every certificate even though our pre-defined certificates only should have one date format (and not always the default).

        Because of this different structuring of the module, we have redesigned based on a model of trying to separate core functionality (certificate saving, reissuing, method of delivery) from the content and format functionality. Our new module trims the certificate database table as well as removing relics like 'studentname','classname' and 'reportgrade' from the certificate_issues table. Our proposed solution is modeled using subplugins which allows each certificate type to decide what content and formatting options they want included, but allows all certificate the benefit of the core functionality. The result of this change is a shift to a much more object oriented module design.

        I wanted to introduce our design here because we specifically designed our module to be able to include all the old functionality (but just making it optional). My hope is that with the effort all on my side to code this change of structure we can merge the current working model and proceed from there. Right now the beta version can be found here: https://code.doit.wisc.edu/svn/UW_Moodle/Moodle_2/plugins/mod/cert/trunk/. The example type that can be viewed is called participation_epd (others are in development).

        Last note: as you will see in the cert_form.php.class file, my idea for merging our two design approaches is to include predefined functions that allow certificate designers to pick and choose options to add to their specific certificate as well as using all of these predefined functions to compile the certificate modules that were being designed originally.

        Any questions/comments please let me know. Thanks.
        Nick Koeppen

        Show
        Nicholas Koeppen added a comment - Everyone, Sorry to be the guy that rips this migration in two directions, but our needs out of the certificate appeared to be highly divergent. At UW-Madison we use predefined certificate formats that do not utilize many of the content options that were standard in the certificate module. This led to us designing certificates where we scrolled until 'Certificate Type' and ignored many of the other options. Originally (14 Sep 11) I had attempted using a customdata field for our different content options and custom mod_form definitions to include those options in the mod_form (while using the disabledIf options to simply disable invalid options). What I came to realize is that the certificate module is designed with a lot of the core code mixed in with formatting and content. e.g. Date and grade formats were attributed to every certificate even though our pre-defined certificates only should have one date format (and not always the default). Because of this different structuring of the module, we have redesigned based on a model of trying to separate core functionality (certificate saving, reissuing, method of delivery) from the content and format functionality. Our new module trims the certificate database table as well as removing relics like 'studentname','classname' and 'reportgrade' from the certificate_issues table. Our proposed solution is modeled using subplugins which allows each certificate type to decide what content and formatting options they want included, but allows all certificate the benefit of the core functionality. The result of this change is a shift to a much more object oriented module design. I wanted to introduce our design here because we specifically designed our module to be able to include all the old functionality (but just making it optional). My hope is that with the effort all on my side to code this change of structure we can merge the current working model and proceed from there. Right now the beta version can be found here: https://code.doit.wisc.edu/svn/UW_Moodle/Moodle_2/plugins/mod/cert/trunk/ . The example type that can be viewed is called participation_epd (others are in development). Last note: as you will see in the cert_form.php.class file, my idea for merging our two design approaches is to include predefined functions that allow certificate designers to pick and choose options to add to their specific certificate as well as using all of these predefined functions to compile the certificate modules that were being designed originally. Any questions/comments please let me know. Thanks. Nick Koeppen
        Hide
        Jean-Michel Vedrine added a comment -

        Hello Nicholas and Mark,
        I think that the idea of making certificate types be real Moodle subplugins is a very good idea and definitely the way to go.
        A few remarks :

        • it is very important to use the recent work done on plugins dependancy in MDL-29474 and associated issues. Of course this is valid for Moodle 2.2 only but it is very important to support this from the sartup
        • I am not sure that "type" is a good name for a Moodle subplugins if certificates types are to be managed as real Moodle plugins. Better to ask to the Moodle core team but something as "certtype" would maybe be a better solution on the long term. I know it will create some compatibility and migration issues but better to solve this now
        • We nedd also to think how can new roles be defined for certificates types, because I think it will be interesting for a lot of schools and institutions to be able to restrict access on certificate types edition and creation based on user roles.
        • an important issue with the decision of making certificates types real plugins is to ensure a migration path for existing certificates types : the 4 basivc ones included in the current version of the certificate module but also customized certificates that users have created.
        Show
        Jean-Michel Vedrine added a comment - Hello Nicholas and Mark, I think that the idea of making certificate types be real Moodle subplugins is a very good idea and definitely the way to go. A few remarks : it is very important to use the recent work done on plugins dependancy in MDL-29474 and associated issues. Of course this is valid for Moodle 2.2 only but it is very important to support this from the sartup I am not sure that "type" is a good name for a Moodle subplugins if certificates types are to be managed as real Moodle plugins. Better to ask to the Moodle core team but something as "certtype" would maybe be a better solution on the long term. I know it will create some compatibility and migration issues but better to solve this now We nedd also to think how can new roles be defined for certificates types, because I think it will be interesting for a lot of schools and institutions to be able to restrict access on certificate types edition and creation based on user roles. an important issue with the decision of making certificates types real plugins is to ensure a migration path for existing certificates types : the 4 basivc ones included in the current version of the certificate module but also customized certificates that users have created.
        Hide
        Nicholas Koeppen added a comment -

        Jean-Michel,

        Glad you agree that subplugins would be a good way forward.

        • Thank you for the suggestion on using plugin dependency as I wasn't aware of this addition. I will continue to make sure that any dependancies are included.
        • Currently I have the database field named certtype as is, but the directory is still called mod/cert/type. This would be a quick fix to change the directory name if we determine the need. As for the individual certificate type plugins, I have them set to be 'cert_[TYPENAME]' and the lang files are accessible as such.
        • I haven't expanded roles, but merely used the ones already laid out in the certificate module that Mark and others were working on.
        • This last issue is something I definitely have to work on, but as I said before the new system I suggest doesn't necessarily change the information being stored that much. My new structure will merely separate the content and formatting from the core functionality of issuing, saving and outputting certificates. Upgrading from the other structure should be guiding data into different fields.

        Anyone interested in this new structure can keep up-to-date on what we're doing at the SVN repo linked in my last post.

        Show
        Nicholas Koeppen added a comment - Jean-Michel, Glad you agree that subplugins would be a good way forward. Thank you for the suggestion on using plugin dependency as I wasn't aware of this addition. I will continue to make sure that any dependancies are included. Currently I have the database field named certtype as is, but the directory is still called mod/cert/type. This would be a quick fix to change the directory name if we determine the need. As for the individual certificate type plugins, I have them set to be 'cert_ [TYPENAME] ' and the lang files are accessible as such. I haven't expanded roles, but merely used the ones already laid out in the certificate module that Mark and others were working on. This last issue is something I definitely have to work on, but as I said before the new system I suggest doesn't necessarily change the information being stored that much. My new structure will merely separate the content and formatting from the core functionality of issuing, saving and outputting certificates. Upgrading from the other structure should be guiding data into different fields. Anyone interested in this new structure can keep up-to-date on what we're doing at the SVN repo linked in my last post.
        Hide
        kerzah added a comment -

        Hi Mark, thanks for all the work with the upgrades and fixes. Are there plans to include the "Locking Options" (similar with the previous certificate under moodle 1.9)? Or are there some other settings avail in the current certificate module (for moodle 2.0) that permits the user to print the certificate only when certain activities have been completed in the course? I did not find any discussion on this feature here...

        Show
        kerzah added a comment - Hi Mark, thanks for all the work with the upgrades and fixes. Are there plans to include the "Locking Options" (similar with the previous certificate under moodle 1.9)? Or are there some other settings avail in the current certificate module (for moodle 2.0) that permits the user to print the certificate only when certain activities have been completed in the course? I did not find any discussion on this feature here...
        Hide
        Mark Nelson added a comment -

        Hi Kerzah,

        This was taken out as it was introduced for all activities in Moodle 2.0. I suspect you need to turn on conditional activities to see this option on your site. Click on the link 'Advanced Features' under the site administration menu and check the box next to 'Enable conditional access'.

        Regards,

        Mark

        Show
        Mark Nelson added a comment - Hi Kerzah, This was taken out as it was introduced for all activities in Moodle 2.0. I suspect you need to turn on conditional activities to see this option on your site. Click on the link 'Advanced Features' under the site administration menu and check the box next to 'Enable conditional access'. Regards, Mark
        Hide
        Mark Nielsen added a comment -

        Hi all, our QA reported that the "Minimum required minutes in course" (coursetime) setting wasn't upgraded in 2.0. Is there a reason why it wasn't upgraded? Just trying to understand why so we can document or create workarounds.

        Cheers, Mark

        Show
        Mark Nielsen added a comment - Hi all, our QA reported that the "Minimum required minutes in course" (coursetime) setting wasn't upgraded in 2.0. Is there a reason why it wasn't upgraded? Just trying to understand why so we can document or create workarounds. Cheers, Mark
        Hide
        Mark Nelson added a comment -

        Hi Mark, sounds like this is a bug. I will investigate it tonight.

        Show
        Mark Nelson added a comment - Hi Mark, sounds like this is a bug. I will investigate it tonight.
        Hide
        Mark Nelson added a comment -

        Hi Mark,

        Please see http://tracker.moodle.org/browse/CONTRIB-3286

        Regards,

        Mark

        Show
        Mark Nelson added a comment - Hi Mark, Please see http://tracker.moodle.org/browse/CONTRIB-3286 Regards, Mark
        Hide
        Asana Draper added a comment -

        We have installed the Certificate Module (2.1) in a 2.1.2 version of Moodle. We can create certificates if NO watermark is used, however when we try to create with either a default watermark (Crest.png) or our own watermark we get this error: TCPDF ERROR: [Image] (displays the image path after the error). The png files are definitely there so what are we doing wrong?

        Show
        Asana Draper added a comment - We have installed the Certificate Module (2.1) in a 2.1.2 version of Moodle. We can create certificates if NO watermark is used, however when we try to create with either a default watermark (Crest.png) or our own watermark we get this error: TCPDF ERROR: [Image] (displays the image path after the error). The png files are definitely there so what are we doing wrong?
        Hide
        Debbie McDonald added a comment -

        We are trying to implement this plug-in on a hosted service. We are unable to do so for the following reasons.

        Error occurs on "Activity reports -> Outline report" as follows:
        Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
        More information about this error
        Debug info: Argument 2 passed to moodle_database::get_record() must be an array, string given, called in /home/marko/work/working2/mod/certificate/lib.php on line 113 and defined

        Error occurs on "Activity reports -> Complete report" as follows:
        Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
        More information about this error
        Debug info: Argument 2 passed to moodle_database::get_record() must be an array, string given, called in /home/marko/work/working2/mod/certificate/lib.php on line 130 and defined

        lib.php has unported 1.9 code for calls to $DB->get_record() in functions certificate_user_outline() and certificate_user_complete() which causes the errors mentioned in the usage section.

        lang/gl_utf8 has not been ported to moodle2 format.

        This particular plug-in is essential to our trainers, help?

        Show
        Debbie McDonald added a comment - We are trying to implement this plug-in on a hosted service. We are unable to do so for the following reasons. Error occurs on "Activity reports -> Outline report" as follows: Coding error detected, it must be fixed by a programmer: PHP catchable fatal error More information about this error Debug info: Argument 2 passed to moodle_database::get_record() must be an array, string given, called in /home/marko/work/working2/mod/certificate/lib.php on line 113 and defined Error occurs on "Activity reports -> Complete report" as follows: Coding error detected, it must be fixed by a programmer: PHP catchable fatal error More information about this error Debug info: Argument 2 passed to moodle_database::get_record() must be an array, string given, called in /home/marko/work/working2/mod/certificate/lib.php on line 130 and defined lib.php has unported 1.9 code for calls to $DB->get_record() in functions certificate_user_outline() and certificate_user_complete() which causes the errors mentioned in the usage section. lang/gl_utf8 has not been ported to moodle2 format. This particular plug-in is essential to our trainers, help?
        Hide
        Mike Churchward added a comment -

        Hi Debbie. This sounds like you are using the wrong version of the module for the Moodle you are using. You should repost your question in the forums at: http://moodle.org/mod/forum/view.php?id=7163 rather than in the tracker. The tracker is for coding bugs and other development issues.
        mike

        Show
        Mike Churchward added a comment - Hi Debbie. This sounds like you are using the wrong version of the module for the Moodle you are using. You should repost your question in the forums at: http://moodle.org/mod/forum/view.php?id=7163 rather than in the tracker. The tracker is for coding bugs and other development issues. mike
        Hide
        Mark Nelson added a comment -

        Hi Debbie,

        You are using an old version of the certificate module, please download the latest version at https://github.com/PukunuiAustralia/moodle-mod_certificate

        Regards,

        Mark

        Show
        Mark Nelson added a comment - Hi Debbie, You are using an old version of the certificate module, please download the latest version at https://github.com/PukunuiAustralia/moodle-mod_certificate Regards, Mark
        Hide
        Mark Nelson added a comment -

        Hi Asana,

        I was unable to replicate this issue. Can you provide more information? Can you turn on debugging on your site and post the stack trace.

        Regards,

        Mark

        Show
        Mark Nelson added a comment - Hi Asana, I was unable to replicate this issue. Can you provide more information? Can you turn on debugging on your site and post the stack trace. Regards, Mark
        Hide
        Mark Nelson added a comment -

        This tracker issue is not in use, am closing as fixed. Please create a new tracker issue if you are having any issues.

        Show
        Mark Nelson added a comment - This tracker issue is not in use, am closing as fixed. Please create a new tracker issue if you are having any issues.
        Hide
        Kirill Astashov added a comment - - edited

        Hi Mark,

        I'm reviewing your plugin and noticed that, in lib.php, function certificate_get_teachers(), you are getting teachers by selecting all users with 'mod/certificate:manage' capability. This means that category level managers/helpdesk are also about to start receiving all those email alerts, aren't they? Has anyone complained about it yet? I reckon it's a good idea to exclude those who are not enrolled in the course (e.g. with array_intersect) before returning results. What do you think?

        Show
        Kirill Astashov added a comment - - edited Hi Mark, I'm reviewing your plugin and noticed that, in lib.php, function certificate_get_teachers(), you are getting teachers by selecting all users with 'mod/certificate:manage' capability. This means that category level managers/helpdesk are also about to start receiving all those email alerts, aren't they? Has anyone complained about it yet? I reckon it's a good idea to exclude those who are not enrolled in the course (e.g. with array_intersect) before returning results. What do you think?
        Hide
        Mark Nelson added a comment -

        Hi Guys,

        Just want to point out that I have been developing a new certificate module which is currently in a Beta release. If you feel brave please test it out, it will currently work for Moodle 2.4 onwards, you can find more information on this new plugin at https://moodle.org/mod/forum/discuss.php?d=229683

        Regards,

        Mark

        Show
        Mark Nelson added a comment - Hi Guys, Just want to point out that I have been developing a new certificate module which is currently in a Beta release. If you feel brave please test it out, it will currently work for Moodle 2.4 onwards, you can find more information on this new plugin at https://moodle.org/mod/forum/discuss.php?d=229683 Regards, Mark