Template talk:End of course week
Template leaves trailing <div>
[edit]Sage (Wiki Ed), TheDJ, Aidan9382, Jonesey95:
This template leaves a trailing <div>
tag, which is mostly not a problem, except for the final use on a page, where the <div>
isn't closed.
I believe that most pages that use this template don't close that final <div>
. The first four transclusions I checked:
- Wikipedia:Wiki Ed/Rollins College/Writing about Wikipedia (Fall 2015)
final & missing - Wikipedia:Wiki Ed/Wiki Ed-APS/Summer Seminar in Psychology (2015)
- Wikipedia:Wiki Ed/Auburn University/Composition I (Fall 2015)
- Wikipedia:Wiki Ed/OSU Newark/Gender, Sex and power (Fall 2015)
all have one lint error, a missing end tag for <div>
and all have {{end of course week}}
as the ending wiki markup.
I think we can fix most of the missing end tag errors with a bot that says:
- For all Wikipedia namespace pages
- If
{{end of course week}}
is transcluded then- If
{{end of course week}}
is the last nonblank wiki markup on the page then- Append
</div>
to the page
- Append
- If
- If
—Anomalocaris (talk) 19:06, 30 May 2025 (UTC)
- This template does not leave a trailing div tag. It inserts a closing div tag that needs to be matched by a starting div tag, typically from
{{start of course week}}
. Different pages may need different fixes. Adding {{end of course timeline}} is probably a good fix for some of them (link to a fix for the first page in the list above). All of the pages on the above list were missing {{end of course timeline}}. – Jonesey95 (talk) 20:13, 30 May 2025 (UTC)
Jonesey95: Thank you for the clarification. Revise my proposed bot:
- For all Wikipedia namespace pages
- If
{{start of course timeline}}
is transcluded then- If
{{end of course timeline}}
is not transcluded 1 then- Append
{{end of course timeline}}
to the page
- Append
- If
- If
1If the bot can do it, insert here: "and there's a missing end tag for <div>
at the end of the page"
—Anomalocaris (talk) 19:06, 30 May 2025 (UTC)
- To get the page list for the bot, you could start with this list (Wiki Ed pages with missing div end tags) and intersect it with this list (Wikipedia-space pages using the start template but not the end template). – Jonesey95 (talk) 22:40, 30 May 2025 (UTC)
- Thanks! We stopped including the timeline on courses in 2023, so the only ones that should be affected are old ones that are not actively in use. So, from my perspective, any method of fixing the trailing `div` is fine and shouldn't disrupt any courses. Maybe one option could be just to remove the div from the `start` template, and also remove the closing tag from `end` template (which I think was only used to manually fix some of these pages in the past, and was never part of the automated posts from dashboard.wikiedu.org). That will affect the layout of the old course pages, but shouldn't matter much. However, I don't know whether remove the div would introduce additional tag errors, perhaps for pages that currently don't throw errors but have only the `start` template. Sage (Wiki Ed) (talk) 16:25, 3 June 2025 (UTC)