Skip to content

Commit

Permalink
Add skip button for grading reports (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrxyz authored May 30, 2024
1 parent fe83079 commit 116a6de
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,25 @@ async def callback(self, interaction: discord.Interaction):
self.view.stop()


class SkipReportButton(ReportReviewButton):
def __init__(self, bot: MILBot, student: Student):
self.bot = bot
self.student = student
super().__init__(
bot,
student,
label="Skip (no score)",
emoji="⏩",
style=discord.ButtonStyle.secondary,
row=3,
)

async def callback(self, interaction: discord.Interaction):
await interaction.response.defer()
assert self.view is not None
self.view.stop()


class ReportsReviewView(MILBotView):
def __init__(self, bot: MILBot, student: Student):
self.bot = bot
Expand All @@ -304,6 +323,7 @@ def __init__(self, bot: MILBot, student: Student):
self.add_item(NegativeReportButton(bot, student))
self.add_item(WarningReportButton(bot, student))
self.add_item(GoodReportButton(bot, student))
self.add_item(SkipReportButton(bot, student))


class StartReviewView(MILBotView):
Expand Down

0 comments on commit 116a6de

Please sign in to comment.