Example #1
0
class TestCreditForNonEmpty(TestingBase):
    def setUp(self) -> None:
        self.config_for_test()
        self.obj = CreditForNonEmptyOLD()

    def test_grade_credit(self):
        txt = "The fat wiffle hound wiffled loudly"
        self.assertEqual(100, self.obj.grade(txt),
                         "Defaults -- greater than minimum word count")

    def test_grade_no_credit(self):
        txt = ""
        self.assertEqual(None, self.obj.grade(txt), "Defaults -- no credit")
Example #2
0
    def __init__( self, **kwargs ):
        self.question_columns = [ ]
        super().__init__( **kwargs )

        # Code for accessing the subsequent unit
        self.access_code_for_next_on = Review
        self.access_code_for_next = None

        # Tools which handle the grade
        self.grace_period = pd.Timedelta( '2 days' )

        self.corrections = [ ]

        # The objects which will be used to penalize late assignments
        self.penalizers = [ HalfLate( self.due_at, self.grace_period ) ]
        # The object which will be used to penalize late assignments

        # The object which will be used to assign the score
        # NB, min_words is 1 for now so as to not create problems with multiple-choice answers
        # This could be fixed in CAN-57
        # The object which will be used to assign the score
        self.grade_methods = [ CreditForNonEmptyOLD( min_words=2, count_stopwords=True ) ]

        try:
            # todo deprecated
            self.penalizer = self.penalizers[ 0 ]
            self.grade_method = self.grade_methods[ 0 ]
        except AttributeError as e:
            print(e)
Example #3
0
    def __init__( self, **kwargs ):
        super().__init__( **kwargs )

        self.email_intro = "Here is the feedback on your assignment:"

        self.corrections = [ ]

        # The objects which will be used to penalize late assignments
        self.penalizers = [ NoLatePenalty() ]
        # The object which will be used to penalize late assignments
        # todo deprecated
        # self.penalizer = self.penalizers[ 0 ]

        # The object which will be used to assign the score
        # NB, min_words is 1 for now so as to not create problems with multiple-choice answers
        # This could be fixed in CAN-57
        # The object which will be used to assign the score
        self.grade_methods = [ CreditForNonEmptyOLD( min_words=2, count_stopwords=True ) ]
        # self.grade_method = self.grade_methods[ 0 ]

        try:
            # todo deprecated
            self.penalizer = self.penalizers[ 0 ]
            self.grade_method = self.grade_methods[ 0 ]
        except AttributeError as e:
            print(e)
Example #4
0
    def __init__( self, **kwargs ):
        self.grace_period = pd.Timedelta( '2 days' )
        super().__init__( **kwargs )

        self.corrections = [ ]

        # The objects which will be used to penalize late assignments
        self.penalizers = [HalfLate( self.due_at, self.grace_period )]
        # The object which will be used to penalize late assignments
        # todo deprecated
        self.penalizer = self.penalizers[ 0 ]

        # The object which will be used to assign the score
        # NB, min_words is 1 for now so as to not create problems with multiple-choice answers
        # This could be fixed in CAN-57
        # The object which will be used to assign the score
        self.grade_methods = [ CreditForNonEmptyOLD( min_words=2, count_stopwords=True ) ]
        self.grade_method = self.grade_methods[ 0 ]
Example #5
0
    def __init__(self, **kwargs):
        super().__init__(**kwargs)

        # The objects which will be used to penalize late assignments
        self.penalizers = [NoLatePenalty()]

        self.corrections = []

        # The object which will be used to penalize late assignments
        # todo deprecated
        # self.penalizer = self.penalizers[0]

        # The object which will be used to assign the score
        self.grade_methods = [
            CreditForNonEmptyOLD(min_words=2, count_stopwords=True)
        ]
        # self.grade_method = self.grade_method[0]

        try:
            # todo deprecated
            self.penalizer = self.penalizers[0]
            self.grade_method = self.grade_methods[0]
        except AttributeError as e:
            print(e)
Example #6
0
    def __init__( self, **kwargs ):
        # Code used to open the review unit
        self.access_code = None

        # todo access_code_for_next_on probably not needed; created without looking at what already have
        self.access_code_for_next_on = MetaReview
        self.access_code_for_next = None

        # Link to the activity_inviting_to_complete on canvas so students can click
        # directly to it
        self.activity_link = None

        self.corrections = [ ]

        # The objects which will be used to penalize late assignments
        self.penalizers = [ NoLatePenalty() ]
        # The object which will be used to penalize late assignments
        # todo deprecated
        # self.penalizer = self.penalizers[ 0 ]

        # The object which will be used to assign the score
        # NB, min_words is 1 for now so as to not create problems with multiple-choice answers
        # This could be fixed in CAN-57
        # The object which will be used to assign the score
        self.grade_methods = [ CreditForNonEmptyOLD( min_words=2, count_stopwords=True ) ]
        # self.grade_method = self.grade_methods[ 0 ]

        try:
            # todo deprecated
            self.penalizer = self.penalizers[ 0 ]
            self.grade_method = self.grade_methods[ 0 ]
        except AttributeError as e:
            print(e)

        super().__init__( **kwargs )
        self.email_intro = "Here is another student's assignment for you to review:"
Example #7
0
 def setUp(self) -> None:
     self.config_for_test()
     self.obj = CreditForNonEmptyOLD()