Skip to content
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

Merged
merged 15 commits into from
May 9, 2012
Merged

django_robots and organizer deletion #115

merged 15 commits into from
May 9, 2012

Conversation

dirkcuys
Copy link
Member

@dirkcuys dirkcuys commented May 9, 2012

No description provided.

dirkcuys added a commit that referenced this pull request May 9, 2012
django_robots and organizer deletion
@dirkcuys dirkcuys merged commit eaa095a into p2pu:master May 9, 2012
elif request.method != 'POST':
http.Http404
else:
participation.organizing = False
Copy link

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.

Copy link
Member Author

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?

Copy link

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

dirkcuys added a commit that referenced this pull request Aug 31, 2012
django_robots and organizer deletion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants