PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
254 stars 203 forks source link

Include eg/intro ahead of each eg/exercise in manifest #2086

Closed Alex-Jordan closed 7 months ago

Alex-Jordan commented 7 months ago

This is just to sit here until confirmed by @bnmnetp that this does not run contrary to Runestone philosophy.

When an interactive exercise is within an exercisegroup, this adds the exercisegroup's introduction to the htmlsrc version of the exercise in the manifest. For example, suppose a book has this exercisegroup:

Convert the given Celsius temperature to Fahrenheit using the formula F = 9/5 C + 32.
  1. 0 degC
  2. 100 degC

Prior to this PR, suppose you put the first exercise into a RS Assignment. Then on the assignments page you just get:

   0 degC

(Of course you can use the in-context link to see the introduction.)

With this PR, you will see:

   Convert the given Celsius temperature to Fahrenheit using the formula F = 9/5 C + 32.
   0 degC

I started a section in the Sample Chapter (newly reborn as a book thanks to Brad and Rob) that is for testing specific things about when a WW exercise is used in a RS assignment. I'm not sure that I can actually test what the end result of this will look like in a RS Assignment. But I can see the added content in the manifest htmlsrc, and it looks like I would expect it to look, as far as raw HTML.

Alex-Jordan commented 7 months ago

@bnmnetp Do you have any thoughts against what this would do?

I'm thinking it is a necessity for exercisegroup exercises to make sense out of context, that we tie the introduction to them. This is a blunt way of doing that. But at the same time, it's simple and does not ask Runestone to do things like go and look up an introduction.

bnmnetp commented 7 months ago

This seems like a smart idea, at least for now.... I think this is an issue we want to address in a more structured way long term, but I'd be in favor of merging this.

rbeezer commented 7 months ago

This change is bigger than just WW, so I think the new tests should go into Chapter 5 of the Sample Book, which is full of Runestone goodies. I'll make that swap as part of merging this.

rbeezer commented 7 months ago

OK, more to this than Runestone v. WeBWorK.

Updating website right now.

Alex-Jordan commented 7 months ago

Maybe both though? Because the sample book is not "bigger" than WW examples, in the sense it has no WW examples.