Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video solutions (design discussion) #188

Closed
sean-fitzpatrick opened this issue Jul 20, 2022 · 21 comments
Closed

Video solutions (design discussion) #188

sean-fitzpatrick opened this issue Jul 20, 2022 · 21 comments

Comments

@sean-fitzpatrick
Copy link
Collaborator

I know that at one point, @Alex-Jordan and possibly @davidfarmer were thinking about adding some technology to PreTeXt that would indicate when a resource like a video is hidden behind a solution knowl.

In the meantime, I am wondering if we should at least move the videos to separate solutions.

Current markup looks like:

<example>
  <statement>
    <p>
      yadda yadda yadda
    </p>
  </statement>
  <solution>
    <video youtube="blah" etc/>
    <p>
      much wisdom
    </p>
  </solution>
</example>

It would not be hard (and can probably be done automatically) to strip out the video, and put it in a second solution;
this could carry a title to indicate the contents:

<solution>
  <title>Video solution</title>
  <video ...../>
</solution>

(possibly this needs an empty paragraph to be schema compliant)

If I were to update markup for exercises with parts to use task (see #178 ), where would we put the video?
Each task carries its own solution. Does the schema allow for an additional solution outside of the tasks?
Or would it be better to move the video solutions outside of the examples entirely?

@sean-fitzpatrick sean-fitzpatrick changed the title Video solutions Video solutions (design discussion) Jul 20, 2022
@grady
Copy link
Contributor

grady commented Jul 20, 2022

I'm not sure if I like the idea of separating out the video presentation into a different solution.

For example, in my custom version, I've added a second solution to some examples in the applications sections that redo the same problem using trigonometry-based coordinate systems. The way I have it set up now, I have the cartesian and angular approaches in two solutions, each with an embedded video. Your idea would mean four different knowls.

Speaking of solution knowls, I think it would be a good idea to add <knowl example-solution="no"> to the publication config. The reason for this is that the Hypothes.is annotator loses track of the location of knowl'd content. You can leave annotations on expanded knowls, and it will always show up in the annotations stream, but you will not be able to jump to the location of the annotation, even if the knowl has been opened for reading.

I would be more on board with the separate solutions for video embeds if it was possible to selectively enable the knowling of the solutions. It might be nice to have the textual solution always expanded, but the video one hidden behind a knowl. Not sure how easy that would be to do with PreTeXt.

@sean-fitzpatrick
Copy link
Collaborator Author

Hmm. I like having solutions in knowls, both for readability and the possibility that a student might actually try the problem before opening the solution. I've tried to get students interested in using Hypothes.is (since it's there) but there hasn't been much uptake, unless there are lots of students doing private annotations that I'm unaware of.

So I would rather turn off hypothes.is than solution knowls.

@grady
Copy link
Contributor

grady commented Jul 21, 2022

Yes, it's certainly a tradeoff. It would be nice if students would give the example a try before reading the solution, but in the real world I also know that nobody is going to actually do that. I think I come down on the side of the example solutions being a very important part of an introductory text, so I like having them not hidden. The fact that it improves Hypothesis compatibility is a nice extra.

I had some success with using Hypothes.is when I tried it last semester, so I think I'll try it again. But this particular thing isn't really a big deal. The nice thing about APEX is that I can roll my own version exactly how I want it.

@sean-fitzpatrick
Copy link
Collaborator Author

Continuing the discussion from #180.

@davidfarmer had suggested that having a short sentence prior to each video may not fit the design philosophy of PreTeXt.
But this is more or less what Rob suggested on pretext-dev, with each such sentence in a <p> that belongs to the video component. He isn't keen on creating a container that can hold a caption and a video, without a number.

Assuming we make this change: I think it's clear what to do with videos currently in figures.
But I'm not sure about video solutions in exercises.

Recognizing that what is "best" will be very subjective here, what is the best thing to do with them?
@grady doesn't like the idea of putting a video solution in its own solution knowl.

It is also not clear to me what will happen when we have examples structured by task.
Can a <solution> containing a video be a peer of task? (Each task would contain the written solution for one part of the example.)

Does it make more sense to move the video out of the example entirely, and place it just after?
That would solve a problem noted by @Alex-Jordan, where someone skimming a page is unaware that there are additional videos in knowls.

@sean-fitzpatrick
Copy link
Collaborator Author

I was going to get started on changing from ol to task in examples. But I think placement of videos needs to be settled first.

@Alex-Jordan
Copy link
Collaborator

I know that at one point, @Alex-Jordan and possibly @davidfarmer were thinking about adding some technology to PreTeXt that would indicate when a resource like a video is hidden behind a solution knowl.

The HTML work for this is already done, maybe. For example, here:
Example 1.1.8: Approximating the value of a limit
https://spot.pcc.edu/~ajordan/temp/apex-ww-2.17/sec_limit_intro.html#ex_limit1
The solution knowl anchor has classes has-image, has-video, has-tabular. What remains to be done is the CSS styling that would respond to those classes. I imagine writing some svg icons that appear as before pseudo elements.

I said "maybe" because if accessibility for this matters, then CSS can't communicate that. Instead, we'd need actual icon elements in the HTML.

Thinking with my PTX hat on, I think it's a good idea to have two solution elements. Each one is typically a complete, independent solution. It is arguably tag abuse to have them under a single solution. Of course an exception would be if the text solution relies or references the video.

(possibly this needs an empty paragraph to be schema compliant)

No. It needs 1 or more "things". Among the options for a "thing" is video.

If I were to update markup for exercises with parts to use task (see #178 ), where would we put the video?

Ideally there'd be multiple, shorter videos :) But no one has time to make that a priority.

Suppose a video covers three tasks.

  • t = 0 to t = 60 is relevant to task 1
  • t = 60 to t = 180 is relevant to task 2
  • t = 150 to t = 300 is relevant to task 3 (so some overlap)

You can use the same video in all three solutions:

<video start="0" stop="60" .../>
<video start="60" stop="180" .../>
<video start="150" stop="300" .../>

Requires someone spending time to find those markers... Extra credit for a calc student?

If the video solution doesn't break down cleanly, you could for now just include the whole thing three times.

Does the schema allow for an additional solution outside of the tasks?

No.

Or would it be better to move the video solutions outside of the examples entirely?

Not in my opinion. They are logically tied to the example, so they should be tied in the XML sense with a ancestor/descendant relationship.

@sean-fitzpatrick
Copy link
Collaborator Author

Another option for an example written to use tasks instead of lists would be to put the video into the introduction: for most examples in APEX, the solution is the example -- the statement is usually fairly brief.

Options available:

  • video outside the example (I agree this is not ideal)
  • video in a separate solution knowl
    • @grady doesn't like this, but I think @Alex-Jordan and I do. @APEXCalculus is probably ambivalent since he will go without videos altogether
    • for examples with tasks, it could be pretty labour-intensive to split a video covering several parts across tasks (this would depend on how many examples with an ol have video solutions. I'm guessing at least 100)
  • video in the introduction

@Alex-Jordan
Copy link
Collaborator

Alex-Jordan commented Jul 22, 2022 via email

@sean-fitzpatrick
Copy link
Collaborator Author

The only thing I'm not sure about is where I'd put the video to avoid interrupting the flow for those who are actually reading the example.

@grady
Copy link
Contributor

grady commented Jul 22, 2022

I'm not categorically opposed to putting the videos in their own knowls, I can see some benefits. But it's worth thinking about how it would work out if there are actually two independent written solutions offered. I don't think APEX has any of these in the official version, but I've added a few here and there to my fork.

@Alex-Jordan
Copy link
Collaborator

Thinking the "PreTeXt" way about source, we shouldn't consider whether or not the output puts "X" into a knowl. The philosophy is more like, what is the best logical structure this element can have in the XML tree. Thinking that way, it may even be correct to have the video in the same "solution" as the text solution (although that's not currently my opinion).

Whether or not "X" comes out in a knowl is a specific matter for the HTML translation instead of the author's source. It could be the case that logically they should be in separate "solution" elements in source, and if it is still desired to have them not be knowled or have them appear "more together" in some way, we could think about the HTML translation more.

Like one idea would be to have the "solution" template do something different when the only content is a "video" element. Or when there is a following-sibling "solution" for which the only content is a "video". Although that particular approach is unlikely to be supported by PreTeXt itself, it's not a crazy thing to write custom APEX XSL for.

@sean-fitzpatrick
Copy link
Collaborator Author

Some reasons I prefer putting the video in its own knowl:

  • reader choice (they can decide which version to open)
  • it's now clear that there's a video there (although this will be clear in any case at some point)
  • this would be very easy for me to implement: wherever there's a video solution, it immediately follows the <solution> tag. I know how to change this using find and replace.
  • the find+replace solution I have in mind would put the video solution knowl first. This would be beneficial for PDF output, since the QR code for the video solution would appear in the margin next to the example, rather than below it, and little (if any) modification will be needed for our custom XSL

@sean-fitzpatrick
Copy link
Collaborator Author

Changes are made in #197 but I'm not sure what this will look like in PDF.

I think I would need to figure out how to modify the XSL to put the first (video) solution into the margin, or there will be a duplicate Solution heading.

@sean-fitzpatrick
Copy link
Collaborator Author

I think this should be doable but I am done for today.

@sean-fitzpatrick
Copy link
Collaborator Author

It was doable. New XSL pushed, and I've also fixed the issue with YouTube captions not fitting properly in the margin.

@sean-fitzpatrick
Copy link
Collaborator Author

sean-fitzpatrick commented Aug 17, 2022

@APEXCalculus @Alex-Jordan @grady I have just posted some output using the code I've committed in the pull request for videos in separate solution knowls:
HTML with no video, to confirm that this behaves as before
HTML with video, to see how things look in HTML
PDF, with video links

The PDF is compiled directly from PreTeXt output, so I have done nothing to adjust vertical positioning of margin items, insert \leavevmode where needed, etc. All of that will be fixed before a production PDF is released.

The only thing I don't 100% like are the solution titles. These are supplied by PreTeXt, but I'm wondering if it's worth figuring out how to override them. Like most things, they're written by an XSL template. But I am already modifying the solution template for LaTeX, so... Do we keep titles like "Solution 1 (Video Solution)" and "Solution 2"? Or should I figure out how to make this become "Video Solution" and "Text Solution"?

@sean-fitzpatrick
Copy link
Collaborator Author

Whoops. The no-video version has videos.

Somewhere along the way some publication files went missing, or didn't get committed.
The html-novideo target in project.ptx is supposed to call the publication-novideo.ptx file, but it's missing, so I guess the CLI just defaulted to another option.

I'll fix this ASAP

@sean-fitzpatrick
Copy link
Collaborator Author

Correction: everything is fine, except for my brain.
The problem is that the no-video version left out the videos, but not the solutions containing them.

I needed to put component="video" on the solution, not the video. (Or, both, I guess, wouldn't hurt.)

Changes to follow.

@APEXCalculus
Copy link
Owner

APEXCalculus commented Aug 17, 2022 via email

@sean-fitzpatrick
Copy link
Collaborator Author

Sorry: typo in the link. I've edited it and it works now.

@sean-fitzpatrick
Copy link
Collaborator Author

Closing this as completed. I have not implemented tasks in examples (it sounds like lists might stop being allowed in exercises at some point; unclear if this will also apply to examples) because this will take a lot more work and I don't have time.

If we want to further tweak how the video solutions appear, we can reopen this issue.

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

No branches or pull requests

4 participants