Fix for issue 1333 with help of @tiagochst

Me and @tiagochst menaged to revert the changes from commit 9432e01eecad3c09bb14d164442db8b9dac24336 and now we are able to hide an assignment from students.