def handle(self, *args, **options): if options['all']: course_keys = [course.id for course in modulestore().get_course_summaries()] else: if len(args) < 1: raise CommandError('At least one course or --all must be specified.') try: course_keys = [CourseKey.from_string(arg) for arg in args] except InvalidKeyError: raise CommandError('Invalid key specified.') CourseOverview.get_select_courses(course_keys)
def handle(self, *args, **options): if options['all']: course_keys = [course.id for course in modulestore().get_course_summaries()] else: if len(args) < 1: raise CommandError('At least one course or --all must be specified.') try: course_keys = [CourseKey.from_string(arg) for arg in args] except InvalidKeyError: raise CommandError('Invalid key specified.') CourseOverview.get_select_courses(course_keys, force_update=options.get('force_update'))
def handle(self, *args, **options): course_keys = [] if options['all']: course_keys = [course.id for course in modulestore().get_courses()] else: if len(args) < 1: raise CommandError('At least one course or --all must be specified.') try: course_keys = [CourseKey.from_string(arg) for arg in args] except InvalidKeyError: log.fatal('Invalid key specified.') if not course_keys: log.fatal('No courses specified.') CourseOverview.get_select_courses(course_keys)
def handle(self, *args, **options): if options['all']: # Have CourseOverview generate course overviews for all # the courses in the system. CourseOverview.get_all_courses(force_reseeding=True) else: course_keys = [] if len(args) < 1: raise CommandError('At least one course or --all must be specified.') try: course_keys = [CourseKey.from_string(arg) for arg in args] except InvalidKeyError: log.fatal('Invalid key specified.') if not course_keys: log.fatal('No courses specified.') CourseOverview.get_select_courses(course_keys)