-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
django_robots and organizer deletion #115
Conversation
django_robots and organizer deletion
elif request.method != 'POST': | ||
http.Http404 | ||
else: | ||
participation.organizing = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to set the leave date and create/save a new participation instance so the historical data of when someone was organizer of a course is not lost.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this also be done when adding an organizer, since currently we do not know when someone got promoted to organizer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Thu, May 10, 2012 at 4:44 AM, Dirk Uys
reply@reply.github.com
wrote:
+@login_required
+@organizer_required
+def edit_participants_organizer_delete(request, slug, username):
- """ remove username as an organizer for the course """
- participation = get_object_or_404(Participation,
- project__slug=slug, user__username=username, left_on__isnull=True)
- organizers = Participation.objects.filter(
- project__slug=slug,
- user__deleted=False,
- organizing=True)
- if len(organizers) == 1 and participation.id == organizers[0].id:
- messages.error(request, _('You cannot delete the only organizer'))
- elif request.method != 'POST':
- http.Http404
- else:
- participation.organizing = False
should this also be done when adding an organizer, since currently we do not know when someone got promoted to organizer?
Yes we should probably do it at that time as well.
Reply to this email directly or view it on GitHub:
https://github.com/p2pu/lernanta/pull/115/files#r800481
django_robots and organizer deletion
No description provided.