本文整理汇总了Python中oasis.lib.Courses.set_assess_vis方法的典型用法代码示例。如果您正苦于以下问题:Python Courses.set_assess_vis方法的具体用法?Python Courses.set_assess_vis怎么用?Python Courses.set_assess_vis使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oasis.lib.Courses
的用法示例。
在下文中一共展示了Courses.set_assess_vis方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_assess_create
# 需要导入模块: from oasis.lib import Courses [as 别名]
# 或者: from oasis.lib.Courses import set_assess_vis [as 别名]
def test_assess_create(self):
""" Create an empty assessment"""
course_id = Courses.create("TESTCOURSE5", "unit tests for assessment", 1, 1)
Courses.create_config(course_id, "casual", 1)
Courses.set_active(course_id, True)
Courses.set_prac_vis(course_id, "none")
Courses.set_assess_vis(course_id, "none")
title = "Test Assessment 1"
atype = 2 # assignment
duration = 60
code = "123456"
instant = 1
instructions = "These are the instructions"
astart = datetime.datetime.utcnow()
aend = astart + datetime.timedelta(hours=2)
exam_id = Exams.create(course_id, 1, title, atype, duration, astart,
aend, instructions, code=code, instant=instant)
self.assertGreater(exam_id, 0)
topic1_id = Topics.create(course_id, "TESTASSESS1", 1, 1)
self.assertGreater(topic1_id, 0)
data = open(self.test_question_fname).read()
numread = External.import_qts_from_zip(data, topic1_id)
self.assertEqual(numread, 3)