-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Waheed/openended problems commands #1946
Conversation
|
||
print "args = ", args | ||
|
||
if len(args) > 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be if len(args) > 2, since you're using args[0], args[1], args[2]?
def get_latest_task(self): | ||
"""Return latest task object.""" | ||
|
||
last_task_state = self.task_states[-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it ever possible that self.task_states is None
or []
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is done wrong.
class Command(BaseCommand): | ||
""" """ | ||
|
||
help = "Usage: openended_post <course_id> <problem_location> <student_ids.csv> \n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would we get this list of students?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@feanil what's the best way to do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I was wondering what the criteria is for this list. Any query run to get a list of affected students externally should probably just be run here in code instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem is is that we have to join over queries from LMS and the ORA dbs, and I don't know how to do that with the django orm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that is what I was originally wondering about, what is an example query that would result in the list needed for this command? Is this query documented somewhere?
@@ -0,0 +1,55 @@ | |||
from xmodule.open_ended_grading_classes.openendedchild import OpenEndedChild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for removing the hashbang, but why remove the module comment? A docstring at the top would be great.
I'm going to close this PR for now since we found another way to fix the bug this addresses. |
return users | ||
|
||
def create_list_from_csv(path_to_csv): | ||
"""Read a csv and return items in a list.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function isn't properly named: it returns a list of the first column in the csv. Will this be used with csv files with more than one column?
@symbolist @adampalay Send to grader django management command for effected students.