Esempio n. 1
0
def impl(context, script_name, practice_uid, course_name):
    course = Course.objects.get(name=course_name)
    practice = Practice.objects.get(uid=practice_uid, course=course)
    practice.delete_script()
    script = Script()
    script.file = "data/" + script_name
    script.practice = practice
    script.save()
Esempio n. 2
0
def impl(context, script_name, practice_uid, course_name):
    course = Course.objects.get(name=course_name)
    practice = Practice.objects.get(uid=practice_uid, course=course)
    practice.delete_script()
    script = Script()
    script.file="data/"+script_name
    script.practice = practice
    script.save()
Esempio n. 3
0
def load_a_script(course_name, practice_uid, script_file):
    course = Course.objects.get(name=course_name)
    practice = Practice.objects.get(course=course, uid=practice_uid)
    practice.get_script().delete()
    script = Script()
    script.practice = practice
    script.file = script_file
    script.save()
    return script
Esempio n. 4
0
def load_a_script(course_name, practice_uid, script_file):
    course = Course.objects.get(name=course_name)
    practice = Practice.objects.get(course=course, uid=practice_uid)
    practice.get_script().delete()
    script = Script()
    script.practice = practice
    script.file = script_file
    script.save()
    return script