I was wondering about the latter and thought perhaps the caller should be
responsible and this model shouldn't know anything about NOT_SUPPLIED.

You can set grader_type to False in the model but not in the db unless we
ensure lms won't get screwed up. If we have any lms tests which test
grading (including not grading ungraded sections), then go for it.


On Fri, Jan 3, 2014 at 3:43 PM, Adam <notifications@github.com> wrote:

> In cms/djangoapps/models/settings/course_grading.py:
>
> >              "location": unicode(location),
> >          }
> >
> >      @staticmethod
> >      def update_section_grader_type(descriptor, grader_type):
> > -        if grader_type is not None and grader_type != u"Not Graded":
> > +        if grader_type is not None and grader_type != GRADER_NOT_SUPPLIED:
>
> I see! So we need a way to differentiate between "Don't do anything" and
> "Change grader type to ungraded". It seems to me what makes the most amount
> of sense is to set grader_type to False if the section is meant to be
> ungraded, and continue to use None when we don't make any change to
> whether or not the sequence is graded.
>
> Also, in this case, we don't even really need to mention
> GRADER_NOT_SUPPLIED since item.py won't
> CourseGradingModel.update_section_grader_type if grader_type ==
> GRADER_NOT_SUPPLIED
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-platform/pull/2067/files#r8644483>
> .
>