Add a custom user field to the certificate

Re: Add a custom user field to the certificate

by Wendi Daniels -
Number of replies: 0
I see my error...I have added a column to the table quiz_attempts, and I want to add the value of that column to the certificate. This value is an id number that I automatically receive from another entity (the student passes the test, the API automatically sends the information to the state and receives a confirmation number, that number is stored in a column in quiz_attempts).
 
  
So, what I need to know is how to I either shift that value to a user profile field in user_info_fields, or how do I recall that data from a column in quiz_attempts?
 
 
A programmer who made the API a while ago created lines similar to this line in the api, and I added this and created the column in quiz_attempts:

$DB->set_field('quiz_attempts', 'certid', (result from the entity), array('id' => $attemptid));
 
 
Seeing my error, I added a user profile field, made it invisible, and added this line in the api, but it is not working:
 
$DB->set_field('user_info_field', 'certidnew', (result from the entity), array('id' => $attemptid));
 
 
I am thinking that "field" refers to the column, but what would refer to a student's value in one particular column, and how would I properly program that?