From 5cc88ec1adbc04b4a6459c8acd90209bb2e5adc9 Mon Sep 17 00:00:00 2001 From: ichuang Date: Thu, 10 Jan 2013 23:25:29 -0500 Subject: [PATCH] example course_id for compute_grades management command --- .../instructor/management/commands/compute_grades.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/instructor/management/commands/compute_grades.py b/lms/djangoapps/instructor/management/commands/compute_grades.py index 717bfd5802..462833ba3c 100644 --- a/lms/djangoapps/instructor/management/commands/compute_grades.py +++ b/lms/djangoapps/instructor/management/commands/compute_grades.py @@ -19,15 +19,17 @@ class Command(BaseCommand): help = "Compute grades for all students in a course, and store result in DB.\n" help += "Usage: compute_grades course_id_or_dir \n" help += " course_id_or_dir: either course_id or course_dir\n" + help += 'Example course_id: MITx/8.01rq_MW/Classical_Mechanics_Reading_Questions_Fall_2012_MW_Section' def handle(self, *args, **options): print "args = ", args - course_id = 'MITx/8.01rq_MW/Classical_Mechanics_Reading_Questions_Fall_2012_MW_Section' - if len(args)>0: course_id = args[0] + else: + print self.help + return try: course = get_course_by_id(course_id)