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()
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()
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