'Return the number of points for an answer, used for partial credit.'

def get_npoints(self, answer_id):

    npoints = self.get_property(answer_id, 'npoints')
    if (npoints is not None):
        return npoints
    elif self.is_correct(answer_id):
        return 1
    return 0
