Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Conversation

@presnick
Copy link
Contributor

No description provided.

# try:
# db.executesql('''alter table questions add constraint name_bc_unique UNIQUE(name, base_course)''')
# except:
# pass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is commented out, then new installations will not get this constraint which we want to preseve? Why comment it out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting an error when there is another migration to be done later in the file. The attempt to run db.executesql seems to poison the session objec that will be needed later, so try/except wasn't sufficient. (Also seems inefficient to keep running this query every time web2py loads. Isn't there a way to get this constraint through web2py define_table?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to everything I could find in the web2py docs, you cannot create a constraint like this as part of the regular syntax for defining a table.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, well we need to do something other than this, because it breaks things when there's another migration to be done.


# dispatch on grading_type; if none specified, can't autograde
if question.autograde == 'unittest':
if autograde == 'unittest':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an instructor is following a grading path of chapter --> question will this still work? Why the change from autograde to question.autograde ??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't aware of that grading path. I don't think I implemented autograde for anything other than assignments. What do you have in mind?

Note: we discussed last week and decided the decision about whether particular questions should be autograded should be a property of the assignment_question, not the question.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We talked about it this summer. The path is where the instructor selects Chapter for the first column, a question from the chapter for the second, and then student in the third column.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. But I think that's just not implemented at this time. I suggest that we make that a to-do item. (Unless you think it's actually working and this will break it.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I may have been confused about the recent conversation or maybe I'm confused by the values associated with the autograde column.

  1. Whether or not a question can be autograded is one thing. I can see where this would be useful at the assignment level. If you try to autograde an entire assignment there might be questions that are autogradeable and questions that are not. But, if a question is autogradeable at all isn't it always autogradeable?
  2. How a question is autograded seems like a separate idea, and does not seem likely to change as the autograde method is kind of encompassed by the kind of question it is in the first place.

else:
results['status'] = 'failed'
results['info'] = 'no row'
return json.dumps(results)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it is unrelated to the purpose of the PR -- but seems like valid cleanup??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I must have encountered some issue where I needed that for debugging purposes.

@bnmnetp bnmnetp merged commit 52c2b22 into RunestoneInteractive:master Sep 23, 2016
@presnick presnick deleted the autograde_rebased branch January 1, 2018 13:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants