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

Fix auto-grading inconsistencies #433

Merged
merged 2 commits into from
Jul 22, 2015

Conversation

dariusf
Copy link
Contributor

@dariusf dariusf commented Jul 16, 2015

Fixes inconsistencies with keyword grading (previously it was possible that a keyword was highlighted, but not counted into the suggested grade).

Also made exact auto-grading less strict, so more answers will test as correct.

Previously it was possible for keywords to be highlighted, but not to
count towards auto-grading score. This DRYs up relevant parts by making
them use a common way of matching keywords.
Spacing and errant punctuation no longer affect equality. This allows
a wider range of simlar answers to test as correct.
@@ -4,9 +4,8 @@ module AssessmentHelper
def highlight_keywords(original, keywords)
highlighted = original.dup
keywords.each do |keyword|
highlighted.gsub!(Regexp.new("\\b#{keyword}\\b"), content_tag(:mark, '\0').html_safe)
highlighted.gsub!(keyword_regex(keyword), content_tag(:mark, '\0').html_safe)

Choose a reason for hiding this comment

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

Line is too long. [83/80]

allenwq pushed a commit that referenced this pull request Jul 22, 2015
…istencies

Fix auto-grading inconsistencies
@allenwq allenwq merged commit 034013f into development Jul 22, 2015
@allenwq allenwq deleted the dariusf/auto-grading-inconsistencies branch August 6, 2015 06:25
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