buggyrace / buggy-race-server

Race server and supporting material for running a "Buggy Racing" Python programming project
https://www.buggyrace.net
Other
1 stars 0 forks source link

Issue loading customised tasks #203

Closed mandyWW closed 5 months ago

mandyWW commented 6 months ago

I can't seem to add new headings, for example I wanted to add a "Pre-requisite" heading but I got this error:

Error parsing/adding tasks: bad section name "Pre" found in task source file at line 5

Not too much of an issue (I removed the heading in the end) but could be useful to document the requirement to stick to existing headings.

davewhiteland commented 6 months ago

Yes those sections are currently very fixed, because you're not uploading a document that's simply being rendered: the markdown is being parsed back into the structure that is slotted into the database. This is weakly documented in the upload a custom markdown file section.

Be careful to respect the organisation of the markdown file you downloaded, because the server uses that structure when it parses what you send back up. [ ... ] The level of the headings is significant: # for the name, ## for the title, and ### for the Problem, Solution and Hints sections. If you deviate from this structure, the file probably won’t parse the way you expect.

If we're going to add more sections, the database needs a new column — this is different from a problem loading the tasks, so I've made that a new issue: #205 and propose closing this one, as it's actually correct behaviour pending a change in what a task is.

davewhiteland commented 5 months ago

Closing this as I think it's represented by #205