Exemplo n.º 1
0
 def inline_actions(self, instance):
     if is_suspended(instance):
         actions = [
             (
                 self._view_href(instance, 'resume_and_rejudge'),
                 _("Resume and rejudge"),
                 'POST',
             ),
             (
                 self._view_href(instance, 'resume_and_clear'),
                 _("Resume and clear queue"),
                 'POST',
             ),
         ]
     else:
         actions = [
             (
                 self._view_href(instance, 'suspend_all'),
                 _("Suspend all tests"),
                 'POST',
             ),
             (
                 self._view_href(instance, 'suspend_all_but_init'),
                 _("Suspend final tests"),
                 'POST',
             ),
         ]
     return (super(SuspendJudgeProblemInstanceAdminMixin,
                   self).inline_actions(instance) + actions)
Exemplo n.º 2
0
 def inline_actions(self, instance):
     if is_suspended(instance):
         actions = [
             (self._view_href(instance, 'resume_and_rejudge'),
                 _("Resume and rejudge"), 'POST'),
             (self._view_href(instance, 'resume_and_clear'),
                 _("Resume and clear queue"), 'POST')
         ]
     else:
         actions = [
             (self._view_href(instance, 'suspend_all'),
                 _("Suspend all tests"), 'POST'),
             (self._view_href(instance, 'suspend_all_but_init'),
                 _("Suspend final tests"), 'POST')
         ]
     return super(SuspendJudgeProblemInstanceAdminMixin, self) \
                .inline_actions(instance) + actions
Exemplo n.º 3
0
 def suspended_on_final_display(self, instance):
     return not is_suspended(instance)
Exemplo n.º 4
0
 def suspended_on_final_display(self, instance):
     return not is_suspended(instance)