コード例 #1
0
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse

from devilry.devilry_gradingsystem.pluginregistry import gradingsystempluginregistry
from devilry.devilry_gradingsystem.pluginregistry import GradingSystemPluginInterface


class ApprovedPluginApi(GradingSystemPluginInterface):
    id = 'devilry_gradingsystemplugin_approved'
    sets_passing_grade_min_points_automatically = True
    sets_max_points_automatically = True
    title = _('Passed/failed')
    description = _('Provides a single checkbox that can be checked to provide a passing grade.')

    def get_edit_feedback_url(self, deliveryid):
        return reverse('devilry_gradingsystemplugin_approved_feedbackeditor', kwargs={'deliveryid': deliveryid})

    def get_passing_grade_min_points(self):
        return 1

    def get_max_points(self):
        return 1

    def get_bulkedit_feedback_url(self, assignmentid):
        return reverse('devilry_gradingsystemplugin_approved_feedbackbulkeditor', kwargs={'assignmentid': assignmentid})


gradingsystempluginregistry.add(ApprovedPluginApi)
コード例 #2
0
ファイル: apps.py プロジェクト: kristtuv/devilry-django
 def ready(self):
     gradingsystempluginregistry.add(PointsPluginApi)
コード例 #3
0
ファイル: apps.py プロジェクト: kristtuv/devilry-django
 def ready(self):
     gradingsystempluginregistry.add(ApprovedPluginApi)
コード例 #4
0
ファイル: apps.py プロジェクト: Nasmi1/devilry-django
 def ready(self):
     gradingsystempluginregistry.add(ApprovedPluginApi)
コード例 #5
0
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse

from devilry.devilry_gradingsystem.pluginregistry import gradingsystempluginregistry
from devilry.devilry_gradingsystem.pluginregistry import GradingSystemPluginInterface


class PointsPluginApi(GradingSystemPluginInterface):
    id = 'devilry_gradingsystemplugin_points'
    title = _('Points')
    description = _('Choose a number between zero and a maximum that you specify on the next page.')

    def get_edit_feedback_url(self, deliveryid):
        return reverse('devilry_gradingsystemplugin_points_feedbackeditor', kwargs={'deliveryid': deliveryid})

    def get_bulkedit_feedback_url(self, assignmentid):
        return reverse('devilry_gradingsystemplugin_points_feedbackbulkeditor', kwargs={'assignmentid': assignmentid})

gradingsystempluginregistry.add(PointsPluginApi)