Skip to content

Synchrnous PI fixes from feedback#1228

Open
sethbern wants to merge 4 commits into
RunestoneInteractive:mainfrom
sethbern:sync-pi-feedback-v2
Open

Synchrnous PI fixes from feedback#1228
sethbern wants to merge 4 commits into
RunestoneInteractive:mainfrom
sethbern:sync-pi-feedback-v2

Conversation

@sethbern

@sethbern sethbern commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Fixed several sync PI issues from testing feedback:

  • Show real student names in the verbal group select dropdown instead of anonymous names
  • Fixed premature "discuss" message after vote 1 stops
  • Added line numbers to code blocks displayed in PI questions (does not touch the actual questions, just adds them visually during a PI session based on instructor feedback that it makes discussion easier)
  • Improved group select placeholder text

Also, some PI pages still seem to route to web2py instead of FastAPI. I think it's because nginx serves /staticAssets/ from the web2py static directory, but if it's something else on my end let me know and I can fix it.

@sethbern sethbern requested a review from bnmnetp as a code owner June 4, 2026 15:52
@bnmnetp

bnmnetp commented Jun 5, 2026

Copy link
Copy Markdown
Member

When we build the nginx container we copy only the components/rsptx/templates/staticAssets folder into the nginx container. It does not have access to the web2py files.

@bnmnetp bnmnetp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not look like this fixes any routing problems. Can you make a list of where you think the routing has gone wrong?

}
doIt();

setTimeout(function addLineNumbers() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this trying to add line numbers to code in a multiple choice question? If the question is written properly it will already have line numbers.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is adding in line numbers that are not rendering during PI even when the question is created with them. I believe the questions are being created properly using the assignment builder interface and it still does not show them.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you point me to a specific question? It may be that we are just missing including the prism js/css files that do the coloring and line numbers.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the templates for peer_question.html and doAssignment.html are missing the needed prism files for decorating code questions. Adding those is the right fix.

@sethbern

sethbern commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

For the routing issue, when navigating to PI from the book page, it routes to runestone/peer/student.html or runestone/peer/instructor.html instead of the correct FastAPI routes assignment/peer/student or assignment/peer/instructor. Navigating from the course home or instructor dashboard goes to FastAPI correctly. It seems like the book page links are the only thing still pointing to the old web2py routes.

@bnmnetp

bnmnetp commented Jun 8, 2026

Copy link
Copy Markdown
Member

Yes we need to make some updates to the master templates of the books both on the legacy_support branch for old RST based books. And in PreTeXt. I'm already working on a PR to do that for PreTeXt that will encompass the PI pages as well as new login/logout/register pages.

@sethbern

sethbern commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Ok I went ahead and fixed the line numbers by adding the missing Prism CSS to static_assets.html and removing the custom JS workaround I had. It works for questions created with the new assignment builder but older questions don't show line numbers since their HTML source is missing the line-numbers class on the pre tag. Is it worth backfilling that class on existing questions or is the expectation that instructors should just update them?

@bnmnetp

bnmnetp commented Jun 8, 2026

Copy link
Copy Markdown
Member

When you say old questions, are they questions written in PreTeXt or are they old RST based questions?

Old RST questions required that the author used .. code-block:: language and then there was a parameter like :linenos: to make it number the lines.

@sethbern

sethbern commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Old RST-based questions. They use div class="highlight-python notranslate" instead of pre class="line-numbers" so Prism doesn't pick them up.

@bnmnetp

bnmnetp commented Jun 8, 2026

Copy link
Copy Markdown
Member

No RST used its own method for adding line numbers and coloring code.

@bnmnetp

bnmnetp commented Jun 8, 2026

Copy link
Copy Markdown
Member

Se my little edit to the previous comment.

@sethbern

sethbern commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

I see then so for those RST questions without line numbers it was just an authoring choice. In that case is it best to leave those as is?

@bnmnetp

bnmnetp commented Jun 8, 2026

Copy link
Copy Markdown
Member

Yeah, if the authors of those questions want line numbers they can edit the book (or question) and add them. I don't think we should impose a style over the top of something an author already has control of.

@bnmnetp

bnmnetp commented Jun 8, 2026

Copy link
Copy Markdown
Member

Now, time is short for RST questions. The editor for those old questions will not be gone by the start of classes in the fall.

@sethbern

sethbern commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Got it, makes sense to leave it to the authors then. I also cleaned up some leftover line number CSS and JS from the dashboard template. Anything else I should do before merge?

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