#7094 set course password

Here is a proposal for the task https://support.chamilo.org/issues/7094#change-33098 about public courses protected by a password.
Please let me know if you see something wrong about coding conventions or use of templates.