Skip to content

f-1257 add Editorial interface for questions - #1537

Merged
bnmnetp merged 5 commits into
RunestoneInteractive:mainfrom
morozov-av:f-1257
Sep 28, 2026
Merged

bnmnetp merged 5 commits into
RunestoneInteractive:mainfrom
morozov-av:f-1257

Conversation

@morozov-av

Copy link
Copy Markdown
Contributor

Add editorial interface for questions marked for review:

  1. editors can open and edit Questions for Review
  2. questions that are not assigned to any assignments can be deleted
  3. added tests for new logic
f-1257.mp4

@morozov-av
morozov-av requested a review from bnmnetp as a code owner September 23, 2026 16:52
@bnmnetp

bnmnetp commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

We need to scope this one a bit more. Here is what an older question looks like.

Screenshot 2026-09-25 at 2 06 37 PM

If a question does not have question_json then either the edit button should be disabled or we should create new question_json from the html.

Then, the edit button would ideally bring up the question in the assignment builder interface for editing. Or at a bare minimum an interface as shown, but with nicely formatted JSON to edit.

Other comments. This change appears to require both greenlets and the newer psycopg[binary] >= 3.2. I had to add those to pyproject.toml in the project file or else the admin server crashed on startup. - nevermind this appears to be a new dependency for a change in sqlalchemy.

@morozov-av

morozov-av commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor Author

We need to scope this one a bit more. Here is what an older question looks like.

Screenshot 2026-09-25 at 2 06 37 PM If a question does not have `question_json` then either the edit button should be disabled or we should create new `question_json` from the html.

Then, the edit button would ideally bring up the question in the assignment builder interface for editing. Or at a bare minimum an interface as shown, but with nicely formatted JSON to edit.

Other comments. This change appears to require both greenlets and the newer psycopg[binary] >= 3.2. I had to add those to pyproject.toml in the project file or else the admin server crashed on startup. - nevermind this appears to be a new dependency for a change in sqlalchemy.

@bnmnetp
Thanks for the feedback. I’ve updated the implementation:

  1. questions without question_json now disabled Edit button with a tooltip
  2. questions with question_json open an editor containing formatted JSON
  3. backend also rejects direct edit requests for questions without question_json

I didn't use the Assignment Builder because editorial questions may be unassigned, and editors don't necessarily have instructor or assignment context it requires
Would you prefer to use current JSON editor, or should I investigate integrating the Assignment Builder instead?
If Assignment Builder integration is preferred, how should unassigned questions and editors without instructor access be handled?

The greenlet and psycopg[binary] >= 3.2 dependencies are already present in previous PR 6a2e535. I synced my branch

f-1257.mp4

Could you check my PR again?

@bnmnetp
bnmnetp merged commit c78acea into RunestoneInteractive:main Sep 28, 2026
2 checks passed
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.

2 participants