Add course-specific registration link
In a vision of making Chamilo usable as a staff selection tool, it should be possible to kind of "pre-subscribe" a user to a course by giving him a link to the registration form with a special param.
As we don't have the flexibility to add database changes in this version, it would only work for public or open courses.
The idea would be to send a user to http://chamilodev.beeznest.com/main/auth/inscription.php?c=ABC&e=3, so that when he finished subscribing, if "ABC" is an open or public course, he would be automatically subscribed.
The e=3 parameter would directly send the user to the corresponding exam page.
I believe the changes would be:
- Update the inscription.php script to understand and store the "c" and "e" params in the session (as c_redirect and e_redirect to avoid confusion) if they exist (and after proper filtering)
- If "c" is defined, try to subscribe the new user to the course as part of the user registration
- Update the inscription.php script to send to the "c" course upon registration success (or directly to the exercise "e" if defined as well)
- Update the course_info/settings.php script to add an information box in the course-access section saying:
$CourseSettingsRegisterDirectLink = "If your course is public or open, you can use the direct link below to send an invitation to new users, so after registration, they will be sent directly to the course. Also, you can add the e=1 parameter to the url, replacing "1" by an exercise ID to send them directly to a specific exam. The exercise ID can be discovered in the url when clicking on an exercise to open it.<br/>%s";
(the %s is where we should put the link to the current course, with e= there, but left empty and ignored by inscription.php if empty)
Updated by Yannick Warnier over 7 years ago
- Status changed from Needs more info to Assigned
- Assignee changed from Yannick Warnier to Julio Montoya
Actually, I've been thinking about that and I think the course ID could provoke spamming and make spammers guess any number, then send a link to try and hack it. Using the literal code requires a bit more research... That's my only reason though, and I'm open to discussing it.
Updated by Julio Montoya over 7 years ago
- File classic.png classic.png added
- Status changed from Assigned to Needs more info
- Assignee deleted (
- % Done changed from 0 to 50
I added some changes, question: you want a "fast" redirection (php header redirection) with "no welcome message" or the classic way?
I did the classic way:
Updated by Yoselyn Castillo over 7 years ago
- File screen-setting.gif screen-setting.gif added
- Assignee changed from Yoselyn Castillo to Julio Montoya
it works fine. That link allows users suscribing to a specific course.
Information label was added to course settings page, but i think It would be useful this label to be hidden if the radio button for open courses is not checked, in order to avoid mistakes. What do you think?