def create_empty_course(url,user, name ='New Course', short_description="", is_private=False): learning_activity = LearningActivity( parent = None, root = None, is_container = True, name = name, uri = '/activity/'+url) learning_activity.save() course = Course(short_description=short_description, root=learning_activity, private=is_private) course.save() auth = AuthorLearningActivity(user=user, learning_activity=learning_activity ) auth.save() return learning_activity.id,learning_activity.uri
def create_empty_course(url, user, name='New Course', short_description="", is_private=False): learning_activity = LearningActivity(parent=None, root=None, is_container=True, name=name, uri='/activity/' + url) learning_activity.save() course = Course(short_description=short_description, root=learning_activity, private=is_private) course.save() auth = AuthorLearningActivity(user=user, learning_activity=learning_activity) auth.save() return learning_activity.id, learning_activity.uri
rollup_objective = True, rollup_progress = True, is_container = True, is_visible = True, order_in_container = 0 ) POO.save() description= u""" <p> Que no te intimiden las palabras <code>class</code> , <code>abstract</code> , <code>override</code> o te dé miedo eso del <strong> polimorfismo </strong> o te emociones con la <strong> herencia múltiple</strong>.</p> <p> Ya deberías saber programación básica en algún lenguaje de programación. </p>""" cursoPOO = Course(short_description=description, root=POO) cursoPOO.save() pretest = LearningActivity( name = 'Pretest', slug = 'Pretest', uri = "/test/Pretest", # lom = , parent = POO, root = POO, pre_condition_rule = "", post_condition_rule = "" , rollup_rule = "", rollup_objective = True, rollup_progress = True, choice_exit = False,
parent = None, root = None, choice_exit = False, is_container = True, order_in_container = 0 ) startup.save() description= u""" <p> Como Construir un Startup</p> """ cursoStartUP = Course(short_description=description, root=startup) cursoStartUP.save() intro = LearningActivity( name = 'Lo que ahora sabemos', uri = "/activity/startup/lo-que-ahora-sabemos", parent = startup, root = startup, heading="Lo que ahora sabemos", description = "Las reglas que se aplican a las empresas son muy diferentes a los startups.", image = "https://s3.amazonaws.com/learning-python/python-logo.png", secondary_text = "Lección 1", is_container = True, is_visible = True, order_in_container = 0
rollup_rule = "satisfied IF All satisfied", rollup_objective = True, rollup_progress = True, is_container = True, is_visible = True, order_in_container = 0 ) Demo.save() description= u""" <p> Este es un curso de ejemplo para mostrar la funcionalidad de <code>protoboard</code>. Se muestran los tipos de ejercicios y recursos que se pueden utilizar para crear cursos de programación. </p>""" cursoDemo = Course(short_description=description, root=Demo) cursoDemo.save() preliminar = LearningActivity( name = 'El secuenciado simple', slug = 'Preliminar', uri = "/activity/SecuenciadoSimple", # lom = parent = Demo, root = Demo, heading="1. Secuenciado simple", description = u"""Protoboard utiliza reglas para el secuenciado de actividades de aprendizaje. Aquí se explica de que se trata. De hecho hay una regla que estipula que no puedes visitar la actividad siguiente hasta ver esta.""", image = "https://s3.amazonaws.com/learning-python/IntroVideo.png", pre_condition_rule = "", post_condition_rule = "",
rollup_progress = True, is_container = True, is_visible = True, order_in_container = 0 ) PPP.save() description= u""" <p> Curso de Python básico, ¡Aprende desde cero!</p> <p><code>print "hola mundo"</code></p> <p> Python es utilizado por la Nasa, Google, Instagram y por su puesto protoboard.org</p> """ cursoPPP = Course(short_description=description, root=PPP) cursoPPP.save() intro = LearningActivity( name = 'Introduccion', slug = 'Intro', uri = "/activity/introduccion", # lom = parent = PPP, root = PPP, heading="Introducción al lenguaje", description = "Vemos las principales características del lenguaje y hacemos los primeros ejercicios.", image = "https://s3.amazonaws.com/learning-python/python-logo.png", secondary_text = "Lección 1", # pre_condition_rule = """self.recommendation_value = Text_Verbal.eval(self.user.learningstyleinventory.verbal,self.user.learningstyleinventory.visual)""" , pre_condition_rule = "" , post_condition_rule = "",
rollup_rule = "satisfied IF All satisfied", rollup_objective = True, rollup_progress = True, is_container = True, is_visible = False, order_in_container = 0 ) Redes.save() description= u""" <p> En este trabajo explicamos como se emplean las capas para una presentacón de multiples dispositivos.</p> """ curso = Course(short_description=description, root=Redes) curso.save() actividad1 = LearningActivity( name = 'Actividad 1', slug = 'A1', uri = '/activity/actividad1', parent = Redes, root = Redes, choice_exit = False, pre_condition_rule = "", post_condition_rule = "", rollup_objective = True, rollup_progress = True,
rollup_rule = "", rollup_objective = True, rollup_progress = True, is_container = True, is_visible = True, order_in_container = 0 ) tec.save() description= u""" <p> Hoy conoceras a protoboard.</p>""" cursoagua = Course(short_description=description, root=tec) cursoagua.save() #pretest = LearningActivity( name = 'pretest', slug = 'pretest', # uri = "/test/pretest", # lom = , # parent = POO, root = POO, # pre_condition_rule = "", # post_condition_rule = "" , # rollup_rule = "", # rollup_objective = True, # rollup_progress = True, # choice_exit = False,