Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Auto-grading with keyword answers #428

Merged
merged 8 commits into from
Jul 7, 2015
Merged

Conversation

dariusf
Copy link
Contributor

@dariusf dariusf commented Jul 2, 2015

Implements feature 4 in Shuqun's feature requests. Depends on #427.

  • On creating an assessment question, a UI for adding variable numbers of keyword-score pairs will be shown.
  • When the question is graded, the keyword-score pairs for it are shown. The keywords will also be highlighted in the submitted solution, and a grade will be filled in based on how many keywords are present.

end
it 'should display the options' do
expect(page).to have_text("Grading: #{mission.title}")
expect(page).to have_selector('.auto-grading-keyword', count: 2)

Choose a reason for hiding this comment

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

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@dariusf dariusf force-pushed the dariusf/keyword-auto-grading branch from 8bc9eff to ded7d99 Compare July 2, 2015 11:09
as_enum :auto_grading_type, none: 0, exact: 1, keyword: 2

Choose a reason for hiding this comment

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

Line is too long. [112/80]

@dariusf dariusf force-pushed the dariusf/keyword-auto-grading branch 3 times, most recently from 9c1c986 to a4fa463 Compare July 6, 2015 02:24
it 'should display the options' do
expect(page).to have_text("Grading: #{mission.title}")
expect(page).to have_selector('.auto-grading-exact', count: 2)
expect(page).to have_selector('.auto-grading-keyword', count: 2)

Choose a reason for hiding this comment

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

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@@ -317,6 +344,11 @@
explanation 'Some explanation'
end

factory :auto_grading_keyword_option, class: Assessment::AutoGradingKeywordOption do
keyword 'keyword1'

Choose a reason for hiding this comment

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

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@dariusf dariusf force-pushed the dariusf/keyword-auto-grading branch from a4fa463 to 9766668 Compare July 6, 2015 02:52
@@ -1,7 +1,7 @@
<%= simple_form_for @grading, url: (@grading.persisted? ?
course_assessment_submission_grading_path(@course, @assessment, @submission, @grading) :
course_assessment_submission_gradings_path(@course, @assessment, @submission)),
html: { class: "form-horizontal" } do |f| %>
htm: { class: "form-horizontal" } do |f| %>
Copy link
Member

Choose a reason for hiding this comment

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

Why changed to htm ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mistake, my bad.

It is made to be less than the current max grade and positive.

The validations go both ways, triggering when the max grade is changed,
and when any score is changed. The latter is done because the score
fields are dynamically created.
A number of forms have buttons that add associations and are rendered as
links, due to `link_to_add_association` being called with incorrect
parameters.
@dariusf dariusf force-pushed the dariusf/keyword-auto-grading branch from 9766668 to 2b7c78d Compare July 7, 2015 09:58
allenwq pushed a commit that referenced this pull request Jul 7, 2015
@allenwq allenwq merged commit 2e09469 into development Jul 7, 2015
@allenwq allenwq deleted the dariusf/keyword-auto-grading branch July 14, 2015 05:57
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.

None yet

3 participants