Skip to content

Add edit buttons for homeworks and projects in cadmin#146

Merged
alexeygrigorev merged 3 commits into
mainfrom
copilot/add-edit-buttons-homeworks-projects
Jan 24, 2026
Merged

Add edit buttons for homeworks and projects in cadmin#146
alexeygrigorev merged 3 commits into
mainfrom
copilot/add-edit-buttons-homeworks-projects

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 24, 2026

Course admin panel had edit buttons only for courses, not for homeworks/projects. Additionally, homework actions (Set Correct Answers, Score) were hidden when homework state was Open.

Changes

  • Added edit icons for homeworks and projects - Django admin links with edit icons now appear next to homework and project titles, matching the existing course edit pattern
  • Fixed homework actions visibility - "Set Correct Answers" and "Score" options now available for both Open and Closed states instead of only Closed
<!-- Before: only showed actions when hw.state == 'CL' -->
<!-- After: shows actions for both open and closed -->
{% if hw.state == 'OP' or hw.state == 'CL' %}
  <option value="{% url 'cadmin_homework_set_correct_answers' course.slug hw.slug %}">Set Correct Answers</option>
  <option value="{% url 'cadmin_homework_score' course.slug hw.slug %}">Score</option>
{% endif %}

Screenshot

Course Admin Panel

Edit icons (pencil) appear next to homework and project titles, providing quick access to Django admin panel for editing.

Original prompt

This section details on the original issue you should resolve

<issue_title>Edit buttons for cadmin</issue_title>
<issue_description>We used to have edit buttons for homeworks and projects. but now we only have this for course. the edit button brings us to the django admin panel where we can edit the entity.

Add edit icons in the list of homeworks and projects next to the name

also if homework is open, I can only see statistics in action. this is not correct - I still want to set correct answers and score the homework </issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 24, 2026 08:23
… open state

Co-authored-by: alexeygrigorev <875246+alexeygrigorev@users.noreply.github.com>
Copilot AI changed the title [WIP] Add edit buttons for homeworks and projects Add edit buttons for homeworks and projects in cadmin Jan 24, 2026
Copilot AI requested a review from alexeygrigorev January 24, 2026 08:26
@alexeygrigorev alexeygrigorev marked this pull request as ready for review January 24, 2026 08:58
@alexeygrigorev alexeygrigorev merged commit 59253f1 into main Jan 24, 2026
2 checks passed
@alexeygrigorev alexeygrigorev deleted the copilot/add-edit-buttons-homeworks-projects branch January 24, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edit buttons for cadmin

2 participants