Esempio n. 1
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)
Esempio n. 2
0
class TestNoLatePenalty(TestingBase):
    def setUp(self):
        self.config_for_test()
        self.due_date = pd.to_datetime('2019-02-23 07:59:00')
        self.grace_period = None
        self.obj = NoLatePenalty(self.due_date, self.grace_period)

    def test_get_penalty(self):
        result = self.obj.get_penalty(self.fake.date_time_this_century())
        self.assertEqual(0, result, "get penalty returns 0")

    def test_get_penalized_score(self):
        original_score = self.fake.random.randint(1, 111111)
        result = self.obj.get_penalized_score(
            self.fake.date_time_this_century(), original_score)
        self.assertEqual(original_score, result,
                         "get penalized score returns original score")

    def test_get_fudge_points(self):
        original_score = self.fake.random.randint(1, 111111)
        result = self.obj.get_fudge_points(self.fake.date_time_this_century(),
                                           original_score, {})
        self.assertEqual(0, result, "get fudge points returns 0")
Esempio n. 3
0
    def __init__(self, **kwargs):
        super().__init__(**kwargs)

        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]
Esempio n. 4
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)
Esempio n. 5
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:"
Esempio n. 6
0
 def setUp(self):
     self.config_for_test()
     self.due_date = pd.to_datetime('2019-02-23 07:59:00')
     self.grace_period = None
     self.obj = NoLatePenalty(self.due_date, self.grace_period)