web-cat / pythy

Pythy – the Cloud-Based IDE for Novice Python Programmers
18 stars 3 forks source link

Add message when no classes allow self-enrollment #26

Closed s-edwards closed 11 years ago

s-edwards commented 11 years ago

Currently, when students try to self-enroll and pick an institution and semester, nothing is displayed if no courses for that institution/semester allow self-enrollment. Instead, there should be a message indicating that "No courses for at allow self-enrollment. Please contact your instructor to be enrolled in the course."

Actually, it should probably have a different message if there are no courses for the specified institution/term combination: "No courses for at are available. Please contact your instructor, who must create the course before you can enroll."

ArturAguiar commented 11 years ago

I have made the changes. But not quite how I'd have liked to. If there aren't any courses to list, a message is displayed that says: "This organization does not allow student self-enrollment of any courses. Please contact your instructor so that he may add you to the course. "

I couldn't figure out how the list of courses gets populated. And I can't actually find where the check for the course's self_enrollment_allowed field is. I even looked at the ability model for cancan. But I am at a lost. Any clues?

s-edwards commented 11 years ago

Messages rewritten.