there is no documentation at this time except the inline-comments.
You can copy an simple item like "textfield". Rename all words "textfield" to the new name.
On the function "check_value()"
you only return true.
On the function "create_value()"
you have to return the name of the teacher
In addition you have to eleminate all shown textboxes. Put a hidden field instead this.
I would say that's all.