The grade based access update is broken (course_update_7135). It's because it sets the high range regardless of whether there was ever any grade based access set on the course. This causes the settings form to fail validation because the high range is filled in but the low isn't.

Attached a patch that adds a check to ensure there was a grade based access originally on the course before populating the range.

Comments

kyoder created an issue. See original summary.

Status: Needs review » Needs work

The last submitted patch, course.upgrade_grade_access.patch, failed testing.

kyoder’s picture

Status: Needs work » Needs review
StatusFileSize
new1.26 KB

My first patch was wrong. The problem wasn't that the course_grade var wasn't being checked for empty, that was already happening (the source of the var was already being checked). The problem was that an empty string equates to 0 so it was passing the check. I've updated the patch to simply check that course_grade (via its source) is either not empty or equates to 0 as a string. In other words, I just put 0 inside quotes.

Status: Needs review » Needs work

The last submitted patch, 3: course_grade_access_upgrade.patch, failed testing.

The last submitted patch, 3: course_grade_access_upgrade.patch, failed testing.

djdevin’s picture

Status: Needs work » Needs review
StatusFileSize
new744 bytes
djdevin’s picture

Status: Needs review » Fixed

  • djdevin committed c95ca96 on 7.x-1.x authored by kyoder
    Issue #2642498 by kyoder, djdevin: Grade based access update is broken
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.