I didn't understand what do you mean by menu tree. Is it a menu like this
or a tree view like this
If it is a menu i.e. like the first one, then you must just display the heading as plain text instead of a hyperlink. Just check into the user's session to see if he/she has completed the chapter. Or if this behavior must persist during multiple logins, then you'll have to store this information in the database.
If it is a tree view like this second one, then I think this will depend on the javascript tool that you use. I don't think that you would implement your own javascript tree
...