Updates and additional features for select toggle functionality#1189
Updates and additional features for select toggle functionality#1189bnmnetp merged 12 commits intoRunestoneInteractive:masterfrom
Conversation
|
Thanks Vincent, A few of comments. Hopefully @barbarer will join in as well. I think "Write code" and "mixed up code" problems are local terminology at UMich. I've never in my life referred to an activecode problem as a "write code" problem nor have I heard anyone but @barbarer use that term. Maybe @bhoffman0 ?? I always call parsons problems "parsons problems". I'm 100% against popups. Lots of browsers prevent them by default and they count against you in all sorts of ways by sites that try to grade you on privacy and efficiency. I can only imagine all the bug reports we would get when people click the button and no window pops up because their browser prevented it. Its kind of like the issue we have with timed exams and navigating away from the page. We are doing it for a good reason but browsers are doing everything they can to prevent us from being nice because it is most often used for evil. Maybe we can update the preview window to be more like the modal reveal that is resizable and moveable? Or maybe we should just position it full width in the DOM above or below the actual question. We can keep the shadowing and background we have now to set it apart but just make it larger and change its position? The transfer idea is super cool. Love it. As well as the option. |
|
In our ebooks we use the terms Mixed-up code (not Parsons) so I like the idea of using :labels: to provide a name or by default use the type and divid. We are talking about different ways to handle popping up the Parsons when the student is struggling while writing code. One way is to make the preview panel bigger, but we also want people to be able to look at the Parsons while writing the code. We could also change the Parsons problem to a single column format when the width is smaller. |
|
Just label it "Transfer Solution" they will figure it out.
Dr. Barbara Ericson
Assistant Professor, School of Information
University of Michigan
…On Tue, May 11, 2021 at 6:40 PM vqum ***@***.***> wrote:
I've added labels as a setting to :toggle:, but I'm encountering an issue
that including any spaces within this string seems to result in the text
being cut off, for example:
:toggle: labels{parsonsexample1, parsonsexample2, activecode1} results in
the reading in of labels{parsonsexample1,
while
:toggle: labels{parsonsexample1,parsonsexample2,activecode1} results in
the reading in of labels{parsonsexample1,parsonsexample2,activecode1}
This seems to be occurring before any of the JavaScript code that I've
written because adding console.log to output either of these values for
toggleOptions produces only the section of text before the first space
detected within the text
[image: image]
<https://user-images.githubusercontent.com/40499850/117893049-b01dbc80-b287-11eb-9cbe-0c2565db0859.png>
Any ideas why it might be doing this and whether I could resolve this?
Additionally, for the transfer button, I've relabeled it to display as
"Transfer Parsons Mixed-Up Code to Active Write Code" as an attempt at
compromise, but I don't like how wide that makes the button itself. I
welcome any ideas for this as well.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1189 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKOZ7M2HM4R2HM4B4TEWCB3TNGW6DANCNFSM43XYXJ7A>
.
|
| var toggleLabels; | ||
| if (toggleOptions.includes("labels{")) { | ||
| toggleLabels = toggleOptions.slice(toggleOptions.indexOf("labels{") + 7, toggleOptions.indexOf("}")).split(","); | ||
| toggleOptions = toggleOptions.slice(0, toggleOptions.indexOf(",labels{")); |
There was a problem hiding this comment.
I think this is your problem. You are slicing from the beginning of the string to labels.
If I have time later I can try to pull and debug in the browser but this seems like the most likely culprit.
|
That does not make sense. Have you stepped through it in the debugger? |
|
Have you looked at the generated html to make sure that all of the options are part of the page? |
|
We have lots of other places where we provide a list of things in a directives.unchanged. Seee the |
|
Actually I just pulled it down and I think you are just missing quotes around your list. I checked the html that was built and here is what I see: In this case the parser to get the data element is only going to see Example1, any attribute value that has a space in it must be quoted. |
|
I like how you have it working so that it defaults correctly if you leave one label blank! I don't think I like the syntax of the It looks like there is one minor conflict with the main branch. Can you check and resolve it? |
|
Separated into This is in conjunction with RunestoneServer pull request RunestoneInteractive/RunestoneServer#1656 to update ajax.py I believe I also resolved the conflict with the main branch. I tested the following cases which use preexisting questions in CSAwesome, and all of them rendered the question as expected:
|
|
Its because git has decided that someone else changed that line. That can happen when others are also making changes to the same file. I can fix the conflict. I see now that you want it to be |












Apologies that this looks like a lot of changes, but they are all related to each other and involve the same files, so I figured that they should reasonably be moved together.
Overview of changes:
1. Relabel "Parsons" as "Mixed-Up Code" and "Active Code" as "Write Code"


A group of U-M students conducted user testing using the select toggle functionality, and one of their findings was that the question type label within the toggle dropdown menu should match the wording that has been used elsewhere in Runestone textbooks.
2. Move preview panel buttons from the bottom to the top


Another finding from the above mentioned user testing was that the toggle preview panel's buttons being at the bottom made them difficult to locate. This was especially true for long problems, such as Parsons problems whose source and answer spaces become stacked vertically resulting in the need for scrolling to get to the bottom and see that there are actionable buttons. Additionally, the buttons at the bottom could be obscured by the privacy policy banner.
3. Add toggle option "lock"



@barbarer asked for the ability to require that students try to solve a specific question (in other words, only that specified question would be graded) but that the other questions would be made available for the students to use as reference in working on the specified question. For achieve this, the option "lock" has been made available on the
:toggle:setting. When applied, text is added to the first option on the dropdown menu describing that only that question would be graded, and the "Select this Problem" button is removed from the preview panel. This results in a select toggle question in which the student is able to pick other questions options from the dropdown menu to preview them, but is not able to set those other questions nor have the grading table be updated.@bnmnetp The question about displaying a question in a separate window was related to this - some questions like Parsons problems take up too much screen space in the preview panel, obscuring the current question underneath. For a student to be able to work on the current question and be able to see the Parsons problem as a reference simultaneously, do you think it would be possible to implement something like a button "Open Preview in Separate Window" on the preview panel that accomplishes this?
4. Add toggle option "transfer"





Option "transfer" made available on the
:toggle:setting. When applied, and when the current question is of type Parsons and the dropdown-selected question is of type active code, the button "Transfer Mixed-Up Code to Write Code" is added to the preview panel. Clicking this button extracts the text with indentations as it's currently set in the answer space of the Parsons question and pastes it into the active code. Any preexisting code within the write code is overwritten.