Synchrnous PI fixes from feedback#1228
Conversation
|
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
left a comment
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
For the routing issue, when navigating to PI from the book page, it routes to |
|
Yes we need to make some updates to the master templates of the books both on the |
|
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? |
|
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 |
|
Old RST-based questions. They use div class="highlight-python notranslate" instead of pre class="line-numbers" so Prism doesn't pick them up. |
|
No RST used its own method for adding line numbers and coloring code. |
|
Se my little edit to the previous comment. |
|
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? |
|
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. |
|
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. |
|
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? |
Fixed several sync PI issues from testing feedback:
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.