[{"data":1,"prerenderedAt":5830},["ShallowReactive",2],{"api-nav":3,"api-guide:\u002Fapi\u002Ftutorials\u002Fchange-an-application":351,"api-spec:guide:\u002Fapi\u002Ftutorials\u002Fchange-an-application":5803},[4,28,57,95,115,301,317,331],{"id":5,"title":6,"links":7,"groups":27},"start","Start here",[8,11,15,18,21,24],{"title":9,"to":10},"Overview","\u002Fapi",{"title":12,"to":13,"status":14},"Quickstart","\u002Fapi\u002Fquickstart","available",{"title":16,"to":17,"status":14},"Environments","\u002Fapi\u002Fenvironments",{"title":19,"to":20,"status":14},"Authentication","\u002Fapi\u002Fauthentication",{"title":22,"to":23,"status":14},"Organizations","\u002Fapi\u002Forganizations",{"title":25,"to":26,"status":14},"Permissions","\u002Fapi\u002Fpermissions",[],{"id":29,"title":30,"links":31,"groups":56},"concepts","Concepts",[32,35,38,41,44,47,50,53],{"title":33,"to":34,"status":14},"Requests and responses","\u002Fapi\u002Frequests-and-responses",{"title":36,"to":37,"status":14},"Identifiers","\u002Fapi\u002Fidentifiers",{"title":39,"to":40,"status":14},"Pagination","\u002Fapi\u002Fpagination",{"title":42,"to":43},"Errors","\u002Fapi\u002Ferrors",{"title":45,"to":46,"status":14},"Rate limits","\u002Fapi\u002Frate-limits",{"title":48,"to":49,"status":14},"Retries","\u002Fapi\u002Fretries-and-idempotency",{"title":51,"to":52,"status":14},"Security","\u002Fapi\u002Fsecurity",{"title":54,"to":55,"status":14},"Versioning","\u002Fapi\u002Fversioning",[],{"id":58,"title":59,"links":60,"groups":94},"resources","Guides",[61,64,67,70,73,76,79,82,85,88,91],{"title":62,"to":63,"status":14},"Students","\u002Fapi\u002Fguides\u002Fstudents",{"title":65,"to":66,"status":14},"Bulk registration","\u002Fapi\u002Fguides\u002Fbulk-registration",{"title":68,"to":69,"status":14},"Passwords","\u002Fapi\u002Fguides\u002Fpasswords",{"title":71,"to":72,"status":14},"Supervisors","\u002Fapi\u002Fguides\u002Fsupervisors",{"title":74,"to":75,"status":14},"Reference data","\u002Fapi\u002Fguides\u002Freference-data",{"title":77,"to":78,"status":14},"API account","\u002Fapi\u002Fguides\u002Fapi-account",{"title":80,"to":81,"status":14},"Sign-in links","\u002Fapi\u002Fguides\u002Fsign-in-links",{"title":83,"to":84,"status":14},"Exams","\u002Fapi\u002Fguides\u002Fexams",{"title":86,"to":87,"status":14},"Applications","\u002Fapi\u002Fguides\u002Fapplications",{"title":89,"to":90,"status":14},"Group challenges","\u002Fapi\u002Fguides\u002Fgroup-challenges",{"title":92,"to":93,"status":14},"Certificates and reports","\u002Fapi\u002Fguides\u002Fcertificates-and-reports",[],{"id":96,"title":97,"links":98,"groups":114},"tutorials","Tutorials",[99,102,105,108,111],{"title":100,"to":101,"status":14},"Register and apply","\u002Fapi\u002Ftutorials\u002Fregister-and-apply",{"title":103,"to":104,"status":14},"Send a student to the panel","\u002Fapi\u002Ftutorials\u002Fsend-student-to-panel",{"title":106,"to":107,"status":14},"Change an application","\u002Fapi\u002Ftutorials\u002Fchange-an-application",{"title":109,"to":110,"status":14},"Collect results","\u002Fapi\u002Ftutorials\u002Fcollect-results",{"title":112,"to":113,"status":14},"Token handling","\u002Fapi\u002Ftutorials\u002Ftoken-handling",[],{"id":116,"title":117,"links":118,"groups":125},"reference","Reference",[119,122],{"title":120,"to":121},"All endpoints","\u002Fapi\u002Freference",{"title":123,"to":124},"Sandbox console","\u002Fapi\u002Fconsole",[126,135,145,166,206,212,230,255,271],{"tag":127,"slug":128,"links":129},"Health","health",[130],{"title":131,"to":132,"method":133,"deprecated":134},"Check that the API is up","\u002Fapi\u002Freference\u002Fget-health","GET",false,{"tag":77,"slug":136,"links":137},"api-account",[138,142],{"title":139,"to":140,"method":141,"deprecated":134},"Revoke the token you send, before it expires","\u002Fapi\u002Freference\u002Frevoke-token","POST",{"title":143,"to":144,"method":133,"deprecated":134},"Fetch the API account your token belongs to","\u002Fapi\u002Freference\u002Fget-current-api-account",{"tag":74,"slug":146,"links":147},"reference-data",[148,151,154,157,160,163],{"title":149,"to":150,"method":133,"deprecated":134},"List the countries a student can be registered in","\u002Fapi\u002Freference\u002Flist-countries",{"title":152,"to":153,"method":133,"deprecated":134},"Fetch one country by its id","\u002Fapi\u002Freference\u002Fget-country",{"title":155,"to":156,"method":133,"deprecated":134},"List the grades a student can be registered with","\u002Fapi\u002Freference\u002Flist-grades",{"title":158,"to":159,"method":133,"deprecated":134},"Fetch one grade by its id","\u002Fapi\u002Freference\u002Fget-grade",{"title":161,"to":162,"method":133,"deprecated":134},"List the organizations and their ids","\u002Fapi\u002Freference\u002Flist-organizations",{"title":164,"to":165,"method":133,"deprecated":134},"Fetch one organization by its id","\u002Fapi\u002Freference\u002Fget-organization",{"tag":62,"slug":167,"links":168},"students",[169,172,175,178,181,184,187,191,194,197,200,203],{"title":170,"to":171,"method":133,"deprecated":134},"List your students","\u002Fapi\u002Freference\u002Flist-students",{"title":173,"to":174,"method":141,"deprecated":134},"Register a student","\u002Fapi\u002Freference\u002Fregister-student",{"title":176,"to":177,"method":141,"deprecated":134},"Check a registration without registering the student","\u002Fapi\u002Freference\u002Fcheck-student-registration",{"title":179,"to":180,"method":141,"deprecated":134},"Register many students at once","\u002Fapi\u002Freference\u002Fcreate-student-import",{"title":182,"to":183,"method":133,"deprecated":134},"Follow a batch of students you sent","\u002Fapi\u002Freference\u002Fget-student-import",{"title":185,"to":186,"method":133,"deprecated":134},"Fetch one of your students","\u002Fapi\u002Freference\u002Fget-student",{"title":188,"to":189,"method":190,"deprecated":134},"Update one of your students","\u002Fapi\u002Freference\u002Fupdate-student","PUT",{"title":192,"to":193,"method":190,"deprecated":134},"Set the sign-in password of one of your students","\u002Fapi\u002Freference\u002Fset-student-password",{"title":195,"to":196,"method":133,"deprecated":134},"List your students who can use this organization","\u002Fapi\u002Freference\u002Flist-org-students",{"title":198,"to":199,"method":133,"deprecated":134},"Fetch one of your students, if they can use this organization","\u002Fapi\u002Freference\u002Fget-org-student",{"title":201,"to":202,"method":190,"deprecated":134},"Update one of your students and give them access to this organization","\u002Fapi\u002Freference\u002Fupdate-org-student",{"title":204,"to":205,"method":190,"deprecated":134},"Link one of your students to a supervisor on this organization","\u002Fapi\u002Freference\u002Flink-student-supervisor",{"tag":80,"slug":207,"links":208},"sign-in-links",[209],{"title":210,"to":211,"method":141,"deprecated":134},"Create a single-use sign-in link for one of your students","\u002Fapi\u002Freference\u002Fcreate-signin-link",{"tag":83,"slug":213,"links":214},"exams",[215,218,221,224,227],{"title":216,"to":217,"method":133,"deprecated":134},"List the exams open for applications","\u002Fapi\u002Freference\u002Flist-exams",{"title":219,"to":220,"method":133,"deprecated":134},"List an organization’s exam categories","\u002Fapi\u002Freference\u002Flist-exam-categories",{"title":222,"to":223,"method":133,"deprecated":134},"Fetch one exam category","\u002Fapi\u002Freference\u002Fget-exam-category",{"title":225,"to":226,"method":133,"deprecated":134},"List the exams one of your students can apply to","\u002Fapi\u002Freference\u002Flist-available-exams",{"title":228,"to":229,"method":133,"deprecated":134},"Fetch one exam that is open for applications","\u002Fapi\u002Freference\u002Fget-exam",{"tag":86,"slug":231,"links":232},"applications",[233,236,239,242,245,248,251],{"title":234,"to":235,"method":133,"deprecated":134},"List your students’ applications in this organization","\u002Fapi\u002Freference\u002Flist-applications",{"title":237,"to":238,"method":141,"deprecated":134},"Enter one of your students for an exam","\u002Fapi\u002Freference\u002Fcreate-application",{"title":240,"to":241,"method":133,"deprecated":134},"List your students’ applications for one exam","\u002Fapi\u002Freference\u002Flist-exam-applications",{"title":243,"to":244,"method":133,"deprecated":134},"List one of your students’ applications in this organization","\u002Fapi\u002Freference\u002Flist-student-applications",{"title":246,"to":247,"method":133,"deprecated":134},"Fetch one of your students’ applications","\u002Fapi\u002Freference\u002Fget-application",{"title":249,"to":250,"method":190,"deprecated":134},"Move one of your students’ applications to another exam","\u002Fapi\u002Freference\u002Fmove-application",{"title":252,"to":253,"method":254,"deprecated":134},"Withdraw one of your students from an exam","\u002Fapi\u002Freference\u002Fdelete-application","DELETE",{"tag":256,"slug":257,"links":258},"Documents","documents",[259,262,265,268],{"title":260,"to":261,"method":133,"deprecated":134},"Download a certificate file","\u002Fapi\u002Freference\u002Fdownload-certificate",{"title":263,"to":264,"method":133,"deprecated":134},"List one of your students’ released certificates","\u002Fapi\u002Freference\u002Flist-student-certificates",{"title":266,"to":267,"method":133,"deprecated":134},"Download a result report file","\u002Fapi\u002Freference\u002Fdownload-report",{"title":269,"to":270,"method":133,"deprecated":134},"List one of your students’ released result reports","\u002Fapi\u002Freference\u002Flist-student-reports",{"tag":89,"slug":272,"links":273},"group-challenges",[274,277,280,283,286,289,292,295,298],{"title":275,"to":276,"method":133,"deprecated":134},"List the group challenges an organization runs","\u002Fapi\u002Freference\u002Flist-group-challenges",{"title":278,"to":279,"method":133,"deprecated":134},"Fetch one group challenge","\u002Fapi\u002Freference\u002Fget-group-challenge",{"title":281,"to":282,"method":133,"deprecated":134},"List the groups your students are in for a group challenge","\u002Fapi\u002Freference\u002Flist-group-challenge-groups",{"title":284,"to":285,"method":133,"deprecated":134},"Fetch one group, with its steps and files","\u002Fapi\u002Freference\u002Fget-group-challenge-group",{"title":287,"to":288,"method":133,"deprecated":134},"List what has happened in one group","\u002Fapi\u002Freference\u002Flist-group-challenge-activity",{"title":290,"to":291,"method":141,"deprecated":134},"Send a group’s finished work for one of your students","\u002Fapi\u002Freference\u002Fsubmit-group-challenge-work",{"title":293,"to":294,"method":141,"deprecated":134},"Submit one step of a group for one of your students","\u002Fapi\u002Freference\u002Fsubmit-group-challenge-step",{"title":296,"to":297,"method":133,"deprecated":134},"List your students’ eligibility and groups for a group challenge","\u002Fapi\u002Freference\u002Flist-group-challenge-students",{"title":299,"to":300,"method":133,"deprecated":134},"Fetch one of your students’ eligibility and group for a group challenge","\u002Fapi\u002Freference\u002Fget-group-challenge-student",{"id":302,"title":303,"links":304,"groups":316},"clients","Clients",[305,307,310,313],{"title":9,"to":306,"status":14},"\u002Fapi\u002Fclients",{"title":308,"to":309,"status":14},"Node.js","\u002Fapi\u002Fclients\u002Fnode",{"title":311,"to":312,"status":14},"PHP","\u002Fapi\u002Fclients\u002Fphp",{"title":314,"to":315,"status":14},"Build your own","\u002Fapi\u002Fclients\u002Fbuild-your-own",[],{"id":318,"title":319,"links":320,"groups":330},"agents","AI agents",[321,324,327],{"title":322,"to":323},"AI connections","\u002Fapi\u002Fmcp",{"title":325,"to":326},"What it can do","\u002Fapi\u002Fmcp\u002Ftools",{"title":328,"to":329},"Agent skills","\u002Fapi\u002Fskills",[],{"id":332,"title":333,"links":334,"groups":350},"help","Help",[335,338,341,344,347],{"title":336,"to":337,"status":14},"Glossary","\u002Fapi\u002Fglossary",{"title":339,"to":340,"status":14},"FAQ","\u002Fapi\u002Ffaq",{"title":342,"to":343,"status":14},"Troubleshooting","\u002Fapi\u002Ftroubleshooting",{"title":345,"to":346,"status":14},"Support","\u002Fapi\u002Fsupport",{"title":348,"to":349},"Changelog","\u002Fapi\u002Fchangelog",[],{"id":352,"title":353,"body":354,"description":5792,"extension":5793,"meta":5794,"navTitle":106,"navigation":2262,"operations":5795,"order":5799,"path":107,"section":96,"seo":5800,"status":14,"stem":5801,"__hash__":5802},"apiGuides\u002Fapi\u002Ftutorials\u002Fchange-an-application.md","Change an application's language or sitting",{"type":355,"value":356,"toc":5771},"minimark",[357,370,373,378,447,450,454,464,558,562,658,675,678,682,742,746,807,1096,1099,1171,1175,1180,1207,1233,1473,1497,1503,1507,1510,1546,1560,1564,1625,1708,1718,1726,1730,1733,1767,1780,1784,2031,2043,2047,2050,2090,2147,2195,2199,2209,2212,3867,3870,5695,5699,5702,5710,5715,5721,5724,5730,5734,5767],[358,359,360,361,365,366,369],"p",{},"A student you entered for Mathematics in English on the November sitting asks to write the paper in\nGerman instead, or to move to the December sitting. You do not cancel and re-apply. You ",[362,363,364],"strong",{},"move"," the\nexisting application to the other exam with one ",[367,368,190],"code",{},".",[358,371,372],{},"This tutorial shows how to find the right target exam, what the API checks and in which order, what\nhappens to the payment, and every refusal you can meet. It ends with a script in Node.js and PHP that\nmakes either change.",[374,375,377],"h2",{"id":376},"move-dont-delete-and-apply-again","Move, don't delete and apply again",[379,380,381,399],"table",{},[382,383,384],"thead",{},[385,386,387,390,396],"tr",{},[388,389],"th",{},[388,391,392,393,395],{},"Move (",[367,394,190],{},")",[388,397,398],{},"Delete, then create",[400,401,402,414,425,436],"tbody",{},[385,403,404,408,411],{},[405,406,407],"td",{},"The application keeps its id",[405,409,410],{},"Yes",[405,412,413],{},"No, the new one has a new id",[385,415,416,419,422],{},[405,417,418],{},"The payment",[405,420,421],{},"Stays attached. Repriced if unsettled, kept if settled and the price is the same",[405,423,424],{},"A paid application cannot be deleted at all",[385,426,427,430,433],{},[405,428,429],{},"Requests",[405,431,432],{},"One",[405,434,435],{},"Two, with a moment in between when the student holds nothing",[385,437,438,441,444],{},[405,439,440],{},"Checks on the new exam",[405,442,443],{},"The same as for a new application",[405,445,446],{},"The same",[358,448,449],{},"A move is also what the student's own panel does when they change an entry, so both paths agree.",[374,451,453],{"id":452},"what-the-api-checks-in-order","What the API checks, in order",[358,455,456,459,460,463],{},[367,457,458],{},"PUT \u002Fv1\u002F\u003CorganizationId>\u002Fapplication\u002F\u003CapplicationId>"," with ",[367,461,462],{},"{ \"examId\": \"…\" }"," runs these checks and\nstops at the first that fails:",[465,466,467,477,486,498,512,521,529,537,545],"ol",{},[468,469,470,473,474,369],"li",{},[362,471,472],{},"The application exists and belongs to one of your students."," Otherwise ",[367,475,476],{},"404 not_found",[468,478,479,473,482,485],{},[362,480,481],{},"The exam has not been started or handed in.",[367,483,484],{},"409",": answers are tied to the paper\nbeing sat, so a started exam stays where it is.",[468,487,488,473,491,494,495,369],{},[362,489,490],{},"The target exam exists on this organization.",[367,492,493],{},"404",", ",[367,496,497],{},"Exam not found!",[468,499,500,503,504,507,508,511],{},[362,501,502],{},"The target is different."," If it is the exam the application already has, the answer is ",[367,505,506],{},"200","\nwith ",[367,509,510],{},"Application already uses that exam."," and nothing changes, so a retried move is harmless.",[468,513,514,517,518,520],{},[362,515,516],{},"The student could be offered the target."," The same rules as a new application: open for\napplications, the student's grade and country, a language set. The application being moved does\nnot count against itself, so swapping languages on the same sitting is allowed. Otherwise ",[367,519,484],{},",\nnaming the rule.",[468,522,523,526,527,369],{},[362,524,525],{},"The current exam's category accepts the target's category as a replacement."," Some categories\nmay not be swapped for others. Otherwise ",[367,528,484],{},[468,530,531,534,535,369],{},[362,532,533],{},"No clash."," The student holds no other application in the target's category on the target's\nsitting. Otherwise ",[367,536,484],{},[468,538,539,542,543,369],{},[362,540,541],{},"Not a started AI Challenge."," An AI Challenge application whose image quota has already been used\ncannot be moved. Otherwise ",[367,544,484],{},[468,546,547,550,551,554,555,557],{},[362,548,549],{},"The price still fits a settled payment."," If the application has been paid for (status ",[367,552,553],{},"paid","\nwith an amount above 0), the target must cost exactly the same. Otherwise ",[367,556,484],{},": this API neither\ncharges a difference nor refunds one.",[374,559,561],{"id":560},"what-happens-to-the-payment","What happens to the payment",[379,563,564,577],{},[382,565,566],{},[385,567,568,571,574],{},[388,569,570],{},"Payment before",[388,572,573],{},"Target's price",[388,575,576],{},"Payment after",[400,578,579,602,618,632,644],{},[385,580,581,591,594],{},[405,582,583,586,587,590],{},[367,584,585],{},"pending"," or ",[367,588,589],{},"canceled",", any amount",[405,592,593],{},"Any",[405,595,596,597,599,600],{},"Amount set to the target's price; ",[367,598,553],{}," if that is 0, otherwise ",[367,601,585],{},[385,603,604,609,612],{},[405,605,606,608],{},[367,607,553],{},", amount 0 (a free exam)",[405,610,611],{},"0",[405,613,614,615,617],{},"Unchanged: ",[367,616,553],{},", amount 0",[385,619,620,624,627],{},[405,621,622,608],{},[367,623,553],{},[405,625,626],{},"Above 0",[405,628,629,631],{},[367,630,585],{},", for the target's price",[385,633,634,639,641],{},[405,635,636,638],{},[367,637,553],{},", amount above 0",[405,640,446],{},[405,642,643],{},"Unchanged; only the exam it pays for moves",[385,645,646,650,653],{},[405,647,648,638],{},[367,649,553],{},[405,651,652],{},"Different",[405,654,655,656],{},"The move is refused with ",[367,657,484],{},[659,660,662],"callout",{"type":661},"warn",[358,663,664,667,668,671,672,674],{},[362,665,666],{},"Moving a free entry onto a priced exam leaves the student owing the new price."," Read the target's\n",[367,669,670],{},"price"," before you move. An exam with no ",[367,673,670],{}," field is free.",[358,676,677],{},"One more rule: an application on a sitting that is linked to another sitting, such as a make-up\nsitting, is temporary. It is set to expire 6 hours after you create it there or move it there, the same\nas when a student makes that entry in their own panel. Moving an application off such a sitting\nremoves the expiry.",[374,679,681],{"id":680},"before-you-start","Before you start",[683,684,685,717,726],"ul",{},[468,686,687,689,690,693,694,697,698,701,702,705,706,709,710,713,714,369],{},[362,688,25],{}," on the organization: ",[367,691,692],{},"application\u002Fread"," and ",[367,695,696],{},"application\u002Fupdate",", plus ",[367,699,700],{},"exam\u002Fread","\nto find the target. To read the student's grade you need ",[367,703,704],{},"student\u002Fread"," on ",[367,707,708],{},"mto",". Deleting (at the\nend) needs ",[367,711,712],{},"application\u002Fdelete",". See ",[715,716,25],"a",{"href":26},[468,718,719,722,723,369],{},[362,720,721],{},"The application's id."," You got it when you created the application. Otherwise list the student's\napplications with ",[367,724,725],{},"GET \u002Fv1\u002F\u003CorganizationId>\u002Fapplication\u002Fstudent-applications\u002F\u003CstudentId>",[468,727,728,731,732,586,735,738,739,369],{},[362,729,730],{},"The helper file"," ",[367,733,734],{},"mainteam.mjs",[367,736,737],{},"mainteam.php"," from\n",[715,740,100],{"href":741},"\u002Fapi\u002Ftutorials\u002Fregister-and-apply#the-helper-file",[374,743,745],{"id":744},"step-1-load-the-application","Step 1: load the application",[747,748,754],"pre",{"className":749,"code":750,"filename":751,"language":752,"meta":753,"style":753},"language-bash shiki shiki-themes github-light-high-contrast github-dark-high-contrast","curl -s https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fapplication\u002F66e6a4b1c1d2b30012a4fa07 \\\n  -H \"Authorization: Bearer $TOKEN\"\n","curl","bash","",[367,755,756,792],{"__ignoreMap":753},[757,758,761,764,768,772,776,779,783,786,789],"span",{"class":759,"line":760},"line",1,[757,762,751],{"class":763},"soyes",[757,765,767],{"class":766},"s-5SL"," -s",[757,769,771],{"class":770},"sT6z2"," https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F",[757,773,775],{"class":774},"sHUrx","\u003C",[757,777,778],{"class":770},"organizationI",[757,780,782],{"class":781},"suds8","d",[757,784,785],{"class":774},">",[757,787,788],{"class":770},"\u002Fapplication\u002F66e6a4b1c1d2b30012a4fa07",[757,790,791],{"class":774}," \\\n",[757,793,795,798,801,804],{"class":759,"line":794},2,[757,796,797],{"class":766},"  -H",[757,799,800],{"class":770}," \"Authorization: Bearer ",[757,802,803],{"class":781},"$TOKEN",[757,805,806],{"class":770},"\"\n",[747,808,813],{"className":809,"code":810,"filename":811,"language":812,"meta":753,"style":753},"language-json shiki shiki-themes github-light-high-contrast github-dark-high-contrast","{\n  \"success\": true,\n  \"message\": \"Application fetched successfully.\",\n  \"data\": {\n    \"_id\": \"66e6a4b1c1d2b30012a4fa07\",\n    \"exam\": {\n      \"_id\": \"64c0a1b2c3d4e5f601234801\",\n      \"session\": \"64c0a1b2c3d4e5f601234601\",\n      \"category\": \"64c0a1b2c3d4e5f601234501\",\n      \"language\": \"64c0a1b2c3d4e5f601234701\",\n      \"grades\": [\"630e01826836e67ec53dc7a6\"],\n      \"price\": 25\n    },\n    \"user\": {\n      \"_id\": \"66e6a41fc1d2b30012a4f9f3\",\n      \"mainId\": \"66e6a3f5c1d2b30012a4f9c1\",\n      \"firstName\": \"Jane\",\n      \"lastName\": \"Doe\"\n    },\n    \"payment\": {\n      \"_id\": \"66e6a4b1c1d2b30012a4fa09\",\n      \"amount\": 25,\n      \"status\": \"paid\"\n    },\n    \"participated\": false\n  }\n}\n","Response 200 (abridged)","json",[367,814,815,820,835,848,857,870,878,891,904,917,930,945,956,962,970,982,995,1008,1019,1024,1032,1044,1057,1068,1073,1084,1090],{"__ignoreMap":753},[757,816,817],{"class":759,"line":760},[757,818,819],{"class":781},"{\n",[757,821,822,826,829,832],{"class":759,"line":794},[757,823,825],{"class":824},"sne4z","  \"success\"",[757,827,828],{"class":781},": ",[757,830,831],{"class":766},"true",[757,833,834],{"class":781},",\n",[757,836,838,841,843,846],{"class":759,"line":837},3,[757,839,840],{"class":824},"  \"message\"",[757,842,828],{"class":781},[757,844,845],{"class":770},"\"Application fetched successfully.\"",[757,847,834],{"class":781},[757,849,851,854],{"class":759,"line":850},4,[757,852,853],{"class":824},"  \"data\"",[757,855,856],{"class":781},": {\n",[757,858,860,863,865,868],{"class":759,"line":859},5,[757,861,862],{"class":824},"    \"_id\"",[757,864,828],{"class":781},[757,866,867],{"class":770},"\"66e6a4b1c1d2b30012a4fa07\"",[757,869,834],{"class":781},[757,871,873,876],{"class":759,"line":872},6,[757,874,875],{"class":824},"    \"exam\"",[757,877,856],{"class":781},[757,879,881,884,886,889],{"class":759,"line":880},7,[757,882,883],{"class":824},"      \"_id\"",[757,885,828],{"class":781},[757,887,888],{"class":770},"\"64c0a1b2c3d4e5f601234801\"",[757,890,834],{"class":781},[757,892,894,897,899,902],{"class":759,"line":893},8,[757,895,896],{"class":824},"      \"session\"",[757,898,828],{"class":781},[757,900,901],{"class":770},"\"64c0a1b2c3d4e5f601234601\"",[757,903,834],{"class":781},[757,905,907,910,912,915],{"class":759,"line":906},9,[757,908,909],{"class":824},"      \"category\"",[757,911,828],{"class":781},[757,913,914],{"class":770},"\"64c0a1b2c3d4e5f601234501\"",[757,916,834],{"class":781},[757,918,920,923,925,928],{"class":759,"line":919},10,[757,921,922],{"class":824},"      \"language\"",[757,924,828],{"class":781},[757,926,927],{"class":770},"\"64c0a1b2c3d4e5f601234701\"",[757,929,834],{"class":781},[757,931,933,936,939,942],{"class":759,"line":932},11,[757,934,935],{"class":824},"      \"grades\"",[757,937,938],{"class":781},": [",[757,940,941],{"class":770},"\"630e01826836e67ec53dc7a6\"",[757,943,944],{"class":781},"],\n",[757,946,948,951,953],{"class":759,"line":947},12,[757,949,950],{"class":824},"      \"price\"",[757,952,828],{"class":781},[757,954,955],{"class":766},"25\n",[757,957,959],{"class":759,"line":958},13,[757,960,961],{"class":781},"    },\n",[757,963,965,968],{"class":759,"line":964},14,[757,966,967],{"class":824},"    \"user\"",[757,969,856],{"class":781},[757,971,973,975,977,980],{"class":759,"line":972},15,[757,974,883],{"class":824},[757,976,828],{"class":781},[757,978,979],{"class":770},"\"66e6a41fc1d2b30012a4f9f3\"",[757,981,834],{"class":781},[757,983,985,988,990,993],{"class":759,"line":984},16,[757,986,987],{"class":824},"      \"mainId\"",[757,989,828],{"class":781},[757,991,992],{"class":770},"\"66e6a3f5c1d2b30012a4f9c1\"",[757,994,834],{"class":781},[757,996,998,1001,1003,1006],{"class":759,"line":997},17,[757,999,1000],{"class":824},"      \"firstName\"",[757,1002,828],{"class":781},[757,1004,1005],{"class":770},"\"Jane\"",[757,1007,834],{"class":781},[757,1009,1011,1014,1016],{"class":759,"line":1010},18,[757,1012,1013],{"class":824},"      \"lastName\"",[757,1015,828],{"class":781},[757,1017,1018],{"class":770},"\"Doe\"\n",[757,1020,1022],{"class":759,"line":1021},19,[757,1023,961],{"class":781},[757,1025,1027,1030],{"class":759,"line":1026},20,[757,1028,1029],{"class":824},"    \"payment\"",[757,1031,856],{"class":781},[757,1033,1035,1037,1039,1042],{"class":759,"line":1034},21,[757,1036,883],{"class":824},[757,1038,828],{"class":781},[757,1040,1041],{"class":770},"\"66e6a4b1c1d2b30012a4fa09\"",[757,1043,834],{"class":781},[757,1045,1047,1050,1052,1055],{"class":759,"line":1046},22,[757,1048,1049],{"class":824},"      \"amount\"",[757,1051,828],{"class":781},[757,1053,1054],{"class":766},"25",[757,1056,834],{"class":781},[757,1058,1060,1063,1065],{"class":759,"line":1059},23,[757,1061,1062],{"class":824},"      \"status\"",[757,1064,828],{"class":781},[757,1066,1067],{"class":770},"\"paid\"\n",[757,1069,1071],{"class":759,"line":1070},24,[757,1072,961],{"class":781},[757,1074,1076,1079,1081],{"class":759,"line":1075},25,[757,1077,1078],{"class":824},"    \"participated\"",[757,1080,828],{"class":781},[757,1082,1083],{"class":766},"false\n",[757,1085,1087],{"class":759,"line":1086},26,[757,1088,1089],{"class":781},"  }\n",[757,1091,1093],{"class":759,"line":1092},27,[757,1094,1095],{"class":781},"}\n",[358,1097,1098],{},"What to take from it:",[379,1100,1101,1111],{},[382,1102,1103],{},[385,1104,1105,1108],{},[388,1106,1107],{},"Field",[388,1109,1110],{},"Use",[400,1112,1113,1129,1139,1155],{},[385,1114,1115,1126],{},[405,1116,1117,494,1120,494,1123],{},[367,1118,1119],{},"exam.session",[367,1121,1122],{},"exam.category",[367,1124,1125],{},"exam.language",[405,1127,1128],{},"The current sitting, category and language, as ids",[385,1130,1131,1136],{},[405,1132,1133],{},[367,1134,1135],{},"user.mainId",[405,1137,1138],{},"The student's core id, for the student and picker requests below",[385,1140,1141,1149],{},[405,1142,1143,494,1146],{},[367,1144,1145],{},"payment.status",[367,1147,1148],{},"payment.amount",[405,1150,1151,1152,1154],{},"Whether the payment is settled: ",[367,1153,553],{}," with an amount above 0",[385,1156,1157,1165],{},[405,1158,1159,494,1162],{},[367,1160,1161],{},"participated",[367,1163,1164],{},"examSubmitted",[405,1166,1167,1168,1170],{},"If either is ",[367,1169,831],{},", the exam has started and the move will be refused. Either may be absent, which means not started",[374,1172,1174],{"id":1173},"step-2-find-the-target-exam","Step 2: find the target exam",[1176,1177,1179],"h3",{"id":1178},"another-language-on-the-same-sitting","Another language on the same sitting",[358,1181,1182,1183,1186,1187,1190,1191,494,1194,494,1197,494,1200,693,1203,1206],{},"The student's picker (",[367,1184,1185],{},"GET \u002Fv1\u002F\u003CorganizationId>\u002Fexam\u002Favailable\u002F\u003CstudentId>",") leaves out any category\nand sitting the student already holds, ",[362,1188,1189],{},"in every language",". It cannot show you this move. Use the\norganization's list of open exams instead. It is paginated, soonest sitting first, and each exam\ncarries its ",[367,1192,1193],{},"session",[367,1195,1196],{},"category",[367,1198,1199],{},"language",[367,1201,1202],{},"grades",[367,1204,1205],{},"countries"," as documents:",[747,1208,1210],{"className":749,"code":1209,"filename":751,"language":752,"meta":753,"style":753},"curl -s \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fexam?page=1&limit=100\" \\\n  -H \"Authorization: Bearer $TOKEN\"\n",[367,1211,1212,1223],{"__ignoreMap":753},[757,1213,1214,1216,1218,1221],{"class":759,"line":760},[757,1215,751],{"class":763},[757,1217,767],{"class":766},[757,1219,1220],{"class":770}," \"https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fexam?page=1&limit=100\"",[757,1222,791],{"class":774},[757,1224,1225,1227,1229,1231],{"class":759,"line":794},[757,1226,797],{"class":766},[757,1228,800],{"class":770},[757,1230,803],{"class":781},[757,1232,806],{"class":770},[747,1234,1236],{"className":809,"code":1235,"filename":811,"language":812,"meta":753,"style":753},"{\n  \"success\": true,\n  \"message\": \"Exams fetched successfully.\",\n  \"data\": [\n    {\n      \"_id\": \"64c0a1b2c3d4e5f601234802\",\n      \"session\": { \"_id\": \"64c0a1b2c3d4e5f601234601\", \"date\": \"2026-11-14T09:00:00.000Z\" },\n      \"category\": { \"_id\": \"64c0a1b2c3d4e5f601234501\", \"name\": \"Mathematics\" },\n      \"language\": { \"_id\": \"64c0a1b2c3d4e5f601234702\", \"name\": \"German\", \"code\": \"de\" },\n      \"grades\": [{ \"_id\": \"630e01826836e67ec53dc7a6\", \"name\": \"10\" }],\n      \"countries\": [],\n      \"price\": 25\n    }\n  ],\n  \"pagination\": { \"page\": 1, \"limit\": 100, \"total\": 38, \"totalPages\": 1 }\n}\n",[367,1237,1238,1242,1252,1263,1270,1275,1286,1313,1337,1371,1396,1404,1412,1417,1422,1469],{"__ignoreMap":753},[757,1239,1240],{"class":759,"line":760},[757,1241,819],{"class":781},[757,1243,1244,1246,1248,1250],{"class":759,"line":794},[757,1245,825],{"class":824},[757,1247,828],{"class":781},[757,1249,831],{"class":766},[757,1251,834],{"class":781},[757,1253,1254,1256,1258,1261],{"class":759,"line":837},[757,1255,840],{"class":824},[757,1257,828],{"class":781},[757,1259,1260],{"class":770},"\"Exams fetched successfully.\"",[757,1262,834],{"class":781},[757,1264,1265,1267],{"class":759,"line":850},[757,1266,853],{"class":824},[757,1268,1269],{"class":781},": [\n",[757,1271,1272],{"class":759,"line":859},[757,1273,1274],{"class":781},"    {\n",[757,1276,1277,1279,1281,1284],{"class":759,"line":872},[757,1278,883],{"class":824},[757,1280,828],{"class":781},[757,1282,1283],{"class":770},"\"64c0a1b2c3d4e5f601234802\"",[757,1285,834],{"class":781},[757,1287,1288,1290,1293,1296,1298,1300,1302,1305,1307,1310],{"class":759,"line":880},[757,1289,896],{"class":824},[757,1291,1292],{"class":781},": { ",[757,1294,1295],{"class":824},"\"_id\"",[757,1297,828],{"class":781},[757,1299,901],{"class":770},[757,1301,494],{"class":781},[757,1303,1304],{"class":824},"\"date\"",[757,1306,828],{"class":781},[757,1308,1309],{"class":770},"\"2026-11-14T09:00:00.000Z\"",[757,1311,1312],{"class":781}," },\n",[757,1314,1315,1317,1319,1321,1323,1325,1327,1330,1332,1335],{"class":759,"line":893},[757,1316,909],{"class":824},[757,1318,1292],{"class":781},[757,1320,1295],{"class":824},[757,1322,828],{"class":781},[757,1324,914],{"class":770},[757,1326,494],{"class":781},[757,1328,1329],{"class":824},"\"name\"",[757,1331,828],{"class":781},[757,1333,1334],{"class":770},"\"Mathematics\"",[757,1336,1312],{"class":781},[757,1338,1339,1341,1343,1345,1347,1350,1352,1354,1356,1359,1361,1364,1366,1369],{"class":759,"line":906},[757,1340,922],{"class":824},[757,1342,1292],{"class":781},[757,1344,1295],{"class":824},[757,1346,828],{"class":781},[757,1348,1349],{"class":770},"\"64c0a1b2c3d4e5f601234702\"",[757,1351,494],{"class":781},[757,1353,1329],{"class":824},[757,1355,828],{"class":781},[757,1357,1358],{"class":770},"\"German\"",[757,1360,494],{"class":781},[757,1362,1363],{"class":824},"\"code\"",[757,1365,828],{"class":781},[757,1367,1368],{"class":770},"\"de\"",[757,1370,1312],{"class":781},[757,1372,1373,1375,1378,1380,1382,1384,1386,1388,1390,1393],{"class":759,"line":919},[757,1374,935],{"class":824},[757,1376,1377],{"class":781},": [{ ",[757,1379,1295],{"class":824},[757,1381,828],{"class":781},[757,1383,941],{"class":770},[757,1385,494],{"class":781},[757,1387,1329],{"class":824},[757,1389,828],{"class":781},[757,1391,1392],{"class":770},"\"10\"",[757,1394,1395],{"class":781}," }],\n",[757,1397,1398,1401],{"class":759,"line":932},[757,1399,1400],{"class":824},"      \"countries\"",[757,1402,1403],{"class":781},": [],\n",[757,1405,1406,1408,1410],{"class":759,"line":947},[757,1407,950],{"class":824},[757,1409,828],{"class":781},[757,1411,955],{"class":766},[757,1413,1414],{"class":759,"line":958},[757,1415,1416],{"class":781},"    }\n",[757,1418,1419],{"class":759,"line":964},[757,1420,1421],{"class":781},"  ],\n",[757,1423,1424,1427,1429,1432,1434,1437,1439,1442,1444,1447,1449,1452,1454,1457,1459,1462,1464,1466],{"class":759,"line":972},[757,1425,1426],{"class":824},"  \"pagination\"",[757,1428,1292],{"class":781},[757,1430,1431],{"class":824},"\"page\"",[757,1433,828],{"class":781},[757,1435,1436],{"class":766},"1",[757,1438,494],{"class":781},[757,1440,1441],{"class":824},"\"limit\"",[757,1443,828],{"class":781},[757,1445,1446],{"class":766},"100",[757,1448,494],{"class":781},[757,1450,1451],{"class":824},"\"total\"",[757,1453,828],{"class":781},[757,1455,1456],{"class":766},"38",[757,1458,494],{"class":781},[757,1460,1461],{"class":824},"\"totalPages\"",[757,1463,828],{"class":781},[757,1465,1436],{"class":766},[757,1467,1468],{"class":781}," }\n",[757,1470,1471],{"class":759,"line":984},[757,1472,1095],{"class":781},[358,1474,1475,1476,693,1479,1482,1483,1486,1487,1489,1490,1493,1494,1496],{},"Pick the exam whose ",[367,1477,1478],{},"session._id",[367,1480,1481],{},"category._id"," match the current ones, whose ",[367,1484,1485],{},"language.code"," is\nthe one the student wants, and whose ",[367,1488,1202],{}," include the student's grade. The grade is on\n",[367,1491,1492],{},"GET \u002Fv1\u002Fstudent\u002F\u003CstudentId>",", and grade ids are the same on every organization. If the payment is\nsettled, also check that ",[367,1495,670],{}," equals the amount paid. The API makes the final decision, country\nrules included, and names the reason if it refuses.",[358,1498,1499,1502],{},[367,1500,1501],{},"GET \u002Fexam"," lists open exams only. An exam missing from it cannot be moved to.",[1176,1504,1506],{"id":1505},"another-sitting","Another sitting",[358,1508,1509],{},"For a different date the student's picker is the right tool. It lists the other sittings of each\ncategory, and leaves out only the sitting the student already holds:",[747,1511,1513],{"className":749,"code":1512,"filename":751,"language":752,"meta":753,"style":753},"curl -s https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fexam\u002Favailable\u002F66e6a3f5c1d2b30012a4f9c1 \\\n  -H \"Authorization: Bearer $TOKEN\"\n",[367,1514,1515,1536],{"__ignoreMap":753},[757,1516,1517,1519,1521,1523,1525,1527,1529,1531,1534],{"class":759,"line":760},[757,1518,751],{"class":763},[757,1520,767],{"class":766},[757,1522,771],{"class":770},[757,1524,775],{"class":774},[757,1526,778],{"class":770},[757,1528,782],{"class":781},[757,1530,785],{"class":774},[757,1532,1533],{"class":770},"\u002Fexam\u002Favailable\u002F66e6a3f5c1d2b30012a4f9c1",[757,1535,791],{"class":774},[757,1537,1538,1540,1542,1544],{"class":759,"line":794},[757,1539,797],{"class":766},[757,1541,800],{"class":770},[757,1543,803],{"class":781},[757,1545,806],{"class":770},[358,1547,1548,1549,1552,1553,1556,1557,369],{},"Find the category whose ",[367,1550,1551],{},"_id"," matches the current category, choose a sitting under it, and take\n",[367,1554,1555],{},"matchedExam._id"," from the language you want. The tree is described step by step in\n",[715,1558,100],{"href":1559},"\u002Fapi\u002Ftutorials\u002Fregister-and-apply#step-6-fetch-the-students-exam-picker",[374,1561,1563],{"id":1562},"step-3-move-it","Step 3: move it",[747,1565,1567],{"className":749,"code":1566,"filename":751,"language":752,"meta":753,"style":753},"curl -s -X PUT https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fapplication\u002F66e6a4b1c1d2b30012a4fa07 \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"examId\": \"64c0a1b2c3d4e5f601234802\" }'\n",[367,1568,1569,1595,1608,1617],{"__ignoreMap":753},[757,1570,1571,1573,1575,1578,1581,1583,1585,1587,1589,1591,1593],{"class":759,"line":760},[757,1572,751],{"class":763},[757,1574,767],{"class":766},[757,1576,1577],{"class":766}," -X",[757,1579,1580],{"class":770}," PUT",[757,1582,771],{"class":770},[757,1584,775],{"class":774},[757,1586,778],{"class":770},[757,1588,782],{"class":781},[757,1590,785],{"class":774},[757,1592,788],{"class":770},[757,1594,791],{"class":774},[757,1596,1597,1599,1601,1603,1606],{"class":759,"line":794},[757,1598,797],{"class":766},[757,1600,800],{"class":770},[757,1602,803],{"class":781},[757,1604,1605],{"class":770},"\"",[757,1607,791],{"class":774},[757,1609,1610,1612,1615],{"class":759,"line":837},[757,1611,797],{"class":766},[757,1613,1614],{"class":770}," \"Content-Type: application\u002Fjson\"",[757,1616,791],{"class":774},[757,1618,1619,1622],{"class":759,"line":850},[757,1620,1621],{"class":766},"  -d",[757,1623,1624],{"class":770}," '{ \"examId\": \"64c0a1b2c3d4e5f601234802\" }'\n",[747,1626,1628],{"className":809,"code":1627,"filename":811,"language":812,"meta":753,"style":753},"{\n  \"success\": true,\n  \"message\": \"Application updated successfully.\",\n  \"data\": {\n    \"_id\": \"66e6a4b1c1d2b30012a4fa07\",\n    \"exam\": \"64c0a1b2c3d4e5f601234802\",\n    \"user\": \"66e6a41fc1d2b30012a4f9f3\",\n    \"payment\": \"66e6a4b1c1d2b30012a4fa09\"\n  }\n}\n",[367,1629,1630,1634,1644,1655,1661,1671,1681,1691,1700,1704],{"__ignoreMap":753},[757,1631,1632],{"class":759,"line":760},[757,1633,819],{"class":781},[757,1635,1636,1638,1640,1642],{"class":759,"line":794},[757,1637,825],{"class":824},[757,1639,828],{"class":781},[757,1641,831],{"class":766},[757,1643,834],{"class":781},[757,1645,1646,1648,1650,1653],{"class":759,"line":837},[757,1647,840],{"class":824},[757,1649,828],{"class":781},[757,1651,1652],{"class":770},"\"Application updated successfully.\"",[757,1654,834],{"class":781},[757,1656,1657,1659],{"class":759,"line":850},[757,1658,853],{"class":824},[757,1660,856],{"class":781},[757,1662,1663,1665,1667,1669],{"class":759,"line":859},[757,1664,862],{"class":824},[757,1666,828],{"class":781},[757,1668,867],{"class":770},[757,1670,834],{"class":781},[757,1672,1673,1675,1677,1679],{"class":759,"line":872},[757,1674,875],{"class":824},[757,1676,828],{"class":781},[757,1678,1283],{"class":770},[757,1680,834],{"class":781},[757,1682,1683,1685,1687,1689],{"class":759,"line":880},[757,1684,967],{"class":824},[757,1686,828],{"class":781},[757,1688,979],{"class":770},[757,1690,834],{"class":781},[757,1692,1693,1695,1697],{"class":759,"line":893},[757,1694,1029],{"class":824},[757,1696,828],{"class":781},[757,1698,1699],{"class":770},"\"66e6a4b1c1d2b30012a4fa09\"\n",[757,1701,1702],{"class":759,"line":906},[757,1703,1089],{"class":781},[757,1705,1706],{"class":759,"line":919},[757,1707,1095],{"class":781},[358,1709,1710,1711,1714,1715,369],{},"The body takes ",[367,1712,1713],{},"examId"," and nothing else. The student is not in the body, because the application\nalready names them. Any other field is refused with ",[367,1716,1717],{},"400",[358,1719,1720,1721,459,1723,1725],{},"Sending the exam the application already has answers ",[367,1722,506],{},[367,1724,510],{},"\nand changes nothing.",[374,1727,1729],{"id":1728},"step-4-check-the-payment","Step 4: check the payment",[358,1731,1732],{},"Read the application again to see where the move left the payment:",[747,1734,1735],{"className":749,"code":750,"filename":751,"language":752,"meta":753,"style":753},[367,1736,1737,1757],{"__ignoreMap":753},[757,1738,1739,1741,1743,1745,1747,1749,1751,1753,1755],{"class":759,"line":760},[757,1740,751],{"class":763},[757,1742,767],{"class":766},[757,1744,771],{"class":770},[757,1746,775],{"class":774},[757,1748,778],{"class":770},[757,1750,782],{"class":781},[757,1752,785],{"class":774},[757,1754,788],{"class":770},[757,1756,791],{"class":774},[757,1758,1759,1761,1763,1765],{"class":759,"line":794},[757,1760,797],{"class":766},[757,1762,800],{"class":770},[757,1764,803],{"class":781},[757,1766,806],{"class":770},[358,1768,1769,1770,693,1773,1776,1777,1779],{},"For the move above, from a settled payment of 25 to another exam at 25, the payment is unchanged:\n",[367,1771,1772],{},"\"status\": \"paid\"",[367,1774,1775],{},"\"amount\": 25",", and it now pays for the German exam. Had the payment been\n",[367,1778,585],{},", it would now show the new exam's price.",[374,1781,1783],{"id":1782},"refusals","Refusals",[379,1785,1786,1799],{},[382,1787,1788],{},[385,1789,1790,1793,1796],{},[388,1791,1792],{},"Status",[388,1794,1795],{},"Message",[388,1797,1798],{},"What to do",[400,1800,1801,1815,1828,1843,1859,1873,1887,1901,1914,1928,1942,1956,1970,1985,1999,2013],{},[385,1802,1803,1807,1812],{},[405,1804,1805],{},[367,1806,476],{},[405,1808,1809],{},[367,1810,1811],{},"Application not found!",[405,1813,1814],{},"The application does not exist on this organization, or is not one of your students'. The two answer alike",[385,1816,1817,1821,1825],{},[405,1818,1819],{},[367,1820,476],{},[405,1822,1823],{},[367,1824,497],{},[405,1826,1827],{},"The exam id is wrong, or belongs to another organization",[385,1829,1830,1835,1840],{},[405,1831,1832],{},[367,1833,1834],{},"409 conflict",[405,1836,1837],{},[367,1838,1839],{},"This exam has already been started and can no longer be changed.",[405,1841,1842],{},"Final. The entry stays as it is",[385,1844,1845,1849,1854],{},[405,1846,1847],{},[367,1848,1834],{},[405,1850,1851],{},[367,1852,1853],{},"Exam is not open for application. Only exams returned by GET \u002F:organizationId\u002Fexam can be applied to.",[405,1855,1856,1857],{},"Pick an exam from ",[367,1858,1501],{},[385,1860,1861,1865,1870],{},[405,1862,1863],{},[367,1864,1834],{},[405,1866,1867],{},[367,1868,1869],{},"Exam is not available for grade 10. It accepts grade 11, 12.",[405,1871,1872],{},"Pick an exam for the student's grade, or correct the grade first",[385,1874,1875,1879,1884],{},[405,1876,1877],{},[367,1878,1834],{},[405,1880,1881],{},[367,1882,1883],{},"Exam is not available in this student’s country. It is offered in …",[405,1885,1886],{},"Pick an exam offered in the student's country",[385,1888,1889,1893,1898],{},[405,1890,1891],{},[367,1892,1834],{},[405,1894,1895],{},[367,1896,1897],{},"Exam has no language set, so it is not offered to students and cannot be applied to.",[405,1899,1900],{},"Pick another exam",[385,1902,1903,1907,1912],{},[405,1904,1905],{},[367,1906,1834],{},[405,1908,1909],{},[367,1910,1911],{},"Exam is not available to this student. Only exams returned by GET \u002F:organizationId\u002Fexam\u002Favailable\u002F:studentId can be applied to.",[405,1913,1900],{},[385,1915,1916,1920,1925],{},[405,1917,1918],{},[367,1919,1834],{},[405,1921,1922],{},[367,1923,1924],{},"An application for Mathematics cannot be moved to that category.",[405,1926,1927],{},"This category may not be swapped for the target's. Stay in the category",[385,1929,1930,1934,1939],{},[405,1931,1932],{},[367,1933,1834],{},[405,1935,1936],{},[367,1937,1938],{},"Student already has an application for Mathematics on this sitting. Two exams in one category on one date cannot both be sat.",[405,1940,1941],{},"The student holds that sitting through another application. Move or delete that one first",[385,1943,1944,1948,1953],{},[405,1945,1946],{},[367,1947,1834],{},[405,1949,1950],{},[367,1951,1952],{},"Training has already started for this AI Challenge application, so it can no longer be moved.",[405,1954,1955],{},"Final. The AI Challenge image quota has been used",[385,1957,1958,1962,1967],{},[405,1959,1960],{},[367,1961,1834],{},[405,1963,1964],{},[367,1965,1966],{},"Application has been paid for at 25, and that exam costs 30. Moving it would change what the payment bought, and this API neither charges a difference nor refunds.",[405,1968,1969],{},"Pick an exam at the same price",[385,1971,1972,1977,1982],{},[405,1973,1974],{},[367,1975,1976],{},"400 bad_request",[405,1978,1979],{},[367,1980,1981],{},"Student has no grade set, and every exam is restricted to a set of grades.…",[405,1983,1984],{},"Set the student's grade first, then move",[385,1986,1987,1991,1996],{},[405,1988,1989],{},[367,1990,1976],{},[405,1992,1993],{},[367,1994,1995],{},"examId must be a mongodb id",[405,1997,1998],{},"The body is malformed",[385,2000,2001,2005,2010],{},[405,2002,2003],{},[367,2004,1976],{},[405,2006,2007],{},[367,2008,2009],{},"Invalid value for '_id': expected ObjectId.",[405,2011,2012],{},"The application id in the path is not a 24-character hex id",[385,2014,2015,2020,2025],{},[405,2016,2017],{},[367,2018,2019],{},"403 forbidden",[405,2021,2022],{},[367,2023,2024],{},"Insufficient role permissions",[405,2026,2027,2028,2030],{},"Your account lacks ",[367,2029,696],{}," on this organization",[358,2032,2033,2034,2036,2037,2039,2040,369],{},"A ",[367,2035,484],{}," never changes anything, so you can show its message to your staff and let them choose another\nexam. Do not retry a ",[367,2038,484],{}," unchanged; it gives the same answer. See ",[715,2041,42],{"href":2042},"\u002Fapi\u002Ferrors#conflict",[374,2044,2046],{"id":2045},"removing-an-application-instead","Removing an application instead",[358,2048,2049],{},"If the student wants out altogether, delete the application:",[747,2051,2053],{"className":749,"code":2052,"filename":751,"language":752,"meta":753,"style":753},"curl -s -X DELETE https:\u002F\u002Fapi.main-team.org\u002Fv1\u002F\u003CorganizationId>\u002Fapplication\u002F66e6a4b1c1d2b30012a4fa07 \\\n  -H \"Authorization: Bearer $TOKEN\"\n",[367,2054,2055,2080],{"__ignoreMap":753},[757,2056,2057,2059,2061,2063,2066,2068,2070,2072,2074,2076,2078],{"class":759,"line":760},[757,2058,751],{"class":763},[757,2060,767],{"class":766},[757,2062,1577],{"class":766},[757,2064,2065],{"class":770}," DELETE",[757,2067,771],{"class":770},[757,2069,775],{"class":774},[757,2071,778],{"class":770},[757,2073,782],{"class":781},[757,2075,785],{"class":774},[757,2077,788],{"class":770},[757,2079,791],{"class":774},[757,2081,2082,2084,2086,2088],{"class":759,"line":794},[757,2083,797],{"class":766},[757,2085,800],{"class":770},[757,2087,803],{"class":781},[757,2089,806],{"class":770},[747,2091,2093],{"className":809,"code":2092,"filename":811,"language":812,"meta":753,"style":753},"{\n  \"success\": true,\n  \"message\": \"Application deleted successfully.\",\n  \"data\": { \"_id\": \"66e6a4b1c1d2b30012a4fa07\", \"exam\": \"64c0a1b2c3d4e5f601234802\" }\n}\n",[367,2094,2095,2099,2109,2120,2143],{"__ignoreMap":753},[757,2096,2097],{"class":759,"line":760},[757,2098,819],{"class":781},[757,2100,2101,2103,2105,2107],{"class":759,"line":794},[757,2102,825],{"class":824},[757,2104,828],{"class":781},[757,2106,831],{"class":766},[757,2108,834],{"class":781},[757,2110,2111,2113,2115,2118],{"class":759,"line":837},[757,2112,840],{"class":824},[757,2114,828],{"class":781},[757,2116,2117],{"class":770},"\"Application deleted successfully.\"",[757,2119,834],{"class":781},[757,2121,2122,2124,2126,2128,2130,2132,2134,2137,2139,2141],{"class":759,"line":850},[757,2123,853],{"class":824},[757,2125,1292],{"class":781},[757,2127,1295],{"class":824},[757,2129,828],{"class":781},[757,2131,867],{"class":770},[757,2133,494],{"class":781},[757,2135,2136],{"class":824},"\"exam\"",[757,2138,828],{"class":781},[757,2140,1283],{"class":770},[757,2142,1468],{"class":781},[757,2144,2145],{"class":759,"line":859},[757,2146,1095],{"class":781},[683,2148,2149,2167,2180],{},[468,2150,2151,2154,2155,2157,2158,459,2160,2163,2164,2166],{},[362,2152,2153],{},"A paid application cannot be deleted."," If the payment is ",[367,2156,553],{}," with an amount above 0, the answer\nis ",[367,2159,484],{},[367,2161,2162],{},"Application has been paid for and cannot be deleted. Cancelling a paid application requires a refund, which this API does not perform."," A free application (",[367,2165,553],{},", amount 0) and an\nunpaid one can be deleted.",[468,2168,2169,494,2174,2176,2177,2179],{},[362,2170,2171,2172],{},"A second delete answers ",[367,2173,493],{},[367,2175,1811],{},". If a delete timed out, a ",[367,2178,493],{}," on the\nretry means the first one worked.",[468,2181,2182,2183,2185,2186,2189,2190,2192,2193,369],{},"Deleting needs ",[367,2184,712],{},". If your integration should never delete, ask your operator for\na ",[367,2187,2188],{},"disallow"," role on ",[367,2191,712],{},". It wins over any allow. See ",[715,2194,25],{"href":26},[374,2196,2198],{"id":2197},"the-complete-script","The complete script",[358,2200,2201,2202,2204,2205,2208],{},"The script takes the organization slug, the application id and the kind of change. For ",[367,2203,1199],{}," it\nsearches the open exams for the same category and sitting in the language you name. For ",[367,2206,2207],{},"sitting"," it\ntakes the soonest other sitting of the same category from the student's picker, keeping the language\nwhen it can. Either way it respects a settled payment's price, moves the application, and prints the\npayment before and after.",[1176,2210,308],{"id":2211},"nodejs",[747,2213,2218],{"className":2214,"code":2215,"filename":2216,"language":2217,"meta":753,"style":753},"language-js shiki shiki-themes github-light-high-contrast github-dark-high-contrast","\u002F\u002F change-application.mjs: move an application to another language or sitting.\n\u002F\u002F Usage:\n\u002F\u002F   node change-application.mjs stem \u003CapplicationId> language de\n\u002F\u002F   node change-application.mjs stem \u003CapplicationId> sitting\nimport { api, ApiError } from '.\u002Fmainteam.mjs';\n\nconst [slug, applicationId, mode, languageCode] = process.argv.slice(2);\nif (!slug || !applicationId || !['language', 'sitting'].includes(mode) || (mode === 'language' && !languageCode)) {\n  console.error('Usage: node change-application.mjs \u003Cslug> \u003CapplicationId> language \u003Ccode> | sitting');\n  process.exit(2);\n}\n\n\u002F\u002F A reference may arrive as a document or as a bare id.\nconst idOf = (value) => (value && typeof value === 'object' ? value._id : value);\n\nasync function organizationId(wanted) {\n  const res = await api('GET', '\u002Forganization?limit=100');\n  const org = res.data.find((candidate) => candidate.slug === wanted);\n  if (!org) throw new Error(`No organization with slug ${wanted}.`);\n  return org._id;\n}\n\nasync function openExams(orgId) {\n  const exams = [];\n  for (let page = 1; ; page++) {\n    const res = await api('GET', `\u002F${orgId}\u002Fexam?page=${page}&limit=100`);\n    exams.push(...res.data);\n    if (page >= res.pagination.totalPages) return exams;\n  }\n}\n\nasync function main() {\n  const orgId = await organizationId(slug);\n  const { data: application } = await api('GET', `\u002F${orgId}\u002Fapplication\u002F${applicationId}`);\n  const current = application.exam; \u002F\u002F a document; its session, category and language are ids\n  const payment = application.payment;\n  const settled = payment?.status === 'paid' && payment.amount > 0;\n  const studentId = application.user.mainId;\n  const fits = (exam) => !settled || (exam.price ?? 0) === payment.amount;\n\n  console.log(`Application ${application._id} for ${application.user.firstName} ${application.user.lastName}`);\n  console.log(`  now: exam ${current._id}, payment ${payment?.status ?? 'none'} ${payment?.amount ?? ''}`);\n\n  if (application.participated || application.examSubmitted) {\n    console.log('  The exam has been started, so it can no longer be moved.');\n    return;\n  }\n\n  let target;\n  if (mode === 'language') {\n    const { data: student } = await api('GET', `\u002Fstudent\u002F${studentId}`);\n    const gradeId = idOf(student?.grade);\n    target = (await openExams(orgId)).find(\n      (exam) =>\n        idOf(exam.session) === idOf(current.session) &&\n        idOf(exam.category) === idOf(current.category) &&\n        exam.language?.code === languageCode &&\n        exam.grades.some((grade) => idOf(grade) === gradeId) &&\n        fits(exam),\n    );\n  } else {\n    const { data: tree } = await api('GET', `\u002F${orgId}\u002Fexam\u002Favailable\u002F${studentId}`);\n    const category = tree.find((node) => node._id === idOf(current.category));\n    const candidates = (category?.sessions ?? [])\n      .flatMap((session) => session.languages.map((language) => language.matchedExam))\n      .filter(fits);\n    target = candidates.find((exam) => exam.language === idOf(current.language)) ?? candidates[0];\n  }\n\n  if (!target) {\n    console.log('  No suitable exam was found. Nothing was changed.');\n    return;\n  }\n  console.log(`  target: exam ${target._id} (price ${target.price ?? 0})`);\n\n  const moved = await api('PUT', `\u002F${orgId}\u002Fapplication\u002F${applicationId}`, { examId: target._id });\n  console.log(`  ${moved.message}`);\n\n  const { data: after } = await api('GET', `\u002F${orgId}\u002Fapplication\u002F${applicationId}`);\n  console.log(`  now: exam ${after.exam._id}, payment ${after.payment?.status} ${after.payment?.amount}`);\n}\n\nmain().catch((error) => {\n  if (error instanceof ApiError) {\n    console.error(`${error.status} ${error.code}: ${error.message} (request ${error.requestId})`);\n  } else {\n    console.error(error);\n  }\n  process.exitCode = 1;\n});\n","change-application.mjs","js",[367,2219,2220,2226,2231,2236,2241,2258,2264,2312,2378,2393,2407,2411,2415,2420,2470,2474,2493,2521,2554,2587,2595,2599,2603,2619,2631,2657,2692,2708,2729,2734,2739,2744,2757,2774,2819,2835,2848,2878,2891,2932,2937,2989,3040,3045,3058,3073,3081,3086,3091,3100,3113,3151,3166,3189,3202,3221,3238,3251,3281,3290,3296,3308,3349,3383,3401,3435,3446,3486,3491,3496,3508,3522,3529,3534,3571,3576,3610,3634,3639,3679,3728,3733,3738,3760,3776,3825,3834,3844,3849,3861],{"__ignoreMap":753},[757,2221,2222],{"class":759,"line":760},[757,2223,2225],{"class":2224},"sLBg1","\u002F\u002F change-application.mjs: move an application to another language or sitting.\n",[757,2227,2228],{"class":759,"line":794},[757,2229,2230],{"class":2224},"\u002F\u002F Usage:\n",[757,2232,2233],{"class":759,"line":837},[757,2234,2235],{"class":2224},"\u002F\u002F   node change-application.mjs stem \u003CapplicationId> language de\n",[757,2237,2238],{"class":759,"line":850},[757,2239,2240],{"class":2224},"\u002F\u002F   node change-application.mjs stem \u003CapplicationId> sitting\n",[757,2242,2243,2246,2249,2252,2255],{"class":759,"line":859},[757,2244,2245],{"class":774},"import",[757,2247,2248],{"class":781}," { api, ApiError } ",[757,2250,2251],{"class":774},"from",[757,2253,2254],{"class":770}," '.\u002Fmainteam.mjs'",[757,2256,2257],{"class":781},";\n",[757,2259,2260],{"class":759,"line":872},[757,2261,2263],{"emptyLinePlaceholder":2262},true,"\n",[757,2265,2266,2269,2272,2275,2277,2280,2282,2285,2287,2290,2293,2296,2299,2303,2306,2309],{"class":759,"line":880},[757,2267,2268],{"class":774},"const",[757,2270,2271],{"class":781}," [",[757,2273,2274],{"class":766},"slug",[757,2276,494],{"class":781},[757,2278,2279],{"class":766},"applicationId",[757,2281,494],{"class":781},[757,2283,2284],{"class":766},"mode",[757,2286,494],{"class":781},[757,2288,2289],{"class":766},"languageCode",[757,2291,2292],{"class":781},"] ",[757,2294,2295],{"class":774},"=",[757,2297,2298],{"class":781}," process.argv.",[757,2300,2302],{"class":2301},"sKwhi","slice",[757,2304,2305],{"class":781},"(",[757,2307,2308],{"class":766},"2",[757,2310,2311],{"class":781},");\n",[757,2313,2314,2317,2320,2323,2326,2329,2332,2335,2337,2339,2342,2345,2347,2350,2353,2356,2359,2361,2364,2367,2370,2373,2375],{"class":759,"line":893},[757,2315,2316],{"class":774},"if",[757,2318,2319],{"class":781}," (",[757,2321,2322],{"class":774},"!",[757,2324,2325],{"class":781},"slug ",[757,2327,2328],{"class":774},"||",[757,2330,2331],{"class":774}," !",[757,2333,2334],{"class":781},"applicationId ",[757,2336,2328],{"class":774},[757,2338,2331],{"class":774},[757,2340,2341],{"class":781},"[",[757,2343,2344],{"class":770},"'language'",[757,2346,494],{"class":781},[757,2348,2349],{"class":770},"'sitting'",[757,2351,2352],{"class":781},"].",[757,2354,2355],{"class":2301},"includes",[757,2357,2358],{"class":781},"(mode) ",[757,2360,2328],{"class":774},[757,2362,2363],{"class":781}," (mode ",[757,2365,2366],{"class":774},"===",[757,2368,2369],{"class":770}," 'language'",[757,2371,2372],{"class":774}," &&",[757,2374,2331],{"class":774},[757,2376,2377],{"class":781},"languageCode)) {\n",[757,2379,2380,2383,2386,2388,2391],{"class":759,"line":906},[757,2381,2382],{"class":781},"  console.",[757,2384,2385],{"class":2301},"error",[757,2387,2305],{"class":781},[757,2389,2390],{"class":770},"'Usage: node change-application.mjs \u003Cslug> \u003CapplicationId> language \u003Ccode> | sitting'",[757,2392,2311],{"class":781},[757,2394,2395,2398,2401,2403,2405],{"class":759,"line":919},[757,2396,2397],{"class":781},"  process.",[757,2399,2400],{"class":2301},"exit",[757,2402,2305],{"class":781},[757,2404,2308],{"class":766},[757,2406,2311],{"class":781},[757,2408,2409],{"class":759,"line":932},[757,2410,1095],{"class":781},[757,2412,2413],{"class":759,"line":947},[757,2414,2263],{"emptyLinePlaceholder":2262},[757,2416,2417],{"class":759,"line":958},[757,2418,2419],{"class":2224},"\u002F\u002F A reference may arrive as a document or as a bare id.\n",[757,2421,2422,2424,2427,2430,2432,2435,2438,2441,2444,2447,2450,2453,2455,2458,2461,2464,2467],{"class":759,"line":964},[757,2423,2268],{"class":774},[757,2425,2426],{"class":2301}," idOf",[757,2428,2429],{"class":774}," =",[757,2431,2319],{"class":781},[757,2433,2434],{"class":763},"value",[757,2436,2437],{"class":781},") ",[757,2439,2440],{"class":774},"=>",[757,2442,2443],{"class":781}," (value ",[757,2445,2446],{"class":774},"&&",[757,2448,2449],{"class":774}," typeof",[757,2451,2452],{"class":781}," value ",[757,2454,2366],{"class":774},[757,2456,2457],{"class":770}," 'object'",[757,2459,2460],{"class":774}," ?",[757,2462,2463],{"class":781}," value._id ",[757,2465,2466],{"class":774},":",[757,2468,2469],{"class":781}," value);\n",[757,2471,2472],{"class":759,"line":972},[757,2473,2263],{"emptyLinePlaceholder":2262},[757,2475,2476,2479,2482,2485,2487,2490],{"class":759,"line":984},[757,2477,2478],{"class":774},"async",[757,2480,2481],{"class":774}," function",[757,2483,2484],{"class":2301}," organizationId",[757,2486,2305],{"class":781},[757,2488,2489],{"class":763},"wanted",[757,2491,2492],{"class":781},") {\n",[757,2494,2495,2498,2501,2503,2506,2509,2511,2514,2516,2519],{"class":759,"line":997},[757,2496,2497],{"class":774},"  const",[757,2499,2500],{"class":766}," res",[757,2502,2429],{"class":774},[757,2504,2505],{"class":774}," await",[757,2507,2508],{"class":2301}," api",[757,2510,2305],{"class":781},[757,2512,2513],{"class":770},"'GET'",[757,2515,494],{"class":781},[757,2517,2518],{"class":770},"'\u002Forganization?limit=100'",[757,2520,2311],{"class":781},[757,2522,2523,2525,2528,2530,2533,2536,2539,2542,2544,2546,2549,2551],{"class":759,"line":1010},[757,2524,2497],{"class":774},[757,2526,2527],{"class":766}," org",[757,2529,2429],{"class":774},[757,2531,2532],{"class":781}," res.data.",[757,2534,2535],{"class":2301},"find",[757,2537,2538],{"class":781},"((",[757,2540,2541],{"class":763},"candidate",[757,2543,2437],{"class":781},[757,2545,2440],{"class":774},[757,2547,2548],{"class":781}," candidate.slug ",[757,2550,2366],{"class":774},[757,2552,2553],{"class":781}," wanted);\n",[757,2555,2556,2559,2561,2563,2566,2569,2572,2575,2577,2580,2582,2585],{"class":759,"line":1021},[757,2557,2558],{"class":774},"  if",[757,2560,2319],{"class":781},[757,2562,2322],{"class":774},[757,2564,2565],{"class":781},"org) ",[757,2567,2568],{"class":774},"throw",[757,2570,2571],{"class":774}," new",[757,2573,2574],{"class":2301}," Error",[757,2576,2305],{"class":781},[757,2578,2579],{"class":770},"`No organization with slug ${",[757,2581,2489],{"class":781},[757,2583,2584],{"class":770},"}.`",[757,2586,2311],{"class":781},[757,2588,2589,2592],{"class":759,"line":1026},[757,2590,2591],{"class":774},"  return",[757,2593,2594],{"class":781}," org._id;\n",[757,2596,2597],{"class":759,"line":1034},[757,2598,1095],{"class":781},[757,2600,2601],{"class":759,"line":1046},[757,2602,2263],{"emptyLinePlaceholder":2262},[757,2604,2605,2607,2609,2612,2614,2617],{"class":759,"line":1059},[757,2606,2478],{"class":774},[757,2608,2481],{"class":774},[757,2610,2611],{"class":2301}," openExams",[757,2613,2305],{"class":781},[757,2615,2616],{"class":763},"orgId",[757,2618,2492],{"class":781},[757,2620,2621,2623,2626,2628],{"class":759,"line":1070},[757,2622,2497],{"class":774},[757,2624,2625],{"class":766}," exams",[757,2627,2429],{"class":774},[757,2629,2630],{"class":781}," [];\n",[757,2632,2633,2636,2638,2641,2644,2646,2649,2652,2655],{"class":759,"line":1075},[757,2634,2635],{"class":774},"  for",[757,2637,2319],{"class":781},[757,2639,2640],{"class":774},"let",[757,2642,2643],{"class":781}," page ",[757,2645,2295],{"class":774},[757,2647,2648],{"class":766}," 1",[757,2650,2651],{"class":781},"; ; page",[757,2653,2654],{"class":774},"++",[757,2656,2492],{"class":781},[757,2658,2659,2662,2664,2666,2668,2670,2672,2674,2676,2679,2681,2684,2687,2690],{"class":759,"line":1086},[757,2660,2661],{"class":774},"    const",[757,2663,2500],{"class":766},[757,2665,2429],{"class":774},[757,2667,2505],{"class":774},[757,2669,2508],{"class":2301},[757,2671,2305],{"class":781},[757,2673,2513],{"class":770},[757,2675,494],{"class":781},[757,2677,2678],{"class":770},"`\u002F${",[757,2680,2616],{"class":781},[757,2682,2683],{"class":770},"}\u002Fexam?page=${",[757,2685,2686],{"class":781},"page",[757,2688,2689],{"class":770},"}&limit=100`",[757,2691,2311],{"class":781},[757,2693,2694,2697,2700,2702,2705],{"class":759,"line":1092},[757,2695,2696],{"class":781},"    exams.",[757,2698,2699],{"class":2301},"push",[757,2701,2305],{"class":781},[757,2703,2704],{"class":774},"...",[757,2706,2707],{"class":781},"res.data);\n",[757,2709,2711,2714,2717,2720,2723,2726],{"class":759,"line":2710},28,[757,2712,2713],{"class":774},"    if",[757,2715,2716],{"class":781}," (page ",[757,2718,2719],{"class":774},">=",[757,2721,2722],{"class":781}," res.pagination.totalPages) ",[757,2724,2725],{"class":774},"return",[757,2727,2728],{"class":781}," exams;\n",[757,2730,2732],{"class":759,"line":2731},29,[757,2733,1089],{"class":781},[757,2735,2737],{"class":759,"line":2736},30,[757,2738,1095],{"class":781},[757,2740,2742],{"class":759,"line":2741},31,[757,2743,2263],{"emptyLinePlaceholder":2262},[757,2745,2747,2749,2751,2754],{"class":759,"line":2746},32,[757,2748,2478],{"class":774},[757,2750,2481],{"class":774},[757,2752,2753],{"class":2301}," main",[757,2755,2756],{"class":781},"() {\n",[757,2758,2760,2762,2765,2767,2769,2771],{"class":759,"line":2759},33,[757,2761,2497],{"class":774},[757,2763,2764],{"class":766}," orgId",[757,2766,2429],{"class":774},[757,2768,2505],{"class":774},[757,2770,2484],{"class":2301},[757,2772,2773],{"class":781},"(slug);\n",[757,2775,2777,2779,2782,2785,2787,2790,2793,2795,2797,2799,2801,2803,2805,2807,2809,2812,2814,2817],{"class":759,"line":2776},34,[757,2778,2497],{"class":774},[757,2780,2781],{"class":781}," { ",[757,2783,2784],{"class":763},"data",[757,2786,828],{"class":781},[757,2788,2789],{"class":766},"application",[757,2791,2792],{"class":781}," } ",[757,2794,2295],{"class":774},[757,2796,2505],{"class":774},[757,2798,2508],{"class":2301},[757,2800,2305],{"class":781},[757,2802,2513],{"class":770},[757,2804,494],{"class":781},[757,2806,2678],{"class":770},[757,2808,2616],{"class":781},[757,2810,2811],{"class":770},"}\u002Fapplication\u002F${",[757,2813,2279],{"class":781},[757,2815,2816],{"class":770},"}`",[757,2818,2311],{"class":781},[757,2820,2822,2824,2827,2829,2832],{"class":759,"line":2821},35,[757,2823,2497],{"class":774},[757,2825,2826],{"class":766}," current",[757,2828,2429],{"class":774},[757,2830,2831],{"class":781}," application.exam; ",[757,2833,2834],{"class":2224},"\u002F\u002F a document; its session, category and language are ids\n",[757,2836,2838,2840,2843,2845],{"class":759,"line":2837},36,[757,2839,2497],{"class":774},[757,2841,2842],{"class":766}," payment",[757,2844,2429],{"class":774},[757,2846,2847],{"class":781}," application.payment;\n",[757,2849,2851,2853,2856,2858,2861,2863,2866,2868,2871,2873,2876],{"class":759,"line":2850},37,[757,2852,2497],{"class":774},[757,2854,2855],{"class":766}," settled",[757,2857,2429],{"class":774},[757,2859,2860],{"class":781}," payment?.status ",[757,2862,2366],{"class":774},[757,2864,2865],{"class":770}," 'paid'",[757,2867,2372],{"class":774},[757,2869,2870],{"class":781}," payment.amount ",[757,2872,785],{"class":774},[757,2874,2875],{"class":766}," 0",[757,2877,2257],{"class":781},[757,2879,2881,2883,2886,2888],{"class":759,"line":2880},38,[757,2882,2497],{"class":774},[757,2884,2885],{"class":766}," studentId",[757,2887,2429],{"class":774},[757,2889,2890],{"class":781}," application.user.mainId;\n",[757,2892,2894,2896,2899,2901,2903,2906,2908,2910,2912,2915,2917,2920,2923,2925,2927,2929],{"class":759,"line":2893},39,[757,2895,2497],{"class":774},[757,2897,2898],{"class":2301}," fits",[757,2900,2429],{"class":774},[757,2902,2319],{"class":781},[757,2904,2905],{"class":763},"exam",[757,2907,2437],{"class":781},[757,2909,2440],{"class":774},[757,2911,2331],{"class":774},[757,2913,2914],{"class":781},"settled ",[757,2916,2328],{"class":774},[757,2918,2919],{"class":781}," (exam.price ",[757,2921,2922],{"class":774},"??",[757,2924,2875],{"class":766},[757,2926,2437],{"class":781},[757,2928,2366],{"class":774},[757,2930,2931],{"class":781}," payment.amount;\n",[757,2933,2935],{"class":759,"line":2934},40,[757,2936,2263],{"emptyLinePlaceholder":2262},[757,2938,2940,2942,2945,2947,2950,2952,2954,2956,2959,2961,2963,2966,2968,2971,2974,2976,2978,2980,2982,2985,2987],{"class":759,"line":2939},41,[757,2941,2382],{"class":781},[757,2943,2944],{"class":2301},"log",[757,2946,2305],{"class":781},[757,2948,2949],{"class":770},"`Application ${",[757,2951,2789],{"class":781},[757,2953,369],{"class":770},[757,2955,1551],{"class":781},[757,2957,2958],{"class":770},"} for ${",[757,2960,2789],{"class":781},[757,2962,369],{"class":770},[757,2964,2965],{"class":781},"user",[757,2967,369],{"class":770},[757,2969,2970],{"class":781},"firstName",[757,2972,2973],{"class":770},"} ${",[757,2975,2789],{"class":781},[757,2977,369],{"class":770},[757,2979,2965],{"class":781},[757,2981,369],{"class":770},[757,2983,2984],{"class":781},"lastName",[757,2986,2816],{"class":770},[757,2988,2311],{"class":781},[757,2990,2992,2994,2996,2998,3001,3004,3006,3008,3011,3014,3017,3020,3023,3026,3028,3030,3033,3035,3038],{"class":759,"line":2991},42,[757,2993,2382],{"class":781},[757,2995,2944],{"class":2301},[757,2997,2305],{"class":781},[757,2999,3000],{"class":770},"`  now: exam ${",[757,3002,3003],{"class":781},"current",[757,3005,369],{"class":770},[757,3007,1551],{"class":781},[757,3009,3010],{"class":770},"}, payment ${",[757,3012,3013],{"class":781},"payment",[757,3015,3016],{"class":770},"?.",[757,3018,3019],{"class":781},"status",[757,3021,3022],{"class":774}," ??",[757,3024,3025],{"class":770}," 'none'} ${",[757,3027,3013],{"class":781},[757,3029,3016],{"class":770},[757,3031,3032],{"class":781},"amount",[757,3034,3022],{"class":774},[757,3036,3037],{"class":770}," ''}`",[757,3039,2311],{"class":781},[757,3041,3043],{"class":759,"line":3042},43,[757,3044,2263],{"emptyLinePlaceholder":2262},[757,3046,3048,3050,3053,3055],{"class":759,"line":3047},44,[757,3049,2558],{"class":774},[757,3051,3052],{"class":781}," (application.participated ",[757,3054,2328],{"class":774},[757,3056,3057],{"class":781}," application.examSubmitted) {\n",[757,3059,3061,3064,3066,3068,3071],{"class":759,"line":3060},45,[757,3062,3063],{"class":781},"    console.",[757,3065,2944],{"class":2301},[757,3067,2305],{"class":781},[757,3069,3070],{"class":770},"'  The exam has been started, so it can no longer be moved.'",[757,3072,2311],{"class":781},[757,3074,3076,3079],{"class":759,"line":3075},46,[757,3077,3078],{"class":774},"    return",[757,3080,2257],{"class":781},[757,3082,3084],{"class":759,"line":3083},47,[757,3085,1089],{"class":781},[757,3087,3089],{"class":759,"line":3088},48,[757,3090,2263],{"emptyLinePlaceholder":2262},[757,3092,3094,3097],{"class":759,"line":3093},49,[757,3095,3096],{"class":774},"  let",[757,3098,3099],{"class":781}," target;\n",[757,3101,3103,3105,3107,3109,3111],{"class":759,"line":3102},50,[757,3104,2558],{"class":774},[757,3106,2363],{"class":781},[757,3108,2366],{"class":774},[757,3110,2369],{"class":770},[757,3112,2492],{"class":781},[757,3114,3116,3118,3120,3122,3124,3127,3129,3131,3133,3135,3137,3139,3141,3144,3147,3149],{"class":759,"line":3115},51,[757,3117,2661],{"class":774},[757,3119,2781],{"class":781},[757,3121,2784],{"class":763},[757,3123,828],{"class":781},[757,3125,3126],{"class":766},"student",[757,3128,2792],{"class":781},[757,3130,2295],{"class":774},[757,3132,2505],{"class":774},[757,3134,2508],{"class":2301},[757,3136,2305],{"class":781},[757,3138,2513],{"class":770},[757,3140,494],{"class":781},[757,3142,3143],{"class":770},"`\u002Fstudent\u002F${",[757,3145,3146],{"class":781},"studentId",[757,3148,2816],{"class":770},[757,3150,2311],{"class":781},[757,3152,3154,3156,3159,3161,3163],{"class":759,"line":3153},52,[757,3155,2661],{"class":774},[757,3157,3158],{"class":766}," gradeId",[757,3160,2429],{"class":774},[757,3162,2426],{"class":2301},[757,3164,3165],{"class":781},"(student?.grade);\n",[757,3167,3169,3172,3174,3176,3179,3181,3184,3186],{"class":759,"line":3168},53,[757,3170,3171],{"class":781},"    target ",[757,3173,2295],{"class":774},[757,3175,2319],{"class":781},[757,3177,3178],{"class":774},"await",[757,3180,2611],{"class":2301},[757,3182,3183],{"class":781},"(orgId)).",[757,3185,2535],{"class":2301},[757,3187,3188],{"class":781},"(\n",[757,3190,3192,3195,3197,3199],{"class":759,"line":3191},54,[757,3193,3194],{"class":781},"      (",[757,3196,2905],{"class":763},[757,3198,2437],{"class":781},[757,3200,3201],{"class":774},"=>\n",[757,3203,3205,3208,3211,3213,3215,3218],{"class":759,"line":3204},55,[757,3206,3207],{"class":2301},"        idOf",[757,3209,3210],{"class":781},"(exam.session) ",[757,3212,2366],{"class":774},[757,3214,2426],{"class":2301},[757,3216,3217],{"class":781},"(current.session) ",[757,3219,3220],{"class":774},"&&\n",[757,3222,3224,3226,3229,3231,3233,3236],{"class":759,"line":3223},56,[757,3225,3207],{"class":2301},[757,3227,3228],{"class":781},"(exam.category) ",[757,3230,2366],{"class":774},[757,3232,2426],{"class":2301},[757,3234,3235],{"class":781},"(current.category) ",[757,3237,3220],{"class":774},[757,3239,3241,3244,3246,3249],{"class":759,"line":3240},57,[757,3242,3243],{"class":781},"        exam.language?.code ",[757,3245,2366],{"class":774},[757,3247,3248],{"class":781}," languageCode ",[757,3250,3220],{"class":774},[757,3252,3254,3257,3260,3262,3265,3267,3269,3271,3274,3276,3279],{"class":759,"line":3253},58,[757,3255,3256],{"class":781},"        exam.grades.",[757,3258,3259],{"class":2301},"some",[757,3261,2538],{"class":781},[757,3263,3264],{"class":763},"grade",[757,3266,2437],{"class":781},[757,3268,2440],{"class":774},[757,3270,2426],{"class":2301},[757,3272,3273],{"class":781},"(grade) ",[757,3275,2366],{"class":774},[757,3277,3278],{"class":781}," gradeId) ",[757,3280,3220],{"class":774},[757,3282,3284,3287],{"class":759,"line":3283},59,[757,3285,3286],{"class":2301},"        fits",[757,3288,3289],{"class":781},"(exam),\n",[757,3291,3293],{"class":759,"line":3292},60,[757,3294,3295],{"class":781},"    );\n",[757,3297,3299,3302,3305],{"class":759,"line":3298},61,[757,3300,3301],{"class":781},"  } ",[757,3303,3304],{"class":774},"else",[757,3306,3307],{"class":781}," {\n",[757,3309,3311,3313,3315,3317,3319,3322,3324,3326,3328,3330,3332,3334,3336,3338,3340,3343,3345,3347],{"class":759,"line":3310},62,[757,3312,2661],{"class":774},[757,3314,2781],{"class":781},[757,3316,2784],{"class":763},[757,3318,828],{"class":781},[757,3320,3321],{"class":766},"tree",[757,3323,2792],{"class":781},[757,3325,2295],{"class":774},[757,3327,2505],{"class":774},[757,3329,2508],{"class":2301},[757,3331,2305],{"class":781},[757,3333,2513],{"class":770},[757,3335,494],{"class":781},[757,3337,2678],{"class":770},[757,3339,2616],{"class":781},[757,3341,3342],{"class":770},"}\u002Fexam\u002Favailable\u002F${",[757,3344,3146],{"class":781},[757,3346,2816],{"class":770},[757,3348,2311],{"class":781},[757,3350,3352,3354,3357,3359,3362,3364,3366,3369,3371,3373,3376,3378,3380],{"class":759,"line":3351},63,[757,3353,2661],{"class":774},[757,3355,3356],{"class":766}," category",[757,3358,2429],{"class":774},[757,3360,3361],{"class":781}," tree.",[757,3363,2535],{"class":2301},[757,3365,2538],{"class":781},[757,3367,3368],{"class":763},"node",[757,3370,2437],{"class":781},[757,3372,2440],{"class":774},[757,3374,3375],{"class":781}," node._id ",[757,3377,2366],{"class":774},[757,3379,2426],{"class":2301},[757,3381,3382],{"class":781},"(current.category));\n",[757,3384,3386,3388,3391,3393,3396,3398],{"class":759,"line":3385},64,[757,3387,2661],{"class":774},[757,3389,3390],{"class":766}," candidates",[757,3392,2429],{"class":774},[757,3394,3395],{"class":781}," (category?.sessions ",[757,3397,2922],{"class":774},[757,3399,3400],{"class":781}," [])\n",[757,3402,3404,3407,3410,3412,3414,3416,3418,3421,3424,3426,3428,3430,3432],{"class":759,"line":3403},65,[757,3405,3406],{"class":781},"      .",[757,3408,3409],{"class":2301},"flatMap",[757,3411,2538],{"class":781},[757,3413,1193],{"class":763},[757,3415,2437],{"class":781},[757,3417,2440],{"class":774},[757,3419,3420],{"class":781}," session.languages.",[757,3422,3423],{"class":2301},"map",[757,3425,2538],{"class":781},[757,3427,1199],{"class":763},[757,3429,2437],{"class":781},[757,3431,2440],{"class":774},[757,3433,3434],{"class":781}," language.matchedExam))\n",[757,3436,3438,3440,3443],{"class":759,"line":3437},66,[757,3439,3406],{"class":781},[757,3441,3442],{"class":2301},"filter",[757,3444,3445],{"class":781},"(fits);\n",[757,3447,3449,3451,3453,3456,3458,3460,3462,3464,3466,3469,3471,3473,3476,3478,3481,3483],{"class":759,"line":3448},67,[757,3450,3171],{"class":781},[757,3452,2295],{"class":774},[757,3454,3455],{"class":781}," candidates.",[757,3457,2535],{"class":2301},[757,3459,2538],{"class":781},[757,3461,2905],{"class":763},[757,3463,2437],{"class":781},[757,3465,2440],{"class":774},[757,3467,3468],{"class":781}," exam.language ",[757,3470,2366],{"class":774},[757,3472,2426],{"class":2301},[757,3474,3475],{"class":781},"(current.language)) ",[757,3477,2922],{"class":774},[757,3479,3480],{"class":781}," candidates[",[757,3482,611],{"class":766},[757,3484,3485],{"class":781},"];\n",[757,3487,3489],{"class":759,"line":3488},68,[757,3490,1089],{"class":781},[757,3492,3494],{"class":759,"line":3493},69,[757,3495,2263],{"emptyLinePlaceholder":2262},[757,3497,3499,3501,3503,3505],{"class":759,"line":3498},70,[757,3500,2558],{"class":774},[757,3502,2319],{"class":781},[757,3504,2322],{"class":774},[757,3506,3507],{"class":781},"target) {\n",[757,3509,3511,3513,3515,3517,3520],{"class":759,"line":3510},71,[757,3512,3063],{"class":781},[757,3514,2944],{"class":2301},[757,3516,2305],{"class":781},[757,3518,3519],{"class":770},"'  No suitable exam was found. Nothing was changed.'",[757,3521,2311],{"class":781},[757,3523,3525,3527],{"class":759,"line":3524},72,[757,3526,3078],{"class":774},[757,3528,2257],{"class":781},[757,3530,3532],{"class":759,"line":3531},73,[757,3533,1089],{"class":781},[757,3535,3537,3539,3541,3543,3546,3549,3551,3553,3556,3558,3560,3562,3564,3566,3569],{"class":759,"line":3536},74,[757,3538,2382],{"class":781},[757,3540,2944],{"class":2301},[757,3542,2305],{"class":781},[757,3544,3545],{"class":770},"`  target: exam ${",[757,3547,3548],{"class":781},"target",[757,3550,369],{"class":770},[757,3552,1551],{"class":781},[757,3554,3555],{"class":770},"} (price ${",[757,3557,3548],{"class":781},[757,3559,369],{"class":770},[757,3561,670],{"class":781},[757,3563,3022],{"class":774},[757,3565,2875],{"class":766},[757,3567,3568],{"class":770},"})`",[757,3570,2311],{"class":781},[757,3572,3574],{"class":759,"line":3573},75,[757,3575,2263],{"emptyLinePlaceholder":2262},[757,3577,3579,3581,3584,3586,3588,3590,3592,3595,3597,3599,3601,3603,3605,3607],{"class":759,"line":3578},76,[757,3580,2497],{"class":774},[757,3582,3583],{"class":766}," moved",[757,3585,2429],{"class":774},[757,3587,2505],{"class":774},[757,3589,2508],{"class":2301},[757,3591,2305],{"class":781},[757,3593,3594],{"class":770},"'PUT'",[757,3596,494],{"class":781},[757,3598,2678],{"class":770},[757,3600,2616],{"class":781},[757,3602,2811],{"class":770},[757,3604,2279],{"class":781},[757,3606,2816],{"class":770},[757,3608,3609],{"class":781},", { examId: target._id });\n",[757,3611,3613,3615,3617,3619,3622,3625,3627,3630,3632],{"class":759,"line":3612},77,[757,3614,2382],{"class":781},[757,3616,2944],{"class":2301},[757,3618,2305],{"class":781},[757,3620,3621],{"class":770},"`  ${",[757,3623,3624],{"class":781},"moved",[757,3626,369],{"class":770},[757,3628,3629],{"class":781},"message",[757,3631,2816],{"class":770},[757,3633,2311],{"class":781},[757,3635,3637],{"class":759,"line":3636},78,[757,3638,2263],{"emptyLinePlaceholder":2262},[757,3640,3642,3644,3646,3648,3650,3653,3655,3657,3659,3661,3663,3665,3667,3669,3671,3673,3675,3677],{"class":759,"line":3641},79,[757,3643,2497],{"class":774},[757,3645,2781],{"class":781},[757,3647,2784],{"class":763},[757,3649,828],{"class":781},[757,3651,3652],{"class":766},"after",[757,3654,2792],{"class":781},[757,3656,2295],{"class":774},[757,3658,2505],{"class":774},[757,3660,2508],{"class":2301},[757,3662,2305],{"class":781},[757,3664,2513],{"class":770},[757,3666,494],{"class":781},[757,3668,2678],{"class":770},[757,3670,2616],{"class":781},[757,3672,2811],{"class":770},[757,3674,2279],{"class":781},[757,3676,2816],{"class":770},[757,3678,2311],{"class":781},[757,3680,3682,3684,3686,3688,3690,3692,3694,3696,3698,3700,3702,3704,3706,3708,3710,3712,3714,3716,3718,3720,3722,3724,3726],{"class":759,"line":3681},80,[757,3683,2382],{"class":781},[757,3685,2944],{"class":2301},[757,3687,2305],{"class":781},[757,3689,3000],{"class":770},[757,3691,3652],{"class":781},[757,3693,369],{"class":770},[757,3695,2905],{"class":781},[757,3697,369],{"class":770},[757,3699,1551],{"class":781},[757,3701,3010],{"class":770},[757,3703,3652],{"class":781},[757,3705,369],{"class":770},[757,3707,3013],{"class":781},[757,3709,3016],{"class":770},[757,3711,3019],{"class":781},[757,3713,2973],{"class":770},[757,3715,3652],{"class":781},[757,3717,369],{"class":770},[757,3719,3013],{"class":781},[757,3721,3016],{"class":770},[757,3723,3032],{"class":781},[757,3725,2816],{"class":770},[757,3727,2311],{"class":781},[757,3729,3731],{"class":759,"line":3730},81,[757,3732,1095],{"class":781},[757,3734,3736],{"class":759,"line":3735},82,[757,3737,2263],{"emptyLinePlaceholder":2262},[757,3739,3741,3744,3747,3750,3752,3754,3756,3758],{"class":759,"line":3740},83,[757,3742,3743],{"class":2301},"main",[757,3745,3746],{"class":781},"().",[757,3748,3749],{"class":2301},"catch",[757,3751,2538],{"class":781},[757,3753,2385],{"class":763},[757,3755,2437],{"class":781},[757,3757,2440],{"class":774},[757,3759,3307],{"class":781},[757,3761,3763,3765,3768,3771,3774],{"class":759,"line":3762},84,[757,3764,2558],{"class":774},[757,3766,3767],{"class":781}," (error ",[757,3769,3770],{"class":774},"instanceof",[757,3772,3773],{"class":763}," ApiError",[757,3775,2492],{"class":781},[757,3777,3779,3781,3783,3785,3788,3790,3792,3794,3796,3798,3800,3802,3805,3807,3809,3811,3814,3816,3818,3821,3823],{"class":759,"line":3778},85,[757,3780,3063],{"class":781},[757,3782,2385],{"class":2301},[757,3784,2305],{"class":781},[757,3786,3787],{"class":770},"`${",[757,3789,2385],{"class":781},[757,3791,369],{"class":770},[757,3793,3019],{"class":781},[757,3795,2973],{"class":770},[757,3797,2385],{"class":781},[757,3799,369],{"class":770},[757,3801,367],{"class":781},[757,3803,3804],{"class":770},"}: ${",[757,3806,2385],{"class":781},[757,3808,369],{"class":770},[757,3810,3629],{"class":781},[757,3812,3813],{"class":770},"} (request ${",[757,3815,2385],{"class":781},[757,3817,369],{"class":770},[757,3819,3820],{"class":781},"requestId",[757,3822,3568],{"class":770},[757,3824,2311],{"class":781},[757,3826,3828,3830,3832],{"class":759,"line":3827},86,[757,3829,3301],{"class":781},[757,3831,3304],{"class":774},[757,3833,3307],{"class":781},[757,3835,3837,3839,3841],{"class":759,"line":3836},87,[757,3838,3063],{"class":781},[757,3840,2385],{"class":2301},[757,3842,3843],{"class":781},"(error);\n",[757,3845,3847],{"class":759,"line":3846},88,[757,3848,1089],{"class":781},[757,3850,3852,3855,3857,3859],{"class":759,"line":3851},89,[757,3853,3854],{"class":781},"  process.exitCode ",[757,3856,2295],{"class":774},[757,3858,2648],{"class":766},[757,3860,2257],{"class":781},[757,3862,3864],{"class":759,"line":3863},90,[757,3865,3866],{"class":781},"});\n",[1176,3868,311],{"id":3869},"php",[747,3871,3875],{"className":3872,"code":3873,"filename":3874,"language":3869,"meta":753,"style":753},"language-php shiki shiki-themes github-light-high-contrast github-dark-high-contrast","\u003C?php\n\u002F\u002F change-application.php: move an application to another language or sitting.\n\u002F\u002F Usage:\n\u002F\u002F   php change-application.php stem \u003CapplicationId> language de\n\u002F\u002F   php change-application.php stem \u003CapplicationId> sitting\ndeclare(strict_types=1);\nrequire __DIR__ . '\u002Fmainteam.php';\n\n[$slug, $applicationId, $mode, $languageCode] = array_pad(array_slice($argv, 1), 4, null);\nif ($slug === null || $applicationId === null || !in_array($mode, ['language', 'sitting'], true)\n    || ($mode === 'language' && $languageCode === null)) {\n    fwrite(STDERR, \"Usage: php change-application.php \u003Cslug> \u003CapplicationId> language \u003Ccode> | sitting\\n\");\n    exit(2);\n}\n\n\u002F\u002F A reference may arrive as a document or as a bare id.\nfunction idOf(mixed $value): ?string\n{\n    return is_array($value) ? ($value['_id'] ?? null) : $value;\n}\n\nfunction organizationId(MainTeam $api, string $wanted): string\n{\n    foreach ($api->call('GET', '\u002Forganization?limit=100')['data'] as $org) {\n        if ($org['slug'] === $wanted) {\n            return $org['_id'];\n        }\n    }\n    throw new RuntimeException(\"No organization with slug $wanted.\");\n}\n\nfunction openExams(MainTeam $api, string $orgId): array\n{\n    $exams = [];\n    for ($page = 1; ; $page++) {\n        $res = $api->call('GET', \"\u002F$orgId\u002Fexam?page=$page&limit=100\");\n        array_push($exams, ...$res['data']);\n        if ($page >= $res['pagination']['totalPages']) {\n            return $exams;\n        }\n    }\n}\n\n$api = MainTeam::fromEnv();\n\ntry {\n    $orgId = organizationId($api, $slug);\n    $application = $api->call('GET', \"\u002F$orgId\u002Fapplication\u002F$applicationId\")['data'];\n    $current = $application['exam']; \u002F\u002F a document; its session, category and language are ids\n    $payment = $application['payment'] ?? null;\n    $settled = ($payment['status'] ?? null) === 'paid' && ($payment['amount'] ?? 0) > 0;\n    $studentId = $application['user']['mainId'];\n    $fits = fn (array $exam): bool => !$settled || ($exam['price'] ?? 0) == $payment['amount'];\n\n    echo \"Application {$application['_id']} for {$application['user']['firstName']} {$application['user']['lastName']}\\n\";\n    printf(\"  now: exam %s, payment %s %s\\n\", $current['_id'], $payment['status'] ?? 'none', $payment['amount'] ?? '');\n\n    if (!empty($application['participated']) || !empty($application['examSubmitted'])) {\n        echo \"  The exam has been started, so it can no longer be moved.\\n\";\n        exit(0);\n    }\n\n    $target = null;\n    if ($mode === 'language') {\n        $student = $api->call('GET', \"\u002Fstudent\u002F$studentId\")['data'] ?? null;\n        $gradeId = idOf($student['grade'] ?? null);\n        foreach (openExams($api, $orgId) as $exam) {\n            $gradeIds = array_map('idOf', $exam['grades'] ?? []);\n            if (idOf($exam['session']) === idOf($current['session'])\n                && idOf($exam['category']) === idOf($current['category'])\n                && ($exam['language']['code'] ?? null) === $languageCode\n                && in_array($gradeId, $gradeIds, true)\n                && $fits($exam)) {\n                $target = $exam;\n                break;\n            }\n        }\n    } else {\n        $tree = $api->call('GET', \"\u002F$orgId\u002Fexam\u002Favailable\u002F$studentId\")['data'];\n        $candidates = [];\n        foreach ($tree as $category) {\n            if ($category['_id'] !== idOf($current['category'])) {\n                continue;\n            }\n            foreach ($category['sessions'] as $session) {\n                foreach ($session['languages'] as $language) {\n                    if ($fits($language['matchedExam'])) {\n                        $candidates[] = $language['matchedExam'];\n                    }\n                }\n            }\n        }\n        foreach ($candidates as $exam) {\n            if ($exam['language'] === idOf($current['language'])) {\n                $target = $exam;\n                break;\n            }\n        }\n        $target ??= $candidates[0] ?? null;\n    }\n\n    if ($target === null) {\n        echo \"  No suitable exam was found. Nothing was changed.\\n\";\n        exit(0);\n    }\n    printf(\"  target: exam %s (price %s)\\n\", $target['_id'], $target['price'] ?? 0);\n\n    $moved = $api->call('PUT', \"\u002F$orgId\u002Fapplication\u002F$applicationId\", ['examId' => $target['_id']]);\n    echo \"  {$moved['message']}\\n\";\n\n    $after = $api->call('GET', \"\u002F$orgId\u002Fapplication\u002F$applicationId\")['data'];\n    printf(\"  now: exam %s, payment %s %s\\n\", $after['exam']['_id'], $after['payment']['status'] ?? '-', $after['payment']['amount'] ?? '-');\n} catch (ApiError $e) {\n    fwrite(STDERR, \"{$e->status} {$e->errorCode}: {$e->getMessage()} (request {$e->requestId})\\n\");\n    exit(1);\n}\n","change-application.php",[367,3876,3877,3885,3890,3894,3899,3904,3920,3936,3940,3973,4019,4043,4065,4076,4080,4084,4088,4108,4112,4144,4148,4152,4177,4181,4217,4235,4247,4252,4256,4279,4283,4287,4309,4313,4322,4341,4378,4396,4419,4426,4430,4434,4438,4442,4461,4465,4472,4484,4521,4539,4559,4605,4624,4681,4685,4715,4760,4764,4798,4812,4823,4827,4831,4842,4854,4893,4916,4934,4962,4992,5016,5042,5056,5063,5073,5080,5085,5089,5098,5134,5143,5155,5177,5184,5188,5205,5223,5236,5250,5255,5260,5265,5270,5282,5303,5312,5319,5324,5329,5351,5356,5361,5375,5389,5400,5405,5437,5442,5489,5509,5514,5550,5604,5620,5679,5690],{"__ignoreMap":753},[757,3878,3879,3882],{"class":759,"line":760},[757,3880,3881],{"class":774},"\u003C?",[757,3883,3884],{"class":766},"php\n",[757,3886,3887],{"class":759,"line":794},[757,3888,3889],{"class":2224},"\u002F\u002F change-application.php: move an application to another language or sitting.\n",[757,3891,3892],{"class":759,"line":837},[757,3893,2230],{"class":2224},[757,3895,3896],{"class":759,"line":850},[757,3897,3898],{"class":2224},"\u002F\u002F   php change-application.php stem \u003CapplicationId> language de\n",[757,3900,3901],{"class":759,"line":859},[757,3902,3903],{"class":2224},"\u002F\u002F   php change-application.php stem \u003CapplicationId> sitting\n",[757,3905,3906,3909,3911,3914,3916,3918],{"class":759,"line":872},[757,3907,3908],{"class":774},"declare",[757,3910,2305],{"class":781},[757,3912,3913],{"class":766},"strict_types",[757,3915,2295],{"class":774},[757,3917,1436],{"class":766},[757,3919,2311],{"class":781},[757,3921,3922,3925,3928,3931,3934],{"class":759,"line":880},[757,3923,3924],{"class":774},"require",[757,3926,3927],{"class":766}," __DIR__",[757,3929,3930],{"class":774}," .",[757,3932,3933],{"class":770}," '\u002Fmainteam.php'",[757,3935,2257],{"class":781},[757,3937,3938],{"class":759,"line":893},[757,3939,2263],{"emptyLinePlaceholder":2262},[757,3941,3942,3945,3947,3950,3952,3955,3958,3960,3963,3966,3968,3971],{"class":759,"line":906},[757,3943,3944],{"class":781},"[$slug, $applicationId, $mode, $languageCode] ",[757,3946,2295],{"class":774},[757,3948,3949],{"class":766}," array_pad",[757,3951,2305],{"class":781},[757,3953,3954],{"class":766},"array_slice",[757,3956,3957],{"class":781},"($argv, ",[757,3959,1436],{"class":766},[757,3961,3962],{"class":781},"), ",[757,3964,3965],{"class":766},"4",[757,3967,494],{"class":781},[757,3969,3970],{"class":766},"null",[757,3972,2311],{"class":781},[757,3974,3975,3977,3980,3982,3985,3988,3991,3993,3995,3997,3999,4002,4005,4007,4009,4011,4014,4016],{"class":759,"line":919},[757,3976,2316],{"class":774},[757,3978,3979],{"class":781}," ($slug ",[757,3981,2366],{"class":774},[757,3983,3984],{"class":766}," null",[757,3986,3987],{"class":774}," ||",[757,3989,3990],{"class":781}," $applicationId ",[757,3992,2366],{"class":774},[757,3994,3984],{"class":766},[757,3996,3987],{"class":774},[757,3998,2331],{"class":774},[757,4000,4001],{"class":766},"in_array",[757,4003,4004],{"class":781},"($mode, [",[757,4006,2344],{"class":770},[757,4008,494],{"class":781},[757,4010,2349],{"class":770},[757,4012,4013],{"class":781},"], ",[757,4015,831],{"class":766},[757,4017,4018],{"class":781},")\n",[757,4020,4021,4024,4027,4029,4031,4033,4036,4038,4040],{"class":759,"line":932},[757,4022,4023],{"class":774},"    ||",[757,4025,4026],{"class":781}," ($mode ",[757,4028,2366],{"class":774},[757,4030,2369],{"class":770},[757,4032,2372],{"class":774},[757,4034,4035],{"class":781}," $languageCode ",[757,4037,2366],{"class":774},[757,4039,3984],{"class":766},[757,4041,4042],{"class":781},")) {\n",[757,4044,4045,4048,4050,4053,4055,4058,4061,4063],{"class":759,"line":947},[757,4046,4047],{"class":766},"    fwrite",[757,4049,2305],{"class":781},[757,4051,4052],{"class":766},"STDERR",[757,4054,494],{"class":781},[757,4056,4057],{"class":770},"\"Usage: php change-application.php \u003Cslug> \u003CapplicationId> language \u003Ccode> | sitting",[757,4059,4060],{"class":774},"\\n",[757,4062,1605],{"class":770},[757,4064,2311],{"class":781},[757,4066,4067,4070,4072,4074],{"class":759,"line":958},[757,4068,4069],{"class":774},"    exit",[757,4071,2305],{"class":781},[757,4073,2308],{"class":766},[757,4075,2311],{"class":781},[757,4077,4078],{"class":759,"line":964},[757,4079,1095],{"class":781},[757,4081,4082],{"class":759,"line":972},[757,4083,2263],{"emptyLinePlaceholder":2262},[757,4085,4086],{"class":759,"line":984},[757,4087,2419],{"class":2224},[757,4089,4090,4093,4095,4097,4100,4103,4105],{"class":759,"line":997},[757,4091,4092],{"class":774},"function",[757,4094,2426],{"class":2301},[757,4096,2305],{"class":781},[757,4098,4099],{"class":774},"mixed",[757,4101,4102],{"class":781}," $value)",[757,4104,2466],{"class":774},[757,4106,4107],{"class":774}," ?string\n",[757,4109,4110],{"class":759,"line":1010},[757,4111,819],{"class":781},[757,4113,4114,4116,4119,4122,4125,4128,4131,4133,4135,4137,4139,4141],{"class":759,"line":1021},[757,4115,3078],{"class":774},[757,4117,4118],{"class":766}," is_array",[757,4120,4121],{"class":781},"($value) ",[757,4123,4124],{"class":774},"?",[757,4126,4127],{"class":781}," ($value[",[757,4129,4130],{"class":770},"'_id'",[757,4132,2292],{"class":781},[757,4134,2922],{"class":774},[757,4136,3984],{"class":766},[757,4138,2437],{"class":781},[757,4140,2466],{"class":774},[757,4142,4143],{"class":781}," $value;\n",[757,4145,4146],{"class":759,"line":1026},[757,4147,1095],{"class":781},[757,4149,4150],{"class":759,"line":1034},[757,4151,2263],{"emptyLinePlaceholder":2262},[757,4153,4154,4156,4158,4160,4163,4166,4169,4172,4174],{"class":759,"line":1046},[757,4155,4092],{"class":774},[757,4157,2484],{"class":2301},[757,4159,2305],{"class":781},[757,4161,4162],{"class":766},"MainTeam",[757,4164,4165],{"class":781}," $api, ",[757,4167,4168],{"class":774},"string",[757,4170,4171],{"class":781}," $wanted)",[757,4173,2466],{"class":774},[757,4175,4176],{"class":774}," string\n",[757,4178,4179],{"class":759,"line":1059},[757,4180,819],{"class":781},[757,4182,4183,4186,4189,4192,4195,4197,4199,4201,4203,4206,4209,4211,4214],{"class":759,"line":1070},[757,4184,4185],{"class":774},"    foreach",[757,4187,4188],{"class":781}," ($api",[757,4190,4191],{"class":774},"->",[757,4193,4194],{"class":2301},"call",[757,4196,2305],{"class":781},[757,4198,2513],{"class":770},[757,4200,494],{"class":781},[757,4202,2518],{"class":770},[757,4204,4205],{"class":781},")[",[757,4207,4208],{"class":770},"'data'",[757,4210,2292],{"class":781},[757,4212,4213],{"class":774},"as",[757,4215,4216],{"class":781}," $org) {\n",[757,4218,4219,4222,4225,4228,4230,4232],{"class":759,"line":1075},[757,4220,4221],{"class":774},"        if",[757,4223,4224],{"class":781}," ($org[",[757,4226,4227],{"class":770},"'slug'",[757,4229,2292],{"class":781},[757,4231,2366],{"class":774},[757,4233,4234],{"class":781}," $wanted) {\n",[757,4236,4237,4240,4243,4245],{"class":759,"line":1086},[757,4238,4239],{"class":774},"            return",[757,4241,4242],{"class":781}," $org[",[757,4244,4130],{"class":770},[757,4246,3485],{"class":781},[757,4248,4249],{"class":759,"line":1092},[757,4250,4251],{"class":781},"        }\n",[757,4253,4254],{"class":759,"line":2710},[757,4255,1416],{"class":781},[757,4257,4258,4261,4263,4266,4268,4271,4274,4277],{"class":759,"line":2731},[757,4259,4260],{"class":774},"    throw",[757,4262,2571],{"class":774},[757,4264,4265],{"class":766}," RuntimeException",[757,4267,2305],{"class":781},[757,4269,4270],{"class":770},"\"No organization with slug ",[757,4272,4273],{"class":781},"$wanted",[757,4275,4276],{"class":770},".\"",[757,4278,2311],{"class":781},[757,4280,4281],{"class":759,"line":2736},[757,4282,1095],{"class":781},[757,4284,4285],{"class":759,"line":2741},[757,4286,2263],{"emptyLinePlaceholder":2262},[757,4288,4289,4291,4293,4295,4297,4299,4301,4304,4306],{"class":759,"line":2746},[757,4290,4092],{"class":774},[757,4292,2611],{"class":2301},[757,4294,2305],{"class":781},[757,4296,4162],{"class":766},[757,4298,4165],{"class":781},[757,4300,4168],{"class":774},[757,4302,4303],{"class":781}," $orgId)",[757,4305,2466],{"class":774},[757,4307,4308],{"class":774}," array\n",[757,4310,4311],{"class":759,"line":2759},[757,4312,819],{"class":781},[757,4314,4315,4318,4320],{"class":759,"line":2776},[757,4316,4317],{"class":781},"    $exams ",[757,4319,2295],{"class":774},[757,4321,2630],{"class":781},[757,4323,4324,4327,4330,4332,4334,4337,4339],{"class":759,"line":2821},[757,4325,4326],{"class":774},"    for",[757,4328,4329],{"class":781}," ($page ",[757,4331,2295],{"class":774},[757,4333,2648],{"class":766},[757,4335,4336],{"class":781},"; ; $page",[757,4338,2654],{"class":774},[757,4340,2492],{"class":781},[757,4342,4343,4346,4348,4351,4353,4355,4357,4359,4361,4364,4367,4370,4373,4376],{"class":759,"line":2837},[757,4344,4345],{"class":781},"        $res ",[757,4347,2295],{"class":774},[757,4349,4350],{"class":781}," $api",[757,4352,4191],{"class":774},[757,4354,4194],{"class":2301},[757,4356,2305],{"class":781},[757,4358,2513],{"class":770},[757,4360,494],{"class":781},[757,4362,4363],{"class":770},"\"\u002F",[757,4365,4366],{"class":781},"$orgId",[757,4368,4369],{"class":770},"\u002Fexam?page=",[757,4371,4372],{"class":781},"$page",[757,4374,4375],{"class":770},"&limit=100\"",[757,4377,2311],{"class":781},[757,4379,4380,4383,4386,4388,4391,4393],{"class":759,"line":2850},[757,4381,4382],{"class":766},"        array_push",[757,4384,4385],{"class":781},"($exams, ",[757,4387,2704],{"class":774},[757,4389,4390],{"class":781},"$res[",[757,4392,4208],{"class":770},[757,4394,4395],{"class":781},"]);\n",[757,4397,4398,4400,4402,4404,4407,4410,4413,4416],{"class":759,"line":2880},[757,4399,4221],{"class":774},[757,4401,4329],{"class":781},[757,4403,2719],{"class":774},[757,4405,4406],{"class":781}," $res[",[757,4408,4409],{"class":770},"'pagination'",[757,4411,4412],{"class":781},"][",[757,4414,4415],{"class":770},"'totalPages'",[757,4417,4418],{"class":781},"]) {\n",[757,4420,4421,4423],{"class":759,"line":2893},[757,4422,4239],{"class":774},[757,4424,4425],{"class":781}," $exams;\n",[757,4427,4428],{"class":759,"line":2934},[757,4429,4251],{"class":781},[757,4431,4432],{"class":759,"line":2939},[757,4433,1416],{"class":781},[757,4435,4436],{"class":759,"line":2991},[757,4437,1095],{"class":781},[757,4439,4440],{"class":759,"line":3042},[757,4441,2263],{"emptyLinePlaceholder":2262},[757,4443,4444,4447,4449,4452,4455,4458],{"class":759,"line":3047},[757,4445,4446],{"class":781},"$api ",[757,4448,2295],{"class":774},[757,4450,4451],{"class":766}," MainTeam",[757,4453,4454],{"class":774},"::",[757,4456,4457],{"class":2301},"fromEnv",[757,4459,4460],{"class":781},"();\n",[757,4462,4463],{"class":759,"line":3060},[757,4464,2263],{"emptyLinePlaceholder":2262},[757,4466,4467,4470],{"class":759,"line":3075},[757,4468,4469],{"class":774},"try",[757,4471,3307],{"class":781},[757,4473,4474,4477,4479,4481],{"class":759,"line":3083},[757,4475,4476],{"class":781},"    $orgId ",[757,4478,2295],{"class":774},[757,4480,2484],{"class":2301},[757,4482,4483],{"class":781},"($api, $slug);\n",[757,4485,4486,4489,4491,4493,4495,4497,4499,4501,4503,4505,4507,4510,4513,4515,4517,4519],{"class":759,"line":3088},[757,4487,4488],{"class":781},"    $application ",[757,4490,2295],{"class":774},[757,4492,4350],{"class":781},[757,4494,4191],{"class":774},[757,4496,4194],{"class":2301},[757,4498,2305],{"class":781},[757,4500,2513],{"class":770},[757,4502,494],{"class":781},[757,4504,4363],{"class":770},[757,4506,4366],{"class":781},[757,4508,4509],{"class":770},"\u002Fapplication\u002F",[757,4511,4512],{"class":781},"$applicationId",[757,4514,1605],{"class":770},[757,4516,4205],{"class":781},[757,4518,4208],{"class":770},[757,4520,3485],{"class":781},[757,4522,4523,4526,4528,4531,4534,4537],{"class":759,"line":3093},[757,4524,4525],{"class":781},"    $current ",[757,4527,2295],{"class":774},[757,4529,4530],{"class":781}," $application[",[757,4532,4533],{"class":770},"'exam'",[757,4535,4536],{"class":781},"]; ",[757,4538,2834],{"class":2224},[757,4540,4541,4544,4546,4548,4551,4553,4555,4557],{"class":759,"line":3102},[757,4542,4543],{"class":781},"    $payment ",[757,4545,2295],{"class":774},[757,4547,4530],{"class":781},[757,4549,4550],{"class":770},"'payment'",[757,4552,2292],{"class":781},[757,4554,2922],{"class":774},[757,4556,3984],{"class":766},[757,4558,2257],{"class":781},[757,4560,4561,4564,4566,4569,4572,4574,4576,4578,4580,4582,4584,4586,4588,4591,4593,4595,4597,4599,4601,4603],{"class":759,"line":3115},[757,4562,4563],{"class":781},"    $settled ",[757,4565,2295],{"class":774},[757,4567,4568],{"class":781}," ($payment[",[757,4570,4571],{"class":770},"'status'",[757,4573,2292],{"class":781},[757,4575,2922],{"class":774},[757,4577,3984],{"class":766},[757,4579,2437],{"class":781},[757,4581,2366],{"class":774},[757,4583,2865],{"class":770},[757,4585,2372],{"class":774},[757,4587,4568],{"class":781},[757,4589,4590],{"class":770},"'amount'",[757,4592,2292],{"class":781},[757,4594,2922],{"class":774},[757,4596,2875],{"class":766},[757,4598,2437],{"class":781},[757,4600,785],{"class":774},[757,4602,2875],{"class":766},[757,4604,2257],{"class":781},[757,4606,4607,4610,4612,4614,4617,4619,4622],{"class":759,"line":3153},[757,4608,4609],{"class":781},"    $studentId ",[757,4611,2295],{"class":774},[757,4613,4530],{"class":781},[757,4615,4616],{"class":770},"'user'",[757,4618,4412],{"class":781},[757,4620,4621],{"class":770},"'mainId'",[757,4623,3485],{"class":781},[757,4625,4626,4629,4631,4634,4636,4639,4642,4644,4647,4650,4652,4655,4657,4660,4663,4665,4667,4669,4671,4674,4677,4679],{"class":759,"line":3168},[757,4627,4628],{"class":781},"    $fits ",[757,4630,2295],{"class":774},[757,4632,4633],{"class":774}," fn",[757,4635,2319],{"class":781},[757,4637,4638],{"class":774},"array",[757,4640,4641],{"class":781}," $exam)",[757,4643,2466],{"class":774},[757,4645,4646],{"class":774}," bool",[757,4648,4649],{"class":781}," => ",[757,4651,2322],{"class":774},[757,4653,4654],{"class":781},"$settled ",[757,4656,2328],{"class":774},[757,4658,4659],{"class":781}," ($exam[",[757,4661,4662],{"class":770},"'price'",[757,4664,2292],{"class":781},[757,4666,2922],{"class":774},[757,4668,2875],{"class":766},[757,4670,2437],{"class":781},[757,4672,4673],{"class":774},"==",[757,4675,4676],{"class":781}," $payment[",[757,4678,4590],{"class":770},[757,4680,3485],{"class":781},[757,4682,4683],{"class":759,"line":3191},[757,4684,2263],{"emptyLinePlaceholder":2262},[757,4686,4687,4690,4693,4696,4699,4701,4704,4706,4709,4711,4713],{"class":759,"line":3204},[757,4688,4689],{"class":766},"    echo",[757,4691,4692],{"class":770}," \"Application {",[757,4694,4695],{"class":781},"$application",[757,4697,4698],{"class":770},"['_id']} for {",[757,4700,4695],{"class":781},[757,4702,4703],{"class":770},"['user']['firstName']} {",[757,4705,4695],{"class":781},[757,4707,4708],{"class":770},"['user']['lastName']}",[757,4710,4060],{"class":774},[757,4712,1605],{"class":770},[757,4714,2257],{"class":781},[757,4716,4717,4720,4722,4725,4727,4729,4732,4734,4737,4739,4741,4743,4746,4749,4751,4753,4755,4758],{"class":759,"line":3223},[757,4718,4719],{"class":766},"    printf",[757,4721,2305],{"class":781},[757,4723,4724],{"class":770},"\"  now: exam %s, payment %s %s",[757,4726,4060],{"class":774},[757,4728,1605],{"class":770},[757,4730,4731],{"class":781},", $current[",[757,4733,4130],{"class":770},[757,4735,4736],{"class":781},"], $payment[",[757,4738,4571],{"class":770},[757,4740,2292],{"class":781},[757,4742,2922],{"class":774},[757,4744,4745],{"class":770}," 'none'",[757,4747,4748],{"class":781},", $payment[",[757,4750,4590],{"class":770},[757,4752,2292],{"class":781},[757,4754,2922],{"class":774},[757,4756,4757],{"class":770}," ''",[757,4759,2311],{"class":781},[757,4761,4762],{"class":759,"line":3240},[757,4763,2263],{"emptyLinePlaceholder":2262},[757,4765,4766,4768,4770,4772,4775,4778,4781,4784,4786,4788,4790,4792,4795],{"class":759,"line":3253},[757,4767,2713],{"class":774},[757,4769,2319],{"class":781},[757,4771,2322],{"class":774},[757,4773,4774],{"class":766},"empty",[757,4776,4777],{"class":781},"($application[",[757,4779,4780],{"class":770},"'participated'",[757,4782,4783],{"class":781},"]) ",[757,4785,2328],{"class":774},[757,4787,2331],{"class":774},[757,4789,4774],{"class":766},[757,4791,4777],{"class":781},[757,4793,4794],{"class":770},"'examSubmitted'",[757,4796,4797],{"class":781},"])) {\n",[757,4799,4800,4803,4806,4808,4810],{"class":759,"line":3283},[757,4801,4802],{"class":766},"        echo",[757,4804,4805],{"class":770}," \"  The exam has been started, so it can no longer be moved.",[757,4807,4060],{"class":774},[757,4809,1605],{"class":770},[757,4811,2257],{"class":781},[757,4813,4814,4817,4819,4821],{"class":759,"line":3292},[757,4815,4816],{"class":774},"        exit",[757,4818,2305],{"class":781},[757,4820,611],{"class":766},[757,4822,2311],{"class":781},[757,4824,4825],{"class":759,"line":3298},[757,4826,1416],{"class":781},[757,4828,4829],{"class":759,"line":3310},[757,4830,2263],{"emptyLinePlaceholder":2262},[757,4832,4833,4836,4838,4840],{"class":759,"line":3351},[757,4834,4835],{"class":781},"    $target ",[757,4837,2295],{"class":774},[757,4839,3984],{"class":766},[757,4841,2257],{"class":781},[757,4843,4844,4846,4848,4850,4852],{"class":759,"line":3385},[757,4845,2713],{"class":774},[757,4847,4026],{"class":781},[757,4849,2366],{"class":774},[757,4851,2369],{"class":770},[757,4853,2492],{"class":781},[757,4855,4856,4859,4861,4863,4865,4867,4869,4871,4873,4876,4879,4881,4883,4885,4887,4889,4891],{"class":759,"line":3403},[757,4857,4858],{"class":781},"        $student ",[757,4860,2295],{"class":774},[757,4862,4350],{"class":781},[757,4864,4191],{"class":774},[757,4866,4194],{"class":2301},[757,4868,2305],{"class":781},[757,4870,2513],{"class":770},[757,4872,494],{"class":781},[757,4874,4875],{"class":770},"\"\u002Fstudent\u002F",[757,4877,4878],{"class":781},"$studentId",[757,4880,1605],{"class":770},[757,4882,4205],{"class":781},[757,4884,4208],{"class":770},[757,4886,2292],{"class":781},[757,4888,2922],{"class":774},[757,4890,3984],{"class":766},[757,4892,2257],{"class":781},[757,4894,4895,4898,4900,4902,4905,4908,4910,4912,4914],{"class":759,"line":3437},[757,4896,4897],{"class":781},"        $gradeId ",[757,4899,2295],{"class":774},[757,4901,2426],{"class":2301},[757,4903,4904],{"class":781},"($student[",[757,4906,4907],{"class":770},"'grade'",[757,4909,2292],{"class":781},[757,4911,2922],{"class":774},[757,4913,3984],{"class":766},[757,4915,2311],{"class":781},[757,4917,4918,4921,4923,4926,4929,4931],{"class":759,"line":3448},[757,4919,4920],{"class":774},"        foreach",[757,4922,2319],{"class":781},[757,4924,4925],{"class":2301},"openExams",[757,4927,4928],{"class":781},"($api, $orgId) ",[757,4930,4213],{"class":774},[757,4932,4933],{"class":781}," $exam) {\n",[757,4935,4936,4939,4941,4944,4946,4949,4952,4955,4957,4959],{"class":759,"line":3488},[757,4937,4938],{"class":781},"            $gradeIds ",[757,4940,2295],{"class":774},[757,4942,4943],{"class":766}," array_map",[757,4945,2305],{"class":781},[757,4947,4948],{"class":770},"'idOf'",[757,4950,4951],{"class":781},", $exam[",[757,4953,4954],{"class":770},"'grades'",[757,4956,2292],{"class":781},[757,4958,2922],{"class":774},[757,4960,4961],{"class":781}," []);\n",[757,4963,4964,4967,4969,4972,4975,4978,4980,4982,4984,4987,4989],{"class":759,"line":3493},[757,4965,4966],{"class":774},"            if",[757,4968,2319],{"class":781},[757,4970,4971],{"class":2301},"idOf",[757,4973,4974],{"class":781},"($exam[",[757,4976,4977],{"class":770},"'session'",[757,4979,4783],{"class":781},[757,4981,2366],{"class":774},[757,4983,2426],{"class":2301},[757,4985,4986],{"class":781},"($current[",[757,4988,4977],{"class":770},[757,4990,4991],{"class":781},"])\n",[757,4993,4994,4997,4999,5001,5004,5006,5008,5010,5012,5014],{"class":759,"line":3498},[757,4995,4996],{"class":774},"                &&",[757,4998,2426],{"class":2301},[757,5000,4974],{"class":781},[757,5002,5003],{"class":770},"'category'",[757,5005,4783],{"class":781},[757,5007,2366],{"class":774},[757,5009,2426],{"class":2301},[757,5011,4986],{"class":781},[757,5013,5003],{"class":770},[757,5015,4991],{"class":781},[757,5017,5018,5020,5022,5024,5026,5029,5031,5033,5035,5037,5039],{"class":759,"line":3510},[757,5019,4996],{"class":774},[757,5021,4659],{"class":781},[757,5023,2344],{"class":770},[757,5025,4412],{"class":781},[757,5027,5028],{"class":770},"'code'",[757,5030,2292],{"class":781},[757,5032,2922],{"class":774},[757,5034,3984],{"class":766},[757,5036,2437],{"class":781},[757,5038,2366],{"class":774},[757,5040,5041],{"class":781}," $languageCode\n",[757,5043,5044,5046,5049,5052,5054],{"class":759,"line":3524},[757,5045,4996],{"class":774},[757,5047,5048],{"class":766}," in_array",[757,5050,5051],{"class":781},"($gradeId, $gradeIds, ",[757,5053,831],{"class":766},[757,5055,4018],{"class":781},[757,5057,5058,5060],{"class":759,"line":3531},[757,5059,4996],{"class":774},[757,5061,5062],{"class":781}," $fits($exam)) {\n",[757,5064,5065,5068,5070],{"class":759,"line":3536},[757,5066,5067],{"class":781},"                $target ",[757,5069,2295],{"class":774},[757,5071,5072],{"class":781}," $exam;\n",[757,5074,5075,5078],{"class":759,"line":3573},[757,5076,5077],{"class":774},"                break",[757,5079,2257],{"class":781},[757,5081,5082],{"class":759,"line":3578},[757,5083,5084],{"class":781},"            }\n",[757,5086,5087],{"class":759,"line":3612},[757,5088,4251],{"class":781},[757,5090,5091,5094,5096],{"class":759,"line":3636},[757,5092,5093],{"class":781},"    } ",[757,5095,3304],{"class":774},[757,5097,3307],{"class":781},[757,5099,5100,5103,5105,5107,5109,5111,5113,5115,5117,5119,5121,5124,5126,5128,5130,5132],{"class":759,"line":3641},[757,5101,5102],{"class":781},"        $tree ",[757,5104,2295],{"class":774},[757,5106,4350],{"class":781},[757,5108,4191],{"class":774},[757,5110,4194],{"class":2301},[757,5112,2305],{"class":781},[757,5114,2513],{"class":770},[757,5116,494],{"class":781},[757,5118,4363],{"class":770},[757,5120,4366],{"class":781},[757,5122,5123],{"class":770},"\u002Fexam\u002Favailable\u002F",[757,5125,4878],{"class":781},[757,5127,1605],{"class":770},[757,5129,4205],{"class":781},[757,5131,4208],{"class":770},[757,5133,3485],{"class":781},[757,5135,5136,5139,5141],{"class":759,"line":3681},[757,5137,5138],{"class":781},"        $candidates ",[757,5140,2295],{"class":774},[757,5142,2630],{"class":781},[757,5144,5145,5147,5150,5152],{"class":759,"line":3730},[757,5146,4920],{"class":774},[757,5148,5149],{"class":781}," ($tree ",[757,5151,4213],{"class":774},[757,5153,5154],{"class":781}," $category) {\n",[757,5156,5157,5159,5162,5164,5166,5169,5171,5173,5175],{"class":759,"line":3735},[757,5158,4966],{"class":774},[757,5160,5161],{"class":781}," ($category[",[757,5163,4130],{"class":770},[757,5165,2292],{"class":781},[757,5167,5168],{"class":774},"!==",[757,5170,2426],{"class":2301},[757,5172,4986],{"class":781},[757,5174,5003],{"class":770},[757,5176,4797],{"class":781},[757,5178,5179,5182],{"class":759,"line":3740},[757,5180,5181],{"class":774},"                continue",[757,5183,2257],{"class":781},[757,5185,5186],{"class":759,"line":3762},[757,5187,5084],{"class":781},[757,5189,5190,5193,5195,5198,5200,5202],{"class":759,"line":3778},[757,5191,5192],{"class":774},"            foreach",[757,5194,5161],{"class":781},[757,5196,5197],{"class":770},"'sessions'",[757,5199,2292],{"class":781},[757,5201,4213],{"class":774},[757,5203,5204],{"class":781}," $session) {\n",[757,5206,5207,5210,5213,5216,5218,5220],{"class":759,"line":3827},[757,5208,5209],{"class":774},"                foreach",[757,5211,5212],{"class":781}," ($session[",[757,5214,5215],{"class":770},"'languages'",[757,5217,2292],{"class":781},[757,5219,4213],{"class":774},[757,5221,5222],{"class":781}," $language) {\n",[757,5224,5225,5228,5231,5234],{"class":759,"line":3836},[757,5226,5227],{"class":774},"                    if",[757,5229,5230],{"class":781}," ($fits($language[",[757,5232,5233],{"class":770},"'matchedExam'",[757,5235,4797],{"class":781},[757,5237,5238,5241,5243,5246,5248],{"class":759,"line":3846},[757,5239,5240],{"class":781},"                        $candidates[] ",[757,5242,2295],{"class":774},[757,5244,5245],{"class":781}," $language[",[757,5247,5233],{"class":770},[757,5249,3485],{"class":781},[757,5251,5252],{"class":759,"line":3851},[757,5253,5254],{"class":781},"                    }\n",[757,5256,5257],{"class":759,"line":3863},[757,5258,5259],{"class":781},"                }\n",[757,5261,5263],{"class":759,"line":5262},91,[757,5264,5084],{"class":781},[757,5266,5268],{"class":759,"line":5267},92,[757,5269,4251],{"class":781},[757,5271,5273,5275,5278,5280],{"class":759,"line":5272},93,[757,5274,4920],{"class":774},[757,5276,5277],{"class":781}," ($candidates ",[757,5279,4213],{"class":774},[757,5281,4933],{"class":781},[757,5283,5285,5287,5289,5291,5293,5295,5297,5299,5301],{"class":759,"line":5284},94,[757,5286,4966],{"class":774},[757,5288,4659],{"class":781},[757,5290,2344],{"class":770},[757,5292,2292],{"class":781},[757,5294,2366],{"class":774},[757,5296,2426],{"class":2301},[757,5298,4986],{"class":781},[757,5300,2344],{"class":770},[757,5302,4797],{"class":781},[757,5304,5306,5308,5310],{"class":759,"line":5305},95,[757,5307,5067],{"class":781},[757,5309,2295],{"class":774},[757,5311,5072],{"class":781},[757,5313,5315,5317],{"class":759,"line":5314},96,[757,5316,5077],{"class":774},[757,5318,2257],{"class":781},[757,5320,5322],{"class":759,"line":5321},97,[757,5323,5084],{"class":781},[757,5325,5327],{"class":759,"line":5326},98,[757,5328,4251],{"class":781},[757,5330,5332,5335,5338,5341,5343,5345,5347,5349],{"class":759,"line":5331},99,[757,5333,5334],{"class":781},"        $target ",[757,5336,5337],{"class":774},"??=",[757,5339,5340],{"class":781}," $candidates[",[757,5342,611],{"class":766},[757,5344,2292],{"class":781},[757,5346,2922],{"class":774},[757,5348,3984],{"class":766},[757,5350,2257],{"class":781},[757,5352,5354],{"class":759,"line":5353},100,[757,5355,1416],{"class":781},[757,5357,5359],{"class":759,"line":5358},101,[757,5360,2263],{"emptyLinePlaceholder":2262},[757,5362,5364,5366,5369,5371,5373],{"class":759,"line":5363},102,[757,5365,2713],{"class":774},[757,5367,5368],{"class":781}," ($target ",[757,5370,2366],{"class":774},[757,5372,3984],{"class":766},[757,5374,2492],{"class":781},[757,5376,5378,5380,5383,5385,5387],{"class":759,"line":5377},103,[757,5379,4802],{"class":766},[757,5381,5382],{"class":770}," \"  No suitable exam was found. Nothing was changed.",[757,5384,4060],{"class":774},[757,5386,1605],{"class":770},[757,5388,2257],{"class":781},[757,5390,5392,5394,5396,5398],{"class":759,"line":5391},104,[757,5393,4816],{"class":774},[757,5395,2305],{"class":781},[757,5397,611],{"class":766},[757,5399,2311],{"class":781},[757,5401,5403],{"class":759,"line":5402},105,[757,5404,1416],{"class":781},[757,5406,5408,5410,5412,5415,5417,5419,5422,5424,5427,5429,5431,5433,5435],{"class":759,"line":5407},106,[757,5409,4719],{"class":766},[757,5411,2305],{"class":781},[757,5413,5414],{"class":770},"\"  target: exam %s (price %s)",[757,5416,4060],{"class":774},[757,5418,1605],{"class":770},[757,5420,5421],{"class":781},", $target[",[757,5423,4130],{"class":770},[757,5425,5426],{"class":781},"], $target[",[757,5428,4662],{"class":770},[757,5430,2292],{"class":781},[757,5432,2922],{"class":774},[757,5434,2875],{"class":766},[757,5436,2311],{"class":781},[757,5438,5440],{"class":759,"line":5439},107,[757,5441,2263],{"emptyLinePlaceholder":2262},[757,5443,5445,5448,5450,5452,5454,5456,5458,5460,5462,5464,5466,5468,5470,5472,5475,5478,5481,5484,5486],{"class":759,"line":5444},108,[757,5446,5447],{"class":781},"    $moved ",[757,5449,2295],{"class":774},[757,5451,4350],{"class":781},[757,5453,4191],{"class":774},[757,5455,4194],{"class":2301},[757,5457,2305],{"class":781},[757,5459,3594],{"class":770},[757,5461,494],{"class":781},[757,5463,4363],{"class":770},[757,5465,4366],{"class":781},[757,5467,4509],{"class":770},[757,5469,4512],{"class":781},[757,5471,1605],{"class":770},[757,5473,5474],{"class":781},", [",[757,5476,5477],{"class":770},"'examId'",[757,5479,5480],{"class":774}," =>",[757,5482,5483],{"class":781}," $target[",[757,5485,4130],{"class":770},[757,5487,5488],{"class":781},"]]);\n",[757,5490,5492,5494,5497,5500,5503,5505,5507],{"class":759,"line":5491},109,[757,5493,4689],{"class":766},[757,5495,5496],{"class":770}," \"  {",[757,5498,5499],{"class":781},"$moved",[757,5501,5502],{"class":770},"['message']}",[757,5504,4060],{"class":774},[757,5506,1605],{"class":770},[757,5508,2257],{"class":781},[757,5510,5512],{"class":759,"line":5511},110,[757,5513,2263],{"emptyLinePlaceholder":2262},[757,5515,5517,5520,5522,5524,5526,5528,5530,5532,5534,5536,5538,5540,5542,5544,5546,5548],{"class":759,"line":5516},111,[757,5518,5519],{"class":781},"    $after ",[757,5521,2295],{"class":774},[757,5523,4350],{"class":781},[757,5525,4191],{"class":774},[757,5527,4194],{"class":2301},[757,5529,2305],{"class":781},[757,5531,2513],{"class":770},[757,5533,494],{"class":781},[757,5535,4363],{"class":770},[757,5537,4366],{"class":781},[757,5539,4509],{"class":770},[757,5541,4512],{"class":781},[757,5543,1605],{"class":770},[757,5545,4205],{"class":781},[757,5547,4208],{"class":770},[757,5549,3485],{"class":781},[757,5551,5553,5555,5557,5559,5561,5563,5566,5568,5570,5572,5575,5577,5579,5581,5583,5585,5588,5590,5592,5594,5596,5598,5600,5602],{"class":759,"line":5552},112,[757,5554,4719],{"class":766},[757,5556,2305],{"class":781},[757,5558,4724],{"class":770},[757,5560,4060],{"class":774},[757,5562,1605],{"class":770},[757,5564,5565],{"class":781},", $after[",[757,5567,4533],{"class":770},[757,5569,4412],{"class":781},[757,5571,4130],{"class":770},[757,5573,5574],{"class":781},"], $after[",[757,5576,4550],{"class":770},[757,5578,4412],{"class":781},[757,5580,4571],{"class":770},[757,5582,2292],{"class":781},[757,5584,2922],{"class":774},[757,5586,5587],{"class":770}," '-'",[757,5589,5565],{"class":781},[757,5591,4550],{"class":770},[757,5593,4412],{"class":781},[757,5595,4590],{"class":770},[757,5597,2292],{"class":781},[757,5599,2922],{"class":774},[757,5601,5587],{"class":770},[757,5603,2311],{"class":781},[757,5605,5607,5610,5612,5614,5617],{"class":759,"line":5606},113,[757,5608,5609],{"class":781},"} ",[757,5611,3749],{"class":774},[757,5613,2319],{"class":781},[757,5615,5616],{"class":766},"ApiError",[757,5618,5619],{"class":781}," $e) {\n",[757,5621,5623,5625,5627,5629,5631,5634,5637,5639,5641,5644,5646,5648,5651,5654,5656,5658,5661,5664,5666,5668,5670,5673,5675,5677],{"class":759,"line":5622},114,[757,5624,4047],{"class":766},[757,5626,2305],{"class":781},[757,5628,4052],{"class":766},[757,5630,494],{"class":781},[757,5632,5633],{"class":770},"\"{",[757,5635,5636],{"class":781},"$e",[757,5638,4191],{"class":774},[757,5640,3019],{"class":781},[757,5642,5643],{"class":770},"} {",[757,5645,5636],{"class":781},[757,5647,4191],{"class":774},[757,5649,5650],{"class":781},"errorCode",[757,5652,5653],{"class":770},"}: {",[757,5655,5636],{"class":781},[757,5657,4191],{"class":774},[757,5659,5660],{"class":2301},"getMessage",[757,5662,5663],{"class":770},"()} (request {",[757,5665,5636],{"class":781},[757,5667,4191],{"class":774},[757,5669,3820],{"class":781},[757,5671,5672],{"class":770},"})",[757,5674,4060],{"class":774},[757,5676,1605],{"class":770},[757,5678,2311],{"class":781},[757,5680,5682,5684,5686,5688],{"class":759,"line":5681},115,[757,5683,4069],{"class":774},[757,5685,2305],{"class":781},[757,5687,1436],{"class":766},[757,5689,2311],{"class":781},[757,5691,5693],{"class":759,"line":5692},116,[757,5694,1095],{"class":781},[1176,5696,5698],{"id":5697},"expected-output","Expected output",[358,5700,5701],{},"A language swap on a settled payment, at the same price:",[747,5703,5708],{"className":5704,"code":5706,"language":5707,"meta":753},[5705],"language-text","$ node change-application.mjs stem 66e6a4b1c1d2b30012a4fa07 language de\nApplication 66e6a4b1c1d2b30012a4fa07 for Jane Doe\n  now: exam 64c0a1b2c3d4e5f601234801, payment paid 25\n  target: exam 64c0a1b2c3d4e5f601234802 (price 25)\n  Application updated successfully.\n  now: exam 64c0a1b2c3d4e5f601234802, payment paid 25\n","text",[367,5709,5706],{"__ignoreMap":753},[358,5711,5712,5713,2466],{},"A move to the next sitting from a free entry, where the next sitting has a price. The payment becomes\n",[367,5714,585],{},[747,5716,5719],{"className":5717,"code":5718,"language":5707,"meta":753},[5705],"$ node change-application.mjs stem 66e6a4b1c1d2b30012a4fa07 sitting\nApplication 66e6a4b1c1d2b30012a4fa07 for Jane Doe\n  now: exam 64c0a1b2c3d4e5f601234801, payment paid 0\n  target: exam 64c0a1b2c3d4e5f601234901 (price 30)\n  Application updated successfully.\n  now: exam 64c0a1b2c3d4e5f601234901, payment pending 30\n",[367,5720,5718],{"__ignoreMap":753},[358,5722,5723],{},"A refused move prints the reason and changes nothing:",[747,5725,5728],{"className":5726,"code":5727,"language":5707,"meta":753},[5705],"409 conflict: Student already has an application for Mathematics on this sitting. Two exams in one category on one date cannot both be sat. (request 5b2d8c1e-0f3a-4e7b-9c61-2a4d7e8f9b10)\n",[367,5729,5727],{"__ignoreMap":753},[374,5731,5733],{"id":5732},"next-steps","Next steps",[683,5735,5736,5741,5746,5752],{},[468,5737,5738,5740],{},[715,5739,86],{"href":87},": every application rule, including the three list variants.",[468,5742,5743,5745],{},[715,5744,83],{"href":84},": what \"open\" means and how the picker is built.",[468,5747,5748,5751],{},[715,5749,5750],{"href":49},"Retries and idempotency",": which of these requests are safe to repeat.",[468,5753,5754,5755,834,5758,834,5761,494,5764,369],{},"Reference: ",[715,5756,5757],{"href":247},"getApplication",[715,5759,5760],{"href":250},"moveApplication",[715,5762,5763],{"href":253},"deleteApplication",[715,5765,5766],{"href":217},"listExams",[5768,5769,5770],"style",{},"html pre.shiki code .soyes, html code.shiki .soyes{--shiki-default:#702C00;--shiki-dark:#FFB757}html pre.shiki code .s-5SL, html code.shiki .s-5SL{--shiki-default:#023B95;--shiki-dark:#91CBFF}html pre.shiki code .sT6z2, html code.shiki .sT6z2{--shiki-default:#032563;--shiki-dark:#ADDCFF}html pre.shiki code .sHUrx, html code.shiki .sHUrx{--shiki-default:#A0111F;--shiki-dark:#FF9492}html pre.shiki code .suds8, html code.shiki .suds8{--shiki-default:#0E1116;--shiki-dark:#F0F3F6}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sne4z, html code.shiki .sne4z{--shiki-default:#024C1A;--shiki-dark:#72F088}html pre.shiki code .sLBg1, html code.shiki .sLBg1{--shiki-default:#66707B;--shiki-dark:#BDC4CC}html pre.shiki code .sKwhi, html code.shiki .sKwhi{--shiki-default:#622CBC;--shiki-dark:#DBB7FF}",{"title":753,"searchDepth":794,"depth":837,"links":5772},[5773,5774,5775,5776,5777,5778,5782,5783,5784,5785,5786,5791],{"id":376,"depth":794,"text":377},{"id":452,"depth":794,"text":453},{"id":560,"depth":794,"text":561},{"id":680,"depth":794,"text":681},{"id":744,"depth":794,"text":745},{"id":1173,"depth":794,"text":1174,"children":5779},[5780,5781],{"id":1178,"depth":837,"text":1179},{"id":1505,"depth":837,"text":1506},{"id":1562,"depth":794,"text":1563},{"id":1728,"depth":794,"text":1729},{"id":1782,"depth":794,"text":1783},{"id":2045,"depth":794,"text":2046},{"id":2197,"depth":794,"text":2198,"children":5787},[5788,5789,5790],{"id":2211,"depth":837,"text":308},{"id":3869,"depth":837,"text":311},{"id":5697,"depth":837,"text":5698},{"id":5732,"depth":794,"text":5733},"Move an existing application to another exam, such as another language or date, and handle every refusal and what the move does to the payment.","md",{},[5757,5796,5797,5766,5798,5760,5763],"listStudentApplications","getStudent","listAvailableExams","30",{"title":353,"description":5792},"api\u002Ftutorials\u002Fchange-an-application","6vSHJIM0mkZ4JtGoQ3vWbDCDgMoDzNR97EPFG8WGE1w",[5804,5809,5812,5817,5821,5824,5827],{"operationId":5757,"slug":5805,"method":133,"path":5806,"tag":86,"summary":246,"deprecated":134,"public":134,"permission":5807,"scope":5808,"order":2746},"get-application","\u002Fv1\u002F{organizationId}\u002Fapplication\u002F{applicationId}","application\u002Fread:$org:$ID","organization",{"operationId":5796,"slug":5810,"method":133,"path":5811,"tag":86,"summary":243,"deprecated":134,"public":134,"permission":5807,"scope":5808,"order":2741},"list-student-applications","\u002Fv1\u002F{organizationId}\u002Fapplication\u002Fstudent-applications\u002F{studentId}",{"operationId":5797,"slug":5813,"method":133,"path":5814,"tag":62,"summary":185,"deprecated":134,"public":134,"permission":5815,"scope":5816,"order":972},"get-student","\u002Fv1\u002Fstudent\u002F{studentId}","student\u002Fread:$org:$ID","flat",{"operationId":5766,"slug":5818,"method":133,"path":5819,"tag":83,"summary":216,"deprecated":134,"public":134,"permission":5820,"scope":5808,"order":1059},"list-exams","\u002Fv1\u002F{organizationId}\u002Fexam","exam\u002Fread:$org:$ID",{"operationId":5798,"slug":5822,"method":133,"path":5823,"tag":83,"summary":225,"deprecated":134,"public":134,"permission":5820,"scope":5808,"order":1086},"list-available-exams","\u002Fv1\u002F{organizationId}\u002Fexam\u002Favailable\u002F{studentId}",{"operationId":5760,"slug":5825,"method":190,"path":5806,"tag":86,"summary":249,"deprecated":134,"public":134,"permission":5826,"scope":5808,"order":2759},"move-application","application\u002Fupdate:$org:$ID",{"operationId":5763,"slug":5828,"method":254,"path":5806,"tag":86,"summary":252,"deprecated":134,"public":134,"permission":5829,"scope":5808,"order":2776},"delete-application","application\u002Fdelete:$org:$ID",1791554615302]