+def convert_to_question(request, id):
+ user = request.user
+ answer = get_object_or_404(Answer, id=id)
+
+ if not user.can_convert_to_question(answer):
+ return HttpResponseUnauthorized(request)
+
+ return _edit_question(request, answer, template='node/convert_to_question.html', summary=_("Converted to question"),
+ action_class=AnswerToQuestionAction, allow_rollback=False, url_getter=lambda a: Question.objects.get(id=a.id).get_absolute_url())
+