/* Ċ Ġ* ĠCopyright Ġ( C ) Ġ 2 0 1 7 Ġ- Ġpresent ĠIn structure , ĠInc . Ċ Ġ* Ċ Ġ* ĠĠĠĠ ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* ĠĠĠĠ Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠĠĠĠ ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠĠĠĠ ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* ĠĠĠĠ Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠĠĠĠ ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠĠĠĠ ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* ĠĠĠĠ Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ* Ċ Ġ*/ Ċ Ċ package Ġcom . in structure . canvas api 2 . apis Ċ Ċ import Ġcom . in structure . canvas api 2 . Status Callback Ċ import Ġcom . in structure . canvas api 2 . builders . Rest Builder Ċ import Ġcom . in structure . canvas api 2 . builders . Rest Params Ċ import Ġcom . in structure . canvas api 2 . models .* Ċ import Ġcom . in structure . canvas api 2 . models . post models . Quiz Post Body Wrapper Ċ import Ġokhttp 3 . ResponseBody Ċ import Ġretrofit 2 . Call Ċ import Ġretrofit 2 . http .* Ċ import Ġjava . util .* Ċ Ċ object ĠQu iz API Ġ{ ĊĊĠĠĠ Ġinternal Ġinterface ĠQu iz Interface Ġ{ ĊĠĠĠĠĠĠĠ Ġ@ GET ("{ context Type }/{ context Id }/ qu izz es ") ĊĠĠĠĠĠĠĠ Ġfun Ġget First Page Qu izz es List (@ Path (" context Type ") Ġcontext Type : ĠString , Ġ@ Path (" context Id ") Ġcontext Id : ĠLong ): ĠCall < List < Quiz >> ĊĊĠĠĠĠĠĠĠ Ġ@ GET ĊĠĠĠĠĠĠĠ Ġfun ĠgetNext Page Qu izz es List (@ Url Ġnext URL : ĠString ): ĠCall < List < Quiz >> ĊĊĠĠĠĠĠĠĠ Ġ@ GET ("{ context Type }/{ context Id }/ qu izz es /{ quiz Id }") ĊĠĠĠĠĠĠĠ Ġfun Ġget Detailed Quiz (@ Path (" context Type ") Ġcontext Type : ĠString , Ġ@ Path (" context Id ") Ġcontext Id : ĠLong , Ġ@ Path (" quiz Id ") Ġquiz Id : ĠLong ): ĠCall < Quiz > ĊĊĠĠĠĠĠĠĠ Ġ@ GET ĊĠĠĠĠĠĠĠ Ġfun Ġget Detailed Quiz By Url (@ Url Ġquiz Url : ĠString ): ĠCall < Quiz > ĊĊĠĠĠĠĠĠĠ Ġ@ GET (" quiz _ submissions /{ quiz Submission Id }/ questions ") ĊĠĠĠĠĠĠĠ Ġfun Ġget First Page Submission Questions (@ Path (" quiz Submission Id ") Ġquiz Submission Id : ĠLong ): ĠCall < Quiz Submission Question Response > ĊĊĠĠĠĠĠĠĠ Ġ@ GET ĊĠĠĠĠĠĠĠ Ġfun ĠgetNext Page Submission Questions (@ Url Ġnext URL : ĠString ): ĠCall < Quiz Submission Question Response > ĊĊĠĠĠĠĠĠĠ Ġ@ GET (" courses /{ course Id }/ qu izz es ") ĊĠĠĠĠĠĠĠ Ġfun Ġget First Page Qu izz es (@ Path (" course Id ") Ġcontext Id : ĠLong ): ĠCall < List < Quiz >> ĊĊĠĠĠĠĠĠĠ Ġ@ GET ĊĠĠĠĠĠĠĠ Ġfun ĠgetNext Page Qu izz es (@ Url Ġnext Url : ĠString ): ĠCall < List < Quiz >> ĊĊĠĠĠĠĠĠĠ Ġ@ GET (" courses /{ course Id }/ qu izz es /{ quiz Id }") ĊĠĠĠĠĠĠĠ Ġfun Ġget Quiz (@ Path (" course Id ") Ġcourse Id : ĠLong , Ġ@ Path (" quiz Id ") Ġquiz Id : ĠLong ): ĠCall < Quiz > ĊĊĠĠĠĠĠĠĠ Ġ@ PUT (" courses /{ course Id }/ qu izz es /{ quiz Id }") ĊĠĠĠĠĠĠĠ Ġfun Ġedit Quiz ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" course Id ") Ġcourse Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" quiz Id ") Ġquiz Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Body Ġbody : ĠQu iz Post Body Wrapper ): ĠCall < Quiz > ĊĊĠĠĠĠĠĠĠ Ġ// FIX ME : ĠM IG RATION Ġcan Ġbe Ġremoved Ġand Ġreplaced Ġwith Ġother Ġget First Page Quiz Sub missions () ĊĠĠĠĠĠĠĠ Ġ@ GET (" courses /{ course Id }/ qu izz es /{ quiz Id }/ submissions ") ĊĠĠĠĠĠĠĠ Ġfun Ġget First Page Quiz Sub missions (@ Path (" course Id ") Ġcourse Id : ĠLong ?, Ġ@ Path (" quiz Id ") Ġquiz Id : ĠLong ?): ĠCall < Quiz Submission Response > ĊĊĠĠĠĠĠĠĠ Ġ@ GET ĊĠĠĠĠĠĠĠ Ġfun ĠgetNext Page Quiz Sub missions (@ Url Ġnext Url : ĠString ): ĠCall < Quiz Submission Response > ĊĊĠĠĠĠĠĠĠ Ġ@ POST ("{ context Type }/{ context Id }/ qu izz es /{ quiz Id }/ submissions /{ submission Id }/ complete ") ĊĠĠĠĠĠĠĠ Ġfun Ġsubmit Quiz ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" context Type ") Ġcontext Type : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" context Id ") Ġcontext Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" quiz Id ") Ġquiz Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" submission Id ") Ġsubmission Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" attempt ") Ġattempt : ĠInt , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" validation _ token ") Ġtoken : ĠString ): ĠCall < Quiz Submission Response > ĊĊĠĠĠĠĠĠĠ Ġ@ GET ("{ context Type }/{ context Id }/ qu izz es /{ quiz Id }/ submissions ") ĊĠĠĠĠĠĠĠ Ġfun Ġget First Page Quiz Sub missions (@ Path (" context Type ") Ġcontext Type : ĠString , Ġ@ Path (" context Id ") Ġcontext Id : ĠLong , Ġ@ Path (" quiz Id ") Ġquiz Id : ĠLong ): ĠCall < Quiz Submission Response > ĊĊĠĠĠĠĠĠĠ Ġ@ POST ("{ context Type }/{ context Id }/ qu izz es /{ quiz Id }/ submissions /{ submission Id }/ events ") ĊĠĠĠĠĠĠĠ Ġfun Ġpost Quiz Started Event ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" context Type ") Ġcontext Type : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" context Id ") Ġcontext Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" quiz Id ") Ġquiz Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" submission Id ") Ġsubmission Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" quiz _ submission _ events [] [ event _ type ]") Ġsession Started String : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" quiz _ submission _ events [] [ event _ data ][ user _ agent ]") Ġuser Agent String : ĠString ): ĠCall < ResponseBody > ĊĊĠĠĠĠĠĠĠ Ġ@ POST ("{ context Type }/{ context Id }/ qu izz es /{ quiz Id }/ submissions ") ĊĠĠĠĠĠĠĠ Ġfun Ġstart Quiz ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" context Type ") Ġcontext Type : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" context Id ") Ġcontext Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" quiz Id ") Ġquiz Id : ĠLong ): ĠCall < Quiz Submission Response > ĊĊĠĠĠĠĠĠĠ Ġ@ GET ("{ context Type }/{ context Id }/ qu izz es /{ quiz Id }/ submissions /{ submission Id }/ time ") ĊĠĠĠĠĠĠĠ Ġfun Ġget Quiz Submission Time ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" context Type ") Ġcontext Type : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" context Id ") Ġcontext Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" quiz Id ") Ġquiz Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" submission Id ") Ġsubmission Id : ĠLong ): ĠCall < Quiz Submission Time > ĊĊĠĠĠĠĠĠĠ Ġ@ POST ("{ context Type }/{ context Id }/ qu izz es /{ quiz Id }/ submissions /{ submission Id }/ complete ") ĊĠĠĠĠĠĠĠ Ġfun Ġpost Quiz Submit ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" context Type ") Ġcontext Type : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" context Id ") Ġcontext Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" quiz Id ") Ġquiz Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" submission Id ") Ġsubmission Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" attempt ") Ġattempt : ĠInt , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" validation _ token ") Ġtoken : ĠString ): ĠCall < Quiz Submission Response > ĊĊĠĠĠĠĠĠĠ Ġ@ POST (" quiz _ submissions /{ quiz Submission Id }/ questions ") ĊĠĠĠĠĠĠĠ Ġfun Ġpost Quiz Question FileUpload ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" quiz Submission Id ") Ġquiz Submission Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" attempt ") Ġattempt : ĠInt , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" validation _ token ") Ġtoken : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" quiz _ questions [] [ id ]") Ġquestion Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" quiz _ questions [] [ answer ]") Ġanswer : ĠString ): ĠCall < Quiz Submission Question Response > ĊĊĠĠĠĠĠĠĠ Ġ@ POST ĊĠĠĠĠĠĠĠ Ġfun Ġpost Quiz Question Url (@ Url Ġurl : ĠString ): ĠCall < Quiz Submission Question Response > ĊĊĠĠĠĠĠĠĠ Ġ@ POST (" quiz _ submissions /{ quiz Submission Id }/ questions ") ĊĠĠĠĠĠĠĠ Ġfun Ġpost Quiz Question Ess ay ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" quiz Submission Id ") Ġquiz Submission Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" attempt ") Ġattempt : ĠInt , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" validation _ token ") Ġtoken : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" quiz _ questions [] [ id ]") Ġquestion Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query ( value Ġ= Ġ" quiz _ questions [] [ answer ]", Ġencoded Ġ= Ġtrue ) Ġanswer : ĠString ): ĠCall < Quiz Submission Question Response > ĊĊĠĠĠĠĠĠĠ Ġ@ POST (" quiz _ submissions /{ quiz Submission Id }/ questions ") ĊĠĠĠĠĠĠĠ Ġfun Ġpost Quiz Question Multi Choice ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" quiz Submission Id ") Ġquiz Submission Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" attempt ") Ġattempt : ĠInt , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" validation _ token ") Ġtoken : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" quiz _ questions [] [ id ]") Ġquestion Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" quiz _ questions [] [ answer ]") Ġanswer : ĠLong ): ĠCall < Quiz Submission Question Response > ĊĊĠĠĠĠĠĠĠ Ġ@ PUT (" quiz _ submissions /{ quiz Submission Id }/ questions /{ question Id }/{ flag }") ĊĠĠĠĠĠĠĠ Ġfun Ġput Flag Quiz Question ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" quiz Submission Id ") Ġquiz Submission Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" question Id ") Ġquestion Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Path (" flag ") Ġflag : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" attempt ") Ġattempt : ĠInt , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Query (" validation _ token ") Ġtoken : ĠString ): ĠCall < ResponseBody > ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Quiz ( course Id : ĠLong , Ġquiz Id : ĠLong , Ġadapter : ĠRest Builder , Ġcallback : ĠStatus Callback < Quiz >, Ġparams : ĠRest Params ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). get Quiz ( course Id , Ġquiz Id )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget First Page Submission Questions ( quiz Submission Id : ĠLong , Ġadapter : ĠRest Builder , Ġparams : ĠRest Params , Ġcallback : ĠStatus Callback < Quiz Submission Question Response >) Ġ{ ĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). getFirst Page Submission Questions ( quiz Submission Id )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun ĠgetNext Page Submission Questions ( next Url : ĠString , Ġadapter : ĠRest Builder , Ġparams : ĠRest Params , Ġcallback : ĠStatus Callback < Quiz Submission Question Response >) Ġ{ ĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). getNext Page Submission Questions ( next Url )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget First Page Qu izz es ( context Id : ĠLong , Ġforce Network : ĠBoolean , Ġadapter : ĠRest Builder , Ġcallback : ĠStatus Callback < List < Quiz >>) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġparams Ġ= ĠRest Params ( use PerPage QueryParam Ġ= Ġtrue , Ġis Force Read From Network Ġ= Ġforce Network ) ĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). getFirst Page Qu izz es ( context Id )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun ĠgetNext Page Qu izz es ( force Network : ĠBoolean , Ġnext Url : ĠString , Ġadapter : ĠRest Builder , Ġcallback : ĠStatus Callback < List < Quiz >>) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġparams Ġ= ĠRest Params ( use PerPage QueryParam Ġ= Ġtrue , Ġis Force Read From Network Ġ= Ġforce Network ) ĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). getNext Page Qu izz es ( next Url )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġedit Quiz ( course Id : ĠLong , Ġassignment Id : ĠLong , Ġbody : ĠQu iz Post Body Wrapper , Ġadapter : ĠRest Builder , Ġcallback : ĠStatus Callback < Quiz >, Ġparams : ĠRest Params ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build Serialize Null s ( Quiz Interface :: class . java , Ġparams ). edit Quiz ( course Id , Ġassignment Id , Ġbody )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Quiz Sub missions ( canvas Context : ĠCanvas Context , Ġquiz Id : ĠLong , Ġadapter : ĠRest Builder , Ġcallback : ĠStatus Callback < Quiz Submission Response >, Ġparams : ĠRest Params ) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( Status Callback . is First Page ( callback . link Headers )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). getFirst Page Quiz Sub missions ( canvas Context . id , Ġquiz Id )). enqueue ( callback ) ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġif Ġ( callback . link Headers Ġ!= Ġnull Ġ&& ĠStatus Callback . more Calls Exist ( callback . link Headers )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). getNext Page Quiz Sub missions ( callback . link Headers !!. next Url !! )). enqueue ( callback ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget First Page Quiz List ( canvas Context : ĠCanvas Context , Ġadapter : ĠRest Builder , Ġparams : ĠRest Params , Ġcallback : ĠStatus Callback < List < Quiz >>) Ġ{ ĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). getFirst Page Qu izz es List ( canvas Context . api Context (), Ġcanvas Context . id )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun ĠgetNext Page Quiz List ( next Url : ĠString , Ġadapter : ĠRest Builder , Ġparams : ĠRest Params , Ġcallback : ĠStatus Callback < List < Quiz >>) Ġ{ ĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). getNext Page Qu izz es List ( next Url )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Detailed Quiz ( canvas Context : ĠCanvas Context , Ġquiz Id : ĠLong , Ġadapter : ĠRest Builder , Ġparams : ĠRest Params , Ġcallback : ĠStatus Callback < Quiz >) Ġ{ ĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). get Detailed Quiz ( canvas Context . api Context (), Ġcanvas Context . id , Ġquiz Id )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Detailed Quiz By Url ( quiz Url : ĠString , Ġadapter : ĠRest Builder , Ġparams : ĠRest Params , Ġcallback : ĠStatus Callback < Quiz >) Ġ{ ĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). get Detailed Quiz By Url ( quiz Url )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġsubmit Quiz ( canvas Context : ĠCanvas Context , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission : ĠQu iz Submission , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġadapter : ĠRest Builder , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġparams : ĠRest Params , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcallback : ĠStatus Callback < Quiz Submission Response >) Ġ{ ĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). submit Quiz ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcanvas Context . api Context (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcanvas Context . id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . quiz Id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . attempt , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . validation Token !! )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget First Page Quiz Sub missions ( canvas Context : ĠCanvas Context , Ġquiz Id : ĠLong , Ġadapter : ĠRest Builder , Ġparams : ĠRest Params , Ġcallback : ĠStatus Callback < Quiz Submission Response >) Ġ{ ĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). getFirst Page Quiz Sub missions ( canvas Context . api Context (), Ġcanvas Context . id , Ġquiz Id )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġpost Quiz Started Event ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcanvas Context : ĠCanvas Context , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsubmission Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġuser Agent : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter : ĠRest Builder , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġparams : ĠRest Params , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcallback : ĠStatus Callback < ResponseBody >) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. post Quiz Started Event ( canvas Context . api Context (), Ġcanvas Context . id , Ġquiz Id , Ġsubmission Id , Ġ" android _ session _ started ", Ġuser Agent )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġstart Quiz ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcanvas Context : ĠCanvas Context , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter : ĠRest Builder , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġparams : ĠRest Params , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcallback : ĠStatus Callback < Quiz Submission Response >) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). start Quiz ( canvas Context . api Context (), Ġcanvas Context . id , Ġquiz Id )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Quiz Submission Time ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcanvas Context : ĠCanvas Context , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsubmission Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter : ĠRest Builder , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġparams : ĠRest Params , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcallback : ĠStatus Callback < Quiz Submission Time >) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). get Quiz Submission Time ( canvas Context . api Context (), Ġcanvas Context . id , Ġquiz Id , Ġsubmission Id )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġpost Quiz Submit ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcanvas Context : ĠCanvas Context , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission : ĠQu iz Submission , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter : ĠRest Builder , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġparams : ĠRest Params , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcallback : ĠStatus Callback < Quiz Submission Response >) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). post Quiz Submit ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcanvas Context . api Context (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcanvas Context . id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . quiz Id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . attempt , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . validation Token !! )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġpost Quiz Question FileUpload ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission : ĠQu iz Submission , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġanswer : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquestion Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter : ĠRest Builder , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġparams : ĠRest Params , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcallback : ĠStatus Callback < Quiz Submission Question Response >) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). post Quiz Question FileUpload ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . attempt , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . validation Token !! , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquestion Id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( answer Ġ== Ġ- 1 L ) Ġ"" Ġelse Ġanswer . toString () ĊĠĠĠĠĠĠĠ Ġ )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġfun Ġpost Quiz Question Matching ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission : ĠQu iz Submission , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquestion Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġanswers : ĠHashMap < Long , ĠInt >, ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter : ĠRest Builder , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġparams : ĠRest Params , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcallback : ĠStatus Callback < Quiz Submission Question Response >) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). post Quiz Question Url ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġbuild Matching Url ( quiz Submission . id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . attempt , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . validation Token !! , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquestion Id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġanswers ))). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġpost Quiz Question Multiple Dropdown ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission : ĠQu iz Submission , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquestion Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġanswers : ĠHashMap < String , ĠLong >, ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter : ĠRest Builder , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġparams : ĠRest Params , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcallback : ĠStatus Callback < Quiz Submission Question Response >) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). post Quiz Question Url ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġbuild Multiple Dropdown Url ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . attempt , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . validation Token !! , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquestion Id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġanswers ))). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġpost Quiz Question Multi Answers ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission : ĠQu iz Submission , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquestion Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġanswers : ĠArrayList < Long >, ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter : ĠRest Builder , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġparams : ĠRest Params , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcallback : ĠStatus Callback < Quiz Submission Question Response >) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). post Quiz Question Url ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġbuild Multi Answer Url ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . attempt , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . validation Token !! , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquestion Id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġanswers ))). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġpost Quiz Question Ess ay ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission : ĠQu iz Submission , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquestion Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġanswer : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter : ĠRest Builder , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġparams : ĠRest Params , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcallback : ĠStatus Callback < Quiz Submission Question Response >) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). post Quiz Question Ess ay ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . attempt , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . validation Token !! , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquestion Id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġanswer )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġpost Quiz Question Multi Choice ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsubmission Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġattempts : ĠInt , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquestion Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġanswer : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtoken : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter : ĠRest Builder , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġparams : ĠRest Params , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcallback : ĠStatus Callback < Quiz Submission Question Response >) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). post Quiz Question Multi Choice ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġsubmission Id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġattempts , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtoken , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquestion Id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġanswer )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġput Flag Quiz Question ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission : ĠQu iz Submission , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġquestion Id : ĠLong , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġflag Question : ĠBoolean , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter : ĠRest Builder , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġparams : ĠRest Params , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcallback : ĠStatus Callback < ResponseBody >) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġcallback . add Call ( adapter . build ( Quiz Interface :: class . java , Ġparams ). put Flag Quiz Question ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquestion Id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( flag Question ) Ġ" flag " Ġelse Ġ" un flag ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . attempt , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġquiz Submission . validation Token !! )). enqueue ( callback ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġbuild Multi Answer Url ( quiz Submission Id : ĠLong , Ġattempt : ĠInt , Ġvalidation Token : ĠString , Ġquestion Id : ĠLong , Ġanswers : ĠArrayList < Long >): ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġ// ĠBuild Ġthe Ġentire Ġrelative ĠURL Ġbecause ĠRet rofit Ġ 2 Ġforce fully Ġescap es Ġ@ Path Ġparams . ĠIt Ġwill Ġend Ġup Ġlooking Ġlike : ĊĠĠĠĠĠĠĠ Ġ// Ġquiz _ submissions /{ submission _ id }/ questions ? attempt ={ attempt }& validation _ token ={ validation _ token }& quiz _ questions [] [ id ] ={ question _ id }& quiz _ questions [] [ answer ][] ={ answer _ id } ... ĊĠĠĠĠĠĠĠ Ġval Ġurl Ġ= Ġ" quiz _ submissions /$ quiz Submission Id / questions ? attempt =$ attempt & validation _ token =$ validation Token & quiz _ questions [] [ id ] =$ question Id " ĊĠĠĠĠĠĠĠ Ġval Ġbuilder Ġ= ĠStringBuilder ( url ) ĊĠĠĠĠĠĠĠ Ġfor Ġ( answer Ġin Ġanswers ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbuilder . append ("& quiz _ questions [] [ answer ][] =$ answer ") ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn Ġbuilder . toString () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġbuild Matching Url ( quiz Submission Id : ĠLong , Ġattempt : ĠInt , Ġvalidation Token : ĠString , Ġquestion Id : ĠLong , Ġanswers : ĠHashMap < Long , ĠInt >): ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġ// ĠBuild Ġthe Ġentire Ġrelative ĠURL Ġbecause ĠRet rofit Ġ 2 Ġforce fully Ġescap es Ġ@ Path Ġparams . ĠIt Ġwill Ġend Ġup Ġlooking Ġlike : ĊĠĠĠĠĠĠĠ Ġ// Ġquiz _ submissions /{ submission _ id }/ questions ? attempt ={ attempt }& validation _ token ={ validation _ token }& quiz _ questions [] [ id ] ={ question _ id }& quiz _ questions [] [ answer ][] [ answer _ id ] ={ answer _ id }& quiz _ questions [] [ answer ][] [ match _ id ] ={ match _ id } ... ĊĠĠĠĠĠĠĠ Ġval Ġurl Ġ= Ġ" quiz _ submissions /$ quiz Submission Id / questions ? attempt =$ attempt & validation _ token =$ validation Token & quiz _ questions [] [ id ] =$ question Id " ĊĠĠĠĠĠĠĠ Ġval Ġbuilder Ġ= ĠStringBuilder ( url ) ĊĠĠĠĠĠĠĠ Ġ// ĠLoop Ġthrough Ġthe ĠHashMap Ġthat Ġcontains Ġthe Ġlist Ġof Ġanswers Ġand Ġtheir Ġmatches Ġthat Ġthe Ġuser Ġselected ĊĠĠĠĠĠĠĠ Ġfor Ġ(( key , Ġvalue ) Ġin Ġanswers ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbuilder . append ("& quiz _ questions [] [ answer ][] [ answer _ id ] =$ key & quiz _ questions [] [ answer ][] [ match _ id ] =$ value ") ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn Ġbuilder . toString () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġbuild Multiple Dropdown Url ( quiz Submission Id : ĠLong , Ġattempt : ĠInt , Ġvalidation Token : ĠString , Ġquestion Id : ĠLong , Ġanswers : ĠHashMap < String , ĠLong >): ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġ// ĠBuild Ġthe Ġentire Ġrelative ĠURL Ġbecause ĠRet rofit Ġ 2 Ġforce fully Ġescap es Ġ@ Path Ġparams . ĠIt Ġwill Ġend Ġup Ġlooking Ġlike : ĊĠĠĠĠĠĠĠ Ġ// Ġquiz _ submissions /{ submission _ id }/ questions ? attempt ={ attempt }& validation _ token ={ validation _ token }& quiz _ questions [] [ id ] ={ question _ id }& quiz _ questions [] [ answer ][ { answer Key }] ={ answer Value } ... ĊĠĠĠĠĠĠĠ Ġval Ġurl Ġ= Ġ" quiz _ submissions /$ quiz Submission Id / questions ? attempt =$ attempt & validation _ token =$ validation Token & quiz _ questions [] [ id ] =$ question Id " ĊĠĠĠĠĠĠĠ Ġval Ġbuilder Ġ= ĠStringBuilder ( url ) ĊĠĠĠĠĠĠĠ Ġ// ĠLoop Ġthrough Ġthe ĠHashMap Ġthat Ġcontains Ġthe Ġlist Ġof Ġanswers Ġand Ġtheir Ġmatches Ġthat Ġthe Ġuser Ġselected ĊĠĠĠĠĠĠĠ Ġfor Ġ(( key , Ġvalue ) Ġin Ġanswers ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbuilder . append ("& quiz _ questions [] [ answer ][$ key ] =$ value ") ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn Ġbuilder . toString () ĊĠĠĠ Ġ} Ċ } Ċ