Playlist Save
playlist_saveSave one checklist's playlist after the server checks it. lines is the ordered list of the playlist's lines. The server checks that line_ids are unique and order runs 1, 2, 3 without gaps; that the credits of every line except option_list and note add up to the published credits (within the range, where a range is published); that every slot's fills_from names an option_list and every option_list is named by a slot; that every course code is one of the school's learning units; that every area designation is in the school policy; that choose has n no greater than its courses; that every quote appears verbatim in the capture its source names, which may be the requirements section, a linked section, or any other capture held for the checklist's school; and that every course code of the checklist's requirement items that the school holds appears in a line or in a note line that names it (a footnote, a permission note or a tag in parentheses outside the items is not counted); and that every checklist item naming a learning unit with published credits is on a course, one_of, choose or option_list line or accepted by an area line, never only a note; that the playlist carries the last requirement group the checklist holds (a playlist that ends before it is never saved); that options the page prints as a choice or as "or" alternatives are not each a required course line, and no course is on two course lines; that every course code a line carries is printed in the requirements, on a linked page or in the line's quote; that a note line carries no course codes; and that a restricted line carries its rule. Where the credits do not add up, the error names the lines that carry no requirement item, or the groups printed with credits that no line carries. It never alters what the lines say; it adds accepts to each area line and min_courses where the text names a number of courses. It returns playlist_id, status, and every error in plain words, each naming its line: lines with errors are saved as rejected, so correct them and save again. A build that passes replaces the playlist in use only when there is none, when the catalog page has changed, or when the one in use is unverified or rejected. Otherwise it is kept as a candidate: the answer gives candidate_id and the playlist in use, the candidate is never used for anyone's progress, and playlist_compare compares the two.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | ||
| built_by | Yes | Who built this playlist: a short string naming the agent and model. Stored with the saved playlist. A save without it is rejected. | |
| checklist_id | Yes | The checklist, by its checklist_id | |
| accept_warnings | No | Optional, false where left out: true saves the result with its warnings. A value's shape, a line's kind and its line_id still refuse the save, and so do a playlist that ends before the last requirement group, options made each a required line or a course on two course lines, a quote not found verbatim or a capture not held, a course code on a note line, and a code the page does not print. A quote over 300 characters is cut at a word boundary with "…" (marked quote trimmed); every other check marks what it concerns not established. Each mark is kept in that item's warnings, and the result is saved with trust state partial, or inferred where it rests on an inferred policy. |