Example #1
0
def manager_dissertations_wait_recep_list(request):
    person = mdl.person.find_by_user(request.user)
    adv = adviser.search_by_person(person)
    offers = faculty_adviser.search_by_adviser(adv)
    offer_props = offer_proposition.search_by_offer(offers)
    show_validation_commission = offer_proposition.show_validation_commission(offer_props)
    show_evaluation_first_year = offer_proposition.show_evaluation_first_year(offer_props)
    disserts = dissertation.search_by_offer_and_status(offers, "TO_RECEIVE")

    return layout.render(request, 'manager_dissertations_wait_recep_list.html',
                         {'dissertations': disserts,
                          'show_validation_commission': show_validation_commission,
                          'show_evaluation_first_year': show_evaluation_first_year})
Example #2
0
def manager_dissertations_wait_comm_jsonlist(request):
    person = mdl.person.find_by_user(request.user)
    adv = adviser.search_by_person(person)
    offers = faculty_adviser.search_by_adviser(adv)
    disserts = dissertation.search_by_offer_and_status(offers, "COM_SUBMIT")
    dissert_waiting_list_json = [
        {
            'pk': dissert.pk,
            'title': dissert.title,
            'author': "{p.last_name} {p.first_name} ".format(p=dissert.author.person),
            'status': dissert.status,
            'offer_year': str(dissert.offer_year_start.academic_year),
            'offer': dissert.offer_year_start.acronym,
            'proposition_dissertation': str(dissert.proposition_dissertation),
            'description': dissert.description
        } for dissert in disserts
    ]
    return JsonResponse(dissert_waiting_list_json, safe=False)