certificate dependant on feedback

certificate dependant on feedback

by Simon T -
Number of replies: 13

I must be doing something really stupid but I can't work out what - can anyone help?

I have a course where it is obligatory to complete the feedback questionnaire before you can print the certificate.

Using the certificate module it is easy to make the certificate dependent on a time or a quiz result but I cannot make the dependancy on the feedback module work.

I have set the feedback in the linked activity box and selected no in the required grade box next to it.  However having completed the feedback form if I try to access the certificate I am told "You must first meet all course activity grade requirements before receving your certificate" (ie complete the feedback form).

It is almost as though the fact that I have completed the feedback form is not being registered.

I have recently upgraded to moodle 1.9.1 and it might be related to this.

Thanks in advance

Simon

Average of ratings: -
In reply to Simon T

Re: certificate dependant on feedback

by Chardelle Busch -
Picture of Core developers
Do you have the feedback set to anonymous? If so, it won't work since user id's are not stored for anonymous feedbacks.
In reply to Chardelle Busch

Re: certificate dependant on feedback

by Simon T -

Chardelle

Thanks for the suggestion - I have set the feedback module to record student names - it still doesn't work.

Any other suggestions gratefully received!

Simon

In reply to Simon T

Re: certificate dependant on feedback

by Dawn Slone -
I have the exact same problem.
In reply to Dawn Slone

Re: certificate dependant on feedback

by Zaghem Abbas -
Having same problem, I've tried feedback with user ids but still does not work.

Zag
In reply to Zaghem Abbas

Re: certificate dependant on feedback

by Laurie Swezey -
I am having the same problem.  Does anyone have any suggestions?
In reply to Laurie Swezey

Re: certificate dependant on feedback

by Chardelle Busch -
Picture of Core developers
It looks like the feedback mod code for completion has changed.

Unfortunately, I do not have the time to volunteer on this module at this time.
In reply to Chardelle Busch

Re: certificate dependant on feedback

by Spiros Tzanetatos -
Same issue. Feedback send by the trainee, but trainee has no access to the cert. Anything new?

In reply to Spiros Tzanetatos

Re: certificate dependant on feedback

by Boaz Neeman_Golan -

I installed the Activity Lock block.

it solved the issue, now I open the final exam/certificate ony after feedback

In reply to Chardelle Busch

Re: certificate dependant on feedback

by John Anderson -

I would like to take a crack at fixing this for 1.9.x Moodle. I wish I had a general area of the code where to look/begin.

 

I see that there is a mdl_feedback_completed table and the code does look into this table:

 

} else if ($cm->module == $feedid) {
            return (get_record('feedback_completed', 'id', $cm->instance, 'userid', $userid) !== false);

 

But I need a tiny hint of direction...

In reply to John Anderson

Re: certificate dependant on feedback

by John Anderson -

any little insight / direction ? I have studied the code more, been looking at:

 

$errorlockmod

and

function certificate_grade_condition()

My last cry for help...

 



 

In reply to John Anderson

Re: certificate dependant on feedback

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi John,

The certificate_activity_completed function performs all the checks for each activity to see whether it has been completed or not. You have identified the code for the feedback module that performs this task. From looking at the sql query (get_record('feedback_completed', 'feedback', $cm->instance, 'userid', $userid) it seems like it should be working. I then viewed the feedback's code to see how completed users were determined. If you view the mod/feedback/lib.php file you will see a function called feedback_get_complete_users. It uses the same logic as the certificate module to determine if a user has completed it or not.

I suggest creating a test account and completing the feedback module, then looking at the database table 'feedback_completed' and ensuring that the user who has completed the feedback is actually being inserted into the table, if not then there is your issue. If you are not sure how to view the database, please see http://docs.moodle.org/20/en/MySQL_Admin

Regards,

Mark

In reply to Mark Nelson

Re: certificate dependant on feedback

by John Anderson -
Just huge thanks for responding Mark. I am going to study the 'feedback_completed' table and see if we can rule that out, that it is indeed INSERTing to the table. It's something simple, but hard to find usually isn't it... John
In reply to John Anderson

Re: certificate dependant on feedback

by John Anderson -

I came back to this because I think I found a solution / correction.

in the certificate lib.php file I made this change and got it working with the feedback activity:

} else if ($cm->module == $feedid) {
            echo "found feedback";
            // return (get_record('feedback_completed', 'id', $cm->instance, 'userid', $userid) !== false);
            return (get_record('feedback_completed', 'feedback', $cm->instance, 'userid', $userid) !== false);

I removed the 'id' column and replaced with the 'feedback' column in the get_record() call. Which was returning FALSE when the 'id' column was part of the query. Only thing I can think is that maybe 'id' is causing a name space conflict with some other use of 'id' in this instance? Or just can't read from the table key column?

Anyway, after studying the questionnaire module (it works fine with certificate) I noticed it was calling 'qid' column (id of the questionnaire) and not the the 'id' of the table 'questionnaire_attempts'. So 'feedback_completed' is structured much the same way, and so I plugged 'feedback' column in (id of the feedback activity) and it started returning TRUE (yep found this record) and working correctly!

So I can stop using the sidebar block trick, a pain to explain to other users how/why you need to hide a certificate.

Pretty old junk but I'm happy! smile