Skip to content
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

Closed
wants to merge 10 commits into from

Conversation

waheedahmed
Copy link
Contributor

@symbolist @adampalay Send to grader django management command for effected students.


print "args = ", args

if len(args) > 0:
Copy link
Contributor

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]
Copy link
Contributor

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 []?

Copy link
Contributor

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"
Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor

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
Copy link
Contributor

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.

@adampalay adampalay closed this Dec 13, 2013
@adampalay
Copy link
Contributor

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."""
Copy link
Contributor

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?

jenkins-ks pushed a commit to nttks/edx-platform that referenced this pull request Jun 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants