def tables_quest_all(request, quest_id): quest = get_object_or_404(Quest, pk=quest_id, type=Quest.LINEAR, parent__isnull=True) request = is_quest_organizer_or_agent(request, quest) players = quest.players() missions = quest.missions().exclude(is_finish=True) keylogs = Keylog.right_keylogs(missions) context = {'quest': quest, 'players': players, 'missions': missions, 'keylogs': keylogs} return render(request, 'coordination/quests/tables/all.html', context)
def results_quest(request, quest_id): quest = get_object_or_404(Quest, pk=quest_id, parent__isnull=True) if not quest.published: request = is_quest_organizer(request, quest) context = {'quest': quest, } if quest.nonlinear or quest.multilinear: players = quest.players_ext() context.update({'players': players}) else: missions = quest.missions().exclude(is_finish=True) keylogs = Keylog.right_keylogs(missions) current_missions = quest.current_missions() context.update({'missions': missions, 'keylogs': keylogs, 'current_missions': current_missions}) return render(request, 'coordination/quests/results.html', context)