Пример #1
0
def random_interactive_A_question(request):
    eligible = [i for i in modulesList() if i[-4] == 'i' and i[-3] == 'a']
    context = ucf.view_builder('aa_matter_and_radiation_logic',
                               eligible[randint(0,
                                                len(eligible) - 1)])
    return render(request, "physics/interactiveTypeDragSelectMultiReveal.html",
                  context)
Пример #2
0
def random_printable_A_section(request):
    eligible = [i for i in modulesList() if i[-5] == 'p' and i[-3] == 'a']
    total_marks = 0
    target_marks = 60
    question_number = 1
    qlist = []
    while total_marks < target_marks:
        context = ucf.view_builder('aa_matter_and_radiation_logic',
                                   eligible[randint(0,
                                                    len(eligible) - 1)])
        total_marks += int(context['marksBase'])
        context['questionNumber'] = question_number
        question_number += 1
        qlist.append(context)
        continue
    return render(request, "physics/printablePaperMSRevealAB.html",
                  {'qlist': qlist})
Пример #3
0
def module_shortcut(selected):
    if selected[0:2] == 'gx':
        context = ucf.view_builder('gx_nuclear_physics', selected)
    return context
Пример #4
0
def random_printable_B_question(request):
    eligible = [i for i in modulesList() if i[-5] == 'p' and i[-2] == 'b']
    context = ucf.view_builder('aa_matter_and_radiation_logic',
                               eligible[randint(0,
                                                len(eligible) - 1)])
    return render(request, "physics/printablePaperMSRevealAB.html", context)
def module_shortcut(selected):
    if selected[0:2] == 'fb':
        context = ucf.view_builder('fb_electric_fields', selected)
    return context