From ed834908ced804bf42a149362564b4d0333e5fd9 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Waseeem <63727438+shaheen7890@users.noreply.github.com> Date: Thu, 22 Sep 2022 13:56:36 +0500 Subject: [PATCH 01/17] CUR-4054-create save token api (#1313) --- .../Api/V1/MicroSoftTeamController.php | 46 +++++++++++++++++++ .../Requests/V1/MSSaveAccessTokenRequest.php | 30 ++++++++++++ routes/api.php | 1 + 3 files changed, 77 insertions(+) create mode 100644 app/Http/Requests/V1/MSSaveAccessTokenRequest.php diff --git a/app/Http/Controllers/Api/V1/MicroSoftTeamController.php b/app/Http/Controllers/Api/V1/MicroSoftTeamController.php index 2fc177faa..071dadfdc 100644 --- a/app/Http/Controllers/Api/V1/MicroSoftTeamController.php +++ b/app/Http/Controllers/Api/V1/MicroSoftTeamController.php @@ -15,6 +15,7 @@ use Illuminate\Support\Facades\Http; use App\Http\Requests\V1\MSTeamCreateClassRequest; use App\Http\Requests\V1\MSTeamCreateAssignmentRequest; +use App\Http\Requests\V1\MSSaveAccessTokenRequest; use App\Models\Playlist; use App\Models\Project; use App\Models\Activity; @@ -107,6 +108,51 @@ public function getAccessToken(Request $request) } } + + /** + * Save Access Token + * + * Save GraphAPI access token in the database. + * + * @bodyParam access_token string required The stringified of the GraphAPI access token JSON object + * + * @response { + * "message": "Access token has been saved successfully." + * } + * + * @response 500 { + * "errors": [ + * "Validation error: Access token is required" + * ] + * } + * + * @response 500 { + * "errors": [ + * "Failed to save the token." + * ] + * } + * + * @param MSSaveAccessTokenRequest $accessTokenRequest + * @return Response + */ + public function saveAccessToken(MSSaveAccessTokenRequest $accessTokenRequest) + { + $data = $accessTokenRequest->validated(); + $authUser = auth()->user(); + $isUpdated = $this->userRepository->update([ + 'msteam_access_token' => $data['access_token'] + ], $authUser->id); + + if ($isUpdated) { + return response([ + 'message' => 'Access token has been saved successfully.', + ], 200); + } + + return response([ + 'errors' => ['Failed to save the token.'], + ], 500); + } /** * Get List of Classes diff --git a/app/Http/Requests/V1/MSSaveAccessTokenRequest.php b/app/Http/Requests/V1/MSSaveAccessTokenRequest.php new file mode 100644 index 000000000..ba2048797 --- /dev/null +++ b/app/Http/Requests/V1/MSSaveAccessTokenRequest.php @@ -0,0 +1,30 @@ + 'required' + ]; + } +} diff --git a/routes/api.php b/routes/api.php index eb592373b..cd53e8b5a 100644 --- a/routes/api.php +++ b/routes/api.php @@ -325,6 +325,7 @@ // Microsoft Team Share Route::group(['prefix' => 'microsoft-team'], function () { + Route::post('save-access-token', 'MicroSoftTeamController@saveAccessToken'); Route::get('classes', 'MicroSoftTeamController@getClasses'); Route::post('classes', 'MicroSoftTeamController@createMsTeamClass'); Route::post('classes/assignments', 'MicroSoftTeamController@createMsTeamAssignment'); From 85f40b6dd5fadfb637a2d4893f01fb2b55617eff Mon Sep 17 00:00:00 2001 From: Muhammad Basit Tkxel Date: Fri, 23 Sep 2022 12:34:30 +0500 Subject: [PATCH 02/17] [CUR-4157] Regenerate the API Docmentation --- public/docs/css/style.css | 3 +- resources/docs/source/.compare.md | 52009 +++++++++++++++------- resources/docs/source/index.md | 50245 +++++++++++++++------ resources/views/apidoc/index.blade.php | 52765 ++++++++++++++++------- 4 files changed, 110100 insertions(+), 44922 deletions(-) diff --git a/public/docs/css/style.css b/public/docs/css/style.css index 6486da2c0..ab759a224 100644 --- a/public/docs/css/style.css +++ b/public/docs/css/style.css @@ -1 +1,2 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.content h1,.content h2,.content h3,.content h4,.content h5,.content h6,body,html{font-family:Helvetica Neue,Helvetica,Arial,Microsoft Yahei,微软雅黑,STXihei,华文细黑,sans-serif;font-size:13px}.content h1,.content h2,.content h3,.content h4,.content h5,.content h6{font-weight:700}.content code,.content pre{font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;font-size:12px;line-height:1.5}.content code{word-break:break-all;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?v=#4.0.3);src:url(fonts/fontawesome-webfont.eot?#iefix&v=#4.0.3) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff?v=#4.0.3) format("woff"),url(fonts/fontawesome-webfont.ttf?v=#4.0.3) format("truetype"),url(fonts/fontawesome-webfont.svg#fontawesomeregular?v=#4.0.3) format("svg")}.content aside.notice:before,.content aside.success:before,.content aside.warning:before,.tocify-wrapper>.search:before{font-family:FontAwesome;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1}.content aside.warning:before{content:"\f06a"}.content aside.notice:before{content:"\f05a"}.content aside.success:before{content:"\f058"}.tocify-wrapper>.search:before{content:"\f002"}.highlight .c,.highlight .c1,.highlight .cm,.highlight .cs{color:#909090}.highlight,.highlight .w{background-color:#292929}.hljs{display:block;overflow-x:auto;padding:.5em;background:#23241f}.hljs,.hljs-subst,.hljs-tag{color:#f8f8f2}.hljs-emphasis,.hljs-strong{color:#a8a8a2}.hljs-bullet,.hljs-link,.hljs-literal,.hljs-number,.hljs-quote,.hljs-regexp{color:#ae81ff}.hljs-code,.hljs-section,.hljs-selector-class,.hljs-title{color:#a6e22e}.hljs-strong{font-weight:700}.hljs-emphasis{font-style:italic}.hljs-attr,.hljs-keyword,.hljs-name,.hljs-selector-tag{color:#f92672}.hljs-attribute,.hljs-symbol{color:#66d9ef}.hljs-class .hljs-title,.hljs-params{color:#f8f8f2}.hljs-addition,.hljs-built_in,.hljs-builtin-name,.hljs-selector-attr,.hljs-selector-id,.hljs-selector-pseudo,.hljs-string,.hljs-template-variable,.hljs-type,.hljs-variable{color:#e6db74}.hljs-comment,.hljs-deletion,.hljs-meta{color:#75715e}body,html{color:#333;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#eaf2f6;height:100%;-webkit-text-size-adjust:none}#toc>ul>li>a>span{float:right;background-color:#2484ff;border-radius:40px;width:20px}.tocify-wrapper{transition:left .3s ease-in-out;overflow-y:auto;overflow-x:hidden;position:fixed;z-index:30;top:0;left:0;bottom:0;width:230px;background-color:#393939;font-size:13px;font-weight:700}.tocify-wrapper .lang-selector{display:none}.tocify-wrapper .lang-selector a{padding-top:.5em;padding-bottom:.5em}.tocify-wrapper>img{display:block}.tocify-wrapper>.search{position:relative}.tocify-wrapper>.search input{background:#393939;border-width:0 0 1px;border-color:#666;padding:6px 0 6px 20px;box-sizing:border-box;margin:10px 15px;width:200px;outline:0;color:#fff;border-radius:0}.tocify-wrapper>.search:before{position:absolute;top:17px;left:15px;color:#fff}.tocify-wrapper img+.tocify{margin-top:20px}.tocify-wrapper .search-results{margin-top:0;box-sizing:border-box;height:0;overflow-y:auto;overflow-x:hidden;transition-property:height,margin;transition-duration:.18s;transition-timing-function:ease-in-out;background:linear-gradient(180deg,rgba(0,0,0,.2),transparent 8px),linear-gradient(0deg,rgba(0,0,0,.2),transparent 8px),linear-gradient(180deg,#000,transparent 1.5px),linear-gradient(0deg,#939393,hsla(0,0%,58%,0) 1.5px),#262626}.tocify-wrapper .search-results.visible{height:30%;margin-bottom:1em}.tocify-wrapper .search-results li{margin:1em 15px;line-height:1}.tocify-wrapper .search-results a{color:#fff;text-decoration:none}.tocify-wrapper .search-results a:hover{text-decoration:underline}.tocify-wrapper .toc-footer li,.tocify-wrapper .tocify-item>a{padding:0 15px;display:block;overflow-x:hidden;white-space:nowrap;text-overflow:ellipsis}.tocify-wrapper li,.tocify-wrapper ul{list-style:none;margin:0;padding:0;line-height:28px}.tocify-wrapper li{color:#fff;transition-property:background;transition-timing-function:linear;transition-duration:.23s}.tocify-wrapper .tocify-focus{box-shadow:0 1px 0 #000;background-color:#2467af;color:#fff}.tocify-wrapper .tocify-subheader{display:none;background-color:#262626;font-weight:500;background:linear-gradient(180deg,rgba(0,0,0,.2),transparent 8px),linear-gradient(0deg,rgba(0,0,0,.2),transparent 8px),linear-gradient(180deg,#000,transparent 1.5px),linear-gradient(0deg,#939393,hsla(0,0%,58%,0) 1.5px),#262626}.tocify-wrapper .tocify-subheader .tocify-item>a{padding-left:25px;font-size:12px}.tocify-wrapper .tocify-subheader>li:last-child{box-shadow:none}.tocify-wrapper .toc-footer{padding:1em 0;margin-top:1em;border-top:1px dashed #666}.tocify-wrapper .toc-footer a,.tocify-wrapper .toc-footer li{color:#fff;text-decoration:none}.tocify-wrapper .toc-footer a:hover{text-decoration:underline}.tocify-wrapper .toc-footer li{font-size:.8em;line-height:1.7;text-decoration:none}#nav-button{padding:0 1.5em 5em 0;display:none;position:fixed;top:0;left:0;z-index:100;color:#000;text-decoration:none;font-weight:700;opacity:.7;line-height:16px;transition:left .3s ease-in-out}#nav-button span{display:block;padding:6px;background-color:rgba(234,242,246,.7);-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:rotate(-90deg) translate(-100%);transform:rotate(-90deg) translate(-100%);border-radius:0 0 0 5px}#nav-button img{height:16px;vertical-align:bottom}#nav-button:hover{opacity:1}#nav-button.open{left:230px}.page-wrapper{margin-left:230px;position:relative;z-index:10;background-color:#eaf2f6;min-height:100%;padding-bottom:1px}.page-wrapper .dark-box{width:50%;background-color:#393939;position:absolute;right:0;top:0;bottom:0}.page-wrapper .lang-selector{position:fixed;z-index:50;border-bottom:5px solid #393939}.lang-selector{background-color:#222;width:100%;font-weight:700}.lang-selector a{display:block;float:left;color:#fff;text-decoration:none;padding:0 10px;line-height:30px;outline:0}.lang-selector a:active,.lang-selector a:focus{background-color:#111;color:#fff}.lang-selector a.active{background-color:#393939;color:#fff}.lang-selector:after{content:'';clear:both;display:block}.content{position:relative;z-index:30}.content:after{content:'';display:block;clear:both}.content>aside,.content>dl,.content>h1,.content>h2,.content>h3,.content>h4,.content>h5,.content>h6,.content>ol,.content>p,.content>table,.content>ul{margin-right:50%;padding:0 28px;box-sizing:border-box;display:block;text-shadow:0 1px 0 #fff}.content>ol,.content>ul{padding-left:43px}.content>div,.content>h1,.content>h2{clear:both}.content h1{font-size:30px;padding-top:.5em;padding-bottom:.5em;border-bottom:1px solid #ccc;margin-bottom:21px;margin-top:2em;border-top:1px solid #ddd;background-image:linear-gradient(180deg,#fff,#f9f9f9)}.content div:first-child+h1,.content h1:first-child{border-top-width:0;margin-top:0}.content h2{font-size:20px;margin-top:4em;margin-bottom:0;border-top:1px solid #ccc;padding-top:1.2em;padding-bottom:1.2em;background-image:linear-gradient(180deg,hsla(0,0%,100%,.4),hsla(0,0%,100%,0))}.content h1+div+h2,.content h1+h2{margin-top:-21px;border-top:none}.content h3,.content h4,.content h5,.content h6{font-size:15px;margin-top:2.5em;margin-bottom:.8em}.content h4,.content h5,.content h6{font-size:10px}.content hr{margin:2em 0;border-top:2px solid #393939;border-bottom:2px solid #eaf2f6}.content table{margin-bottom:1em;overflow:auto}.content table td,.content table th{text-align:left;vertical-align:top;line-height:1.6}.content table th{padding:5px 10px;border-bottom:1px solid #ccc;vertical-align:bottom}.content table td{padding:10px}.content table tr:last-child{border-bottom:1px solid #ccc}.content table tr:nth-child(odd)>td{background-color:#ebf3f6}.content table tr:nth-child(even)>td{background-color:#ebf2f6}.content dt{font-weight:700}.content dd{margin-left:15px}.content dd,.content dt,.content li,.content p{line-height:1.6;margin-top:0}.content img{max-width:100%}.content code{background-color:rgba(0,0,0,.05);padding:3px;border-radius:3px}.content pre>code{background-color:transparent;padding:0}.content aside{padding-top:1em;padding-bottom:1em;text-shadow:0 1px 0 #a0c6da;margin-top:1.5em;margin-bottom:1.5em;background:#8fbcd4;line-height:1.6}.content aside.warning{background-color:#c97a7e;text-shadow:0 1px 0 #d18e91}.content aside.success{background-color:#6ac174;text-shadow:0 1px 0 #80ca89}.content aside:before{vertical-align:middle;padding-right:.5em;font-size:14px}.content .search-highlight{padding:2px;margin:-2px;border-radius:4px;border:1px solid #f7e633;text-shadow:1px 1px 0 #666;background:linear-gradient(to top left,#f7e633,#f1d32f)}.content blockquote,.content pre{background-color:#292929;color:#fff;padding:2em 28px;margin:0;width:50%;float:right;clear:right;box-sizing:border-box;text-shadow:0 1px 2px rgba(0,0,0,.4)}.content blockquote>p,.content pre>p{margin:0}.content blockquote a,.content pre a{color:#fff;text-decoration:none;border-bottom:1px dashed #ccc}.content blockquote>p{background-color:#1c1c1c;border-radius:5px;padding:13px;color:#ccc;border-top:1px solid #000;border-bottom:1px solid #404040}@media (max-width:930px){.tocify-wrapper{left:-230px}.tocify-wrapper.open{left:0}.page-wrapper{margin-left:0}#nav-button{display:block}.tocify-wrapper .tocify-item>a{padding-top:.3em;padding-bottom:.3em}}@media (max-width:700px){.dark-box{display:none}.tocify-wrapper .lang-selector{display:block}.page-wrapper .lang-selector{display:none}.content aside,.content dl,.content h1,.content h2,.content h3,.content h4,.content h5,.content h6,.content ol,.content p,.content table,.content ul{margin-right:0}.content blockquote,.content pre{float:none;width:auto}}.tocify-wrapper li{color:#000}.tocify-wrapper{background:#fff}.tocify-wrapper .search-results,.tocify-wrapper .toc-footer,.tocify-wrapper .tocify-subheader{background:#eee}.tocify-wrapper img{margin:0 auto}.tocify-wrapper>.search:before{color:#4169e1}.tocify-wrapper>.search input{color:#000;background:#fff}.tocify-wrapper .toc-footer a,.tocify-wrapper .toc-footer li{color:#000} \ No newline at end of file +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.content h1,.content h2,.content h3,.content h4,.content h5,.content h6,body,html{font-family:Helvetica Neue,Helvetica,Arial,Microsoft Yahei,微软雅黑,STXihei,华文细黑,sans-serif;font-size:13px}.content h1,.content h2,.content h3,.content h4,.content h5,.content h6{font-weight:700}.content code,.content pre{font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;font-size:12px;line-height:1.5}.content code{word-break:break-all;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?v=#4.0.3);src:url(fonts/fontawesome-webfont.eot?#iefix&v=#4.0.3) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff?v=#4.0.3) format("woff"),url(fonts/fontawesome-webfont.ttf?v=#4.0.3) format("truetype"),url(fonts/fontawesome-webfont.svg#fontawesomeregular?v=#4.0.3) format("svg")}.content aside.notice:before,.content aside.success:before,.content aside.warning:before,.tocify-wrapper>.search:before{font-family:FontAwesome;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1}.content aside.warning:before{content:"\f06a"}.content aside.notice:before{content:"\f05a"}.content aside.success:before{content:"\f058"}.tocify-wrapper>.search:before{content:"\f002"}.highlight .c,.highlight .c1,.highlight .cm,.highlight .cs{color:#909090}.highlight,.highlight .w{background-color:#292929}.hljs{display:block;overflow-x:auto;padding:.5em;background:#23241f}.hljs,.hljs-subst,.hljs-tag{color:#f8f8f2}.hljs-emphasis,.hljs-strong{color:#a8a8a2}.hljs-bullet,.hljs-link,.hljs-literal,.hljs-number,.hljs-quote,.hljs-regexp{color:#ae81ff}.hljs-code,.hljs-section,.hljs-selector-class,.hljs-title{color:#a6e22e}.hljs-strong{font-weight:700}.hljs-emphasis{font-style:italic}.hljs-attr,.hljs-keyword,.hljs-name,.hljs-selector-tag{color:#f92672}.hljs-attribute,.hljs-symbol{color:#66d9ef}.hljs-class .hljs-title,.hljs-params{color:#f8f8f2}.hljs-addition,.hljs-built_in,.hljs-builtin-name,.hljs-selector-attr,.hljs-selector-id,.hljs-selector-pseudo,.hljs-string,.hljs-template-variable,.hljs-type,.hljs-variable{color:#e6db74}.hljs-comment,.hljs-deletion,.hljs-meta{color:#75715e}body,html{color:#333;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#eaf2f6;height:100%;-webkit-text-size-adjust:none}#toc>ul>li>a>span{float:right;background-color:#2484ff;border-radius:40px;width:20px}.tocify-wrapper{transition:left .3s ease-in-out;overflow-y:auto;overflow-x:hidden;position:fixed;z-index:30;top:0;left:0;bottom:0;width:230px;background-color:#393939;font-size:13px;font-weight:700}.tocify-wrapper .lang-selector{display:none}.tocify-wrapper .lang-selector a{padding-top:.5em;padding-bottom:.5em}.tocify-wrapper>img{display:block}.tocify-wrapper>.search{position:relative}.tocify-wrapper>.search input{background:#393939;border-width:0 0 1px;border-color:#666;padding:6px 0 6px 20px;box-sizing:border-box;margin:10px 15px;width:200px;outline:none;color:#fff;border-radius:0}.tocify-wrapper>.search:before{position:absolute;top:17px;left:15px;color:#fff}.tocify-wrapper img+.tocify{margin-top:20px}.tocify-wrapper .search-results{margin-top:0;box-sizing:border-box;height:0;overflow-y:auto;overflow-x:hidden;transition-property:height,margin;transition-duration:.18s;transition-timing-function:ease-in-out;background:linear-gradient(180deg,rgba(0,0,0,.2),transparent 8px),linear-gradient(0deg,rgba(0,0,0,.2),transparent 8px),linear-gradient(180deg,#000,transparent 1.5px),linear-gradient(0deg,#939393,hsla(0,0%,58%,0) 1.5px),#262626}.tocify-wrapper .search-results.visible{height:30%;margin-bottom:1em}.tocify-wrapper .search-results li{margin:1em 15px;line-height:1}.tocify-wrapper .search-results a{color:#fff;text-decoration:none}.tocify-wrapper .search-results a:hover{text-decoration:underline}.tocify-wrapper .toc-footer li,.tocify-wrapper .tocify-item>a{padding:0 15px;display:block;overflow-x:hidden;white-space:nowrap;text-overflow:ellipsis}.tocify-wrapper li,.tocify-wrapper ul{list-style:none;margin:0;padding:0;line-height:28px}.tocify-wrapper li{color:#fff;transition-property:background;transition-timing-function:linear;transition-duration:.23s}.tocify-wrapper .tocify-focus{box-shadow:0 1px 0 #000;background-color:#2467af;color:#fff}.tocify-wrapper .tocify-subheader{display:none;background-color:#262626;font-weight:500;background:linear-gradient(180deg,rgba(0,0,0,.2),transparent 8px),linear-gradient(0deg,rgba(0,0,0,.2),transparent 8px),linear-gradient(180deg,#000,transparent 1.5px),linear-gradient(0deg,#939393,hsla(0,0%,58%,0) 1.5px),#262626}.tocify-wrapper .tocify-subheader .tocify-item>a{padding-left:25px;font-size:12px}.tocify-wrapper .tocify-subheader>li:last-child{box-shadow:none}.tocify-wrapper .toc-footer{padding:1em 0;margin-top:1em;border-top:1px dashed #666}.tocify-wrapper .toc-footer a,.tocify-wrapper .toc-footer li{color:#fff;text-decoration:none}.tocify-wrapper .toc-footer a:hover{text-decoration:underline}.tocify-wrapper .toc-footer li{font-size:.8em;line-height:1.7;text-decoration:none}#nav-button{padding:0 1.5em 5em 0;display:none;position:fixed;top:0;left:0;z-index:100;color:#000;text-decoration:none;font-weight:700;opacity:.7;line-height:16px;transition:left .3s ease-in-out}#nav-button span{display:block;padding:6px;background-color:rgba(234,242,246,.7);-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:rotate(-90deg) translate(-100%);transform:rotate(-90deg) translate(-100%);border-radius:0 0 0 5px}#nav-button img{height:16px;vertical-align:bottom}#nav-button:hover{opacity:1}#nav-button.open{left:230px}.page-wrapper{margin-left:230px;position:relative;z-index:10;background-color:#eaf2f6;min-height:100%;padding-bottom:1px}.page-wrapper .dark-box{width:50%;background-color:#393939;position:absolute;right:0;top:0;bottom:0}.page-wrapper .lang-selector{position:fixed;z-index:50;border-bottom:5px solid #393939}.lang-selector{background-color:#222;width:100%;font-weight:700}.lang-selector a{display:block;float:left;color:#fff;text-decoration:none;padding:0 10px;line-height:30px;outline:0}.lang-selector a:active,.lang-selector a:focus{background-color:#111;color:#fff}.lang-selector a.active{background-color:#393939;color:#fff}.lang-selector:after{content:'';clear:both;display:block}.content{position:relative;z-index:30}.content:after{content:'';display:block;clear:both}.content>aside,.content>dl,.content>h1,.content>h2,.content>h3,.content>h4,.content>h5,.content>h6,.content>ol,.content>p,.content>table,.content>ul{margin-right:50%;padding:0 28px;box-sizing:border-box;display:block;text-shadow:0 1px 0 #fff}.content>ol,.content>ul{padding-left:43px}.content>div,.content>h1,.content>h2{clear:both}.content h1{font-size:30px;padding-top:.5em;padding-bottom:.5em;border-bottom:1px solid #ccc;margin-bottom:21px;margin-top:2em;border-top:1px solid #ddd;background-image:linear-gradient(180deg,#fff,#f9f9f9)}.content div:first-child+h1,.content h1:first-child{border-top-width:0;margin-top:0}.content h2{font-size:20px;margin-top:4em;margin-bottom:0;border-top:1px solid #ccc;padding-top:1.2em;padding-bottom:1.2em;background-image:linear-gradient(180deg,hsla(0,0%,100%,.4),hsla(0,0%,100%,0))}.content h1+div+h2,.content h1+h2{margin-top:-21px;border-top:none}.content h3,.content h4,.content h5,.content h6{font-size:15px;margin-top:2.5em;margin-bottom:.8em}.content h4,.content h5,.content h6{font-size:10px}.content hr{margin:2em 0;border-top:2px solid #393939;border-bottom:2px solid #eaf2f6}.content table{margin-bottom:1em;overflow:auto}.content table td,.content table th{text-align:left;vertical-align:top;line-height:1.6}.content table th{padding:5px 10px;border-bottom:1px solid #ccc;vertical-align:bottom}.content table td{padding:10px}.content table tr:last-child{border-bottom:1px solid #ccc}.content table tr:nth-child(odd)>td{background-color:#ebf3f6}.content table tr:nth-child(even)>td{background-color:#ebf2f6}.content dt{font-weight:700}.content dd{margin-left:15px}.content dd,.content dt,.content li,.content p{line-height:1.6;margin-top:0}.content img{max-width:100%}.content code{background-color:rgba(0,0,0,.05);padding:3px;border-radius:3px}.content pre>code{background-color:transparent;padding:0}.content aside{padding-top:1em;padding-bottom:1em;text-shadow:0 1px 0 #a0c6da;margin-top:1.5em;margin-bottom:1.5em;background:#8fbcd4;line-height:1.6}.content aside.warning{background-color:#c97a7e;text-shadow:0 1px 0 #d18e91}.content aside.success{background-color:#6ac174;text-shadow:0 1px 0 #80ca89}.content aside:before{vertical-align:middle;padding-right:.5em;font-size:14px}.content .search-highlight{padding:2px;margin:-2px;border-radius:4px;border:1px solid #f7e633;text-shadow:1px 1px 0 #666;background:linear-gradient(to top left,#f7e633,#f1d32f)}.content blockquote,.content pre{background-color:#292929;color:#fff;padding:2em 28px;margin:0;width:50%;float:right;clear:right;box-sizing:border-box;text-shadow:0 1px 2px rgba(0,0,0,.4)}.content blockquote>p,.content pre>p{margin:0}.content blockquote a,.content pre a{color:#fff;text-decoration:none;border-bottom:1px dashed #ccc}.content blockquote>p{background-color:#1c1c1c;border-radius:5px;padding:13px;color:#ccc;border-top:1px solid #000;border-bottom:1px solid #404040}@media (max-width:930px){.tocify-wrapper{left:-230px}.tocify-wrapper.open{left:0}.page-wrapper{margin-left:0}#nav-button{display:block}.tocify-wrapper .tocify-item>a{padding-top:.3em;padding-bottom:.3em}}@media (max-width:700px){.dark-box{display:none}.tocify-wrapper .lang-selector{display:block}.page-wrapper .lang-selector{display:none}.content aside,.content dl,.content h1,.content h2,.content h3,.content h4,.content h5,.content h6,.content ol,.content p,.content table,.content ul{margin-right:0}.content blockquote,.content pre{float:none;width:auto}} +.tocify-wrapper .toc-footer a,.tocify-wrapper .toc-footer li,.tocify-wrapper li{color:#000}.tocify-wrapper{background:#fff}.tocify-wrapper .search-results,.tocify-wrapper .toc-footer,.tocify-wrapper .tocify-subheader{background:#eee}.tocify-wrapper img{margin:0 auto}.tocify-wrapper>.search:before{color:#4169e1}.tocify-wrapper>.search input{color:#000;background:#fff} \ No newline at end of file diff --git a/resources/docs/source/.compare.md b/resources/docs/source/.compare.md index 6780ecdd1..b16d40cbe 100644 --- a/resources/docs/source/.compare.md +++ b/resources/docs/source/.compare.md @@ -18,7 +18,7 @@ toc_footers: # Info Welcome to the generated API reference. -[Get Postman Collection](http://localhost:8082/api/docs/collection.json) +[Get Postman Collection](http://localhost:8000/docs/collection.json) @@ -33,7 +33,7 @@ APIs for Authentication ```bash curl -X POST \ - "http://localhost:8082/api/api/register" \ + "http://localhost:8000/api/register" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"first_name":"John","last_name":"Doe","email":"john.doe@currikistudio.org","password":"Password123","organization_name":"Curriki","organization_type":"Nonprofit","job_title":"Developer","domain":"currikistudio"}' @@ -42,7 +42,7 @@ curl -X POST \ ```javascript const url = new URL( - "http://localhost:8082/api/api/register" + "http://localhost:8000/api/register" ); let headers = { @@ -74,7 +74,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/register', + 'http://localhost:8000/api/register', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -100,7 +100,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/register' +url = 'http://localhost:8000/api/register' payload = { "first_name": "John", "last_name": "Doe", @@ -161,7 +161,7 @@ Parameter | Type | Status | Description ```bash curl -X POST \ - "http://localhost:8082/api/api/login" \ + "http://localhost:8000/api/login" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"email":"john.doe@currikistudio.org","password":"Password123","domain":"curriki"}' @@ -170,7 +170,7 @@ curl -X POST \ ```javascript const url = new URL( - "http://localhost:8082/api/api/login" + "http://localhost:8000/api/login" ); let headers = { @@ -197,7 +197,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/login', + 'http://localhost:8000/api/login', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -218,7 +218,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/login' +url = 'http://localhost:8000/api/login' payload = { "email": "john.doe@currikistudio.org", "password": "Password123", @@ -300,7 +300,7 @@ Parameter | Type | Status | Description ```bash curl -X POST \ - "http://localhost:8082/api/api/admin/login" \ + "http://localhost:8000/api/admin/login" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"email":"john.doe@currikistudio.org","password":"Password123"}' @@ -309,7 +309,7 @@ curl -X POST \ ```javascript const url = new URL( - "http://localhost:8082/api/api/admin/login" + "http://localhost:8000/api/admin/login" ); let headers = { @@ -335,7 +335,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/admin/login', + 'http://localhost:8000/api/admin/login', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -355,7 +355,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/admin/login' +url = 'http://localhost:8000/api/admin/login' payload = { "email": "john.doe@currikistudio.org", "password": "Password123" @@ -435,7 +435,7 @@ Parameter | Type | Status | Description ```bash curl -X POST \ - "http://localhost:8082/api/api/login/google" \ + "http://localhost:8000/api/login/google" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"tokenId":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjJjNmZh...","tokenObj":{"token_type":"Bearer","access_token":"ya29.a0AfH6SMBx-CIZfKRorxn8xPugO...","scope":"email profile ...","login_hint":"AJDLj6JUa8yxXrhHdWRHIV0...","expires_in":3599,"id_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6I...","session_state":{"extraQueryParams":{"authuser":"0"}},"first_issued_at":1601535932504,"expires_at":1601539531504,"idpId":"google"}}' @@ -444,7 +444,7 @@ curl -X POST \ ```javascript const url = new URL( - "http://localhost:8082/api/api/login/google" + "http://localhost:8000/api/login/google" ); let headers = { @@ -485,7 +485,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/login/google', + 'http://localhost:8000/api/login/google', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -520,7 +520,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/login/google' +url = 'http://localhost:8000/api/login/google' payload = { "tokenId": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjJjNmZh...", "tokenObj": { @@ -602,25 +602,23 @@ Parameter | Type | Status | Description - -## Forgot Password - -Send a password reset link to the given user. + +## Login with LTI SSO 1.0 > Example request: ```bash curl -X POST \ - "http://localhost:8082/api/api/forgot-password" \ + "http://localhost:8000/api/login/sso" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ - -d '{"email":"john.doe@currikistudio.org"}' + -d '{"sso_info":"dXNlcl9rZXk9YWFobWFkJnVzZXJfZW1haWw9YXFlZWwuYWhtYWQlNDB..."}' ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/forgot-password" + "http://localhost:8000/api/login/sso" ); let headers = { @@ -629,7 +627,7 @@ let headers = { }; let body = { - "email": "john.doe@currikistudio.org" + "sso_info": "dXNlcl9rZXk9YWFobWFkJnVzZXJfZW1haWw9YXFlZWwuYWhtYWQlNDB..." } fetch(url, { @@ -645,14 +643,14 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/forgot-password', + 'http://localhost:8000/api/login/sso', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ - 'email' => 'john.doe@currikistudio.org', + 'sso_info' => 'dXNlcl9rZXk9YWFobWFkJnVzZXJfZW1haWw9YXFlZWwuYWhtYWQlNDB...', ], ] ); @@ -664,9 +662,9 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/forgot-password' +url = 'http://localhost:8000/api/login/sso' payload = { - "email": "john.doe@currikistudio.org" + "sso_info": "dXNlcl9rZXk9YWFobWFkJnVzZXJfZW1haWw9YXFlZWwuYWhtYWQlNDB..." } headers = { 'Content-Type': 'application/json', @@ -677,52 +675,63 @@ response.json() ``` -> Example response (200): +> Example response (400): ```json { - "message": "Password reset email has been sent. Please follow the instructions." + "errors": [ + "Unable to login with LTI SSO." + ] } ``` -> Example response (400): +> Example response (200): ```json { - "errors": [ - "Email is not verified." - ] + "user": { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "organization_name": "Curriki", + "organization_type": null, + "job_title": "Developer", + "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", + "phone_number": "+1234567890", + "website": "www.currikistudio.org", + "subscribed": true + }, + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." } ``` ### HTTP Request -`POST api/forgot-password` +`POST api/login/sso` #### Body Parameters Parameter | Type | Status | Description --------- | ------- | ------- | ------- | ----------- - `email` | string | required | The email of a user + `sso_info` | string | required | The base64encode query params - - - -## Reset Password + -Reset the given user's password. + +## Login with LTI SSO > Example request: ```bash curl -X POST \ - "http://localhost:8082/api/api/reset-password" \ + "http://localhost:8000/api/login/lti-sso" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ - -d '{"token":"ya29.a0AfH6SMBx-CIZfKRorxn8xPugO...","email":"john.doe@currikistudio.org","password":"Password123","password_confirmation":"Password123"}' + -d '{"sso_info":"dXNlcl9rZXk9YWFobWFkJnVzZXJfZW1haWw9YXFlZWwuYWhtYWQlNDB..."}' ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/reset-password" + "http://localhost:8000/api/login/lti-sso" ); let headers = { @@ -731,10 +740,7 @@ let headers = { }; let body = { - "token": "ya29.a0AfH6SMBx-CIZfKRorxn8xPugO...", - "email": "john.doe@currikistudio.org", - "password": "Password123", - "password_confirmation": "Password123" + "sso_info": "dXNlcl9rZXk9YWFobWFkJnVzZXJfZW1haWw9YXFlZWwuYWhtYWQlNDB..." } fetch(url, { @@ -750,17 +756,14 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/reset-password', + 'http://localhost:8000/api/login/lti-sso', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ - 'token' => 'ya29.a0AfH6SMBx-CIZfKRorxn8xPugO...', - 'email' => 'john.doe@currikistudio.org', - 'password' => 'Password123', - 'password_confirmation' => 'Password123', + 'sso_info' => 'dXNlcl9rZXk9YWFobWFkJnVzZXJfZW1haWw9YXFlZWwuYWhtYWQlNDB...', ], ] ); @@ -772,12 +775,9 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/reset-password' +url = 'http://localhost:8000/api/login/lti-sso' payload = { - "token": "ya29.a0AfH6SMBx-CIZfKRorxn8xPugO...", - "email": "john.doe@currikistudio.org", - "password": "Password123", - "password_confirmation": "Password123" + "sso_info": "dXNlcl9rZXk9YWFobWFkJnVzZXJfZW1haWw9YXFlZWwuYWhtYWQlNDB..." } headers = { 'Content-Type': 'application/json', @@ -788,53 +788,63 @@ response.json() ``` -> Example response (200): +> Example response (400): ```json { - "message": "Password has been reset successfully." + "errors": [ + "Unable to login with LTI SSO." + ] } ``` -> Example response (401): +> Example response (200): ```json { - "error": "Invalid request." + "user": { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "organization_name": "Curriki", + "organization_type": null, + "job_title": "Developer", + "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", + "phone_number": "+1234567890", + "website": "www.currikistudio.org", + "subscribed": true + }, + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." } ``` ### HTTP Request -`POST api/reset-password` +`POST api/login/lti-sso` #### Body Parameters Parameter | Type | Status | Description --------- | ------- | ------- | ------- | ----------- - `token` | string | required | The token for reset password - `email` | string | required | The email of a user - `password` | string | required | The new password - `password_confirmation` | string | required | The confirmation of password + `sso_info` | string | required | The base64encode query params - + - -## Verify an Email Address - -Mark the authenticated user's email address as verified. + +## Wordpress SSO: Execute wordpress sso authentication > Example request: ```bash curl -X POST \ - "http://localhost:8082/api/api/verify-email" \ + "http://localhost:8000/api/login/wordpress-sso" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ - -d '{"id":1,"hash":"9e0f70124a2a88d5435...","signature":"467fbe9a00e7d367553f...","expires":1599754915}' + -d '{"clientId":"est","code":"sit"}' ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/verify-email" + "http://localhost:8000/api/login/wordpress-sso" ); let headers = { @@ -843,10 +853,8 @@ let headers = { }; let body = { - "id": 1, - "hash": "9e0f70124a2a88d5435...", - "signature": "467fbe9a00e7d367553f...", - "expires": 1599754915 + "clientId": "est", + "code": "sit" } fetch(url, { @@ -862,17 +870,15 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/verify-email', + 'http://localhost:8000/api/login/wordpress-sso', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ - 'id' => 1, - 'hash' => '9e0f70124a2a88d5435...', - 'signature' => '467fbe9a00e7d367553f...', - 'expires' => 1599754915, + 'clientId' => 'est', + 'code' => 'sit', ], ] ); @@ -884,12 +890,10 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/verify-email' +url = 'http://localhost:8000/api/login/wordpress-sso' payload = { - "id": 1, - "hash": "9e0f70124a2a88d5435...", - "signature": "467fbe9a00e7d367553f...", - "expires": 1599754915 + "clientId": "est", + "code": "sit" } headers = { 'Content-Type': 'application/json', @@ -900,40 +904,40 @@ response.json() ``` -> Example response (204): +> Example response (500): ```json -{} +{ + "message": "Server Error" +} ``` ### HTTP Request -`POST api/verify-email` +`POST api/login/wordpress-sso` #### Body Parameters Parameter | Type | Status | Description --------- | ------- | ------- | ------- | ----------- - `id` | integer | required | The Id of a user - `hash` | string | required | The hash string - `signature` | string | required | The signature - `expires` | integer | required | The expire time of verification email + `clientId` | string | optional | client id for the integration: 7PwnyVuYIWJtdKYIzvxBpo5wFAizj12F6WU8qFta + `code` | string | optional | temporary token for sso : 7PwnyVuYIWJtdKYIzvxBpo5wFAizj12F6WU8qFta - + - -## Logout + +## Wordpress SSO: Get default settings for a particular wordpress sso integration > Example request: ```bash -curl -X POST \ - "http://localhost:8082/api/api/logout" \ +curl -X GET \ + -G "http://localhost:8000/api/login/wordpress-sso-settings/1" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/logout" + "http://localhost:8000/api/login/wordpress-sso-settings/1" ); let headers = { @@ -942,7 +946,7 @@ let headers = { }; fetch(url, { - method: "POST", + method: "GET", headers: headers, }) .then(response => response.json()) @@ -952,8 +956,8 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->post( - 'http://localhost:8082/api/api/logout', +$response = $client->get( + 'http://localhost:8000/api/login/wordpress-sso-settings/1', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -969,51 +973,142 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/logout' +url = 'http://localhost:8000/api/login/wordpress-sso-settings/1' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('POST', url, headers=headers) +response = requests.request('GET', url, headers=headers) response.json() ``` -> Example response (200): +> Example response (500): ```json { - "message": "You have been successfully logged out." + "message": "Server Error" } ``` ### HTTP Request -`POST api/logout` +`GET api/login/wordpress-sso-settings/{clientId}` +#### URL Parameters - +Parameter | Status | Description +--------- | ------- | ------- | ------- + `client` | optional | id for the integration: 7PwnyVuYIWJtdKYIzvxBpo5wFAizj12F6WU8qFta -#2. User + + +## Oaut Redirect -APIs for user management - -## Get All User Organizations +> Example request: -Get a list of the users organizations +```bash +curl -X GET \ + -G "http://localhost:8000/api/oauth/1/redirect" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/oauth/1/redirect" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/oauth/1/redirect', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/oauth/1/redirect' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (404): + +```json +null +``` +> Example response (200): + +```json +{ + "user": { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "organization_name": "Curriki", + "organization_type": null, + "job_title": "Developer", + "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", + "phone_number": "+1234567890", + "website": "www.currikistudio.org", + "subscribed": true + }, + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." +} +``` + +### HTTP Request +`GET api/oauth/{provider}/redirect` + + + + + +## Oaut oauthCallBack > Example request: ```bash curl -X GET \ - -G "http://localhost:8082/api/api/v1/users/organizations" \ + -G "http://localhost:8000/api/oauth/1/callback" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/users/organizations" + "http://localhost:8000/api/oauth/1/callback" ); let headers = { @@ -1033,7 +1128,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->get( - 'http://localhost:8082/api/api/v1/users/organizations', + 'http://localhost:8000/api/oauth/1/callback', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -1049,7 +1144,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/users/organizations' +url = 'http://localhost:8000/api/oauth/1/callback' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' @@ -1059,47 +1154,57 @@ response.json() ``` +> Example response (404): + +```json +null +``` > Example response (200): ```json { - "data": [ - { - "id": 1, - "name": "Curriki Studio", - "description": "Curriki Studio, default organization.", - "image": null, - "domain": "currikistudio" - } - ] + "user": { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "organization_name": "Curriki", + "organization_type": null, + "job_title": "Developer", + "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", + "phone_number": "+1234567890", + "website": "www.currikistudio.org", + "subscribed": true + }, + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." } ``` ### HTTP Request -`GET api/v1/users/organizations` +`GET api/oauth/{provider}/callback` - + - -## Set Default Organization + +## Forgot Password -Set default organization for the user. +Send a password reset link to the given user. > Example request: ```bash -curl -X PUT \ - "http://localhost:8082/api/api/v1/users/default-organization" \ +curl -X POST \ + "http://localhost:8000/api/forgot-password" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ - -d '{"organization_id":1}' + -d '{"email":"john.doe@currikistudio.org"}' ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/users/default-organization" + "http://localhost:8000/api/forgot-password" ); let headers = { @@ -1108,11 +1213,11 @@ let headers = { }; let body = { - "organization_id": 1 + "email": "john.doe@currikistudio.org" } fetch(url, { - method: "PUT", + method: "POST", headers: headers, body: body }) @@ -1123,15 +1228,15 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->put( - 'http://localhost:8082/api/api/v1/users/default-organization', +$response = $client->post( + 'http://localhost:8000/api/forgot-password', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ - 'organization_id' => 1, + 'email' => 'john.doe@currikistudio.org', ], ] ); @@ -1143,15 +1248,15 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/users/default-organization' +url = 'http://localhost:8000/api/forgot-password' payload = { - "organization_id": 1 + "email": "john.doe@currikistudio.org" } headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('PUT', url, headers=headers, json=payload) +response = requests.request('POST', url, headers=headers, json=payload) response.json() ``` @@ -1160,7 +1265,7 @@ response.json() ```json { - "message": "Default organization has been set successfully." + "message": "Password reset email has been sent. Please follow the instructions." } ``` > Example response (400): @@ -1168,47 +1273,40 @@ response.json() ```json { "errors": [ - "Invalid request." - ] -} -``` -> Example response (500): - -```json -{ - "errors": [ - "Failed to set default organization." + "Email is not verified." ] } ``` ### HTTP Request -`PUT api/v1/users/default-organization` +`POST api/forgot-password` #### Body Parameters Parameter | Type | Status | Description --------- | ------- | ------- | ------- | ----------- - `organization_id` | integer | required | The id of the organization to be set as default + `email` | string | required | The email of a user - + - -## Accept Terms + +## Reset Password -Accept Terms and Privacy Policy. +Reset the given user's password. > Example request: ```bash curl -X POST \ - "http://localhost:8082/api/api/v1/subscribe" \ + "http://localhost:8000/api/reset-password" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" + -H "Accept: application/json" \ + -d '{"token":"ya29.a0AfH6SMBx-CIZfKRorxn8xPugO...","email":"john.doe@currikistudio.org","password":"Password123","password_confirmation":"Password123"}' + ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/subscribe" + "http://localhost:8000/api/reset-password" ); let headers = { @@ -1216,9 +1314,17 @@ let headers = { "Accept": "application/json", }; +let body = { + "token": "ya29.a0AfH6SMBx-CIZfKRorxn8xPugO...", + "email": "john.doe@currikistudio.org", + "password": "Password123", + "password_confirmation": "Password123" +} + fetch(url, { method: "POST", headers: headers, + body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -1228,12 +1334,18 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/v1/subscribe', + 'http://localhost:8000/api/reset-password', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'json' => [ + 'token' => 'ya29.a0AfH6SMBx-CIZfKRorxn8xPugO...', + 'email' => 'john.doe@currikistudio.org', + 'password' => 'Password123', + 'password_confirmation' => 'Password123', + ], ] ); $body = $response->getBody(); @@ -1244,68 +1356,69 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/subscribe' +url = 'http://localhost:8000/api/reset-password' +payload = { + "token": "ya29.a0AfH6SMBx-CIZfKRorxn8xPugO...", + "email": "john.doe@currikistudio.org", + "password": "Password123", + "password_confirmation": "Password123" +} headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('POST', url, headers=headers) +response = requests.request('POST', url, headers=headers, json=payload) response.json() ``` -> Example response (500): +> Example response (200): ```json { - "errors": [ - "Failed to subscribe." - ] + "message": "Password has been reset successfully." } ``` -> Example response (200): +> Example response (401): ```json { - "user": { - "id": 1, - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@currikistudio.org", - "organization_name": "Curriki", - "organization_type": null, - "job_title": "Developer", - "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", - "phone_number": "+1234567890", - "website": "www.currikistudio.org", - "subscribed": true - } + "error": "Invalid request." } ``` ### HTTP Request -`POST api/v1/subscribe` - +`POST api/reset-password` - +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `token` | string | required | The token for reset password + `email` | string | required | The email of a user + `password` | string | required | The new password + `password_confirmation` | string | required | The confirmation of password + + - -## Get Authenticated User + +## Verify an Email Address -Get the authenticated user detail. +Mark the authenticated user's email address as verified. > Example request: ```bash -curl -X GET \ - -G "http://localhost:8082/api/api/v1/users/me" \ +curl -X POST \ + "http://localhost:8000/api/verify-email" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" + -H "Accept: application/json" \ + -d '{"id":1,"hash":"9e0f70124a2a88d5435...","signature":"467fbe9a00e7d367553f...","expires":1599754915}' + ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/users/me" + "http://localhost:8000/api/verify-email" ); let headers = { @@ -1313,9 +1426,17 @@ let headers = { "Accept": "application/json", }; +let body = { + "id": 1, + "hash": "9e0f70124a2a88d5435...", + "signature": "467fbe9a00e7d367553f...", + "expires": 1599754915 +} + fetch(url, { - method: "GET", + method: "POST", headers: headers, + body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -1324,13 +1445,19 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->get( - 'http://localhost:8082/api/api/v1/users/me', +$response = $client->post( + 'http://localhost:8000/api/verify-email', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'json' => [ + 'id' => 1, + 'hash' => '9e0f70124a2a88d5435...', + 'signature' => '467fbe9a00e7d367553f...', + 'expires' => 1599754915, + ], ] ); $body = $response->getBody(); @@ -1341,59 +1468,56 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/users/me' +url = 'http://localhost:8000/api/verify-email' +payload = { + "id": 1, + "hash": "9e0f70124a2a88d5435...", + "signature": "467fbe9a00e7d367553f...", + "expires": 1599754915 +} headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('POST', url, headers=headers, json=payload) response.json() ``` -> Example response (200): +> Example response (204): ```json -{ - "user": { - "id": 1, - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@currikistudio.org", - "organization_name": "Curriki", - "organization_type": null, - "job_title": "Developer", - "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", - "phone_number": "+1234567890", - "website": "www.currikistudio.org", - "subscribed": true - } -} +{} ``` ### HTTP Request -`GET api/v1/users/me` - - - +`POST api/verify-email` - -## Get All User Notifications +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `id` | integer | required | The Id of a user + `hash` | string | required | The hash string + `signature` | string | required | The signature + `expires` | integer | required | The expire time of verification email + + -Get a list of the users unread notification + +## Logout > Example request: ```bash -curl -X GET \ - -G "http://localhost:8082/api/api/v1/users/notifications" \ +curl -X POST \ + "http://localhost:8000/api/logout" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/users/notifications" + "http://localhost:8000/api/logout" ); let headers = { @@ -1402,7 +1526,7 @@ let headers = { }; fetch(url, { - method: "GET", + method: "POST", headers: headers, }) .then(response => response.json()) @@ -1412,8 +1536,8 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->get( - 'http://localhost:8082/api/api/v1/users/notifications', +$response = $client->post( + 'http://localhost:8000/api/logout', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -1429,12 +1553,12 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/users/notifications' +url = 'http://localhost:8000/api/logout' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('POST', url, headers=headers) response.json() ``` @@ -1443,46 +1567,31 @@ response.json() ```json { - "notifications": [ - { - "id": "afff2365-a4f3-48ab-8d53-6d958a9e3ab3", - "type": "App\\Notifications\\CloneNotification", - "notifiable_type": "App\\User", - "notifiable_id": 1243, - "data": { - "message": "Project(26 Project 2) has been duplicated successfully" - }, - "read_at": null, - "created_at": "2020-10-16T13:46:33.000000Z", - "updated_at": "2020-10-16T13:46:33.000000Z" - } - ] + "message": "You have been successfully logged out." } ``` ### HTTP Request -`GET api/v1/users/notifications` - +`POST api/logout` - - -## Read All Notifications + -Read all notifications of the specified user. + +## Check if email is already registered > Example request: ```bash curl -X GET \ - -G "http://localhost:8082/api/api/v1/users/notifications/read-all" \ + -G "http://localhost:8000/api/checkemail/et" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/users/notifications/read-all" + "http://localhost:8000/api/checkemail/et" ); let headers = { @@ -1502,7 +1611,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->get( - 'http://localhost:8082/api/api/v1/users/notifications/read-all', + 'http://localhost:8000/api/checkemail/et', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -1518,7 +1627,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/users/notifications/read-all' +url = 'http://localhost:8000/api/checkemail/et' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' @@ -1532,55 +1641,42 @@ response.json() ```json { - "errors": [ - "Failed to read notifications." - ] -} -``` -> Example response (200): - -```json -{ - "notifications": [ - { - "id": "afff2365-a4f3-48ab-8d53-6d958a9e3ab3", - "type": "App\\Notifications\\CloneNotification", - "notifiable_type": "App\\User", - "notifiable_id": 1243, - "data": { - "message": "Project(26 Project 2) has been duplicated successfully" - }, - "read_at": null, - "created_at": "2020-10-16T13:46:33.000000Z", - "updated_at": "2020-10-16T13:46:33.000000Z" - } - ] + "message": "Server Error" } ``` ### HTTP Request -`GET api/v1/users/notifications/read-all` +`GET api/checkemail/{email}` +#### URL Parameters - +Parameter | Status | Description +--------- | ------- | ------- | ------- + `email` | optional | address to be checked: currikiuser@curriki.org - -## Read Notification + -Read notification of the specified user. +#2. User + + +APIs for user management + +## Download Exported Project + +Download the specific notification project. > Example request: ```bash -curl -X POST \ - "http://localhost:8082/api/api/v1/users/notifications/1/read" \ +curl -X GET \ + -G "http://localhost:8000/api/users/notifications/1/download-export" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/users/notifications/1/read" + "http://localhost:8000/api/users/notifications/1/download-export" ); let headers = { @@ -1589,7 +1685,7 @@ let headers = { }; fetch(url, { - method: "POST", + method: "GET", headers: headers, }) .then(response => response.json()) @@ -1599,8 +1695,8 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->post( - 'http://localhost:8082/api/api/v1/users/notifications/1/read', +$response = $client->get( + 'http://localhost:8000/api/users/notifications/1/download-export', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -1616,48 +1712,31 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/users/notifications/1/read' +url = 'http://localhost:8000/api/users/notifications/1/download-export' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('POST', url, headers=headers) +response = requests.request('GET', url, headers=headers) response.json() ``` -> Example response (500): +> Example response (200): ```json { - "errors": [ - "Failed to read notification." - ] + "message": "Notification has been deleted successfully." } ``` -> Example response (200): +> Example response (500): ```json -{ - "notifications": [ - { - "id": "afff2365-a4f3-48ab-8d53-6d958a9e3ab3", - "type": "App\\Notifications\\CloneNotification", - "notifiable_type": "App\\User", - "notifiable_id": 1243, - "data": { - "message": "Project(26 Project 2) has been duplicated successfully" - }, - "read_at": null, - "created_at": "2020-10-16T13:46:33.000000Z", - "updated_at": "2020-10-16T13:46:33.000000Z" - } - ] -} +null ``` ### HTTP Request -`POST api/v1/users/notifications/{notification}/read` +`GET api/users/notifications/{notification}/download-export` #### URL Parameters @@ -1665,25 +1744,25 @@ Parameter | Status | Description --------- | ------- | ------- | ------- `$notification_id` | optional | string required Current id of a notification - + - -## Delete Notification + +## Get All User Organizations -Remove the specified notification from storage. +Get a list of the users organizations > Example request: ```bash -curl -X POST \ - "http://localhost:8082/api/api/v1/users/notifications/1/delete" \ +curl -X GET \ + -G "http://localhost:8000/api/v1/users/organizations" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/users/notifications/1/delete" + "http://localhost:8000/api/v1/users/organizations" ); let headers = { @@ -1692,7 +1771,7 @@ let headers = { }; fetch(url, { - method: "POST", + method: "GET", headers: headers, }) .then(response => response.json()) @@ -1702,8 +1781,8 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->post( - 'http://localhost:8082/api/api/v1/users/notifications/1/delete', +$response = $client->get( + 'http://localhost:8000/api/v1/users/organizations', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -1719,12 +1798,12 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/users/notifications/1/delete' +url = 'http://localhost:8000/api/v1/users/organizations' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('POST', url, headers=headers) +response = requests.request('GET', url, headers=headers) response.json() ``` @@ -1733,49 +1812,42 @@ response.json() ```json { - "message": "Notification has been deleted successfully." -} -``` -> Example response (500): - -```json -{ - "errors": [ - "Failed to delete notification." + "data": [ + { + "id": 1, + "name": "Curriki Studio", + "description": "Curriki Studio, default organization.", + "image": "\/storage\/organizations\/PlPVBtEVfKEU8PBI1eknYgW3kjIf5YdpILBS0Yyr.png", + "favicon": "\/storage\/organizations\/favicon\/PlPVBtEVfKEU8PBI1eknYgW3kjIf5YdpILBS0Yyr.png", + "domain": "currikistudio" + } ] } ``` ### HTTP Request -`POST api/v1/users/notifications/{notification}/delete` - -#### URL Parameters +`GET api/v1/users/organizations` -Parameter | Status | Description ---------- | ------- | ------- | ------- - `$notification_id` | optional | string required Current id of a notification - + - -## Get All Users for Team + +## Accept Terms -Get a list of the users for Team. +Accept Terms and Privacy Policy. > Example request: ```bash curl -X POST \ - "http://localhost:8082/api/api/v1/users/search" \ + "http://localhost:8000/api/v1/subscribe" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" \ - -d '{"search":"Abby"}' - + -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/users/search" + "http://localhost:8000/api/v1/subscribe" ); let headers = { @@ -1783,14 +1855,9 @@ let headers = { "Accept": "application/json", }; -let body = { - "search": "Abby" -} - fetch(url, { method: "POST", headers: headers, - body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -1800,15 +1867,12 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/v1/users/search', + 'http://localhost:8000/api/v1/subscribe', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], - 'json' => [ - 'search' => 'Abby', - ], ] ); $body = $response->getBody(); @@ -1819,67 +1883,68 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/users/search' -payload = { - "search": "Abby" -} +url = 'http://localhost:8000/api/v1/subscribe' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('POST', url, headers=headers, json=payload) +response = requests.request('POST', url, headers=headers) response.json() ``` -> Example response (200): +> Example response (500): ```json { - "users": [ - { - "id": 1, - "first_name": "John", - "last_name": "Doe" - }, - { - "id": 2, - "first_name": "Jane", - "last_name": "Doe" - } + "errors": [ + "Failed to subscribe." ] } ``` +> Example response (200): + +```json +{ + "user": { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "organization_name": "Curriki", + "organization_type": null, + "job_title": "Developer", + "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", + "phone_number": "+1234567890", + "website": "www.currikistudio.org", + "subscribed": true + } +} +``` ### HTTP Request -`POST api/v1/users/search` +`POST api/v1/subscribe` -#### Body Parameters -Parameter | Type | Status | Description ---------- | ------- | ------- | ------- | ----------- - `search` | string | required | Search string for User - - - -## Update Password + -Update password of the specified user in storage. + +## Get Authenticated User + +Get the authenticated user detail. > Example request: ```bash -curl -X POST \ - "http://localhost:8082/api/api/v1/users/update-password" \ +curl -X GET \ + -G "http://localhost:8000/api/v1/users/me" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" \ - -d '{"current_password":"Password123","password":"Password321","password_confirmation":"Password321"}' - + -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/users/update-password" + "http://localhost:8000/api/v1/users/me" ); let headers = { @@ -1887,16 +1952,9 @@ let headers = { "Accept": "application/json", }; -let body = { - "current_password": "Password123", - "password": "Password321", - "password_confirmation": "Password321" -} - fetch(url, { - method: "POST", + method: "GET", headers: headers, - body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -1905,18 +1963,13 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->post( - 'http://localhost:8082/api/api/v1/users/update-password', +$response = $client->get( + 'http://localhost:8000/api/v1/users/me', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], - 'json' => [ - 'current_password' => 'Password123', - 'password' => 'Password321', - 'password_confirmation' => 'Password321', - ], ] ); $body = $response->getBody(); @@ -1927,17 +1980,12 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/users/update-password' -payload = { - "current_password": "Password123", - "password": "Password321", - "password_confirmation": "Password321" -} +url = 'http://localhost:8000/api/v1/users/me' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('POST', url, headers=headers, json=payload) +response = requests.request('GET', url, headers=headers) response.json() ``` @@ -1946,57 +1994,45 @@ response.json() ```json { - "message": "Password has been updated successfully." -} -``` -> Example response (400): - -```json -{ - "errors": [ - "Invalid request." - ] -} -``` -> Example response (500): - -```json -{ - "errors": [ - "Failed to update password." - ] + "user": { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "organization_name": "Curriki", + "organization_type": null, + "job_title": "Developer", + "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", + "phone_number": "+1234567890", + "website": "www.currikistudio.org", + "subscribed": true + } } ``` ### HTTP Request -`POST api/v1/users/update-password` +`GET api/v1/users/me` -#### Body Parameters -Parameter | Type | Status | Description ---------- | ------- | ------- | ------- | ----------- - `current_password` | string | required | Current password of a user - `password` | string | required | New password to be set for a user - `password_confirmation` | string | required | Password confirmation of new password - - - -## Get All Users + -Get a list of the users. + +## Get All User Notifications + +Get a list of the users unread notification > Example request: ```bash curl -X GET \ - -G "http://localhost:8082/api/api/v1/users" \ + -G "http://localhost:8000/api/v1/users/notifications" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/users" + "http://localhost:8000/api/v1/users/notifications" ); let headers = { @@ -2016,7 +2052,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->get( - 'http://localhost:8082/api/api/v1/users', + 'http://localhost:8000/api/v1/users/notifications', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -2032,7 +2068,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/users' +url = 'http://localhost:8000/api/v1/users/notifications' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' @@ -2046,60 +2082,48 @@ response.json() ```json { - "users": [ - { - "id": 1, - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@currikistudio.org", - "organization_name": "Curriki", - "organization_type": null, - "job_title": "Developer", - "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", - "phone_number": "+1234567890", - "website": "www.currikistudio.org", - "subscribed": true - }, + "notifications": [ { - "id": 2, - "first_name": "Jane", - "last_name": "Doe", - "email": "jane.doe@currikistudio.org", - "organization_name": "Curriki", - "organization_type": null, - "job_title": "Manager", - "address": "20660 Stevens Creek Blvd #333, Cupertino, CA 95014", - "phone_number": "+1234567891", - "website": "www.currikistudio.org", - "subscribed": true + "id": "afff2365-a4f3-48ab-8d53-6d958a9e3ab3", + "type": "App\\Notifications\\CloneNotification", + "notifiable_type": "App\\User", + "notifiable_id": 1243, + "data": { + "message": "Project(26 Project 2) has been duplicated successfully" + }, + "read_at": null, + "created_at": "2020-10-16T13:46:33.000000Z", + "updated_at": "2020-10-16T13:46:33.000000Z" } ] } ``` ### HTTP Request -`GET api/v1/users` +`GET api/v1/users/notifications` - + - -## Get User + +## Get All User Export list -Get the specified user detail. +Get a list of the users exported project > Example request: ```bash curl -X GET \ - -G "http://localhost:8082/api/api/v1/users/1" \ + -G "http://localhost:8000/api/v1/suborganization/1/users/notifications/export-list" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" + -H "Accept: application/json" \ + -d '{"size":"25","days_limit":"?days_limit=5"}' + ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/users/1" + "http://localhost:8000/api/v1/suborganization/1/users/notifications/export-list" ); let headers = { @@ -2107,9 +2131,15 @@ let headers = { "Accept": "application/json", }; +let body = { + "size": "25", + "days_limit": "?days_limit=5" +} + fetch(url, { method: "GET", headers: headers, + body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -2119,12 +2149,16 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->get( - 'http://localhost:8082/api/api/v1/users/1', + 'http://localhost:8000/api/v1/suborganization/1/users/notifications/export-list', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'json' => [ + 'size' => '25', + 'days_limit' => '?days_limit=5', + ], ] ); $body = $response->getBody(); @@ -2135,12 +2169,16 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/users/1' +url = 'http://localhost:8000/api/v1/suborganization/1/users/notifications/export-list' +payload = { + "size": "25", + "days_limit": "?days_limit=5" +} headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('GET', url, headers=headers, json=payload) response.json() ``` @@ -2149,52 +2187,75 @@ response.json() ```json { - "user": { - "id": 1, - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@currikistudio.org", - "organization_name": "Curriki", - "organization_type": null, - "job_title": "Developer", - "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", - "phone_number": "+1234567890", - "website": "www.currikistudio.org", - "subscribed": true + "data": [ + { + "id": "681e9e03-6601-4752-a360-5037f0401bba", + "project": "Metrics Project", + "created_at": "14-Jun-2022", + "will_expire_on": "24-Jun-2022", + "link": "\/api\/storage\/exports\/projects-62a877f9af025.zip" + }, + { + "id": "21f86165-698f-4c7e-ac8a-7ddace3fca73", + "project": "Pro Micro", + "created_at": "09-Jun-2022", + "will_expire_on": "19-Jun-2022", + "link": "\/api\/storage\/exports\/projects-62a1f02f43a7b.zip" + } + ], + "links": { + "first": "suborganization\/1\/users\/notifications\/export-list?size=10&page=1", + "last": "suborganization\/1\/users\/notifications\/export-list?size=10&page=1", + "prev": null, + "next": null + }, + "meta": { + "current_page": 1, + "from": 1, + "last_page": 1, + "path": "suborganization\/1\/users\/notifications\/export-list", + "per_page": "10", + "to": 2, + "total": 2 } } ``` ### HTTP Request -`GET api/v1/users/{user}` +`GET api/v1/suborganization/{suborganization}/users/notifications/export-list` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `user` | required | The Id of a user - - + `suborganization` | optional | id of an organization. +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `size` | Limit | optional | for getting the paginated records, Default 25. + `days_limit` | days | optional | Limit for getting the exported project records, Default 10. + + - -## Update User + +## Get All User Export list -Update the specified user in storage. +Get a list of the users exported project > Example request: ```bash -curl -X PUT \ - "http://localhost:8082/api/api/v1/users/1" \ +curl -X GET \ + -G "http://localhost:8000/api/v1/suborganization/1/users/notifications/export-list-independent-activities" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ - -d '{"first_name":"John","last_name":"Doe","organization_name":"Curriki","website":"www.currikistudio.org","job_title":"Developer","address":"20660 Stevens Creek Blvd #332, Cupertino, CA 95014","phone_number":"+1234567890"}' + -d '{"size":"25","days_limit":"?days_limit=5"}' ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/users/1" + "http://localhost:8000/api/v1/suborganization/1/users/notifications/export-list-independent-activities" ); let headers = { @@ -2203,17 +2264,12 @@ let headers = { }; let body = { - "first_name": "John", - "last_name": "Doe", - "organization_name": "Curriki", - "website": "www.currikistudio.org", - "job_title": "Developer", - "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", - "phone_number": "+1234567890" + "size": "25", + "days_limit": "?days_limit=5" } fetch(url, { - method: "PUT", + method: "GET", headers: headers, body: body }) @@ -2224,21 +2280,16 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->put( - 'http://localhost:8082/api/api/v1/users/1', +$response = $client->get( + 'http://localhost:8000/api/v1/suborganization/1/users/notifications/export-list-independent-activities', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ - 'first_name' => 'John', - 'last_name' => 'Doe', - 'organization_name' => 'Curriki', - 'website' => 'www.currikistudio.org', - 'job_title' => 'Developer', - 'address' => '20660 Stevens Creek Blvd #332, Cupertino, CA 95014', - 'phone_number' => '+1234567890', + 'size' => '25', + 'days_limit' => '?days_limit=5', ], ] ); @@ -2250,21 +2301,16 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/users/1' +url = 'http://localhost:8000/api/v1/suborganization/1/users/notifications/export-list-independent-activities' payload = { - "first_name": "John", - "last_name": "Doe", - "organization_name": "Curriki", - "website": "www.currikistudio.org", - "job_title": "Developer", - "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", - "phone_number": "+1234567890" + "size": "25", + "days_limit": "?days_limit=5" } headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('PUT', url, headers=headers, json=payload) +response = requests.request('GET', url, headers=headers, json=payload) response.json() ``` @@ -2273,72 +2319,75 @@ response.json() ```json { - "user": { - "id": 1, - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@currikistudio.org", - "organization_name": "Curriki", - "organization_type": null, - "job_title": "Developer", - "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", - "phone_number": "+1234567890", - "website": "www.currikistudio.org", - "subscribed": true + "data": [ + { + "id": "e66ce14f-e8c0-4fcd-8e9c-0a53453c6da0", + "project": "Test new Drag 1.14", + "created_at": "17-Jun-2022", + "will_expire_on": "27-Jun-2022", + "link": "storage\/exports\/independent_activity-62ac5c287b011.zip", + "organization_id": 1 + }, + { + "id": "e1ef3916-645e-40ed-81b3-0143d9fc19f6", + "project": "Taurus 10 Jun 2022 edited-COPY edited", + "created_at": "17-Jun-2022", + "will_expire_on": "27-Jun-2022", + "link": "storage\/exports\/independent_activity-62ac5c2566576.zip", + "organization_id": 1 + } + ], + "links": { + "first": "suborganization\/1\/users\/notifications\/export-list-independent-activities?size=10&page=1", + "last": "suborganization\/1\/users\/notifications\/export-list-independent-activities?size=10&page=1", + "prev": null, + "next": null }, - "message": "Profile has been updated successfully." -} -``` -> Example response (500): - -```json -{ - "errors": [ - "Failed to update profile." - ] + "meta": { + "current_page": 1, + "from": 1, + "last_page": 1, + "path": "suborganization\/1\/users\/notifications\/export-list-independent-activities", + "per_page": "10", + "to": 2, + "total": 2 + } } ``` ### HTTP Request -`PUT api/v1/users/{user}` - -`PATCH api/v1/users/{user}` +`GET api/v1/suborganization/{suborganization}/users/notifications/export-list-independent-activities` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `user` | required | The Id of a user + `suborganization` | optional | id of an organization. #### Body Parameters Parameter | Type | Status | Description --------- | ------- | ------- | ------- | ----------- - `first_name` | string | required | First name of a user - `last_name` | string | required | Last name of a user - `organization_name` | string | optional | Organization name of a user - `website` | string | optional | Website url of a user - `job_title` | string | optional | Job title of a user - `address` | string | optional | Address of a user - `phone_number` | string | optional | Phone number of a user + `size` | Limit | optional | for getting the paginated records, Default 25. + `days_limit` | days | optional | Limit for getting the exported project records, Default 10. - + - -## Delete User + +## Read All Notifications -Remove the specified user from storage. +Read all notifications of the specified user. > Example request: ```bash -curl -X DELETE \ - "http://localhost:8082/api/api/v1/users/1" \ +curl -X GET \ + -G "http://localhost:8000/api/v1/users/notifications/read-all" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/users/1" + "http://localhost:8000/api/v1/users/notifications/read-all" ); let headers = { @@ -2347,7 +2396,7 @@ let headers = { }; fetch(url, { - method: "DELETE", + method: "GET", headers: headers, }) .then(response => response.json()) @@ -2357,8 +2406,8 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->delete( - 'http://localhost:8082/api/api/v1/users/1', +$response = $client->get( + 'http://localhost:8000/api/v1/users/notifications/read-all', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -2374,61 +2423,69 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/users/1' +url = 'http://localhost:8000/api/v1/users/notifications/read-all' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('DELETE', url, headers=headers) +response = requests.request('GET', url, headers=headers) response.json() ``` -> Example response (200): +> Example response (500): ```json { - "message": "User has been deleted successfully." + "errors": [ + "Failed to read notifications." + ] } ``` -> Example response (500): +> Example response (200): ```json { - "errors": [ - "Failed to delete profile." + "notifications": [ + { + "id": "afff2365-a4f3-48ab-8d53-6d958a9e3ab3", + "type": "App\\Notifications\\CloneNotification", + "notifiable_type": "App\\User", + "notifiable_id": 1243, + "data": { + "message": "Project(26 Project 2) has been duplicated successfully" + }, + "read_at": null, + "created_at": "2020-10-16T13:46:33.000000Z", + "updated_at": "2020-10-16T13:46:33.000000Z" + } ] } ``` ### HTTP Request -`DELETE api/v1/users/{user}` - -#### URL Parameters +`GET api/v1/users/notifications/read-all` -Parameter | Status | Description ---------- | ------- | ------- | ------- - `user` | required | The Id of a user - + - -## Get All Shared Projects + +## Read Notification -Get a list of the shared projects of a user. +Read notification of the specified user. > Example request: ```bash curl -X POST \ - "http://localhost:8082/api/api/v1/projects/shared" \ + "http://localhost:8000/api/v1/users/notifications/1/read" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/projects/shared" + "http://localhost:8000/api/v1/users/notifications/1/read" ); let headers = { @@ -2448,7 +2505,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/v1/projects/shared', + 'http://localhost:8000/api/v1/users/notifications/1/read', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -2464,7 +2521,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/projects/shared' +url = 'http://localhost:8000/api/v1/users/notifications/1/read' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' @@ -2474,64 +2531,64 @@ response.json() ``` +> Example response (500): + +```json +{ + "errors": [ + "Failed to read notification." + ] +} +``` > Example response (200): ```json { - "projects": [ - { - "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "is_public": true, - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" - }, + "notifications": [ { - "id": 2, - "name": "Math Project", - "description": "This is a test math project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832384", - "shared": true, - "starter_project": null, - "is_public": true, - "created_at": "2020-09-07T19:21:08.000000Z", - "updated_at": "2020-09-07T19:21:08.000000Z" + "id": "afff2365-a4f3-48ab-8d53-6d958a9e3ab3", + "type": "App\\Notifications\\CloneNotification", + "notifiable_type": "App\\User", + "notifiable_id": 1243, + "data": { + "message": "Project(26 Project 2) has been duplicated successfully" + }, + "read_at": null, + "created_at": "2020-10-16T13:46:33.000000Z", + "updated_at": "2020-10-16T13:46:33.000000Z" } ] } ``` ### HTTP Request -`POST api/v1/projects/shared` - +`POST api/v1/users/notifications/{notification}/read` - +#### URL Parameters -#3. Project +Parameter | Status | Description +--------- | ------- | ------- | ------- + `$notification_id` | optional | string required Current id of a notification + -APIs for project management - -## Get Shared Project + +## Delete Notification -Get the specified shared project detail. +Remove the specified notification from storage. > Example request: ```bash -curl -X GET \ - -G "http://localhost:8082/api/api/v1/projects/1/load-shared" \ +curl -X POST \ + "http://localhost:8000/api/v1/users/notifications/1/delete" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/projects/1/load-shared" + "http://localhost:8000/api/v1/users/notifications/1/delete" ); let headers = { @@ -2540,7 +2597,7 @@ let headers = { }; fetch(url, { - method: "GET", + method: "POST", headers: headers, }) .then(response => response.json()) @@ -2550,8 +2607,8 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->get( - 'http://localhost:8082/api/api/v1/projects/1/load-shared', +$response = $client->post( + 'http://localhost:8000/api/v1/users/notifications/1/delete', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -2567,79 +2624,63 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/projects/1/load-shared' +url = 'http://localhost:8000/api/v1/users/notifications/1/delete' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('POST', url, headers=headers) response.json() ``` -> Example response (400): +> Example response (200): ```json { - "errors": [ - "No shareable Project found." - ] + "message": "Notification has been deleted successfully." } ``` -> Example response (201): +> Example response (500): ```json { - "project": { - "id": 1, - "organization_id": 1, - "organization_visibility_type_id": 4, - "name": "The Science of Golf", - "description": "Uncover the science, technology, engineering, and mathematics behind the game of golf.", - "thumb_url": "\/storage\/uploads\/nN5y8v8zh2ghxrKuHCv5wvJOREFw0Nr27s2DPxWq.png", - "shared": false, - "starter_project": false, - "order": null, - "status": 1, - "status_text": "DRAFT", - "indexing": null, - "indexing_text": "NOT REQUESTED", - "created_at": "2020-04-30T20:03:12.000000Z", - "updated_at": "2020-09-17T09:44:27.000000Z" - } + "errors": [ + "Failed to delete notification." + ] } ``` ### HTTP Request -`GET api/v1/projects/{project}/load-shared` +`POST api/v1/users/notifications/{notification}/delete` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `project` | required | The Id of a project + `$notification_id` | optional | string required Current id of a notification - + - -## Upload thumbnail + +## Get All Users for Team -Upload thumbnail image for a project +Get a list of the users for Team. > Example request: ```bash curl -X POST \ - "http://localhost:8082/api/api/v1/suborganization/1/projects/upload-thumb" \ + "http://localhost:8000/api/v1/users/search" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ - -d '{"thumb":"(binary)"}' + -d '{"search":"Abby"}' ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/suborganization/1/projects/upload-thumb" + "http://localhost:8000/api/v1/users/search" ); let headers = { @@ -2648,7 +2689,7 @@ let headers = { }; let body = { - "thumb": "(binary)" + "search": "Abby" } fetch(url, { @@ -2664,14 +2705,14 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/v1/suborganization/1/projects/upload-thumb', + 'http://localhost:8000/api/v1/users/search', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ - 'thumb' => '(binary)', + 'search' => 'Abby', ], ] ); @@ -2683,9 +2724,9 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/suborganization/1/projects/upload-thumb' +url = 'http://localhost:8000/api/v1/users/search' payload = { - "thumb": "(binary)" + "search": "Abby" } headers = { 'Content-Type': 'application/json', @@ -2700,51 +2741,50 @@ response.json() ```json { - "thumbUrl": "\/storage\/projects\/1fqwe2f65ewf465qwe46weef5w5eqwq.png" -} -``` -> Example response (400): - -```json -{ - "errors": [ - "Invalid image." + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe" + }, + { + "id": 2, + "first_name": "Jane", + "last_name": "Doe" + } ] } ``` ### HTTP Request -`POST api/v1/suborganization/{suborganization}/projects/upload-thumb` - -#### URL Parameters +`POST api/v1/users/search` -Parameter | Status | Description ---------- | ------- | ------- | ------- - `suborganization` | required | The Id of a suborganization #### Body Parameters Parameter | Type | Status | Description --------- | ------- | ------- | ------- | ----------- - `thumb` | image | required | Thumbnail image to upload + `search` | string | required | Search string for User - + - -## Get Recent Projects + +## Get All Organization Users -Get a list of the recent projects of a user. +Get a list of the organization users. > Example request: ```bash -curl -X GET \ - -G "http://localhost:8082/api/api/v1/suborganization/1/projects/recent" \ +curl -X POST \ + "http://localhost:8000/api/v1/suborganization/1/users/search" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" + -H "Accept: application/json" \ + -d '{"search":"Abby"}' + ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/suborganization/1/projects/recent" + "http://localhost:8000/api/v1/suborganization/1/users/search" ); let headers = { @@ -2752,9 +2792,14 @@ let headers = { "Accept": "application/json", }; +let body = { + "search": "Abby" +} + fetch(url, { - method: "GET", + method: "POST", headers: headers, + body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -2763,13 +2808,16 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->get( - 'http://localhost:8082/api/api/v1/suborganization/1/projects/recent', +$response = $client->post( + 'http://localhost:8000/api/v1/suborganization/1/users/search', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'json' => [ + 'search' => 'Abby', + ], ] ); $body = $response->getBody(); @@ -2780,12 +2828,15 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/suborganization/1/projects/recent' +url = 'http://localhost:8000/api/v1/suborganization/1/users/search' +payload = { + "search": "Abby" +} headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('POST', url, headers=headers, json=payload) response.json() ``` @@ -2794,93 +2845,55 @@ response.json() ```json { - "projects": [ + "users": [ { "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "is_public": true, - "playlists": [ - { - "id": 1, - "title": "Test Playlist 1", - "order": 1, - "created_at": "2020-09-10T19:21:08.000000Z", - "updated_at": "2020-09-10T19:21:08.000000Z" - }, - { - "id": 2, - "title": "Test Playlist 2", - "order": 2, - "created_at": "2020-09-11T19:21:08.000000Z", - "updated_at": "2020-09-11T19:21:08.000000Z" - } - ], - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" + "first_name": "John", + "last_name": "Doe" }, { "id": 2, - "name": "Math Project", - "description": "This is a test math project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "is_public": true, - "playlists": [ - { - "id": 3, - "title": "Test Playlist 3", - "order": 1, - "created_at": "2020-09-12T19:21:08.000000Z", - "updated_at": "2020-09-12T19:21:08.000000Z" - }, - { - "id": 4, - "title": "Test Playlist 4", - "order": 2, - "created_at": "2020-09-13T19:21:08.000000Z", - "updated_at": "2020-09-13T19:21:08.000000Z" - } - ], - "created_at": "2020-09-07T19:21:08.000000Z", - "updated_at": "2020-09-07T19:21:08.000000Z" + "first_name": "Jane", + "last_name": "Doe" } ] } ``` ### HTTP Request -`GET api/v1/suborganization/{suborganization}/projects/recent` +`POST api/v1/suborganization/{suborganization}/users/search` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `suborganization` | required | The Id of a suborganization - - + `Organization` | optional | $suborganization +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `search` | string | required | Search string for User + + - -## Get Default Projects + +## Check Organization User -Get a list of the default projects. +Check if organization user exist in specific organization or not. > Example request: ```bash -curl -X GET \ - -G "http://localhost:8082/api/api/v1/suborganization/1/projects/default" \ +curl -X POST \ + "http://localhost:8000/api/v1/suborganization/1/users/check" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" + -H "Accept: application/json" \ + -d '{"user_id":"1","organization_id":"1"}' + ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/suborganization/1/projects/default" + "http://localhost:8000/api/v1/suborganization/1/users/check" ); let headers = { @@ -2888,9 +2901,15 @@ let headers = { "Accept": "application/json", }; +let body = { + "user_id": "1", + "organization_id": "1" +} + fetch(url, { - method: "GET", + method: "POST", headers: headers, + body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -2899,13 +2918,17 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->get( - 'http://localhost:8082/api/api/v1/suborganization/1/projects/default', +$response = $client->post( + 'http://localhost:8000/api/v1/suborganization/1/users/check', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'json' => [ + 'user_id' => '1', + 'organization_id' => '1', + ], ] ); $body = $response->getBody(); @@ -2916,12 +2939,16 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/suborganization/1/projects/default' +url = 'http://localhost:8000/api/v1/suborganization/1/users/check' +payload = { + "user_id": "1", + "organization_id": "1" +} headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('POST', url, headers=headers, json=payload) response.json() ``` @@ -2930,93 +2957,54 @@ response.json() ```json { - "projects": [ - { - "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "is_public": true, - "playlists": [ - { - "id": 1, - "title": "Test Playlist 1", - "order": 1, - "created_at": "2020-09-10T19:21:08.000000Z", - "updated_at": "2020-09-10T19:21:08.000000Z" - }, - { - "id": 2, - "title": "Test Playlist 2", - "order": 2, - "created_at": "2020-09-11T19:21:08.000000Z", - "updated_at": "2020-09-11T19:21:08.000000Z" - } - ], - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" - }, - { - "id": 2, - "name": "Math Project", - "description": "This is a test math project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "is_public": true, - "playlists": [ - { - "id": 3, - "title": "Test Playlist 3", - "order": 1, - "created_at": "2020-09-12T19:21:08.000000Z", - "updated_at": "2020-09-12T19:21:08.000000Z" - }, - { - "id": 4, - "title": "Test Playlist 4", - "order": 2, - "created_at": "2020-09-13T19:21:08.000000Z", - "updated_at": "2020-09-13T19:21:08.000000Z" - } - ], - "created_at": "2020-09-07T19:21:08.000000Z", - "updated_at": "2020-09-07T19:21:08.000000Z" - } - ] + "invited": true, + "message": "Success" +} +``` +> Example response (400): + +```json +{ + "invited": false, + "message": "error" } ``` ### HTTP Request -`GET api/v1/suborganization/{suborganization}/projects/default` +`POST api/v1/suborganization/{suborganization}/users/check` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `suborganization` | required | The Id of a suborganization - - + `Organization` | optional | $suborganization +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `user_id` | inetger | required | user Id + `organization_id` | inetger | required | organization Id + + - -## Get All Projects Detail + +## Check User Email -Get a list of the projects of a user with detail. +Check if user email exist in the instance. > Example request: ```bash curl -X GET \ - -G "http://localhost:8082/api/api/v1/suborganization/1/projects/detail" \ + -G "http://localhost:8000/api/v1/suborganization/1/users/check-email" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" + -H "Accept: application/json" \ + -d '{"email":"john.doe@currikistudio.org"}' + ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/suborganization/1/projects/detail" + "http://localhost:8000/api/v1/suborganization/1/users/check-email" ); let headers = { @@ -3024,9 +3012,14 @@ let headers = { "Accept": "application/json", }; +let body = { + "email": "john.doe@currikistudio.org" +} + fetch(url, { method: "GET", headers: headers, + body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -3036,12 +3029,15 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->get( - 'http://localhost:8082/api/api/v1/suborganization/1/projects/detail', + 'http://localhost:8000/api/v1/suborganization/1/users/check-email', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'json' => [ + 'email' => 'john.doe@currikistudio.org', + ], ] ); $body = $response->getBody(); @@ -3052,104 +3048,80 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/suborganization/1/projects/detail' +url = 'http://localhost:8000/api/v1/suborganization/1/users/check-email' +payload = { + "email": "john.doe@currikistudio.org" +} headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('GET', url, headers=headers, json=payload) response.json() ``` +> Example response (422): + +```json +{ + "message": "The user already exists in the organization." +} +``` > Example response (200): ```json { - "projects": [ - { - "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "is_public": true, - "playlists": [ - { - "id": 1, - "title": "Test Playlist 1", - "order": 1, - "created_at": "2020-09-10T19:21:08.000000Z", - "updated_at": "2020-09-10T19:21:08.000000Z" - }, - { - "id": 2, - "title": "Test Playlist 2", - "order": 2, - "created_at": "2020-09-11T19:21:08.000000Z", - "updated_at": "2020-09-11T19:21:08.000000Z" - } - ], - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" - }, - { - "id": 2, - "name": "Math Project", - "description": "This is a test math project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "is_public": true, - "playlists": [ - { - "id": 3, - "title": "Test Playlist 3", - "order": 1, - "created_at": "2020-09-12T19:21:08.000000Z", - "updated_at": "2020-09-12T19:21:08.000000Z" - }, - { - "id": 4, - "title": "Test Playlist 4", - "order": 2, - "created_at": "2020-09-13T19:21:08.000000Z", - "updated_at": "2020-09-13T19:21:08.000000Z" - } - ], - "created_at": "2020-09-07T19:21:08.000000Z", - "updated_at": "2020-09-07T19:21:08.000000Z" - } - ] + "user": { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "organization_name": "Curriki", + "organization_type": null, + "job_title": "Developer", + "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", + "phone_number": "+1234567890", + "website": "www.currikistudio.org", + "subscribed": true + } } ``` ### HTTP Request -`GET api/v1/suborganization/{suborganization}/projects/detail` +`GET api/v1/suborganization/{suborganization}/users/check-email` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- `suborganization` | required | The Id of a suborganization +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `email` | string | required | The email of a user + + - + +## Update Password + +Update password of the specified user in storage. - -## api/v1/projects/update-order > Example request: ```bash -curl -X GET \ - -G "http://localhost:8082/api/api/v1/projects/update-order" \ +curl -X POST \ + "http://localhost:8000/api/v1/users/update-password" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" + -H "Accept: application/json" \ + -d '{"current_password":"Password123","password":"Password321","password_confirmation":"Password321"}' + ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/projects/update-order" + "http://localhost:8000/api/v1/users/update-password" ); let headers = { @@ -3157,9 +3129,16 @@ let headers = { "Accept": "application/json", }; +let body = { + "current_password": "Password123", + "password": "Password321", + "password_confirmation": "Password321" +} + fetch(url, { - method: "GET", + method: "POST", headers: headers, + body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -3168,13 +3147,18 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->get( - 'http://localhost:8082/api/api/v1/projects/update-order', +$response = $client->post( + 'http://localhost:8000/api/v1/users/update-password', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'json' => [ + 'current_password' => 'Password123', + 'password' => 'Password321', + 'password_confirmation' => 'Password321', + ], ] ); $body = $response->getBody(); @@ -3185,45 +3169,76 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/projects/update-order' +url = 'http://localhost:8000/api/v1/users/update-password' +payload = { + "current_password": "Password123", + "password": "Password321", + "password_confirmation": "Password321" +} headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('POST', url, headers=headers, json=payload) response.json() ``` -> Example response (401): +> Example response (200): ```json { - "message": "Unauthenticated." + "message": "Password has been updated successfully." +} +``` +> Example response (400): + +```json +{ + "errors": [ + "Invalid request." + ] +} +``` +> Example response (500): + +```json +{ + "errors": [ + "Failed to update password." + ] } ``` ### HTTP Request -`GET api/v1/projects/update-order` +`POST api/v1/users/update-password` +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `current_password` | string | required | Current password of a user + `password` | string | required | New password to be set for a user + `password_confirmation` | string | required | Password confirmation of new password + + - + +## Get All Users - -## Get All Favorite Projects +Get a list of the users. > Example request: ```bash curl -X GET \ - -G "http://localhost:8082/api/api/v1/suborganization/1/projects/favorites" \ + -G "http://localhost:8000/api/v1/users" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/suborganization/1/projects/favorites" + "http://localhost:8000/api/v1/users" ); let headers = { @@ -3243,7 +3258,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->get( - 'http://localhost:8082/api/api/v1/suborganization/1/projects/favorites', + 'http://localhost:8000/api/v1/users', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -3259,7 +3274,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/suborganization/1/projects/favorites' +url = 'http://localhost:8000/api/v1/users' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' @@ -3273,63 +3288,60 @@ response.json() ```json { - "projects": [ + "users": [ { "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "is_public": true, - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "organization_name": "Curriki", + "organization_type": null, + "job_title": "Developer", + "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", + "phone_number": "+1234567890", + "website": "www.currikistudio.org", + "subscribed": true }, { "id": 2, - "name": "Math Project", - "description": "This is a test math project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832384", - "shared": true, - "starter_project": null, - "is_public": true, - "created_at": "2020-09-07T19:21:08.000000Z", - "updated_at": "2020-09-07T19:21:08.000000Z" + "first_name": "Jane", + "last_name": "Doe", + "email": "jane.doe@currikistudio.org", + "organization_name": "Curriki", + "organization_type": null, + "job_title": "Manager", + "address": "20660 Stevens Creek Blvd #333, Cupertino, CA 95014", + "phone_number": "+1234567891", + "website": "www.currikistudio.org", + "subscribed": true } ] } ``` ### HTTP Request -`GET api/v1/suborganization/{suborganization}/projects/favorites` - -#### URL Parameters +`GET api/v1/users` -Parameter | Status | Description ---------- | ------- | ------- | ------- - `suborganization` | required | The Id of a suborganization - + - -## Reorder Projects + +## Get User -Reorder projects of a user. +Get the specified user detail. > Example request: ```bash -curl -X POST \ - "http://localhost:8082/api/api/v1/projects/reorder" \ +curl -X GET \ + -G "http://localhost:8000/api/v1/users/1" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" \ - -d '{"projects":[]}' - + -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/projects/reorder" + "http://localhost:8000/api/v1/users/1" ); let headers = { @@ -3337,14 +3349,9 @@ let headers = { "Accept": "application/json", }; -let body = { - "projects": [] -} - fetch(url, { - method: "POST", + method: "GET", headers: headers, - body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -3353,16 +3360,13 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->post( - 'http://localhost:8082/api/api/v1/projects/reorder', +$response = $client->get( + 'http://localhost:8000/api/v1/users/1', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], - 'json' => [ - 'projects' => [], - ], ] ); $body = $response->getBody(); @@ -3373,15 +3377,12 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/projects/reorder' -payload = { - "projects": [] -} +url = 'http://localhost:8000/api/v1/users/1' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('POST', url, headers=headers, json=payload) +response = requests.request('GET', url, headers=headers) response.json() ``` @@ -3390,60 +3391,52 @@ response.json() ```json { - "projects": [ - { - "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "is_public": true, - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" - }, - { - "id": 2, - "name": "Math Project", - "description": "This is a test math project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832384", - "shared": true, - "starter_project": null, - "is_public": true, - "created_at": "2020-09-07T19:21:08.000000Z", - "updated_at": "2020-09-07T19:21:08.000000Z" - } - ] + "user": { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "organization_name": "Curriki", + "organization_type": null, + "job_title": "Developer", + "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", + "phone_number": "+1234567890", + "website": "www.currikistudio.org", + "subscribed": true + } } ``` ### HTTP Request -`POST api/v1/projects/reorder` +`GET api/v1/users/{user}` -#### Body Parameters -Parameter | Type | Status | Description ---------- | ------- | ------- | ------- | ----------- - `projects` | array | required | projects of a user - - +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `user` | required | The Id of a user - -## Indexing Request + + + +## Update User -Make the indexing request for a project. +Update the specified user in storage. > Example request: ```bash -curl -X GET \ - -G "http://localhost:8082/api/api/v1/projects/1/indexing" \ +curl -X PUT \ + "http://localhost:8000/api/v1/users/1" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" + -H "Accept: application/json" \ + -d '{"first_name":"John","last_name":"Doe","organization_name":"Curriki","website":"www.currikistudio.org","job_title":"Developer","address":"20660 Stevens Creek Blvd #332, Cupertino, CA 95014","phone_number":"+1234567890"}' + ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/projects/1/indexing" + "http://localhost:8000/api/v1/users/1" ); let headers = { @@ -3451,9 +3444,20 @@ let headers = { "Accept": "application/json", }; +let body = { + "first_name": "John", + "last_name": "Doe", + "organization_name": "Curriki", + "website": "www.currikistudio.org", + "job_title": "Developer", + "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", + "phone_number": "+1234567890" +} + fetch(url, { - method: "GET", + method: "PUT", headers: headers, + body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -3462,13 +3466,22 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->get( - 'http://localhost:8082/api/api/v1/projects/1/indexing', +$response = $client->put( + 'http://localhost:8000/api/v1/users/1', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'json' => [ + 'first_name' => 'John', + 'last_name' => 'Doe', + 'organization_name' => 'Curriki', + 'website' => 'www.currikistudio.org', + 'job_title' => 'Developer', + 'address' => '20660 Stevens Creek Blvd #332, Cupertino, CA 95014', + 'phone_number' => '+1234567890', + ], ] ); $body = $response->getBody(); @@ -3479,12 +3492,21 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/projects/1/indexing' +url = 'http://localhost:8000/api/v1/users/1' +payload = { + "first_name": "John", + "last_name": "Doe", + "organization_name": "Curriki", + "website": "www.currikistudio.org", + "job_title": "Developer", + "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", + "phone_number": "+1234567890" +} headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('PUT', url, headers=headers, json=payload) response.json() ``` @@ -3493,23 +3515,20 @@ response.json() ```json { - "message": "Indexing request for this project has been made successfully!" -} -``` -> Example response (404): - -```json -{ - "message": "No query results for model [Project] Id" -} -``` -> Example response (500): - -```json -{ - "errors": [ - "Indexing value is already set. Current indexing state of this project: CURRENT_STATE_OF_PROJECT_INDEX" - ] + "user": { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "organization_name": "Curriki", + "organization_type": null, + "job_title": "Developer", + "address": "20660 Stevens Creek Blvd #332, Cupertino, CA 95014", + "phone_number": "+1234567890", + "website": "www.currikistudio.org", + "subscribed": true + }, + "message": "Profile has been updated successfully." } ``` > Example response (500): @@ -3517,39 +3536,51 @@ response.json() ```json { "errors": [ - "Project must be finalized before requesting the indexing." + "Failed to update profile." ] } ``` ### HTTP Request -`GET api/v1/projects/{project}/indexing` +`PUT api/v1/users/{user}` + +`PATCH api/v1/users/{user}` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `project` | required | The Id of a project - - + `user` | required | The Id of a user +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `first_name` | string | required | First name of a user + `last_name` | string | required | Last name of a user + `organization_name` | string | optional | Organization name of a user + `website` | string | optional | Website url of a user + `job_title` | string | optional | Job title of a user + `address` | string | optional | Address of a user + `phone_number` | string | optional | Phone number of a user + + - -## Status Update + +## Delete User -Update the status of the project, draft to final or vice versa. +Remove the specified user from storage. > Example request: ```bash -curl -X GET \ - -G "http://localhost:8082/api/api/v1/projects/1/status-update" \ +curl -X DELETE \ + "http://localhost:8000/api/v1/users/1" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/projects/1/status-update" + "http://localhost:8000/api/v1/users/1" ); let headers = { @@ -3558,7 +3589,7 @@ let headers = { }; fetch(url, { - method: "GET", + method: "DELETE", headers: headers, }) .then(response => response.json()) @@ -3568,8 +3599,8 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->get( - 'http://localhost:8082/api/api/v1/projects/1/status-update', +$response = $client->delete( + 'http://localhost:8000/api/v1/users/1', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -3585,12 +3616,12 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/projects/1/status-update' +url = 'http://localhost:8000/api/v1/users/1' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('DELETE', url, headers=headers) response.json() ``` @@ -3599,45 +3630,47 @@ response.json() ```json { - "message": "Status of this project has been updated successfully!" + "message": "User has been deleted successfully." } ``` -> Example response (404): +> Example response (500): ```json { - "message": "No query results for model [Project] Id" + "errors": [ + "Failed to delete profile." + ] } ``` ### HTTP Request -`GET api/v1/projects/{project}/status-update` +`DELETE api/v1/users/{user}` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `project` | required | The Id of a project + `user` | required | The Id of a user - + - -## Share Project + +## Create New Organization User -Share the specified project of a user. +Create a new user in storage. > Example request: ```bash curl -X POST \ - "http://localhost:8082/api/api/v1/suborganization/1/projects/1/share" \ + "http://localhost:8000/api/v1/suborganizations/1/add-new-user" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/suborganization/1/projects/1/share" + "http://localhost:8000/api/v1/suborganizations/1/add-new-user" ); let headers = { @@ -3657,7 +3690,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/v1/suborganization/1/projects/1/share', + 'http://localhost:8000/api/v1/suborganizations/1/add-new-user', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -3673,7 +3706,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/suborganization/1/projects/1/share' +url = 'http://localhost:8000/api/v1/suborganizations/1/add-new-user' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' @@ -3687,64 +3720,33 @@ response.json() ```json { - "errors": [ - "Failed to share project." - ] -} -``` -> Example response (200): - -```json -{ - "project": { - "id": 1, - "organization_id": 1, - "organization_visibility_type_id": 4, - "name": "The Science of Golf", - "description": "Uncover the science, technology, engineering, and mathematics behind the game of golf.", - "thumb_url": "\/storage\/uploads\/nN5y8v8zh2ghxrKuHCv5wvJOREFw0Nr27s2DPxWq.png", - "shared": false, - "starter_project": false, - "order": null, - "status": 1, - "status_text": "DRAFT", - "indexing": null, - "indexing_text": "NOT REQUESTED", - "created_at": "2020-04-30T20:03:12.000000Z", - "updated_at": "2020-09-17T09:44:27.000000Z" - } + "message": "Server Error" } ``` ### HTTP Request -`POST api/v1/suborganization/{suborganization}/projects/{project}/share` - -#### URL Parameters +`POST api/v1/suborganizations/{suborganization}/add-new-user` -Parameter | Status | Description ---------- | ------- | ------- | ------- - `project` | required | The Id of a project - `suborganization` | required | The Id of a suborganization - + - -## Clone Project + +## Update Organization User Detail -Clone the specified project of a user. +Update user detail in storage. > Example request: ```bash -curl -X POST \ - "http://localhost:8082/api/api/v1/suborganization/1/projects/1/clone" \ +curl -X PUT \ + "http://localhost:8000/api/v1/suborganizations/1/update-user-detail" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/suborganization/1/projects/1/clone" + "http://localhost:8000/api/v1/suborganizations/1/update-user-detail" ); let headers = { @@ -3753,7 +3755,7 @@ let headers = { }; fetch(url, { - method: "POST", + method: "PUT", headers: headers, }) .then(response => response.json()) @@ -3763,8 +3765,8 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->post( - 'http://localhost:8082/api/api/v1/suborganization/1/projects/1/clone', +$response = $client->put( + 'http://localhost:8000/api/v1/suborganizations/1/update-user-detail', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -3780,62 +3782,49 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/suborganization/1/projects/1/clone' +url = 'http://localhost:8000/api/v1/suborganizations/1/update-user-detail' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('POST', url, headers=headers) +response = requests.request('PUT', url, headers=headers) response.json() ``` -> Example response (200): - -```json -{ - "message": "Project is being cloned|duplicated in background!" -} -``` -> Example response (400): +> Example response (500): ```json { - "errors": [ - "Not a Public Project." - ] + "message": "Server Error" } ``` ### HTTP Request -`POST api/v1/suborganization/{suborganization}/projects/{project}/clone` - -#### URL Parameters +`PUT api/v1/suborganizations/{suborganization}/update-user-detail` -Parameter | Status | Description ---------- | ------- | ------- | ------- - `suborganization` | required | The Id of a suborganization - `project` | required | The Id of a project - + - -## Remove Share Project + +## Users Basic Report -Remove share the specified project of a user. +Returns the paginated response of the users with basic reporting. > Example request: ```bash -curl -X POST \ - "http://localhost:8082/api/api/v1/suborganization/1/projects/1/remove-share" \ +curl -X GET \ + -G "http://localhost:8000/api/v1/users/report/basic" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" + -H "Accept: application/json" \ + -d '{"size":"25","query":"Test"}' + ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/suborganization/1/projects/1/remove-share" + "http://localhost:8000/api/v1/users/report/basic" ); let headers = { @@ -3843,9 +3832,15 @@ let headers = { "Accept": "application/json", }; +let body = { + "size": "25", + "query": "Test" +} + fetch(url, { - method: "POST", + method: "GET", headers: headers, + body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -3854,13 +3849,17 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->post( - 'http://localhost:8082/api/api/v1/suborganization/1/projects/1/remove-share', +$response = $client->get( + 'http://localhost:8000/api/v1/users/report/basic', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'json' => [ + 'size' => '25', + 'query' => 'Test', + ], ] ); $body = $response->getBody(); @@ -3871,72 +3870,86 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/suborganization/1/projects/1/remove-share' +url = 'http://localhost:8000/api/v1/users/report/basic' +payload = { + "size": "25", + "query": "Test" +} headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('POST', url, headers=headers) +response = requests.request('GET', url, headers=headers, json=payload) response.json() ``` -> Example response (500): - -```json -{ - "errors": [ - "Failed to remove share project." - ] -} -``` > Example response (200): ```json { - "project": { - "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": false, - "starter_project": null, - "is_public": true, - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" - } + "current_page": 1, + "data": [ + { + "id": 1242, + "first_name": "123security", + "last_name": "products", + "email": "wirelessproducts.wl@gmail.com", + "projects_count": 2, + "playlists_count": 9, + "activities_count": 60 + }, + { + "id": 824, + "first_name": "168xoso", + "last_name": "com", + "email": "168xosocom@gmail.com", + "projects_count": 2, + "playlists_count": 9, + "activities_count": 60 + } + ], + "first_page_url": "https:\/\/currikistudio.org\/api\/api\/api\/v1\/admin\/users\/report\/basic?page=1", + "from": 1, + "last_page": 816, + "last_page_url": "https:\/\/currikistudio.org\/api\/api\/api\/v1\/admin\/users\/report\/basic?page=816", + "next_page_url": "https:\/\/currikistudio.org\/api\/api\/api\/v1\/admin\/users\/report\/basic?page=2", + "path": "https:\/\/currikistudio.org\/api\/api\/api\/v1\/admin\/users\/report\/basic", + "per_page": "2", + "prev_page_url": null, + "to": 2, + "total": 1632 } ``` ### HTTP Request -`POST api/v1/suborganization/{suborganization}/projects/{project}/remove-share` - -#### URL Parameters - -Parameter | Status | Description ---------- | ------- | ------- | ------- - `suborganization` | required | The Id of a suborganization - `project` | required | The Id of a project +`GET api/v1/users/report/basic` - +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `size` | Limit | optional | for getting the paginated records, Default 25. + `query` | for | optional | getting the search records by name and email. + + - -## Favorite/Unfavorite Project + +## Get All Shared Projects -Favorite/Unfavorite the specified project for a user. +Get a list of the shared projects of a user. > Example request: ```bash curl -X POST \ - "http://localhost:8082/api/api/v1/suborganization/1/projects/1/favorite" \ + "http://localhost:8000/api/v1/projects/shared" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/suborganization/1/projects/1/favorite" + "http://localhost:8000/api/v1/projects/shared" ); let headers = { @@ -3956,7 +3969,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/v1/suborganization/1/projects/1/favorite', + 'http://localhost:8000/api/v1/projects/shared', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -3972,7 +3985,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/suborganization/1/projects/1/favorite' +url = 'http://localhost:8000/api/v1/projects/shared' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' @@ -3982,88 +3995,6 @@ response.json() ``` -> Example response (200): - -```json -{ - "message": "This resource will be removed from your Favorites. You will no longer be able to reuse\/remix its contents into your projects." -} -``` - -### HTTP Request -`POST api/v1/suborganization/{suborganization}/projects/{project}/favorite` - -#### URL Parameters - -Parameter | Status | Description ---------- | ------- | ------- | ------- - `suborganization` | required | The Id of a suborganization - `project` | required | The Id of a project - - - - -## Get All Projects - -Get a list of the projects of a user. - -> Example request: - -```bash -curl -X GET \ - -G "http://localhost:8082/api/api/v1/suborganization/1/projects" \ - -H "Content-Type: application/json" \ - -H "Accept: application/json" -``` - -```javascript -const url = new URL( - "http://localhost:8082/api/api/v1/suborganization/1/projects" -); - -let headers = { - "Content-Type": "application/json", - "Accept": "application/json", -}; - -fetch(url, { - method: "GET", - headers: headers, -}) - .then(response => response.json()) - .then(json => console.log(json)); -``` - -```php - -$client = new \GuzzleHttp\Client(); -$response = $client->get( - 'http://localhost:8082/api/api/v1/suborganization/1/projects', - [ - 'headers' => [ - 'Content-Type' => 'application/json', - 'Accept' => 'application/json', - ], - ] -); -$body = $response->getBody(); -print_r(json_decode((string) $body)); -``` - -```python -import requests -import json - -url = 'http://localhost:8082/api/api/v1/suborganization/1/projects' -headers = { - 'Content-Type': 'application/json', - 'Accept': 'application/json' -} -response = requests.request('GET', url, headers=headers) -response.json() -``` - - > Example response (200): ```json @@ -4077,6 +4008,7 @@ response.json() "shared": true, "starter_project": null, "is_public": true, + "gcr_project_visibility": true, "created_at": "2020-09-06T19:21:08.000000Z", "updated_at": "2020-09-06T19:21:08.000000Z" }, @@ -4096,35 +4028,32 @@ response.json() ``` ### HTTP Request -`GET api/v1/suborganization/{suborganization}/projects` +`POST api/v1/projects/shared` -#### URL Parameters -Parameter | Status | Description ---------- | ------- | ------- | ------- - `suborganization` | required | The Id of a suborganization + - +#3. Project - -## Create Project -Create a new project in storage for a user. +APIs for project management + +## Get Shared Project + +Get the specified shared project detail. > Example request: ```bash -curl -X POST \ - "http://localhost:8082/api/api/v1/suborganization/1/projects" \ +curl -X GET \ + -G "http://localhost:8000/api/v1/projects/1/load-shared" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" \ - -d '{"name":"Test Project","description":"This is a test project.","thumb_url":"https:\/\/images.pexels.com\/photos\/2832382","organization_visibility_type_id":1}' - + -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/suborganization/1/projects" + "http://localhost:8000/api/v1/projects/1/load-shared" ); let headers = { @@ -4132,17 +4061,9 @@ let headers = { "Accept": "application/json", }; -let body = { - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "organization_visibility_type_id": 1 -} - fetch(url, { - method: "POST", + method: "GET", headers: headers, - body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -4151,19 +4072,13 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->post( - 'http://localhost:8082/api/api/v1/suborganization/1/projects', +$response = $client->get( + 'http://localhost:8000/api/v1/projects/1/load-shared', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], - 'json' => [ - 'name' => 'Test Project', - 'description' => 'This is a test project.', - 'thumb_url' => 'https://images.pexels.com/photos/2832382', - 'organization_visibility_type_id' => 1, - ], ] ); $body = $response->getBody(); @@ -4174,28 +4089,22 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/suborganization/1/projects' -payload = { - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "organization_visibility_type_id": 1 -} +url = 'http://localhost:8000/api/v1/projects/1/load-shared' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('POST', url, headers=headers, json=payload) +response = requests.request('GET', url, headers=headers) response.json() ``` -> Example response (500): +> Example response (400): ```json { "errors": [ - "Could not create project. Please try again later." + "No shareable Project found." ] } ``` @@ -4211,6 +4120,7 @@ response.json() "description": "Uncover the science, technology, engineering, and mathematics behind the game of golf.", "thumb_url": "\/storage\/uploads\/nN5y8v8zh2ghxrKuHCv5wvJOREFw0Nr27s2DPxWq.png", "shared": false, + "gcr_project_visibility": true, "starter_project": false, "order": null, "status": 1, @@ -4224,40 +4134,33 @@ response.json() ``` ### HTTP Request -`POST api/v1/suborganization/{suborganization}/projects` +`GET api/v1/projects/{project}/load-shared` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `suborganization` | required | The Id of a suborganization -#### Body Parameters -Parameter | Type | Status | Description ---------- | ------- | ------- | ------- | ----------- - `name` | string | required | Name of a project - `description` | string | required | Description of a project - `thumb_url` | string | required | Thumbnail Url of a project - `organization_visibility_type_id` | integer | required | Id of the organization visibility type - - + `project` | required | The Id of a project - -## Get Project + -Get the specified project detail. + +## Get Project Search Preview + +Get the specified project search preview. > Example request: ```bash curl -X GET \ - -G "http://localhost:8082/api/api/v1/suborganization/1/projects/1" \ + -G "http://localhost:8000/api/v1/suborganization/1/projects/1/search-preview" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/suborganization/1/projects/1" + "http://localhost:8000/api/v1/suborganization/1/projects/1/search-preview" ); let headers = { @@ -4277,7 +4180,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->get( - 'http://localhost:8082/api/api/v1/suborganization/1/projects/1', + 'http://localhost:8000/api/v1/suborganization/1/projects/1/search-preview', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -4293,7 +4196,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/suborganization/1/projects/1' +url = 'http://localhost:8000/api/v1/suborganization/1/projects/1/search-preview' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' @@ -4303,61 +4206,96 @@ response.json() ``` -> Example response (201): +> Example response (200): ```json { "project": { - "id": 1, - "organization_id": 1, - "organization_visibility_type_id": 4, - "name": "The Science of Golf", - "description": "Uncover the science, technology, engineering, and mathematics behind the game of golf.", - "thumb_url": "\/storage\/uploads\/nN5y8v8zh2ghxrKuHCv5wvJOREFw0Nr27s2DPxWq.png", + "id": 2459, + "name": "Teach for America: High School Science", + "description": "This project consists of two playlists serving as exemplar high school science digital learning instruction.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/593158\/pexels-photo-593158.jpeg?auto=compress&cs=tinysrgb&dpr=1&fit=crop&h=200&w=280", "shared": false, - "starter_project": false, - "order": null, - "status": 1, - "status_text": "DRAFT", "indexing": null, "indexing_text": "NOT REQUESTED", - "created_at": "2020-04-30T20:03:12.000000Z", - "updated_at": "2020-09-17T09:44:27.000000Z" + "created_at": "2021-05-03T15:41:08.000000Z", + "updated_at": "2021-05-03T15:41:08.000000Z", + "playlists": [ + { + "id": 5078, + "title": "The Smallest Unit of Life: The Cell", + "project_id": 2459, + "created_at": "2021-05-03T15:41:11.000000Z", + "updated_at": "2021-05-03T15:41:11.000000Z", + "activities": [ + { + "id": 23090, + "title": "What You'll Explore", + "type": "h5p", + "thumb_url": "https:\/\/images.pexels.com\/photos\/593158\/pexels-photo-593158.jpeg?auto=compress&cs=tinysrgb&dpr=1&fit=crop&h=200&w=280", + "library_name": "H5P.Accordion 1.0" + }, + { + "id": 23091, + "title": "History of Cell Theory", + "type": "h5p", + "thumb_url": "https:\/\/images.pexels.com\/photos\/593158\/pexels-photo-593158.jpeg?auto=compress&cs=tinysrgb&dpr=1&fit=crop&h=200&w=280", + "library_name": "H5P.Column 1.11" + } + ] + }, + { + "id": 5079, + "title": "Understanding the Atom", + "project_id": 2459, + "created_at": "2021-05-03T15:41:15.000000Z", + "updated_at": "2021-05-03T15:41:15.000000Z", + "activities": [ + { + "id": 23097, + "title": "Build an Atom", + "type": "h5p", + "thumb_url": "https:\/\/images.pexels.com\/photos\/593158\/pexels-photo-593158.jpeg?auto=compress&cs=tinysrgb&dpr=1&fit=crop&h=200&w=280", + "library_name": "H5P.IFrameEmbed 1.0" + } + ] + } + ] } } ``` ### HTTP Request -`GET api/v1/suborganization/{suborganization}/projects/{project}` +`GET api/v1/suborganization/{suborganization}/projects/{project}/search-preview` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `project` | required | The Id of a project `suborganization` | required | The Id of a suborganization + `project` | required | The Id of a project - + - -## Update Project + +## Upload thumbnail -Update the specified project of a user. +Upload thumbnail image for a project > Example request: ```bash -curl -X PUT \ - "http://localhost:8082/api/api/v1/suborganization/1/projects/1" \ +curl -X POST \ + "http://localhost:8000/api/v1/suborganization/1/projects/upload-thumb" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ - -d '{"name":"Test Project","description":"This is a test project.","thumb_url":"https:\/\/images.pexels.com\/photos\/2832382","organization_visibility_type_id":1}' + -d '{"thumb":"(binary)"}' ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/suborganization/1/projects/1" + "http://localhost:8000/api/v1/suborganization/1/projects/upload-thumb" ); let headers = { @@ -4366,14 +4304,11 @@ let headers = { }; let body = { - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "organization_visibility_type_id": 1 + "thumb": "(binary)" } fetch(url, { - method: "PUT", + method: "POST", headers: headers, body: body }) @@ -4384,18 +4319,15 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->put( - 'http://localhost:8082/api/api/v1/suborganization/1/projects/1', +$response = $client->post( + 'http://localhost:8000/api/v1/suborganization/1/projects/upload-thumb', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ - 'name' => 'Test Project', - 'description' => 'This is a test project.', - 'thumb_url' => 'https://images.pexels.com/photos/2832382', - 'organization_visibility_type_id' => 1, + 'thumb' => '(binary)', ], ] ); @@ -4407,93 +4339,71 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/suborganization/1/projects/1' +url = 'http://localhost:8000/api/v1/suborganization/1/projects/upload-thumb' payload = { - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "organization_visibility_type_id": 1 + "thumb": "(binary)" } headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('PUT', url, headers=headers, json=payload) +response = requests.request('POST', url, headers=headers, json=payload) response.json() ``` -> Example response (500): +> Example response (200): ```json { - "errors": [ - "Failed to update project." - ] + "thumbUrl": "\/storage\/projects\/1fqwe2f65ewf465qwe46weef5w5eqwq.png" } ``` -> Example response (200): +> Example response (422): ```json { - "project": { - "id": 1, - "organization_id": 1, - "organization_visibility_type_id": 4, - "name": "The Science of Golf", - "description": "Uncover the science, technology, engineering, and mathematics behind the game of golf.", - "thumb_url": "\/storage\/uploads\/nN5y8v8zh2ghxrKuHCv5wvJOREFw0Nr27s2DPxWq.png", - "shared": false, - "starter_project": false, - "order": null, - "status": 1, - "status_text": "DRAFT", - "indexing": null, - "indexing_text": "NOT REQUESTED", - "created_at": "2020-04-30T20:03:12.000000Z", - "updated_at": "2020-09-17T09:44:27.000000Z" + "message": "The given data was invalid.", + "errors": { + "thumb": [ + "The thumb must be an image." + ] } } ``` ### HTTP Request -`PUT api/v1/suborganization/{suborganization}/projects/{project}` - -`PATCH api/v1/suborganization/{suborganization}/projects/{project}` +`POST api/v1/suborganization/{suborganization}/projects/upload-thumb` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `project` | required | The Id of a project `suborganization` | required | The Id of a suborganization #### Body Parameters Parameter | Type | Status | Description --------- | ------- | ------- | ------- | ----------- - `name` | string | required | Name of a project - `description` | string | required | Description of a project - `thumb_url` | string | required | Thumbnail Url of a project - `organization_visibility_type_id` | integer | required | Id of the organization visibility type + `thumb` | image | required | Thumbnail image to upload - + - -## Remove Project + +## Get Recent Projects -Remove the specified project of a user. +Get a list of the recent projects of a user. > Example request: ```bash -curl -X DELETE \ - "http://localhost:8082/api/api/v1/suborganization/1/projects/1" \ +curl -X GET \ + -G "http://localhost:8000/api/v1/suborganization/1/projects/recent" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/suborganization/1/projects/1" + "http://localhost:8000/api/v1/suborganization/1/projects/recent" ); let headers = { @@ -4502,7 +4412,7 @@ let headers = { }; fetch(url, { - method: "DELETE", + method: "GET", headers: headers, }) .then(response => response.json()) @@ -4512,8 +4422,8 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->delete( - 'http://localhost:8082/api/api/v1/suborganization/1/projects/1', +$response = $client->get( + 'http://localhost:8000/api/v1/suborganization/1/projects/recent', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -4529,12 +4439,12 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/suborganization/1/projects/1' +url = 'http://localhost:8000/api/v1/suborganization/1/projects/recent' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('DELETE', url, headers=headers) +response = requests.request('GET', url, headers=headers) response.json() ``` @@ -4543,54 +4453,101 @@ response.json() ```json { - "message": "Project has been deleted successfully." -} -``` -> Example response (500): - -```json -{ - "errors": [ - "Failed to delete project." + "projects": [ + { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "is_public": true, + "playlists": [ + { + "id": 1, + "title": "Test Playlist 1", + "order": 1, + "created_at": "2020-09-10T19:21:08.000000Z", + "updated_at": "2020-09-10T19:21:08.000000Z" + }, + { + "id": 2, + "title": "Test Playlist 2", + "order": 2, + "created_at": "2020-09-11T19:21:08.000000Z", + "updated_at": "2020-09-11T19:21:08.000000Z" + } + ], + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + { + "id": 2, + "name": "Math Project", + "description": "This is a test math project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "is_public": true, + "playlists": [ + { + "id": 3, + "title": "Test Playlist 3", + "order": 1, + "created_at": "2020-09-12T19:21:08.000000Z", + "updated_at": "2020-09-12T19:21:08.000000Z" + }, + { + "id": 4, + "title": "Test Playlist 4", + "order": 2, + "created_at": "2020-09-13T19:21:08.000000Z", + "updated_at": "2020-09-13T19:21:08.000000Z" + } + ], + "created_at": "2020-09-07T19:21:08.000000Z", + "updated_at": "2020-09-07T19:21:08.000000Z" + } ] } ``` ### HTTP Request -`DELETE api/v1/suborganization/{suborganization}/projects/{project}` +`GET api/v1/suborganization/{suborganization}/projects/recent` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- `suborganization` | required | The Id of a suborganization - `project` | required | The Id of a project - - - -#4. Playlist + -APIs for playlist management - -## Get Shared Playlist + +## Get Default Projects -Get the specified shared playlist of a Project. +Get a list of the default projects. > Example request: ```bash curl -X GET \ - -G "http://localhost:8082/api/api/v1/playlists/1/load-shared" \ + -G "http://localhost:8000/api/v1/suborganization/1/projects/default?optional=size%2C+order_by_type%2C+order_by_column8" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/playlists/1/load-shared" + "http://localhost:8000/api/v1/suborganization/1/projects/default" ); +let params = { + "optional": "size, order_by_type, order_by_column8", +}; +Object.keys(params) + .forEach(key => url.searchParams.append(key, params[key])); + let headers = { "Content-Type": "application/json", "Accept": "application/json", @@ -4608,12 +4565,15 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->get( - 'http://localhost:8082/api/api/v1/playlists/1/load-shared', + 'http://localhost:8000/api/v1/suborganization/1/projects/default', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'query' => [ + 'optional'=> 'size, order_by_type, order_by_column8', + ], ] ); $body = $response->getBody(); @@ -4624,87 +4584,121 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/playlists/1/load-shared' +url = 'http://localhost:8000/api/v1/suborganization/1/projects/default' +params = { + 'optional': 'size, order_by_type, order_by_column8', +} headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('GET', url, headers=headers, params=params) response.json() ``` -> Example response (400): +> Example response (200): ```json -{ - "errors": [ - "No shareable Project found." - ] -} +null ``` > Example response (200): ```json { - "playlist": { - "id": 1, - "title": "Math Playlist", - "order": 0, - "is_public": true, - "project_id": 1, - "project": { + "projects": [ + { "id": 1, "name": "Test Project", "description": "This is a test project.", "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", "shared": true, "starter_project": null, - "users": [ + "is_public": true, + "playlists": [ { "id": 1, - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@currikistudio.org", - "role": "owner" + "title": "Test Playlist 1", + "order": 1, + "created_at": "2020-09-10T19:21:08.000000Z", + "updated_at": "2020-09-10T19:21:08.000000Z" + }, + { + "id": 2, + "title": "Test Playlist 2", + "order": 2, + "created_at": "2020-09-11T19:21:08.000000Z", + "updated_at": "2020-09-11T19:21:08.000000Z" } ], - "is_public": true, "created_at": "2020-09-06T19:21:08.000000Z", "updated_at": "2020-09-06T19:21:08.000000Z" }, - "activities": [], - "created_at": "2020-09-07T17:01:24.000000Z", - "updated_at": "2020-09-07T17:01:24.000000Z" - } + { + "id": 2, + "name": "Math Project", + "description": "This is a test math project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "is_public": true, + "playlists": [ + { + "id": 3, + "title": "Test Playlist 3", + "order": 1, + "created_at": "2020-09-12T19:21:08.000000Z", + "updated_at": "2020-09-12T19:21:08.000000Z" + }, + { + "id": 4, + "title": "Test Playlist 4", + "order": 2, + "created_at": "2020-09-13T19:21:08.000000Z", + "updated_at": "2020-09-13T19:21:08.000000Z" + } + ], + "created_at": "2020-09-07T19:21:08.000000Z", + "updated_at": "2020-09-07T19:21:08.000000Z" + } + ] } ``` ### HTTP Request -`GET api/v1/playlists/{playlist}/load-shared` +`GET api/v1/suborganization/{suborganization}/projects/default` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `playlist` | required | The Id of a playlist + `required` | optional | Organization $suborganization. + `Organization` | optional | $suborganization +#### Query Parameters - +Parameter | Status | Description +--------- | ------- | ------- | ----------- + `optional` | optional | GetProjectsRequest $request. + + + + +## Get All Projects Detail + +Get a list of the projects of a user with detail. - -## api/v1/playlists/update-order > Example request: ```bash curl -X GET \ - -G "http://localhost:8082/api/api/v1/playlists/update-order" \ + -G "http://localhost:8000/api/v1/suborganization/1/projects/detail" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/playlists/update-order" + "http://localhost:8000/api/v1/suborganization/1/projects/detail" ); let headers = { @@ -4724,7 +4718,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->get( - 'http://localhost:8082/api/api/v1/playlists/update-order', + 'http://localhost:8000/api/v1/suborganization/1/projects/detail', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -4740,7 +4734,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/playlists/update-order' +url = 'http://localhost:8000/api/v1/suborganization/1/projects/detail' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' @@ -4750,39 +4744,94 @@ response.json() ``` -> Example response (500): +> Example response (200): ```json { - "message": "Server Error" + "projects": [ + { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "is_public": true, + "playlists": [ + { + "id": 1, + "title": "Test Playlist 1", + "order": 1, + "created_at": "2020-09-10T19:21:08.000000Z", + "updated_at": "2020-09-10T19:21:08.000000Z" + }, + { + "id": 2, + "title": "Test Playlist 2", + "order": 2, + "created_at": "2020-09-11T19:21:08.000000Z", + "updated_at": "2020-09-11T19:21:08.000000Z" + } + ], + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + { + "id": 2, + "name": "Math Project", + "description": "This is a test math project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "is_public": true, + "playlists": [ + { + "id": 3, + "title": "Test Playlist 3", + "order": 1, + "created_at": "2020-09-12T19:21:08.000000Z", + "updated_at": "2020-09-12T19:21:08.000000Z" + }, + { + "id": 4, + "title": "Test Playlist 4", + "order": 2, + "created_at": "2020-09-13T19:21:08.000000Z", + "updated_at": "2020-09-13T19:21:08.000000Z" + } + ], + "created_at": "2020-09-07T19:21:08.000000Z", + "updated_at": "2020-09-07T19:21:08.000000Z" + } + ] } ``` ### HTTP Request -`GET api/v1/playlists/update-order` - +`GET api/v1/suborganization/{suborganization}/projects/detail` - +#### URL Parameters - -## Reorder Playlists +Parameter | Status | Description +--------- | ------- | ------- | ------- + `suborganization` | required | The Id of a suborganization -Reorder playlists of a project. + + +## api/v1/projects/update-order > Example request: ```bash -curl -X POST \ - "http://localhost:8082/api/api/v1/projects/1/playlists/reorder" \ +curl -X GET \ + -G "http://localhost:8000/api/v1/projects/update-order" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" \ - -d '{"playlists":[]}' - + -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/projects/1/playlists/reorder" + "http://localhost:8000/api/v1/projects/update-order" ); let headers = { @@ -4790,14 +4839,9 @@ let headers = { "Accept": "application/json", }; -let body = { - "playlists": [] -} - fetch(url, { - method: "POST", + method: "GET", headers: headers, - body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -4806,16 +4850,13 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->post( - 'http://localhost:8082/api/api/v1/projects/1/playlists/reorder', +$response = $client->get( + 'http://localhost:8000/api/v1/projects/update-order', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], - 'json' => [ - 'playlists' => [], - ], ] ); $body = $response->getBody(); @@ -4826,199 +4867,47 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/projects/1/playlists/reorder' -payload = { - "playlists": [] -} +url = 'http://localhost:8000/api/v1/projects/update-order' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('POST', url, headers=headers, json=payload) +response = requests.request('GET', url, headers=headers) response.json() ``` -> Example response (200): +> Example response (401): ```json { - "playlists": [ - { - "id": 1, - "title": "Math Playlist", - "order": 0, - "is_public": true, - "project_id": 1, - "project": { - "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "users": [ - { - "id": 1, - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@currikistudio.org", - "role": "owner" - } - ], - "is_public": true, - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" - }, - "activities": [ - { - "id": 1, - "playlist_id": 1, - "title": "Audio Record", - "type": "h5p", - "content": "Audio Record content", - "shared": true, - "order": 0, - "thumb_url": "\/storage\/activities\/3vVpHHh75MJHOV6a6iZdy13luBaiNn1SrniYpBbQ.png", - "subject_id": "Career & Technical Education", - "education_level_id": null, - "h5p_content": { - "id": 19430, - "user_id": 1, - "title": "record", - "library_id": 98, - "parameters": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing \\\"Retry\\\" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", - "filtered": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing "Retry" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", - "slug": "record", - "embed_type": "div", - "disable": 9, - "content_type": null, - "authors": null, - "source": null, - "year_from": null, - "year_to": null, - "license": "U", - "license_version": null, - "license_extras": null, - "author_comments": null, - "changes": null, - "default_language": null, - "created_at": "2020-09-27T07:14:57.000000Z", - "updated_at": "2020-09-27T07:14:57.000000Z" - }, - "is_public": false, - "created_at": "2020-09-27T07:14:57.000000Z", - "updated_at": "2020-09-27T07:14:57.000000Z" - }, - { - "id": 2, - "playlist_id": 1, - "title": "Language Arts", - "type": "h5p", - "content": "Language Arts content", - "shared": true, - "order": 1, - "thumb_url": "\/storage\/activities\/w2LXV4VMPgccjJyZbs16wSzglX1s58K5NFfFp7ed.png", - "subject_id": "Language Arts", - "education_level_id": null, - "h5p_content": { - "id": 19431, - "user_id": 1, - "title": "fghfhg", - "library_id": 98, - "parameters": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing \\\"Retry\\\" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", - "filtered": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing "Retry" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", - "slug": "fghfhg", - "embed_type": "div", - "disable": 9, - "content_type": null, - "authors": null, - "source": null, - "year_from": null, - "year_to": null, - "license": "U", - "license_version": null, - "license_extras": null, - "author_comments": null, - "changes": null, - "default_language": null, - "created_at": "2020-09-07T07:15:31.000000Z", - "updated_at": "2020-09-07T07:15:31.000000Z" - }, - "is_public": false, - "created_at": "2020-09-07T07:15:31.000000Z", - "updated_at": "2020-09-07T07:15:31.000000Z" - } - ], - "created_at": "2020-09-07T17:01:24.000000Z", - "updated_at": "2020-09-07T17:01:24.000000Z" - }, - { - "id": 2, - "title": "Music Playlist", - "order": 1, - "is_public": false, - "project_id": 1, - "project": { - "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "users": [ - { - "id": 1, - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@currikistudio.org", - "role": "owner" - } - ], - "is_public": true, - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" - }, - "activities": [], - "created_at": "2020-09-16T18:21:29.000000Z", - "updated_at": "2020-09-16T18:21:29.000000Z" - } - ] + "message": "Unauthenticated." } ``` ### HTTP Request -`POST api/v1/projects/{project}/playlists/reorder` +`GET api/v1/projects/update-order` -#### URL Parameters -Parameter | Status | Description ---------- | ------- | ------- | ------- - `project` | required | The Id of a project -#### Body Parameters -Parameter | Type | Status | Description ---------- | ------- | ------- | ------- | ----------- - `playlists` | array | required | Playlists of a project - - + - -## Clone Playlist + +## Get All Favorite Projects of login user -Clone a playlist of a project. +Get a list of the favorite projects of a user. > Example request: ```bash -curl -X POST \ - "http://localhost:8082/api/api/v1/projects/1/playlists/1/clone" \ +curl -X GET \ + -G "http://localhost:8000/api/v1/suborganization/1/projects/favorites" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/projects/1/playlists/1/clone" + "http://localhost:8000/api/v1/suborganization/1/projects/favorites" ); let headers = { @@ -5027,7 +4916,7 @@ let headers = { }; fetch(url, { - method: "POST", + method: "GET", headers: headers, }) .then(response => response.json()) @@ -5037,8 +4926,8 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->post( - 'http://localhost:8082/api/api/v1/projects/1/playlists/1/clone', +$response = $client->get( + 'http://localhost:8000/api/v1/suborganization/1/projects/favorites', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -5054,12 +4943,12 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/projects/1/playlists/1/clone' +url = 'http://localhost:8000/api/v1/suborganization/1/projects/favorites' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('POST', url, headers=headers) +response = requests.request('GET', url, headers=headers) response.json() ``` @@ -5068,48 +4957,64 @@ response.json() ```json { - "message": "Playlist is being cloned|duplicated in background!" -} -``` -> Example response (500): - -```json -{ - "errors": [ - "Not a Public Playlist." - ] -} -``` - -### HTTP Request -`POST api/v1/projects/{project}/playlists/{playlist}/clone` + "projects": [ + { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "is_public": true, + "gcr_project_visibility": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + { + "id": 2, + "name": "Math Project", + "description": "This is a test math project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832384", + "shared": true, + "starter_project": null, + "is_public": true, + "created_at": "2020-09-07T19:21:08.000000Z", + "updated_at": "2020-09-07T19:21:08.000000Z" + } + ] +} +``` + +### HTTP Request +`GET api/v1/suborganization/{suborganization}/projects/favorites` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `project` | required | The Id of a project - `playlist` | required | The Id of a playlist + `Organization` | optional | $suborganization - + - -## Get Playlists + +## Reorder Projects -Get a list of the playlists of a project. +Reorder projects of a user. > Example request: ```bash -curl -X GET \ - -G "http://localhost:8082/api/api/v1/projects/1/playlists" \ +curl -X POST \ + "http://localhost:8000/api/v1/suborganization/1/projects/reorder" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" + -H "Accept: application/json" \ + -d '{"projects":[]}' + ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/projects/1/playlists" + "http://localhost:8000/api/v1/suborganization/1/projects/reorder" ); let headers = { @@ -5117,9 +5022,14 @@ let headers = { "Accept": "application/json", }; +let body = { + "projects": [] +} + fetch(url, { - method: "GET", + method: "POST", headers: headers, + body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -5128,13 +5038,16 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->get( - 'http://localhost:8082/api/api/v1/projects/1/playlists', +$response = $client->post( + 'http://localhost:8000/api/v1/suborganization/1/projects/reorder', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'json' => [ + 'projects' => [], + ], ] ); $body = $response->getBody(); @@ -5145,12 +5058,15 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/projects/1/playlists' +url = 'http://localhost:8000/api/v1/suborganization/1/projects/reorder' +payload = { + "projects": [] +} headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('POST', url, headers=headers, json=payload) response.json() ``` @@ -5159,180 +5075,63 @@ response.json() ```json { - "playlists": [ + "projects": [ { "id": 1, - "title": "Math Playlist", - "order": 0, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, "is_public": true, - "project_id": 1, - "project": { - "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "users": [ - { - "id": 1, - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@currikistudio.org", - "role": "owner" - } - ], - "is_public": true, - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" - }, - "activities": [ - { - "id": 1, - "playlist_id": 1, - "title": "Audio Record", - "type": "h5p", - "content": "Audio Record content", - "shared": true, - "order": 0, - "thumb_url": "\/storage\/activities\/3vVpHHh75MJHOV6a6iZdy13luBaiNn1SrniYpBbQ.png", - "subject_id": "Career & Technical Education", - "education_level_id": null, - "h5p_content": { - "id": 19430, - "user_id": 1, - "title": "record", - "library_id": 98, - "parameters": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing \\\"Retry\\\" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", - "filtered": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing "Retry" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", - "slug": "record", - "embed_type": "div", - "disable": 9, - "content_type": null, - "authors": null, - "source": null, - "year_from": null, - "year_to": null, - "license": "U", - "license_version": null, - "license_extras": null, - "author_comments": null, - "changes": null, - "default_language": null, - "created_at": "2020-09-27T07:14:57.000000Z", - "updated_at": "2020-09-27T07:14:57.000000Z" - }, - "is_public": false, - "created_at": "2020-09-27T07:14:57.000000Z", - "updated_at": "2020-09-27T07:14:57.000000Z" - }, - { - "id": 2, - "playlist_id": 1, - "title": "Language Arts", - "type": "h5p", - "content": "Language Arts content", - "shared": true, - "order": 1, - "thumb_url": "\/storage\/activities\/w2LXV4VMPgccjJyZbs16wSzglX1s58K5NFfFp7ed.png", - "subject_id": "Language Arts", - "education_level_id": null, - "h5p_content": { - "id": 19431, - "user_id": 1, - "title": "fghfhg", - "library_id": 98, - "parameters": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing \\\"Retry\\\" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", - "filtered": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing "Retry" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", - "slug": "fghfhg", - "embed_type": "div", - "disable": 9, - "content_type": null, - "authors": null, - "source": null, - "year_from": null, - "year_to": null, - "license": "U", - "license_version": null, - "license_extras": null, - "author_comments": null, - "changes": null, - "default_language": null, - "created_at": "2020-09-07T07:15:31.000000Z", - "updated_at": "2020-09-07T07:15:31.000000Z" - }, - "is_public": false, - "created_at": "2020-09-07T07:15:31.000000Z", - "updated_at": "2020-09-07T07:15:31.000000Z" - } - ], - "created_at": "2020-09-07T17:01:24.000000Z", - "updated_at": "2020-09-07T17:01:24.000000Z" + "gcr_project_visibility": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" }, { "id": 2, - "title": "Music Playlist", - "order": 1, - "is_public": false, - "project_id": 1, - "project": { - "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "users": [ - { - "id": 1, - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@currikistudio.org", - "role": "owner" - } - ], - "is_public": true, - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" - }, - "activities": [], - "created_at": "2020-09-16T18:21:29.000000Z", - "updated_at": "2020-09-16T18:21:29.000000Z" + "name": "Math Project", + "description": "This is a test math project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832384", + "shared": true, + "starter_project": null, + "is_public": true, + "created_at": "2020-09-07T19:21:08.000000Z", + "updated_at": "2020-09-07T19:21:08.000000Z" } ] } ``` ### HTTP Request -`GET api/v1/projects/{project}/playlists` - -#### URL Parameters - -Parameter | Status | Description ---------- | ------- | ------- | ------- - `project` | required | The Id of a project +`POST api/v1/suborganization/{suborganization}/projects/reorder` - +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `projects` | array | required | projects of a user + + - -## Create Playlist + +## Update Project's Order -Create a new playlist of a project. +Update project's order. > Example request: ```bash curl -X POST \ - "http://localhost:8082/api/api/v1/projects/est/playlists" \ + "http://localhost:8000/api/v1/suborganization/1/projects/1/order" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ - -d '{"title":"Math Playlist","order":0}' + -d '{"order":1}' ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/projects/est/playlists" + "http://localhost:8000/api/v1/suborganization/1/projects/1/order" ); let headers = { @@ -5341,8 +5140,7 @@ let headers = { }; let body = { - "title": "Math Playlist", - "order": 0 + "order": 1 } fetch(url, { @@ -5358,15 +5156,14 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/v1/projects/est/playlists', + 'http://localhost:8000/api/v1/suborganization/1/projects/1/order', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ - 'title' => 'Math Playlist', - 'order' => 0, + 'order' => 1, ], ] ); @@ -5378,10 +5175,9 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/projects/est/playlists' +url = 'http://localhost:8000/api/v1/suborganization/1/projects/1/order' payload = { - "title": "Math Playlist", - "order": 0 + "order": 1 } headers = { 'Content-Type': 'application/json', @@ -5392,85 +5188,55 @@ response.json() ``` -> Example response (500): +> Example response (200): ```json { - "errors": [ - "Could not create playlist. Please try again later." - ] + "message": "Project reorder has been successful." } ``` -> Example response (201): +> Example response (500): ```json { - "playlist": { - "id": 1, - "title": "Math Playlist", - "order": 0, - "is_public": true, - "project_id": 1, - "project": { - "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "users": [ - { - "id": 1, - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@currikistudio.org", - "role": "owner" - } - ], - "is_public": true, - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" - }, - "activities": [], - "created_at": "2020-09-07T17:01:24.000000Z", - "updated_at": "2020-09-07T17:01:24.000000Z" - } + "errors": [ + "Failed to reorder project." + ] } ``` ### HTTP Request -`POST api/v1/projects/{project}/playlists` +`POST api/v1/suborganization/{suborganization}/projects/{project}/order` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `project` | required | The Id of a project Example 1 + `project_id` | optional | int required Id of the project whose order is to be updated #### Body Parameters Parameter | Type | Status | Description --------- | ------- | ------- | ------- | ----------- - `title` | string | required | The title of a playlist - `order` | integer | optional | The order number of a playlist + `order` | integer | required | New order to set for the project - + - -## Get Playlist + +## Share Project -Get the specified playlist of a project. +Share the specified project of a user. > Example request: ```bash -curl -X GET \ - -G "http://localhost:8082/api/api/v1/projects/1/playlists/1" \ +curl -X POST \ + "http://localhost:8000/api/v1/suborganization/1/projects/1/share" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/projects/1/playlists/1" + "http://localhost:8000/api/v1/suborganization/1/projects/1/share" ); let headers = { @@ -5479,7 +5245,7 @@ let headers = { }; fetch(url, { - method: "GET", + method: "POST", headers: headers, }) .then(response => response.json()) @@ -5489,8 +5255,8 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->get( - 'http://localhost:8082/api/api/v1/projects/1/playlists/1', +$response = $client->post( + 'http://localhost:8000/api/v1/suborganization/1/projects/1/share', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -5506,22 +5272,22 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/projects/1/playlists/1' +url = 'http://localhost:8000/api/v1/suborganization/1/projects/1/share' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('POST', url, headers=headers) response.json() ``` -> Example response (400): +> Example response (500): ```json { "errors": [ - "Invalid project or playlist id." + "Failed to share project." ] } ``` @@ -5529,70 +5295,58 @@ response.json() ```json { - "playlist": { + "project": { "id": 1, - "title": "Math Playlist", - "order": 0, - "is_public": true, - "project_id": 1, - "project": { - "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "users": [ - { - "id": 1, - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@currikistudio.org", - "role": "owner" - } - ], - "is_public": true, - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" - }, - "activities": [], - "created_at": "2020-09-07T17:01:24.000000Z", - "updated_at": "2020-09-07T17:01:24.000000Z" + "organization_id": 1, + "organization_visibility_type_id": 4, + "name": "The Science of Golf", + "description": "Uncover the science, technology, engineering, and mathematics behind the game of golf.", + "thumb_url": "\/storage\/uploads\/nN5y8v8zh2ghxrKuHCv5wvJOREFw0Nr27s2DPxWq.png", + "shared": false, + "gcr_project_visibility": true, + "starter_project": false, + "order": null, + "status": 1, + "status_text": "DRAFT", + "indexing": null, + "indexing_text": "NOT REQUESTED", + "created_at": "2020-04-30T20:03:12.000000Z", + "updated_at": "2020-09-17T09:44:27.000000Z" } } ``` ### HTTP Request -`GET api/v1/projects/{project}/playlists/{playlist}` +`POST api/v1/suborganization/{suborganization}/projects/{project}/share` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- `project` | required | The Id of a project - `playlist` | required | The Id of a playlist + `suborganization` | required | The Id of a suborganization - + - -## Update Playlist + +## Clone Project -Update the specified playlist of a project. +Clone the specified project of a user. > Example request: ```bash -curl -X PUT \ - "http://localhost:8082/api/api/v1/projects/1/playlists/1" \ +curl -X POST \ + "http://localhost:8000/api/v1/suborganization/1/projects/1/clone" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ - -d '{"title":"Math Playlist","order":0}' + -d '{"user_id":"1"}' ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/projects/1/playlists/1" + "http://localhost:8000/api/v1/suborganization/1/projects/1/clone" ); let headers = { @@ -5601,12 +5355,11 @@ let headers = { }; let body = { - "title": "Math Playlist", - "order": 0 + "user_id": "1" } fetch(url, { - method: "PUT", + method: "POST", headers: headers, body: body }) @@ -5617,16 +5370,15 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->put( - 'http://localhost:8082/api/api/v1/projects/1/playlists/1', +$response = $client->post( + 'http://localhost:8000/api/v1/suborganization/1/projects/1/clone', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ - 'title' => 'Math Playlist', - 'order' => 0, + 'user_id' => '1', ], ] ); @@ -5638,111 +5390,69 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/projects/1/playlists/1' +url = 'http://localhost:8000/api/v1/suborganization/1/projects/1/clone' payload = { - "title": "Math Playlist", - "order": 0 + "user_id": "1" } headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('PUT', url, headers=headers, json=payload) +response = requests.request('POST', url, headers=headers, json=payload) response.json() ``` -> Example response (400): +> Example response (200): ```json { - "errors": [ - "Invalid project or playlist id." - ] + "message": "Project is being cloned|duplicated in background!" } ``` -> Example response (500): +> Example response (400): ```json { "errors": [ - "Failed to update playlist." + "Not a Public Project." ] } ``` -> Example response (200): - -```json -{ - "playlist": { - "id": 1, - "title": "Math Playlist", - "order": 0, - "is_public": true, - "project_id": 1, - "project": { - "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "users": [ - { - "id": 1, - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@currikistudio.org", - "role": "owner" - } - ], - "is_public": true, - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" - }, - "activities": [], - "created_at": "2020-09-07T17:01:24.000000Z", - "updated_at": "2020-09-07T17:01:24.000000Z" - } -} -``` ### HTTP Request -`PUT api/v1/projects/{project}/playlists/{playlist}` - -`PATCH api/v1/projects/{project}/playlists/{playlist}` +`POST api/v1/suborganization/{suborganization}/projects/{project}/clone` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- + `suborganization` | required | The Id of a suborganization `project` | required | The Id of a project - `playlist` | required | The Id of a playlist #### Body Parameters Parameter | Type | Status | Description --------- | ------- | ------- | ------- | ----------- - `title` | string | required | The title of a playlist - `order` | integer | optional | The order number of a playlist + `user_id` | optional | optional | The Id of a user - + - -## Remove Playlist + +## Export Project -Remove the specified playlist of a project. +Export the specified project of a user. > Example request: ```bash -curl -X DELETE \ - "http://localhost:8082/api/api/v1/projects/1/playlists/1" \ +curl -X POST \ + "http://localhost:8000/api/v1/suborganization/1/projects/1/export" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/projects/1/playlists/1" + "http://localhost:8000/api/v1/suborganization/1/projects/1/export" ); let headers = { @@ -5751,7 +5461,7 @@ let headers = { }; fetch(url, { - method: "DELETE", + method: "POST", headers: headers, }) .then(response => response.json()) @@ -5761,8 +5471,8 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->delete( - 'http://localhost:8082/api/api/v1/projects/1/playlists/1', +$response = $client->post( + 'http://localhost:8000/api/v1/suborganization/1/projects/1/export', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -5778,12 +5488,12 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/projects/1/playlists/1' +url = 'http://localhost:8000/api/v1/suborganization/1/projects/1/export' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('DELETE', url, headers=headers) +response = requests.request('POST', url, headers=headers) response.json() ``` @@ -5792,57 +5502,39 @@ response.json() ```json { - "message": "Playlist has been deleted successfully." -} -``` -> Example response (400): - -```json -{ - "errors": [ - "Invalid project or playlist id." - ] -} -``` -> Example response (500): - -```json -{ - "errors": [ - "Failed to delete playlist." - ] + "message": "Project is being cloned|duplicated in background!" } ``` ### HTTP Request -`DELETE api/v1/projects/{project}/playlists/{playlist}` +`POST api/v1/suborganization/{suborganization}/projects/{project}/export` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- + `Organization` | optional | $suborganization `project` | required | The Id of a project - `playlist` | required | The Id of a playlist - + - -## Get Lti Playlist + +## Export Noovo Project -Get the lti playlist of a project. +Export the specified project of a user. > Example request: ```bash -curl -X GET \ - -G "http://localhost:8082/api/api/v1/playlists/1/lti" \ +curl -X POST \ + "http://localhost:8000/api/v1/suborganization/1/projects/1/export-noovo" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/playlists/1/lti" + "http://localhost:8000/api/v1/suborganization/1/projects/1/export-noovo" ); let headers = { @@ -5851,7 +5543,7 @@ let headers = { }; fetch(url, { - method: "GET", + method: "POST", headers: headers, }) .then(response => response.json()) @@ -5861,8 +5553,8 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->get( - 'http://localhost:8082/api/api/v1/playlists/1/lti', +$response = $client->post( + 'http://localhost:8000/api/v1/suborganization/1/projects/1/export-noovo', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -5878,12 +5570,12 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/playlists/1/lti' +url = 'http://localhost:8000/api/v1/suborganization/1/projects/1/export-noovo' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('POST', url, headers=headers) response.json() ``` @@ -5892,71 +5584,39 @@ response.json() ```json { - "playlist": { - "id": 1, - "title": "Math Playlist", - "order": 0, - "is_public": true, - "project_id": 1, - "project": { - "id": 1, - "name": "Test Project", - "description": "This is a test project.", - "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", - "shared": true, - "starter_project": null, - "users": [ - { - "id": 1, - "first_name": "John", - "last_name": "Doe", - "email": "john.doe@currikistudio.org", - "role": "owner" - } - ], - "is_public": true, - "created_at": "2020-09-06T19:21:08.000000Z", - "updated_at": "2020-09-06T19:21:08.000000Z" - }, - "activities": [], - "created_at": "2020-09-07T17:01:24.000000Z", - "updated_at": "2020-09-07T17:01:24.000000Z" - } + "message": "Project is being cloned|duplicated in background!" } ``` ### HTTP Request -`GET api/v1/playlists/{playlist}/lti` +`POST api/v1/suborganization/{suborganization}/projects/{project}/export-noovo` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `project` | required | The Id of a project Example 1 - - - -#5. Activity + `suborganization` | required | The Id of a suborganization + `project` | required | The Id of a project + -APIs for activity management - -## Clone Activity + +## Import Project -Clone the specified activity of a playlist. +Import the specified project of a user. > Example request: ```bash curl -X POST \ - "http://localhost:8082/api/api/v1/playlists/1/activities/1/clone" \ + "http://localhost:8000/api/v1/suborganization/1/projects/import" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/playlists/1/activities/1/clone" + "http://localhost:8000/api/v1/suborganization/1/projects/import" ); let headers = { @@ -5976,7 +5636,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/v1/playlists/1/activities/1/clone', + 'http://localhost:8000/api/v1/suborganization/1/projects/import', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -5992,7 +5652,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/playlists/1/activities/1/clone' +url = 'http://localhost:8000/api/v1/suborganization/1/projects/import' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' @@ -6006,59 +5666,140 @@ response.json() ```json { - "message": "Activity is being cloned|duplicated in background!" + "message": "Project is being cloned|duplicated in background!" } ``` -> Example response (400): -```json -{ - "errors": [ - "Not a Public Activity." +### HTTP Request +`POST api/v1/suborganization/{suborganization}/projects/import` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `suborganization` | required | The Id of a suborganization + `project` | required | The Id of a project + + + + +## Remove Share Project + +Remove share the specified project of a user. + +> Example request: + +```bash +curl -X POST \ + "http://localhost:8000/api/v1/suborganization/1/projects/1/remove-share" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/suborganization/1/projects/1/remove-share" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "POST", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->post( + 'http://localhost:8000/api/v1/suborganization/1/projects/1/remove-share', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/suborganization/1/projects/1/remove-share' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' } +response = requests.request('POST', url, headers=headers) +response.json() ``` + + > Example response (500): ```json { "errors": [ - "Failed to clone activity." + "Failed to remove share project." ] } ``` +> Example response (200): + +```json +{ + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": false, + "starter_project": null, + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + } +} +``` ### HTTP Request -`POST api/v1/playlists/{playlist}/activities/{activity}/clone` +`POST api/v1/suborganization/{suborganization}/projects/{project}/remove-share` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `playlist` | required | The Id of a playlist - `activity` | required | The Id of a activity + `suborganization` | required | The Id of a suborganization + `project` | required | The Id of a project - + - -## Upload Activity thumbnail + +## Favorite/Unfavorite Project -Upload thumbnail image for a activity +Favorite/Unfavorite the specified project for a user. > Example request: ```bash curl -X POST \ - "http://localhost:8082/api/api/v1/activities/upload-thumb" \ + "http://localhost:8000/api/v1/suborganization/1/projects/1/favorite" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" \ - -d '{"thumb":"(binary)"}' - + -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/activities/upload-thumb" + "http://localhost:8000/api/v1/suborganization/1/projects/1/favorite" ); let headers = { @@ -6066,14 +5807,9 @@ let headers = { "Accept": "application/json", }; -let body = { - "thumb": "(binary)" -} - fetch(url, { method: "POST", headers: headers, - body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -6083,15 +5819,12 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->post( - 'http://localhost:8082/api/api/v1/activities/upload-thumb', + 'http://localhost:8000/api/v1/suborganization/1/projects/1/favorite', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], - 'json' => [ - 'thumb' => '(binary)', - ], ] ); $body = $response->getBody(); @@ -6102,15 +5835,12 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/activities/upload-thumb' -payload = { - "thumb": "(binary)" -} +url = 'http://localhost:8000/api/v1/suborganization/1/projects/1/favorite' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('POST', url, headers=headers, json=payload) +response = requests.request('POST', url, headers=headers) response.json() ``` @@ -6119,46 +5849,39 @@ response.json() ```json { - "thumbUrl": "\/storage\/activities\/1fqwe2f65ewf465qwe46weef5w5eqwq.png" -} -``` -> Example response (400): - -```json -{ - "errors": [ - "Invalid image." - ] + "message": "This resource will be removed from your Favorites. You will no longer be able to reuse\/remix its contents into your projects." } ``` ### HTTP Request -`POST api/v1/activities/upload-thumb` +`POST api/v1/suborganization/{suborganization}/projects/{project}/favorite` -#### Body Parameters -Parameter | Type | Status | Description ---------- | ------- | ------- | ------- | ----------- - `thumb` | image | required | Thumbnail image to upload - - +#### URL Parameters - -## Share Activity +Parameter | Status | Description +--------- | ------- | ------- | ------- + `suborganization` | required | The Id of a suborganization + `project` | required | The Id of a project -Share the specified activity. + + + +## Get All Organization Team's Projects + +Get a list of the team's projects of an organization. > Example request: ```bash curl -X GET \ - -G "http://localhost:8082/api/api/v1/activities/1/share" \ + -G "http://localhost:8000/api/v1/suborganization/1/team-projects" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/activities/1/share" + "http://localhost:8000/api/v1/suborganization/1/team-projects" ); let headers = { @@ -6178,7 +5901,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->get( - 'http://localhost:8082/api/api/v1/activities/1/share', + 'http://localhost:8000/api/v1/suborganization/1/team-projects', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -6194,7 +5917,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/activities/1/share' +url = 'http://localhost:8000/api/v1/suborganization/1/team-projects' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' @@ -6204,107 +5927,188 @@ response.json() ``` -> Example response (500): - -```json -{ - "errors": [ - "Failed to share activity." - ] -} -``` > Example response (200): ```json { - "activity": { - "id": 1, - "playlist_id": 1, - "title": "Science of Golf: Why Balls Have Dimples", - "type": "h5p", - "content": "", - "shared": true, - "order": 2, - "thumb_url": null, - "subject_id": null, - "education_level_id": null, - "h5p_content": { - "id": 59, - "user_id": 1, - "title": "Science of Golf: Why Balls Have Dimples", - "library_id": 40, - "parameters": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"},\"aspectRatio\":\"16:9\"}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"bookmarks\":[],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", - "filtered": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"}}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", - "slug": "science-of-golf-why-balls-have-dimples", - "embed_type": "div", - "disable": 9, - "content_type": null, - "authors": null, - "source": null, - "year_from": null, - "year_to": null, - "license": "U", - "license_version": null, - "license_extras": null, - "author_comments": null, - "changes": null, - "default_language": null, - "library": { - "id": 40, - "created_at": null, - "updated_at": null, - "name": "H5P.InteractiveVideo", - "title": "Interactive Video", - "major_version": 1, - "minor_version": 21, - "patch_version": 9, - "runnable": 1, - "restricted": 0, - "fullscreen": 1, - "embed_types": "iframe", - "preloaded_js": "dist\/h5p-interactive-video.js", - "preloaded_css": "dist\/h5p-interactive-video.css", - "drop_library_css": "", - "semantics": "[\n {\n \"name\": \"interactiveVideo\",\n \"type\": \"group\",\n \"widget\": \"wizard\",\n \"label\": \"Interactive Video Editor\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"video\",\n \"type\": \"group\",\n \"label\": \"Upload\/embed video\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"files\",\n \"type\": \"video\",\n \"label\": \"Add a video\",\n \"importance\": \"high\",\n \"description\": \"Click below to add a video you wish to use in your interactive video. You can add a video link or upload video files. It is possible to add several versions of the video with different qualities. To ensure maximum support in browsers at least add a version in webm and mp4 formats.\",\n \"extraAttributes\": [\n \"metadata\"\n ],\n \"enableCustomQualityLabel\": true\n },\n {\n \"name\": \"startScreenOptions\",\n \"type\": \"group\",\n \"label\": \"Start screen options (unsupported for YouTube videos)\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"title\",\n \"type\": \"text\",\n \"label\": \"The title of this interactive video\",\n \"importance\": \"low\",\n \"maxLength\": 60,\n \"default\": \"Interactive Video\",\n \"description\": \"Used in summaries, statistics etc.\"\n },\n {\n \"name\": \"hideStartTitle\",\n \"type\": \"boolean\",\n \"label\": \"Hide title on video start screen\",\n \"importance\": \"low\",\n \"optional\": true,\n \"default\": false\n },\n {\n \"name\": \"shortStartDescription\",\n \"type\": \"text\",\n \"label\": \"Short description (Optional)\",\n \"importance\": \"low\",\n \"optional\": true,\n \"maxLength\": 120,\n \"description\": \"Optional. Display a short description text on the video start screen. Does not work for YouTube videos.\"\n },\n {\n \"name\": \"poster\",\n \"type\": \"image\",\n \"label\": \"Poster image\",\n \"importance\": \"low\",\n \"optional\": true,\n \"description\": \"Image displayed before the user launches the video. Does not work for YouTube Videos.\"\n }\n ]\n },\n {\n \"name\": \"textTracks\",\n \"type\": \"group\",\n \"label\": \"Text tracks (unsupported for YouTube videos)\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"videoTrack\",\n \"type\": \"list\",\n \"label\": \"Available text tracks\",\n \"importance\": \"low\",\n \"optional\": true,\n \"entity\": \"Track\",\n \"min\": 0,\n \"defaultNum\": 1,\n \"field\": {\n \"name\": \"track\",\n \"type\": \"group\",\n \"label\": \"Track\",\n \"importance\": \"low\",\n \"expanded\": false,\n \"fields\": [\n {\n \"name\": \"label\",\n \"type\": \"text\",\n \"label\": \"Track label\",\n \"description\": \"Used if you offer multiple tracks and the user has to choose a track. For instance 'Spanish subtitles' could be the label of a Spanish subtitle track.\",\n \"importance\": \"low\",\n \"default\": \"Subtitles\",\n \"optional\": true\n },\n {\n \"name\": \"kind\",\n \"type\": \"select\",\n \"label\": \"Type of text track\",\n \"importance\": \"low\",\n \"default\": \"subtitles\",\n \"options\": [\n {\n \"value\": \"subtitles\",\n \"label\": \"Subtitles\"\n },\n {\n \"value\": \"captions\",\n \"label\": \"Captions\"\n },\n {\n \"value\": \"descriptions\",\n \"label\": \"Descriptions\"\n }\n ]\n },\n {\n \"name\": \"srcLang\",\n \"type\": \"text\",\n \"label\": \"Source language, must be defined for subtitles\",\n \"importance\": \"low\",\n \"default\": \"en\",\n \"description\": \"Must be a valid BCP 47 language tag. If 'Subtitles' is the type of text track selected, the source language of the track must be defined.\"\n },\n {\n \"name\": \"track\",\n \"type\": \"file\",\n \"label\": \"Track source (WebVTT file)\",\n \"importance\": \"low\"\n }\n ]\n }\n },\n {\n \"name\": \"defaultTrackLabel\",\n \"type\": \"text\",\n \"label\": \"Default text track\",\n \"description\": \"If left empty or not matching any of the text tracks the first text track will be used as the default.\",\n \"importance\": \"low\",\n \"optional\": true\n }\n ]\n }\n ]\n },\n {\n \"name\": \"assets\",\n \"type\": \"group\",\n \"label\": \"Add interactions\",\n \"importance\": \"high\",\n \"widget\": \"interactiveVideo\",\n \"video\": \"video\/files\",\n \"poster\": \"video\/startScreenOptions\/poster\",\n \"fields\": [\n {\n \"name\": \"interactions\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"interaction\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"duration\",\n \"type\": \"group\",\n \"widget\": \"duration\",\n \"label\": \"Display time\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"from\",\n \"type\": \"number\"\n },\n {\n \"name\": \"to\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"name\": \"pause\",\n \"label\": \"Pause video\",\n \"importance\": \"low\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"displayType\",\n \"label\": \"Display as\",\n \"importance\": \"low\",\n \"description\": \"Button<\/b> is a collapsed interaction the user must press to open. Poster<\/b> is an expanded interaction displayed directly on top of the video\",\n \"type\": \"select\",\n \"widget\": \"imageRadioButtonGroup\",\n \"options\": [\n {\n \"value\": \"button\",\n \"label\": \"Button\"\n },\n {\n \"value\": \"poster\",\n \"label\": \"Poster\"\n }\n ],\n \"default\": \"button\"\n },\n {\n \"name\": \"buttonOnMobile\",\n \"label\": \"Turn into button on small screens\",\n \"importance\": \"low\",\n \"type\": \"boolean\",\n \"default\": false\n },\n {\n \"name\": \"label\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"label\": \"Label\",\n \"importance\": \"low\",\n \"description\": \"Label displayed next to interaction icon.\",\n \"optional\": true,\n \"enterMode\": \"p\",\n \"tags\": [\n \"p\"\n ]\n },\n {\n \"name\": \"x\",\n \"type\": \"number\",\n \"importance\": \"low\",\n \"widget\": \"none\"\n },\n {\n \"name\": \"y\",\n \"type\": \"number\",\n \"importance\": \"low\",\n \"widget\": \"none\"\n },\n {\n \"name\": \"width\",\n \"type\": \"number\",\n \"widget\": \"none\",\n \"importance\": \"low\",\n \"optional\": true\n },\n {\n \"name\": \"height\",\n \"type\": \"number\",\n \"widget\": \"none\",\n \"importance\": \"low\",\n \"optional\": true\n },\n {\n \"name\": \"libraryTitle\",\n \"type\": \"text\",\n \"importance\": \"low\",\n \"optional\": true,\n \"widget\": \"none\"\n },\n {\n \"name\": \"action\",\n \"type\": \"library\",\n \"importance\": \"low\",\n \"options\": [\n \"H5P.Nil 1.0\",\n \"H5P.Text 1.1\",\n \"H5P.Table 1.1\",\n \"H5P.Link 1.3\",\n \"H5P.Image 1.1\",\n \"H5P.Summary 1.10\",\n \"H5P.SingleChoiceSet 1.11\",\n \"H5P.MultiChoice 1.14\",\n \"H5P.TrueFalse 1.6\",\n \"H5P.Blanks 1.12\",\n \"H5P.DragQuestion 1.13\",\n \"H5P.MarkTheWords 1.9\",\n \"H5P.DragText 1.8\",\n \"H5P.GoToQuestion 1.3\",\n \"H5P.IVHotspot 1.2\",\n \"H5P.Questionnaire 1.2\",\n \"H5P.FreeTextQuestion 1.0\"\n ]\n },\n {\n \"name\": \"adaptivity\",\n \"type\": \"group\",\n \"label\": \"Adaptivity\",\n \"importance\": \"low\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"correct\",\n \"type\": \"group\",\n \"label\": \"Action on all correct\",\n \"fields\": [\n {\n \"name\": \"seekTo\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Seek to\",\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"allowOptOut\",\n \"type\": \"boolean\",\n \"label\": \"Allow the user to opt out and continue\"\n },\n {\n \"name\": \"message\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"enterMode\": \"p\",\n \"tags\": [\n \"strong\",\n \"em\",\n \"del\",\n \"a\",\n \"code\"\n ],\n \"label\": \"Message\"\n },\n {\n \"name\": \"seekLabel\",\n \"type\": \"text\",\n \"label\": \"Label for seek button\"\n }\n ]\n },\n {\n \"name\": \"wrong\",\n \"type\": \"group\",\n \"label\": \"Action on wrong\",\n \"fields\": [\n {\n \"name\": \"seekTo\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Seek to\",\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"allowOptOut\",\n \"type\": \"boolean\",\n \"label\": \"Allow the user to opt out and continue\"\n },\n {\n \"name\": \"message\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"enterMode\": \"p\",\n \"tags\": [\n \"strong\",\n \"em\",\n \"del\",\n \"a\",\n \"code\"\n ],\n \"label\": \"Message\"\n },\n {\n \"name\": \"seekLabel\",\n \"type\": \"text\",\n \"label\": \"Label for seek button\"\n }\n ]\n },\n {\n \"name\": \"requireCompletion\",\n \"type\": \"boolean\",\n \"label\": \"Require full score for task before proceeding\",\n \"description\": \"For best functionality this option should be used in conjunction with the \\\"Prevent skipping forward in a video\\\" option of Interactive Video.\"\n }\n ]\n },\n {\n \"name\": \"visuals\",\n \"label\": \"Visuals\",\n \"importance\": \"low\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"backgroundColor\",\n \"type\": \"text\",\n \"label\": \"Background color\",\n \"widget\": \"colorSelector\",\n \"default\": \"rgb(255, 255, 255)\",\n \"spectrum\": {\n \"showInput\": true,\n \"showAlpha\": true,\n \"preferredFormat\": \"rgb\",\n \"showPalette\": true,\n \"palette\": [\n [\n \"rgba(0, 0, 0, 0)\"\n ],\n [\n \"rgb(67, 67, 67)\",\n \"rgb(102, 102, 102)\",\n \"rgb(204, 204, 204)\",\n \"rgb(217, 217, 217)\",\n \"rgb(255, 255, 255)\"\n ],\n [\n \"rgb(152, 0, 0)\",\n \"rgb(255, 0, 0)\",\n \"rgb(255, 153, 0)\",\n \"rgb(255, 255, 0)\",\n \"rgb(0, 255, 0)\",\n \"rgb(0, 255, 255)\",\n \"rgb(74, 134, 232)\",\n \"rgb(0, 0, 255)\",\n \"rgb(153, 0, 255)\",\n \"rgb(255, 0, 255)\"\n ],\n [\n \"rgb(230, 184, 175)\",\n \"rgb(244, 204, 204)\",\n \"rgb(252, 229, 205)\",\n \"rgb(255, 242, 204)\",\n \"rgb(217, 234, 211)\",\n \"rgb(208, 224, 227)\",\n \"rgb(201, 218, 248)\",\n \"rgb(207, 226, 243)\",\n \"rgb(217, 210, 233)\",\n \"rgb(234, 209, 220)\",\n \"rgb(221, 126, 107)\",\n \"rgb(234, 153, 153)\",\n \"rgb(249, 203, 156)\",\n \"rgb(255, 229, 153)\",\n \"rgb(182, 215, 168)\",\n \"rgb(162, 196, 201)\",\n \"rgb(164, 194, 244)\",\n \"rgb(159, 197, 232)\",\n \"rgb(180, 167, 214)\",\n \"rgb(213, 166, 189)\",\n \"rgb(204, 65, 37)\",\n \"rgb(224, 102, 102)\",\n \"rgb(246, 178, 107)\",\n \"rgb(255, 217, 102)\",\n \"rgb(147, 196, 125)\",\n \"rgb(118, 165, 175)\",\n \"rgb(109, 158, 235)\",\n \"rgb(111, 168, 220)\",\n \"rgb(142, 124, 195)\",\n \"rgb(194, 123, 160)\",\n \"rgb(166, 28, 0)\",\n \"rgb(204, 0, 0)\",\n \"rgb(230, 145, 56)\",\n \"rgb(241, 194, 50)\",\n \"rgb(106, 168, 79)\",\n \"rgb(69, 129, 142)\",\n \"rgb(60, 120, 216)\",\n \"rgb(61, 133, 198)\",\n \"rgb(103, 78, 167)\",\n \"rgb(166, 77, 121)\",\n \"rgb(91, 15, 0)\",\n \"rgb(102, 0, 0)\",\n \"rgb(120, 63, 4)\",\n \"rgb(127, 96, 0)\",\n \"rgb(39, 78, 19)\",\n \"rgb(12, 52, 61)\",\n \"rgb(28, 69, 135)\",\n \"rgb(7, 55, 99)\",\n \"rgb(32, 18, 77)\",\n \"rgb(76, 17, 48)\"\n ]\n ]\n }\n },\n {\n \"name\": \"boxShadow\",\n \"type\": \"boolean\",\n \"label\": \"Box shadow\",\n \"default\": true,\n \"description\": \"Adds a subtle shadow around the interaction. You might want to disable this for completely transparent interactions\"\n }\n ]\n },\n {\n \"name\": \"goto\",\n \"label\": \"Go to on click\",\n \"importance\": \"low\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"type\",\n \"label\": \"Type\",\n \"type\": \"select\",\n \"widget\": \"selectToggleFields\",\n \"options\": [\n {\n \"value\": \"timecode\",\n \"label\": \"Timecode\",\n \"hideFields\": [\n \"url\"\n ]\n },\n {\n \"value\": \"url\",\n \"label\": \"Another page (URL)\",\n \"hideFields\": [\n \"time\"\n ]\n }\n ],\n \"optional\": true\n },\n {\n \"name\": \"time\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Go To\",\n \"description\": \"The target time the user will be taken to upon pressing the hotspot. Enter timecode in the format M:SS.\",\n \"optional\": true\n },\n {\n \"name\": \"url\",\n \"type\": \"group\",\n \"label\": \"URL\",\n \"widget\": \"linkWidget\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"protocol\",\n \"type\": \"select\",\n \"label\": \"Protocol\",\n \"options\": [\n {\n \"value\": \"http:\/\/\",\n \"label\": \"http:\/\/\"\n },\n {\n \"value\": \"https:\/\/\",\n \"label\": \"https:\/\/\"\n },\n {\n \"value\": \"\/\",\n \"label\": \"(root relative)\"\n },\n {\n \"value\": \"other\",\n \"label\": \"other\"\n }\n ],\n \"optional\": true,\n \"default\": \"http:\/\/\"\n },\n {\n \"name\": \"url\",\n \"type\": \"text\",\n \"label\": \"URL\",\n \"optional\": true\n }\n ]\n },\n {\n \"name\": \"visualize\",\n \"type\": \"boolean\",\n \"label\": \"Visualize\",\n \"description\": \"Show that interaction can be clicked by adding a border and an icon\"\n }\n ]\n }\n ]\n }\n },\n {\n \"name\": \"bookmarks\",\n \"importance\": \"low\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"bookmark\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"time\",\n \"type\": \"number\"\n },\n {\n \"name\": \"label\",\n \"type\": \"text\"\n }\n ]\n }\n },\n {\n \"name\": \"endscreens\",\n \"importance\": \"low\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"endscreen\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"time\",\n \"type\": \"number\"\n },\n {\n \"name\": \"label\",\n \"type\": \"text\"\n }\n ]\n }\n }\n ]\n },\n {\n \"name\": \"summary\",\n \"type\": \"group\",\n \"label\": \"Summary task\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"task\",\n \"type\": \"library\",\n \"options\": [\n \"H5P.Summary 1.10\"\n ],\n \"default\": {\n \"library\": \"H5P.Summary 1.10\",\n \"params\": {}\n }\n },\n {\n \"name\": \"displayAt\",\n \"type\": \"number\",\n \"label\": \"Display at\",\n \"description\": \"Number of seconds before the video ends.\",\n \"default\": 3\n }\n ]\n }\n ]\n },\n {\n \"name\": \"override\",\n \"type\": \"group\",\n \"label\": \"Behavioural settings\",\n \"importance\": \"low\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"startVideoAt\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Start video at\",\n \"importance\": \"low\",\n \"optional\": true,\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"autoplay\",\n \"type\": \"boolean\",\n \"label\": \"Auto-play video\",\n \"default\": false,\n \"optional\": true,\n \"description\": \"Start playing the video automatically\"\n },\n {\n \"name\": \"loop\",\n \"type\": \"boolean\",\n \"label\": \"Loop the video\",\n \"default\": false,\n \"optional\": true,\n \"description\": \"Check if video should run in a loop\"\n },\n {\n \"name\": \"showSolutionButton\",\n \"type\": \"select\",\n \"label\": \"Override \\\"Show Solution\\\" button\",\n \"importance\": \"low\",\n \"description\": \"This option determines if the \\\"Show Solution\\\" button will be shown for all questions, disabled for all or configured for each question individually.\",\n \"optional\": true,\n \"options\": [\n {\n \"value\": \"on\",\n \"label\": \"Enabled\"\n },\n {\n \"value\": \"off\",\n \"label\": \"Disabled\"\n }\n ]\n },\n {\n \"name\": \"retryButton\",\n \"type\": \"select\",\n \"label\": \"Override \\\"Retry\\\" button\",\n \"importance\": \"low\",\n \"description\": \"This option determines if the \\\"Retry\\\" button will be shown for all questions, disabled for all or configured for each question individually.\",\n \"optional\": true,\n \"options\": [\n {\n \"value\": \"on\",\n \"label\": \"Enabled\"\n },\n {\n \"value\": \"off\",\n \"label\": \"Disabled\"\n }\n ]\n },\n {\n \"name\": \"showBookmarksmenuOnLoad\",\n \"type\": \"boolean\",\n \"label\": \"Start with bookmarks menu open\",\n \"importance\": \"low\",\n \"default\": false,\n \"description\": \"This function is not available on iPad when using YouTube as video source.\"\n },\n {\n \"name\": \"showRewind10\",\n \"type\": \"boolean\",\n \"label\": \"Show button for rewinding 10 seconds\",\n \"importance\": \"low\",\n \"default\": false\n },\n {\n \"name\": \"preventSkipping\",\n \"type\": \"boolean\",\n \"default\": false,\n \"label\": \"Prevent skipping forward in a video\",\n \"importance\": \"low\",\n \"description\": \"Enabling this options will disable user video navigation through default controls.\"\n },\n {\n \"name\": \"deactivateSound\",\n \"type\": \"boolean\",\n \"default\": false,\n \"label\": \"Deactivate sound\",\n \"importance\": \"low\",\n \"description\": \"Enabling this option will deactivate the video's sound and prevent it from being switched on.\"\n }\n ]\n },\n {\n \"name\": \"l10n\",\n \"type\": \"group\",\n \"label\": \"Localize\",\n \"importance\": \"low\",\n \"common\": true,\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"interaction\",\n \"type\": \"text\",\n \"label\": \"Interaction title\",\n \"importance\": \"low\",\n \"default\": \"Interaction\",\n \"optional\": true\n },\n {\n \"name\": \"play\",\n \"type\": \"text\",\n \"label\": \"Play title\",\n \"importance\": \"low\",\n \"default\": \"Play\",\n \"optional\": true\n },\n {\n \"name\": \"pause\",\n \"type\": \"text\",\n \"label\": \"Pause title\",\n \"importance\": \"low\",\n \"default\": \"Pause\",\n \"optional\": true\n },\n {\n \"name\": \"mute\",\n \"type\": \"text\",\n \"label\": \"Mute title\",\n \"importance\": \"low\",\n \"default\": \"Mute\",\n \"optional\": true\n },\n {\n \"name\": \"unmute\",\n \"type\": \"text\",\n \"label\": \"Unmute title\",\n \"importance\": \"low\",\n \"default\": \"Unmute\",\n \"optional\": true\n },\n {\n \"name\": \"quality\",\n \"type\": \"text\",\n \"label\": \"Video quality title\",\n \"importance\": \"low\",\n \"default\": \"Video Quality\",\n \"optional\": true\n },\n {\n \"name\": \"captions\",\n \"type\": \"text\",\n \"label\": \"Video captions title\",\n \"importance\": \"low\",\n \"default\": \"Captions\",\n \"optional\": true\n },\n {\n \"name\": \"close\",\n \"type\": \"text\",\n \"label\": \"Close button text\",\n \"importance\": \"low\",\n \"default\": \"Close\",\n \"optional\": true\n },\n {\n \"name\": \"fullscreen\",\n \"type\": \"text\",\n \"label\": \"Fullscreen title\",\n \"importance\": \"low\",\n \"default\": \"Fullscreen\",\n \"optional\": true\n },\n {\n \"name\": \"exitFullscreen\",\n \"type\": \"text\",\n \"label\": \"Exit fullscreen title\",\n \"importance\": \"low\",\n \"default\": \"Exit Fullscreen\",\n \"optional\": true\n },\n {\n \"name\": \"summary\",\n \"type\": \"text\",\n \"label\": \"Summary title\",\n \"importance\": \"low\",\n \"default\": \"Open summary dialog\",\n \"optional\": true\n },\n {\n \"name\": \"bookmarks\",\n \"type\": \"text\",\n \"label\": \"Bookmarks title\",\n \"importance\": \"low\",\n \"default\": \"Bookmarks\",\n \"optional\": true\n },\n {\n \"name\": \"endscreen\",\n \"type\": \"text\",\n \"label\": \"Submit screen title\",\n \"importance\": \"low\",\n \"default\": \"Submit screen\",\n \"optional\": true\n },\n {\n \"name\": \"defaultAdaptivitySeekLabel\",\n \"type\": \"text\",\n \"label\": \"Default label for adaptivity seek button\",\n \"importance\": \"low\",\n \"default\": \"Continue\",\n \"optional\": true\n },\n {\n \"name\": \"continueWithVideo\",\n \"type\": \"text\",\n \"label\": \"Default label for continue video button\",\n \"importance\": \"low\",\n \"default\": \"Continue with video\",\n \"optional\": true\n },\n {\n \"name\": \"playbackRate\",\n \"type\": \"text\",\n \"label\": \"Set playback rate\",\n \"importance\": \"low\",\n \"default\": \"Playback Rate\",\n \"optional\": true\n },\n {\n \"name\": \"rewind10\",\n \"type\": \"text\",\n \"label\": \"Rewind 10 Seconds\",\n \"importance\": \"low\",\n \"default\": \"Rewind 10 Seconds\",\n \"optional\": true\n },\n {\n \"name\": \"navDisabled\",\n \"type\": \"text\",\n \"label\": \"Navigation is disabled text\",\n \"importance\": \"low\",\n \"default\": \"Navigation is disabled\",\n \"optional\": true\n },\n {\n \"name\": \"sndDisabled\",\n \"type\": \"text\",\n \"label\": \"Sound is disabled text\",\n \"importance\": \"low\",\n \"default\": \"Sound is disabled\",\n \"optional\": true\n },\n {\n \"name\": \"requiresCompletionWarning\",\n \"type\": \"text\",\n \"label\": \"Warning that the user must answer the question correctly before continuing\",\n \"importance\": \"low\",\n \"default\": \"You need to answer all the questions correctly before continuing.\",\n \"optional\": true\n },\n {\n \"name\": \"back\",\n \"type\": \"text\",\n \"label\": \"Back button\",\n \"importance\": \"low\",\n \"default\": \"Back\",\n \"optional\": true\n },\n {\n \"name\": \"hours\",\n \"type\": \"text\",\n \"label\": \"Passed time hours\",\n \"importance\": \"low\",\n \"default\": \"Hours\",\n \"optional\": true\n },\n {\n \"name\": \"minutes\",\n \"type\": \"text\",\n \"label\": \"Passed time minutes\",\n \"importance\": \"low\",\n \"default\": \"Minutes\",\n \"optional\": true\n },\n {\n \"name\": \"seconds\",\n \"type\": \"text\",\n \"label\": \"Passed time seconds\",\n \"importance\": \"low\",\n \"default\": \"Seconds\",\n \"optional\": true\n },\n {\n \"name\": \"currentTime\",\n \"type\": \"text\",\n \"label\": \"Label for current time\",\n \"importance\": \"low\",\n \"default\": \"Current time:\",\n \"optional\": true\n },\n {\n \"name\": \"totalTime\",\n \"type\": \"text\",\n \"label\": \"Label for total time\",\n \"importance\": \"low\",\n \"default\": \"Total time:\",\n \"optional\": true\n },\n {\n \"name\": \"singleInteractionAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Text explaining that a single interaction with a name has come into view\",\n \"importance\": \"low\",\n \"default\": \"Interaction appeared:\",\n \"optional\": true\n },\n {\n \"name\": \"multipleInteractionsAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Text for explaining that multiple interactions have come into view\",\n \"importance\": \"low\",\n \"default\": \"Multiple interactions appeared.\",\n \"optional\": true\n },\n {\n \"name\": \"videoPausedAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Video is paused announcement\",\n \"importance\": \"low\",\n \"default\": \"Video is paused\",\n \"optional\": true\n },\n {\n \"name\": \"content\",\n \"type\": \"text\",\n \"label\": \"Content label\",\n \"importance\": \"low\",\n \"default\": \"Content\",\n \"optional\": true\n },\n {\n \"name\": \"answered\",\n \"type\": \"text\",\n \"label\": \"Answered message (@answered will be replaced with the number of answered questions)\",\n \"importance\": \"low\",\n \"default\": \"@answered answered\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTitle\",\n \"type\": \"text\",\n \"label\": \"Submit screen title\",\n \"importance\": \"low\",\n \"default\": \"@answered Question(s) answered\",\n \"description\": \"@answered will be replaced by the number of answered questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformation\",\n \"type\": \"text\",\n \"label\": \"Submit screen information\",\n \"importance\": \"low\",\n \"default\": \"You have answered @answered questions, click below to submit your answers.\",\n \"description\": \"@answered will be replaced by the number of answered questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformationNoAnswers\",\n \"type\": \"text\",\n \"label\": \"Submit screen information for missing answers\",\n \"importance\": \"low\",\n \"default\": \"You have not answered any questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformationMustHaveAnswer\",\n \"type\": \"text\",\n \"label\": \"Submit screen information for answer needed\",\n \"importance\": \"low\",\n \"default\": \"You have to answer at least one question before you can submit your answers.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardSubmitButton\",\n \"type\": \"text\",\n \"label\": \"Submit screen submit button\",\n \"importance\": \"low\",\n \"default\": \"Submit Answers\",\n \"optional\": true\n },\n {\n \"name\": \"endcardSubmitMessage\",\n \"type\": \"text\",\n \"label\": \"Submit screen submit message\",\n \"importance\": \"low\",\n \"default\": \"Your answers have been submitted!\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTableRowAnswered\",\n \"type\": \"text\",\n \"label\": \"Submit screen table row title: Answered questions\",\n \"importance\": \"low\",\n \"default\": \"Answered questions\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTableRowScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen table row title: Score\",\n \"importance\": \"low\",\n \"default\": \"Score\",\n \"optional\": true\n },\n {\n \"name\": \"endcardAnsweredScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen answered score\",\n \"importance\": \"low\",\n \"default\": \"answered\",\n \"optional\": true\n },\n {\n \"name\": \"endCardTableRowSummaryWithScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen row summary including score (for readspeakers)\",\n \"importance\": \"low\",\n \"default\": \"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\n \"optional\": true\n },\n {\n \"name\": \"endCardTableRowSummaryWithoutScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen row summary for no score (for readspeakers)\",\n \"importance\": \"low\",\n \"default\": \"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\",\n \"optional\": true\n }\n ]\n }\n]", - "tutorial_url": "", - "has_icon": 1 - }, - "created_at": "2020-09-30T20:24:58.000000Z", - "updated_at": "2020-09-30T20:24:58.000000Z" + "data": [ + { + "id": 10, + "organization_id": 1, + "organization_visibility_type_id": 1, + "name": "project 1", + "description": "test fffff rrrr", + "thumb_url": "", + "shared": true, + "starter_project": false, + "order": 2, + "status": 1, + "status_text": "DRAFT", + "indexing": null, + "is_user_starter": false, + "indexing_text": "NOT REQUESTED", + "created_at": "2021-08-17T11:15:58.000000Z", + "updated_at": "2021-08-17T11:15:58.000000Z", + "users": [ + { + "id": 1, + "name": "Test User", + "email": "test@test.com", + "email_verified_at": "2021-03-05T15:53:34.000000Z", + "created_at": null, + "updated_at": null, + "first_name": "Test", + "last_name": "User", + "organization_name": null, + "job_title": null, + "address": null, + "phone_number": null, + "organization_type": null, + "website": null, + "deleted_at": null, + "role": null, + "gapi_access_token": null, + "hubspot": false, + "subscribed": false, + "subscribed_ip": null, + "membership_type_id": 2, + "pivot": { + "project_id": 10, + "user_id": 1, + "role": "owner", + "created_at": "2021-08-17T11:15:58.000000Z", + "updated_at": "2021-08-17T11:15:58.000000Z" + } + } + ], + "team": { + "id": 63, + "name": "Team Test One", + "created_at": "2021-08-17T11:15:57.000000Z", + "updated_at": "2021-08-17T11:15:57.000000Z", + "deleted_at": null, + "description": "desc", + "indexing": null, + "organization_id": 1, + "original_user": null + } }, - "created_at": "2020-09-30T20:24:58.000000Z", - "updated_at": "2020-09-30T20:24:58.000000Z" + { + "id": 11, + "organization_id": 1, + "organization_visibility_type_id": 1, + "name": "The Science of Golf", + "description": "Uncover the science, technology, engineering, and mathematics behind the game of golf.", + "thumb_url": "", + "shared": true, + "starter_project": false, + "order": 2, + "status": 1, + "status_text": "DRAFT", + "indexing": null, + "is_user_starter": false, + "indexing_text": "NOT REQUESTED", + "created_at": "2021-08-17T11:21:09.000000Z", + "updated_at": "2021-08-23T17:17:46.000000Z", + "users": [ + { + "id": 1, + "name": "Test User 2", + "email": "test2@test.com", + "email_verified_at": "2021-03-05T15:53:34.000000Z", + "created_at": null, + "updated_at": null, + "first_name": "Test", + "last_name": "User 2", + "organization_name": null, + "job_title": null, + "address": null, + "phone_number": null, + "organization_type": null, + "website": null, + "deleted_at": null, + "role": null, + "gapi_access_token": null, + "hubspot": false, + "subscribed": false, + "subscribed_ip": null, + "membership_type_id": 2, + "pivot": { + "project_id": 11, + "user_id": 1, + "role": "owner", + "created_at": "2021-08-17T11:21:09.000000Z", + "updated_at": "2021-08-17T11:21:09.000000Z" + } + } + ], + "team": { + "id": 64, + "name": "Team 2 Test", + "created_at": "2021-08-17T11:21:08.000000Z", + "updated_at": "2021-08-17T11:21:08.000000Z", + "deleted_at": null, + "description": "desc", + "indexing": null, + "organization_id": 2, + "original_user": null + } + } + ], + "links": { + "first": "http:\/\/localhost:8000\/api\/v1\/suborganization\/1\/team-projects?page=1", + "last": "http:\/\/localhost:8000\/api\/v1\/suborganization\/1\/team-projects?page=1", + "prev": null, + "next": null + }, + "meta": { + "current_page": 1, + "from": 1, + "last_page": 1, + "path": "http:\/\/localhost:8000\/api\/v1\/suborganization\/1\/team-projects", + "per_page": 10, + "to": 2, + "total": 2 } } ``` ### HTTP Request -`GET api/v1/activities/{activity}/share` +`GET api/v1/suborganization/{suborganization}/team-projects` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `activity` | required | The Id of a activity + `suborganization` | required | The Id of a suborganization - + + + +## Get All Projects of login user + +Get a list of the projects of a user. - -## api/v1/activities/update-order > Example request: ```bash curl -X GET \ - -G "http://localhost:8082/api/api/v1/activities/update-order" \ + -G "http://localhost:8000/api/v1/suborganization/1/projects?optional=size%2C+order_by_type%2C+order_by_column8" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/activities/update-order" + "http://localhost:8000/api/v1/suborganization/1/projects" ); +let params = { + "optional": "size, order_by_type, order_by_column8", +}; +Object.keys(params) + .forEach(key => url.searchParams.append(key, params[key])); + let headers = { "Content-Type": "application/json", "Accept": "application/json", @@ -6322,12 +6126,15 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->get( - 'http://localhost:8082/api/api/v1/activities/update-order', + 'http://localhost:8000/api/v1/suborganization/1/projects', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'query' => [ + 'optional'=> 'size, order_by_type, order_by_column8', + ], ] ); $body = $response->getBody(); @@ -6338,47 +6145,91 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/activities/update-order' +url = 'http://localhost:8000/api/v1/suborganization/1/projects' +params = { + 'optional': 'size, order_by_type, order_by_column8', +} headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('GET', url, headers=headers, params=params) response.json() ``` -> Example response (401): +> Example response (200): + +```json +null +``` +> Example response (200): ```json { - "message": "Unauthenticated." + "projects": [ + { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "is_public": true, + "gcr_project_visibility": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + { + "id": 2, + "name": "Math Project", + "description": "This is a test math project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832384", + "shared": true, + "starter_project": null, + "is_public": true, + "created_at": "2020-09-07T19:21:08.000000Z", + "updated_at": "2020-09-07T19:21:08.000000Z" + } + ] } ``` ### HTTP Request -`GET api/v1/activities/update-order` +`GET api/v1/suborganization/{suborganization}/projects` +#### URL Parameters - +Parameter | Status | Description +--------- | ------- | ------- | ------- + `required` | optional | Organization $suborganization. +#### Query Parameters - -## Remove Share Activity +Parameter | Status | Description +--------- | ------- | ------- | ----------- + `optional` | optional | GetProjectsRequest $request. -Remove share the specified activity. + + + +## Create Project + +Create a new project in storage for a user. > Example request: ```bash -curl -X GET \ - -G "http://localhost:8082/api/api/v1/activities/1/remove-share" \ +curl -X POST \ + "http://localhost:8000/api/v1/suborganization/1/projects" \ -H "Content-Type: application/json" \ - -H "Accept: application/json" + -H "Accept: application/json" \ + -d '{"name":"Test Project","description":"This is a test project.","thumb_url":"https:\/\/images.pexels.com\/photos\/2832382","organization_visibility_type_id":1}' + ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/activities/1/remove-share" + "http://localhost:8000/api/v1/suborganization/1/projects" ); let headers = { @@ -6386,9 +6237,17 @@ let headers = { "Accept": "application/json", }; +let body = { + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "organization_visibility_type_id": 1 +} + fetch(url, { - method: "GET", + method: "POST", headers: headers, + body: body }) .then(response => response.json()) .then(json => console.log(json)); @@ -6397,13 +6256,19 @@ fetch(url, { ```php $client = new \GuzzleHttp\Client(); -$response = $client->get( - 'http://localhost:8082/api/api/v1/activities/1/remove-share', +$response = $client->post( + 'http://localhost:8000/api/v1/suborganization/1/projects', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], + 'json' => [ + 'name' => 'Test Project', + 'description' => 'This is a test project.', + 'thumb_url' => 'https://images.pexels.com/photos/2832382', + 'organization_visibility_type_id' => 1, + ], ] ); $body = $response->getBody(); @@ -6414,12 +6279,18 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/activities/1/remove-share' +url = 'http://localhost:8000/api/v1/suborganization/1/projects' +payload = { + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "organization_visibility_type_id": 1 +} headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } -response = requests.request('GET', url, headers=headers) +response = requests.request('POST', url, headers=headers, json=payload) response.json() ``` @@ -6429,103 +6300,70 @@ response.json() ```json { "errors": [ - "Failed to remove share activity." + "Could not create project. Please try again later." ] } ``` -> Example response (200): +> Example response (201): ```json { - "activity": { + "project": { "id": 1, - "playlist_id": 1, - "title": "Science of Golf: Why Balls Have Dimples", - "type": "h5p", - "content": "", + "organization_id": 1, + "organization_visibility_type_id": 4, + "name": "The Science of Golf", + "description": "Uncover the science, technology, engineering, and mathematics behind the game of golf.", + "thumb_url": "\/storage\/uploads\/nN5y8v8zh2ghxrKuHCv5wvJOREFw0Nr27s2DPxWq.png", "shared": false, - "order": 2, - "thumb_url": null, - "subject_id": null, - "education_level_id": null, - "h5p_content": { - "id": 59, - "user_id": 1, - "title": "Science of Golf: Why Balls Have Dimples", - "library_id": 40, - "parameters": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"},\"aspectRatio\":\"16:9\"}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"bookmarks\":[],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", - "filtered": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"}}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", - "slug": "science-of-golf-why-balls-have-dimples", - "embed_type": "div", - "disable": 9, - "content_type": null, - "authors": null, - "source": null, - "year_from": null, - "year_to": null, - "license": "U", - "license_version": null, - "license_extras": null, - "author_comments": null, - "changes": null, - "default_language": null, - "library": { - "id": 40, - "created_at": null, - "updated_at": null, - "name": "H5P.InteractiveVideo", - "title": "Interactive Video", - "major_version": 1, - "minor_version": 21, - "patch_version": 9, - "runnable": 1, - "restricted": 0, - "fullscreen": 1, - "embed_types": "iframe", - "preloaded_js": "dist\/h5p-interactive-video.js", - "preloaded_css": "dist\/h5p-interactive-video.css", - "drop_library_css": "", - "semantics": "[\n {\n \"name\": \"interactiveVideo\",\n \"type\": \"group\",\n \"widget\": \"wizard\",\n \"label\": \"Interactive Video Editor\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"video\",\n \"type\": \"group\",\n \"label\": \"Upload\/embed video\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"files\",\n \"type\": \"video\",\n \"label\": \"Add a video\",\n \"importance\": \"high\",\n \"description\": \"Click below to add a video you wish to use in your interactive video. You can add a video link or upload video files. It is possible to add several versions of the video with different qualities. To ensure maximum support in browsers at least add a version in webm and mp4 formats.\",\n \"extraAttributes\": [\n \"metadata\"\n ],\n \"enableCustomQualityLabel\": true\n },\n {\n \"name\": \"startScreenOptions\",\n \"type\": \"group\",\n \"label\": \"Start screen options (unsupported for YouTube videos)\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"title\",\n \"type\": \"text\",\n \"label\": \"The title of this interactive video\",\n \"importance\": \"low\",\n \"maxLength\": 60,\n \"default\": \"Interactive Video\",\n \"description\": \"Used in summaries, statistics etc.\"\n },\n {\n \"name\": \"hideStartTitle\",\n \"type\": \"boolean\",\n \"label\": \"Hide title on video start screen\",\n \"importance\": \"low\",\n \"optional\": true,\n \"default\": false\n },\n {\n \"name\": \"shortStartDescription\",\n \"type\": \"text\",\n \"label\": \"Short description (Optional)\",\n \"importance\": \"low\",\n \"optional\": true,\n \"maxLength\": 120,\n \"description\": \"Optional. Display a short description text on the video start screen. Does not work for YouTube videos.\"\n },\n {\n \"name\": \"poster\",\n \"type\": \"image\",\n \"label\": \"Poster image\",\n \"importance\": \"low\",\n \"optional\": true,\n \"description\": \"Image displayed before the user launches the video. Does not work for YouTube Videos.\"\n }\n ]\n },\n {\n \"name\": \"textTracks\",\n \"type\": \"group\",\n \"label\": \"Text tracks (unsupported for YouTube videos)\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"videoTrack\",\n \"type\": \"list\",\n \"label\": \"Available text tracks\",\n \"importance\": \"low\",\n \"optional\": true,\n \"entity\": \"Track\",\n \"min\": 0,\n \"defaultNum\": 1,\n \"field\": {\n \"name\": \"track\",\n \"type\": \"group\",\n \"label\": \"Track\",\n \"importance\": \"low\",\n \"expanded\": false,\n \"fields\": [\n {\n \"name\": \"label\",\n \"type\": \"text\",\n \"label\": \"Track label\",\n \"description\": \"Used if you offer multiple tracks and the user has to choose a track. For instance 'Spanish subtitles' could be the label of a Spanish subtitle track.\",\n \"importance\": \"low\",\n \"default\": \"Subtitles\",\n \"optional\": true\n },\n {\n \"name\": \"kind\",\n \"type\": \"select\",\n \"label\": \"Type of text track\",\n \"importance\": \"low\",\n \"default\": \"subtitles\",\n \"options\": [\n {\n \"value\": \"subtitles\",\n \"label\": \"Subtitles\"\n },\n {\n \"value\": \"captions\",\n \"label\": \"Captions\"\n },\n {\n \"value\": \"descriptions\",\n \"label\": \"Descriptions\"\n }\n ]\n },\n {\n \"name\": \"srcLang\",\n \"type\": \"text\",\n \"label\": \"Source language, must be defined for subtitles\",\n \"importance\": \"low\",\n \"default\": \"en\",\n \"description\": \"Must be a valid BCP 47 language tag. If 'Subtitles' is the type of text track selected, the source language of the track must be defined.\"\n },\n {\n \"name\": \"track\",\n \"type\": \"file\",\n \"label\": \"Track source (WebVTT file)\",\n \"importance\": \"low\"\n }\n ]\n }\n },\n {\n \"name\": \"defaultTrackLabel\",\n \"type\": \"text\",\n \"label\": \"Default text track\",\n \"description\": \"If left empty or not matching any of the text tracks the first text track will be used as the default.\",\n \"importance\": \"low\",\n \"optional\": true\n }\n ]\n }\n ]\n },\n {\n \"name\": \"assets\",\n \"type\": \"group\",\n \"label\": \"Add interactions\",\n \"importance\": \"high\",\n \"widget\": \"interactiveVideo\",\n \"video\": \"video\/files\",\n \"poster\": \"video\/startScreenOptions\/poster\",\n \"fields\": [\n {\n \"name\": \"interactions\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"interaction\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"duration\",\n \"type\": \"group\",\n \"widget\": \"duration\",\n \"label\": \"Display time\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"from\",\n \"type\": \"number\"\n },\n {\n \"name\": \"to\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"name\": \"pause\",\n \"label\": \"Pause video\",\n \"importance\": \"low\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"displayType\",\n \"label\": \"Display as\",\n \"importance\": \"low\",\n \"description\": \"Button<\/b> is a collapsed interaction the user must press to open. Poster<\/b> is an expanded interaction displayed directly on top of the video\",\n \"type\": \"select\",\n \"widget\": \"imageRadioButtonGroup\",\n \"options\": [\n {\n \"value\": \"button\",\n \"label\": \"Button\"\n },\n {\n \"value\": \"poster\",\n \"label\": \"Poster\"\n }\n ],\n \"default\": \"button\"\n },\n {\n \"name\": \"buttonOnMobile\",\n \"label\": \"Turn into button on small screens\",\n \"importance\": \"low\",\n \"type\": \"boolean\",\n \"default\": false\n },\n {\n \"name\": \"label\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"label\": \"Label\",\n \"importance\": \"low\",\n \"description\": \"Label displayed next to interaction icon.\",\n \"optional\": true,\n \"enterMode\": \"p\",\n \"tags\": [\n \"p\"\n ]\n },\n {\n \"name\": \"x\",\n \"type\": \"number\",\n \"importance\": \"low\",\n \"widget\": \"none\"\n },\n {\n \"name\": \"y\",\n \"type\": \"number\",\n \"importance\": \"low\",\n \"widget\": \"none\"\n },\n {\n \"name\": \"width\",\n \"type\": \"number\",\n \"widget\": \"none\",\n \"importance\": \"low\",\n \"optional\": true\n },\n {\n \"name\": \"height\",\n \"type\": \"number\",\n \"widget\": \"none\",\n \"importance\": \"low\",\n \"optional\": true\n },\n {\n \"name\": \"libraryTitle\",\n \"type\": \"text\",\n \"importance\": \"low\",\n \"optional\": true,\n \"widget\": \"none\"\n },\n {\n \"name\": \"action\",\n \"type\": \"library\",\n \"importance\": \"low\",\n \"options\": [\n \"H5P.Nil 1.0\",\n \"H5P.Text 1.1\",\n \"H5P.Table 1.1\",\n \"H5P.Link 1.3\",\n \"H5P.Image 1.1\",\n \"H5P.Summary 1.10\",\n \"H5P.SingleChoiceSet 1.11\",\n \"H5P.MultiChoice 1.14\",\n \"H5P.TrueFalse 1.6\",\n \"H5P.Blanks 1.12\",\n \"H5P.DragQuestion 1.13\",\n \"H5P.MarkTheWords 1.9\",\n \"H5P.DragText 1.8\",\n \"H5P.GoToQuestion 1.3\",\n \"H5P.IVHotspot 1.2\",\n \"H5P.Questionnaire 1.2\",\n \"H5P.FreeTextQuestion 1.0\"\n ]\n },\n {\n \"name\": \"adaptivity\",\n \"type\": \"group\",\n \"label\": \"Adaptivity\",\n \"importance\": \"low\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"correct\",\n \"type\": \"group\",\n \"label\": \"Action on all correct\",\n \"fields\": [\n {\n \"name\": \"seekTo\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Seek to\",\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"allowOptOut\",\n \"type\": \"boolean\",\n \"label\": \"Allow the user to opt out and continue\"\n },\n {\n \"name\": \"message\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"enterMode\": \"p\",\n \"tags\": [\n \"strong\",\n \"em\",\n \"del\",\n \"a\",\n \"code\"\n ],\n \"label\": \"Message\"\n },\n {\n \"name\": \"seekLabel\",\n \"type\": \"text\",\n \"label\": \"Label for seek button\"\n }\n ]\n },\n {\n \"name\": \"wrong\",\n \"type\": \"group\",\n \"label\": \"Action on wrong\",\n \"fields\": [\n {\n \"name\": \"seekTo\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Seek to\",\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"allowOptOut\",\n \"type\": \"boolean\",\n \"label\": \"Allow the user to opt out and continue\"\n },\n {\n \"name\": \"message\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"enterMode\": \"p\",\n \"tags\": [\n \"strong\",\n \"em\",\n \"del\",\n \"a\",\n \"code\"\n ],\n \"label\": \"Message\"\n },\n {\n \"name\": \"seekLabel\",\n \"type\": \"text\",\n \"label\": \"Label for seek button\"\n }\n ]\n },\n {\n \"name\": \"requireCompletion\",\n \"type\": \"boolean\",\n \"label\": \"Require full score for task before proceeding\",\n \"description\": \"For best functionality this option should be used in conjunction with the \\\"Prevent skipping forward in a video\\\" option of Interactive Video.\"\n }\n ]\n },\n {\n \"name\": \"visuals\",\n \"label\": \"Visuals\",\n \"importance\": \"low\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"backgroundColor\",\n \"type\": \"text\",\n \"label\": \"Background color\",\n \"widget\": \"colorSelector\",\n \"default\": \"rgb(255, 255, 255)\",\n \"spectrum\": {\n \"showInput\": true,\n \"showAlpha\": true,\n \"preferredFormat\": \"rgb\",\n \"showPalette\": true,\n \"palette\": [\n [\n \"rgba(0, 0, 0, 0)\"\n ],\n [\n \"rgb(67, 67, 67)\",\n \"rgb(102, 102, 102)\",\n \"rgb(204, 204, 204)\",\n \"rgb(217, 217, 217)\",\n \"rgb(255, 255, 255)\"\n ],\n [\n \"rgb(152, 0, 0)\",\n \"rgb(255, 0, 0)\",\n \"rgb(255, 153, 0)\",\n \"rgb(255, 255, 0)\",\n \"rgb(0, 255, 0)\",\n \"rgb(0, 255, 255)\",\n \"rgb(74, 134, 232)\",\n \"rgb(0, 0, 255)\",\n \"rgb(153, 0, 255)\",\n \"rgb(255, 0, 255)\"\n ],\n [\n \"rgb(230, 184, 175)\",\n \"rgb(244, 204, 204)\",\n \"rgb(252, 229, 205)\",\n \"rgb(255, 242, 204)\",\n \"rgb(217, 234, 211)\",\n \"rgb(208, 224, 227)\",\n \"rgb(201, 218, 248)\",\n \"rgb(207, 226, 243)\",\n \"rgb(217, 210, 233)\",\n \"rgb(234, 209, 220)\",\n \"rgb(221, 126, 107)\",\n \"rgb(234, 153, 153)\",\n \"rgb(249, 203, 156)\",\n \"rgb(255, 229, 153)\",\n \"rgb(182, 215, 168)\",\n \"rgb(162, 196, 201)\",\n \"rgb(164, 194, 244)\",\n \"rgb(159, 197, 232)\",\n \"rgb(180, 167, 214)\",\n \"rgb(213, 166, 189)\",\n \"rgb(204, 65, 37)\",\n \"rgb(224, 102, 102)\",\n \"rgb(246, 178, 107)\",\n \"rgb(255, 217, 102)\",\n \"rgb(147, 196, 125)\",\n \"rgb(118, 165, 175)\",\n \"rgb(109, 158, 235)\",\n \"rgb(111, 168, 220)\",\n \"rgb(142, 124, 195)\",\n \"rgb(194, 123, 160)\",\n \"rgb(166, 28, 0)\",\n \"rgb(204, 0, 0)\",\n \"rgb(230, 145, 56)\",\n \"rgb(241, 194, 50)\",\n \"rgb(106, 168, 79)\",\n \"rgb(69, 129, 142)\",\n \"rgb(60, 120, 216)\",\n \"rgb(61, 133, 198)\",\n \"rgb(103, 78, 167)\",\n \"rgb(166, 77, 121)\",\n \"rgb(91, 15, 0)\",\n \"rgb(102, 0, 0)\",\n \"rgb(120, 63, 4)\",\n \"rgb(127, 96, 0)\",\n \"rgb(39, 78, 19)\",\n \"rgb(12, 52, 61)\",\n \"rgb(28, 69, 135)\",\n \"rgb(7, 55, 99)\",\n \"rgb(32, 18, 77)\",\n \"rgb(76, 17, 48)\"\n ]\n ]\n }\n },\n {\n \"name\": \"boxShadow\",\n \"type\": \"boolean\",\n \"label\": \"Box shadow\",\n \"default\": true,\n \"description\": \"Adds a subtle shadow around the interaction. You might want to disable this for completely transparent interactions\"\n }\n ]\n },\n {\n \"name\": \"goto\",\n \"label\": \"Go to on click\",\n \"importance\": \"low\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"type\",\n \"label\": \"Type\",\n \"type\": \"select\",\n \"widget\": \"selectToggleFields\",\n \"options\": [\n {\n \"value\": \"timecode\",\n \"label\": \"Timecode\",\n \"hideFields\": [\n \"url\"\n ]\n },\n {\n \"value\": \"url\",\n \"label\": \"Another page (URL)\",\n \"hideFields\": [\n \"time\"\n ]\n }\n ],\n \"optional\": true\n },\n {\n \"name\": \"time\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Go To\",\n \"description\": \"The target time the user will be taken to upon pressing the hotspot. Enter timecode in the format M:SS.\",\n \"optional\": true\n },\n {\n \"name\": \"url\",\n \"type\": \"group\",\n \"label\": \"URL\",\n \"widget\": \"linkWidget\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"protocol\",\n \"type\": \"select\",\n \"label\": \"Protocol\",\n \"options\": [\n {\n \"value\": \"http:\/\/\",\n \"label\": \"http:\/\/\"\n },\n {\n \"value\": \"https:\/\/\",\n \"label\": \"https:\/\/\"\n },\n {\n \"value\": \"\/\",\n \"label\": \"(root relative)\"\n },\n {\n \"value\": \"other\",\n \"label\": \"other\"\n }\n ],\n \"optional\": true,\n \"default\": \"http:\/\/\"\n },\n {\n \"name\": \"url\",\n \"type\": \"text\",\n \"label\": \"URL\",\n \"optional\": true\n }\n ]\n },\n {\n \"name\": \"visualize\",\n \"type\": \"boolean\",\n \"label\": \"Visualize\",\n \"description\": \"Show that interaction can be clicked by adding a border and an icon\"\n }\n ]\n }\n ]\n }\n },\n {\n \"name\": \"bookmarks\",\n \"importance\": \"low\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"bookmark\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"time\",\n \"type\": \"number\"\n },\n {\n \"name\": \"label\",\n \"type\": \"text\"\n }\n ]\n }\n },\n {\n \"name\": \"endscreens\",\n \"importance\": \"low\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"endscreen\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"time\",\n \"type\": \"number\"\n },\n {\n \"name\": \"label\",\n \"type\": \"text\"\n }\n ]\n }\n }\n ]\n },\n {\n \"name\": \"summary\",\n \"type\": \"group\",\n \"label\": \"Summary task\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"task\",\n \"type\": \"library\",\n \"options\": [\n \"H5P.Summary 1.10\"\n ],\n \"default\": {\n \"library\": \"H5P.Summary 1.10\",\n \"params\": {}\n }\n },\n {\n \"name\": \"displayAt\",\n \"type\": \"number\",\n \"label\": \"Display at\",\n \"description\": \"Number of seconds before the video ends.\",\n \"default\": 3\n }\n ]\n }\n ]\n },\n {\n \"name\": \"override\",\n \"type\": \"group\",\n \"label\": \"Behavioural settings\",\n \"importance\": \"low\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"startVideoAt\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Start video at\",\n \"importance\": \"low\",\n \"optional\": true,\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"autoplay\",\n \"type\": \"boolean\",\n \"label\": \"Auto-play video\",\n \"default\": false,\n \"optional\": true,\n \"description\": \"Start playing the video automatically\"\n },\n {\n \"name\": \"loop\",\n \"type\": \"boolean\",\n \"label\": \"Loop the video\",\n \"default\": false,\n \"optional\": true,\n \"description\": \"Check if video should run in a loop\"\n },\n {\n \"name\": \"showSolutionButton\",\n \"type\": \"select\",\n \"label\": \"Override \\\"Show Solution\\\" button\",\n \"importance\": \"low\",\n \"description\": \"This option determines if the \\\"Show Solution\\\" button will be shown for all questions, disabled for all or configured for each question individually.\",\n \"optional\": true,\n \"options\": [\n {\n \"value\": \"on\",\n \"label\": \"Enabled\"\n },\n {\n \"value\": \"off\",\n \"label\": \"Disabled\"\n }\n ]\n },\n {\n \"name\": \"retryButton\",\n \"type\": \"select\",\n \"label\": \"Override \\\"Retry\\\" button\",\n \"importance\": \"low\",\n \"description\": \"This option determines if the \\\"Retry\\\" button will be shown for all questions, disabled for all or configured for each question individually.\",\n \"optional\": true,\n \"options\": [\n {\n \"value\": \"on\",\n \"label\": \"Enabled\"\n },\n {\n \"value\": \"off\",\n \"label\": \"Disabled\"\n }\n ]\n },\n {\n \"name\": \"showBookmarksmenuOnLoad\",\n \"type\": \"boolean\",\n \"label\": \"Start with bookmarks menu open\",\n \"importance\": \"low\",\n \"default\": false,\n \"description\": \"This function is not available on iPad when using YouTube as video source.\"\n },\n {\n \"name\": \"showRewind10\",\n \"type\": \"boolean\",\n \"label\": \"Show button for rewinding 10 seconds\",\n \"importance\": \"low\",\n \"default\": false\n },\n {\n \"name\": \"preventSkipping\",\n \"type\": \"boolean\",\n \"default\": false,\n \"label\": \"Prevent skipping forward in a video\",\n \"importance\": \"low\",\n \"description\": \"Enabling this options will disable user video navigation through default controls.\"\n },\n {\n \"name\": \"deactivateSound\",\n \"type\": \"boolean\",\n \"default\": false,\n \"label\": \"Deactivate sound\",\n \"importance\": \"low\",\n \"description\": \"Enabling this option will deactivate the video's sound and prevent it from being switched on.\"\n }\n ]\n },\n {\n \"name\": \"l10n\",\n \"type\": \"group\",\n \"label\": \"Localize\",\n \"importance\": \"low\",\n \"common\": true,\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"interaction\",\n \"type\": \"text\",\n \"label\": \"Interaction title\",\n \"importance\": \"low\",\n \"default\": \"Interaction\",\n \"optional\": true\n },\n {\n \"name\": \"play\",\n \"type\": \"text\",\n \"label\": \"Play title\",\n \"importance\": \"low\",\n \"default\": \"Play\",\n \"optional\": true\n },\n {\n \"name\": \"pause\",\n \"type\": \"text\",\n \"label\": \"Pause title\",\n \"importance\": \"low\",\n \"default\": \"Pause\",\n \"optional\": true\n },\n {\n \"name\": \"mute\",\n \"type\": \"text\",\n \"label\": \"Mute title\",\n \"importance\": \"low\",\n \"default\": \"Mute\",\n \"optional\": true\n },\n {\n \"name\": \"unmute\",\n \"type\": \"text\",\n \"label\": \"Unmute title\",\n \"importance\": \"low\",\n \"default\": \"Unmute\",\n \"optional\": true\n },\n {\n \"name\": \"quality\",\n \"type\": \"text\",\n \"label\": \"Video quality title\",\n \"importance\": \"low\",\n \"default\": \"Video Quality\",\n \"optional\": true\n },\n {\n \"name\": \"captions\",\n \"type\": \"text\",\n \"label\": \"Video captions title\",\n \"importance\": \"low\",\n \"default\": \"Captions\",\n \"optional\": true\n },\n {\n \"name\": \"close\",\n \"type\": \"text\",\n \"label\": \"Close button text\",\n \"importance\": \"low\",\n \"default\": \"Close\",\n \"optional\": true\n },\n {\n \"name\": \"fullscreen\",\n \"type\": \"text\",\n \"label\": \"Fullscreen title\",\n \"importance\": \"low\",\n \"default\": \"Fullscreen\",\n \"optional\": true\n },\n {\n \"name\": \"exitFullscreen\",\n \"type\": \"text\",\n \"label\": \"Exit fullscreen title\",\n \"importance\": \"low\",\n \"default\": \"Exit Fullscreen\",\n \"optional\": true\n },\n {\n \"name\": \"summary\",\n \"type\": \"text\",\n \"label\": \"Summary title\",\n \"importance\": \"low\",\n \"default\": \"Open summary dialog\",\n \"optional\": true\n },\n {\n \"name\": \"bookmarks\",\n \"type\": \"text\",\n \"label\": \"Bookmarks title\",\n \"importance\": \"low\",\n \"default\": \"Bookmarks\",\n \"optional\": true\n },\n {\n \"name\": \"endscreen\",\n \"type\": \"text\",\n \"label\": \"Submit screen title\",\n \"importance\": \"low\",\n \"default\": \"Submit screen\",\n \"optional\": true\n },\n {\n \"name\": \"defaultAdaptivitySeekLabel\",\n \"type\": \"text\",\n \"label\": \"Default label for adaptivity seek button\",\n \"importance\": \"low\",\n \"default\": \"Continue\",\n \"optional\": true\n },\n {\n \"name\": \"continueWithVideo\",\n \"type\": \"text\",\n \"label\": \"Default label for continue video button\",\n \"importance\": \"low\",\n \"default\": \"Continue with video\",\n \"optional\": true\n },\n {\n \"name\": \"playbackRate\",\n \"type\": \"text\",\n \"label\": \"Set playback rate\",\n \"importance\": \"low\",\n \"default\": \"Playback Rate\",\n \"optional\": true\n },\n {\n \"name\": \"rewind10\",\n \"type\": \"text\",\n \"label\": \"Rewind 10 Seconds\",\n \"importance\": \"low\",\n \"default\": \"Rewind 10 Seconds\",\n \"optional\": true\n },\n {\n \"name\": \"navDisabled\",\n \"type\": \"text\",\n \"label\": \"Navigation is disabled text\",\n \"importance\": \"low\",\n \"default\": \"Navigation is disabled\",\n \"optional\": true\n },\n {\n \"name\": \"sndDisabled\",\n \"type\": \"text\",\n \"label\": \"Sound is disabled text\",\n \"importance\": \"low\",\n \"default\": \"Sound is disabled\",\n \"optional\": true\n },\n {\n \"name\": \"requiresCompletionWarning\",\n \"type\": \"text\",\n \"label\": \"Warning that the user must answer the question correctly before continuing\",\n \"importance\": \"low\",\n \"default\": \"You need to answer all the questions correctly before continuing.\",\n \"optional\": true\n },\n {\n \"name\": \"back\",\n \"type\": \"text\",\n \"label\": \"Back button\",\n \"importance\": \"low\",\n \"default\": \"Back\",\n \"optional\": true\n },\n {\n \"name\": \"hours\",\n \"type\": \"text\",\n \"label\": \"Passed time hours\",\n \"importance\": \"low\",\n \"default\": \"Hours\",\n \"optional\": true\n },\n {\n \"name\": \"minutes\",\n \"type\": \"text\",\n \"label\": \"Passed time minutes\",\n \"importance\": \"low\",\n \"default\": \"Minutes\",\n \"optional\": true\n },\n {\n \"name\": \"seconds\",\n \"type\": \"text\",\n \"label\": \"Passed time seconds\",\n \"importance\": \"low\",\n \"default\": \"Seconds\",\n \"optional\": true\n },\n {\n \"name\": \"currentTime\",\n \"type\": \"text\",\n \"label\": \"Label for current time\",\n \"importance\": \"low\",\n \"default\": \"Current time:\",\n \"optional\": true\n },\n {\n \"name\": \"totalTime\",\n \"type\": \"text\",\n \"label\": \"Label for total time\",\n \"importance\": \"low\",\n \"default\": \"Total time:\",\n \"optional\": true\n },\n {\n \"name\": \"singleInteractionAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Text explaining that a single interaction with a name has come into view\",\n \"importance\": \"low\",\n \"default\": \"Interaction appeared:\",\n \"optional\": true\n },\n {\n \"name\": \"multipleInteractionsAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Text for explaining that multiple interactions have come into view\",\n \"importance\": \"low\",\n \"default\": \"Multiple interactions appeared.\",\n \"optional\": true\n },\n {\n \"name\": \"videoPausedAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Video is paused announcement\",\n \"importance\": \"low\",\n \"default\": \"Video is paused\",\n \"optional\": true\n },\n {\n \"name\": \"content\",\n \"type\": \"text\",\n \"label\": \"Content label\",\n \"importance\": \"low\",\n \"default\": \"Content\",\n \"optional\": true\n },\n {\n \"name\": \"answered\",\n \"type\": \"text\",\n \"label\": \"Answered message (@answered will be replaced with the number of answered questions)\",\n \"importance\": \"low\",\n \"default\": \"@answered answered\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTitle\",\n \"type\": \"text\",\n \"label\": \"Submit screen title\",\n \"importance\": \"low\",\n \"default\": \"@answered Question(s) answered\",\n \"description\": \"@answered will be replaced by the number of answered questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformation\",\n \"type\": \"text\",\n \"label\": \"Submit screen information\",\n \"importance\": \"low\",\n \"default\": \"You have answered @answered questions, click below to submit your answers.\",\n \"description\": \"@answered will be replaced by the number of answered questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformationNoAnswers\",\n \"type\": \"text\",\n \"label\": \"Submit screen information for missing answers\",\n \"importance\": \"low\",\n \"default\": \"You have not answered any questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformationMustHaveAnswer\",\n \"type\": \"text\",\n \"label\": \"Submit screen information for answer needed\",\n \"importance\": \"low\",\n \"default\": \"You have to answer at least one question before you can submit your answers.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardSubmitButton\",\n \"type\": \"text\",\n \"label\": \"Submit screen submit button\",\n \"importance\": \"low\",\n \"default\": \"Submit Answers\",\n \"optional\": true\n },\n {\n \"name\": \"endcardSubmitMessage\",\n \"type\": \"text\",\n \"label\": \"Submit screen submit message\",\n \"importance\": \"low\",\n \"default\": \"Your answers have been submitted!\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTableRowAnswered\",\n \"type\": \"text\",\n \"label\": \"Submit screen table row title: Answered questions\",\n \"importance\": \"low\",\n \"default\": \"Answered questions\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTableRowScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen table row title: Score\",\n \"importance\": \"low\",\n \"default\": \"Score\",\n \"optional\": true\n },\n {\n \"name\": \"endcardAnsweredScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen answered score\",\n \"importance\": \"low\",\n \"default\": \"answered\",\n \"optional\": true\n },\n {\n \"name\": \"endCardTableRowSummaryWithScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen row summary including score (for readspeakers)\",\n \"importance\": \"low\",\n \"default\": \"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\n \"optional\": true\n },\n {\n \"name\": \"endCardTableRowSummaryWithoutScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen row summary for no score (for readspeakers)\",\n \"importance\": \"low\",\n \"default\": \"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\",\n \"optional\": true\n }\n ]\n }\n]", - "tutorial_url": "", - "has_icon": 1 - }, - "created_at": "2020-09-30T20:24:58.000000Z", - "updated_at": "2020-09-30T20:24:58.000000Z" - }, - "created_at": "2020-09-30T20:24:58.000000Z", - "updated_at": "2020-09-30T20:24:58.000000Z" + "gcr_project_visibility": true, + "starter_project": false, + "order": null, + "status": 1, + "status_text": "DRAFT", + "indexing": null, + "indexing_text": "NOT REQUESTED", + "created_at": "2020-04-30T20:03:12.000000Z", + "updated_at": "2020-09-17T09:44:27.000000Z" } } ``` ### HTTP Request -`GET api/v1/activities/{activity}/remove-share` +`POST api/v1/suborganization/{suborganization}/projects` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `activity` | required | The Id of a activity - - + `suborganization` | required | The Id of a suborganization +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `name` | string | required | Name of a project + `description` | string | required | Description of a project + `thumb_url` | string | required | Thumbnail Url of a project + `organization_visibility_type_id` | integer | required | Id of the organization visibility type + + - -## Get Activity Detail + +## Get Project -Get the specified activity in detail. +Get the specified project detail. > Example request: ```bash curl -X GET \ - -G "http://localhost:8082/api/api/v1/activities/1/detail" \ + -G "http://localhost:8000/api/v1/suborganization/1/projects/1" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/activities/1/detail" + "http://localhost:8000/api/v1/suborganization/1/projects/1" ); let headers = { @@ -6545,7 +6383,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->get( - 'http://localhost:8082/api/api/v1/activities/1/detail', + 'http://localhost:8000/api/v1/suborganization/1/projects/1', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -6561,7 +6399,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/activities/1/detail' +url = 'http://localhost:8000/api/v1/suborganization/1/projects/1' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' @@ -6571,131 +6409,496 @@ response.json() ``` -> Example response (200): +> Example response (201): ```json { - "activity": { + "project": { "id": 1, - "playlist": { - "id": 1, - "title": "The Engineering & Design Behind Golf Balls", - "is_public": true, - "order": 0, - "project_id": 1, - "project": { - "id": 1, - "name": "The Science of Golf", - "description": "Uncover the science, technology, engineering, and mathematics behind the game of golf.", - "thumb_url": "\/storage\/projects\/nN5y8v8zh2ghxrKuHCv5wvJOREFw0Nr27s2DPxWq.png", - "starter_project": false, - "shared": false, - "is_public": true, - "users": [ - { - "id": 1, - "email": "john.doe@currikistudio.org", - "first_name": "John", - "last_name": "Doe", - "role": "owner" - } - ], - "created_at": "2020-04-30T20:03:12.000000Z", - "updated_at": "2020-07-11T12:51:07.000000Z" - }, - "created_at": "2020-04-30T20:03:12.000000Z", - "updated_at": "2020-07-11T12:51:07.000000Z" - }, - "title": "Science of Golf: Why Balls Have Dimples", - "type": "h5p", - "content": "", - "shared": false, - "order": 2, - "thumb_url": null, - "subject_id": null, - "education_level_id": null, - "h5p": "{\"params\":{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"}}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}},\"metadata\":{\"title\":\"Science of Golf: Why Balls Have Dimples\",\"license\":\"U\"}}", - "h5p_content": { - "id": 59, - "user_id": 1, - "title": "Science of Golf: Why Balls Have Dimples", - "library_id": 40, - "parameters": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"},\"aspectRatio\":\"16:9\"}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"bookmarks\":[],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", - "filtered": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"}}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", - "slug": "science-of-golf-why-balls-have-dimples", - "embed_type": "div", - "disable": 9, - "content_type": null, - "authors": null, - "source": null, - "year_from": null, - "year_to": null, - "license": "U", - "license_version": null, - "license_extras": null, - "author_comments": null, - "changes": null, - "default_language": null, - "library": { - "id": 40, - "created_at": null, - "updated_at": null, - "name": "H5P.InteractiveVideo", - "title": "Interactive Video", - "major_version": 1, - "minor_version": 21, - "patch_version": 9, - "runnable": 1, - "restricted": 0, - "fullscreen": 1, - "embed_types": "iframe", - "preloaded_js": "dist\/h5p-interactive-video.js", - "preloaded_css": "dist\/h5p-interactive-video.css", - "drop_library_css": "", - "semantics": "[\n {\n \"name\": \"interactiveVideo\",\n \"type\": \"group\",\n \"widget\": \"wizard\",\n \"label\": \"Interactive Video Editor\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"video\",\n \"type\": \"group\",\n \"label\": \"Upload\/embed video\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"files\",\n \"type\": \"video\",\n \"label\": \"Add a video\",\n \"importance\": \"high\",\n \"description\": \"Click below to add a video you wish to use in your interactive video. You can add a video link or upload video files. It is possible to add several versions of the video with different qualities. To ensure maximum support in browsers at least add a version in webm and mp4 formats.\",\n \"extraAttributes\": [\n \"metadata\"\n ],\n \"enableCustomQualityLabel\": true\n },\n {\n \"name\": \"startScreenOptions\",\n \"type\": \"group\",\n \"label\": \"Start screen options (unsupported for YouTube videos)\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"title\",\n \"type\": \"text\",\n \"label\": \"The title of this interactive video\",\n \"importance\": \"low\",\n \"maxLength\": 60,\n \"default\": \"Interactive Video\",\n \"description\": \"Used in summaries, statistics etc.\"\n },\n {\n \"name\": \"hideStartTitle\",\n \"type\": \"boolean\",\n \"label\": \"Hide title on video start screen\",\n \"importance\": \"low\",\n \"optional\": true,\n \"default\": false\n },\n {\n \"name\": \"shortStartDescription\",\n \"type\": \"text\",\n \"label\": \"Short description (Optional)\",\n \"importance\": \"low\",\n \"optional\": true,\n \"maxLength\": 120,\n \"description\": \"Optional. Display a short description text on the video start screen. Does not work for YouTube videos.\"\n },\n {\n \"name\": \"poster\",\n \"type\": \"image\",\n \"label\": \"Poster image\",\n \"importance\": \"low\",\n \"optional\": true,\n \"description\": \"Image displayed before the user launches the video. Does not work for YouTube Videos.\"\n }\n ]\n },\n {\n \"name\": \"textTracks\",\n \"type\": \"group\",\n \"label\": \"Text tracks (unsupported for YouTube videos)\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"videoTrack\",\n \"type\": \"list\",\n \"label\": \"Available text tracks\",\n \"importance\": \"low\",\n \"optional\": true,\n \"entity\": \"Track\",\n \"min\": 0,\n \"defaultNum\": 1,\n \"field\": {\n \"name\": \"track\",\n \"type\": \"group\",\n \"label\": \"Track\",\n \"importance\": \"low\",\n \"expanded\": false,\n \"fields\": [\n {\n \"name\": \"label\",\n \"type\": \"text\",\n \"label\": \"Track label\",\n \"description\": \"Used if you offer multiple tracks and the user has to choose a track. For instance 'Spanish subtitles' could be the label of a Spanish subtitle track.\",\n \"importance\": \"low\",\n \"default\": \"Subtitles\",\n \"optional\": true\n },\n {\n \"name\": \"kind\",\n \"type\": \"select\",\n \"label\": \"Type of text track\",\n \"importance\": \"low\",\n \"default\": \"subtitles\",\n \"options\": [\n {\n \"value\": \"subtitles\",\n \"label\": \"Subtitles\"\n },\n {\n \"value\": \"captions\",\n \"label\": \"Captions\"\n },\n {\n \"value\": \"descriptions\",\n \"label\": \"Descriptions\"\n }\n ]\n },\n {\n \"name\": \"srcLang\",\n \"type\": \"text\",\n \"label\": \"Source language, must be defined for subtitles\",\n \"importance\": \"low\",\n \"default\": \"en\",\n \"description\": \"Must be a valid BCP 47 language tag. If 'Subtitles' is the type of text track selected, the source language of the track must be defined.\"\n },\n {\n \"name\": \"track\",\n \"type\": \"file\",\n \"label\": \"Track source (WebVTT file)\",\n \"importance\": \"low\"\n }\n ]\n }\n },\n {\n \"name\": \"defaultTrackLabel\",\n \"type\": \"text\",\n \"label\": \"Default text track\",\n \"description\": \"If left empty or not matching any of the text tracks the first text track will be used as the default.\",\n \"importance\": \"low\",\n \"optional\": true\n }\n ]\n }\n ]\n },\n {\n \"name\": \"assets\",\n \"type\": \"group\",\n \"label\": \"Add interactions\",\n \"importance\": \"high\",\n \"widget\": \"interactiveVideo\",\n \"video\": \"video\/files\",\n \"poster\": \"video\/startScreenOptions\/poster\",\n \"fields\": [\n {\n \"name\": \"interactions\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"interaction\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"duration\",\n \"type\": \"group\",\n \"widget\": \"duration\",\n \"label\": \"Display time\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"from\",\n \"type\": \"number\"\n },\n {\n \"name\": \"to\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"name\": \"pause\",\n \"label\": \"Pause video\",\n \"importance\": \"low\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"displayType\",\n \"label\": \"Display as\",\n \"importance\": \"low\",\n \"description\": \"Button<\/b> is a collapsed interaction the user must press to open. Poster<\/b> is an expanded interaction displayed directly on top of the video\",\n \"type\": \"select\",\n \"widget\": \"imageRadioButtonGroup\",\n \"options\": [\n {\n \"value\": \"button\",\n \"label\": \"Button\"\n },\n {\n \"value\": \"poster\",\n \"label\": \"Poster\"\n }\n ],\n \"default\": \"button\"\n },\n {\n \"name\": \"buttonOnMobile\",\n \"label\": \"Turn into button on small screens\",\n \"importance\": \"low\",\n \"type\": \"boolean\",\n \"default\": false\n },\n {\n \"name\": \"label\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"label\": \"Label\",\n \"importance\": \"low\",\n \"description\": \"Label displayed next to interaction icon.\",\n \"optional\": true,\n \"enterMode\": \"p\",\n \"tags\": [\n \"p\"\n ]\n },\n {\n \"name\": \"x\",\n \"type\": \"number\",\n \"importance\": \"low\",\n \"widget\": \"none\"\n },\n {\n \"name\": \"y\",\n \"type\": \"number\",\n \"importance\": \"low\",\n \"widget\": \"none\"\n },\n {\n \"name\": \"width\",\n \"type\": \"number\",\n \"widget\": \"none\",\n \"importance\": \"low\",\n \"optional\": true\n },\n {\n \"name\": \"height\",\n \"type\": \"number\",\n \"widget\": \"none\",\n \"importance\": \"low\",\n \"optional\": true\n },\n {\n \"name\": \"libraryTitle\",\n \"type\": \"text\",\n \"importance\": \"low\",\n \"optional\": true,\n \"widget\": \"none\"\n },\n {\n \"name\": \"action\",\n \"type\": \"library\",\n \"importance\": \"low\",\n \"options\": [\n \"H5P.Nil 1.0\",\n \"H5P.Text 1.1\",\n \"H5P.Table 1.1\",\n \"H5P.Link 1.3\",\n \"H5P.Image 1.1\",\n \"H5P.Summary 1.10\",\n \"H5P.SingleChoiceSet 1.11\",\n \"H5P.MultiChoice 1.14\",\n \"H5P.TrueFalse 1.6\",\n \"H5P.Blanks 1.12\",\n \"H5P.DragQuestion 1.13\",\n \"H5P.MarkTheWords 1.9\",\n \"H5P.DragText 1.8\",\n \"H5P.GoToQuestion 1.3\",\n \"H5P.IVHotspot 1.2\",\n \"H5P.Questionnaire 1.2\",\n \"H5P.FreeTextQuestion 1.0\"\n ]\n },\n {\n \"name\": \"adaptivity\",\n \"type\": \"group\",\n \"label\": \"Adaptivity\",\n \"importance\": \"low\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"correct\",\n \"type\": \"group\",\n \"label\": \"Action on all correct\",\n \"fields\": [\n {\n \"name\": \"seekTo\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Seek to\",\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"allowOptOut\",\n \"type\": \"boolean\",\n \"label\": \"Allow the user to opt out and continue\"\n },\n {\n \"name\": \"message\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"enterMode\": \"p\",\n \"tags\": [\n \"strong\",\n \"em\",\n \"del\",\n \"a\",\n \"code\"\n ],\n \"label\": \"Message\"\n },\n {\n \"name\": \"seekLabel\",\n \"type\": \"text\",\n \"label\": \"Label for seek button\"\n }\n ]\n },\n {\n \"name\": \"wrong\",\n \"type\": \"group\",\n \"label\": \"Action on wrong\",\n \"fields\": [\n {\n \"name\": \"seekTo\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Seek to\",\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"allowOptOut\",\n \"type\": \"boolean\",\n \"label\": \"Allow the user to opt out and continue\"\n },\n {\n \"name\": \"message\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"enterMode\": \"p\",\n \"tags\": [\n \"strong\",\n \"em\",\n \"del\",\n \"a\",\n \"code\"\n ],\n \"label\": \"Message\"\n },\n {\n \"name\": \"seekLabel\",\n \"type\": \"text\",\n \"label\": \"Label for seek button\"\n }\n ]\n },\n {\n \"name\": \"requireCompletion\",\n \"type\": \"boolean\",\n \"label\": \"Require full score for task before proceeding\",\n \"description\": \"For best functionality this option should be used in conjunction with the \\\"Prevent skipping forward in a video\\\" option of Interactive Video.\"\n }\n ]\n },\n {\n \"name\": \"visuals\",\n \"label\": \"Visuals\",\n \"importance\": \"low\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"backgroundColor\",\n \"type\": \"text\",\n \"label\": \"Background color\",\n \"widget\": \"colorSelector\",\n \"default\": \"rgb(255, 255, 255)\",\n \"spectrum\": {\n \"showInput\": true,\n \"showAlpha\": true,\n \"preferredFormat\": \"rgb\",\n \"showPalette\": true,\n \"palette\": [\n [\n \"rgba(0, 0, 0, 0)\"\n ],\n [\n \"rgb(67, 67, 67)\",\n \"rgb(102, 102, 102)\",\n \"rgb(204, 204, 204)\",\n \"rgb(217, 217, 217)\",\n \"rgb(255, 255, 255)\"\n ],\n [\n \"rgb(152, 0, 0)\",\n \"rgb(255, 0, 0)\",\n \"rgb(255, 153, 0)\",\n \"rgb(255, 255, 0)\",\n \"rgb(0, 255, 0)\",\n \"rgb(0, 255, 255)\",\n \"rgb(74, 134, 232)\",\n \"rgb(0, 0, 255)\",\n \"rgb(153, 0, 255)\",\n \"rgb(255, 0, 255)\"\n ],\n [\n \"rgb(230, 184, 175)\",\n \"rgb(244, 204, 204)\",\n \"rgb(252, 229, 205)\",\n \"rgb(255, 242, 204)\",\n \"rgb(217, 234, 211)\",\n \"rgb(208, 224, 227)\",\n \"rgb(201, 218, 248)\",\n \"rgb(207, 226, 243)\",\n \"rgb(217, 210, 233)\",\n \"rgb(234, 209, 220)\",\n \"rgb(221, 126, 107)\",\n \"rgb(234, 153, 153)\",\n \"rgb(249, 203, 156)\",\n \"rgb(255, 229, 153)\",\n \"rgb(182, 215, 168)\",\n \"rgb(162, 196, 201)\",\n \"rgb(164, 194, 244)\",\n \"rgb(159, 197, 232)\",\n \"rgb(180, 167, 214)\",\n \"rgb(213, 166, 189)\",\n \"rgb(204, 65, 37)\",\n \"rgb(224, 102, 102)\",\n \"rgb(246, 178, 107)\",\n \"rgb(255, 217, 102)\",\n \"rgb(147, 196, 125)\",\n \"rgb(118, 165, 175)\",\n \"rgb(109, 158, 235)\",\n \"rgb(111, 168, 220)\",\n \"rgb(142, 124, 195)\",\n \"rgb(194, 123, 160)\",\n \"rgb(166, 28, 0)\",\n \"rgb(204, 0, 0)\",\n \"rgb(230, 145, 56)\",\n \"rgb(241, 194, 50)\",\n \"rgb(106, 168, 79)\",\n \"rgb(69, 129, 142)\",\n \"rgb(60, 120, 216)\",\n \"rgb(61, 133, 198)\",\n \"rgb(103, 78, 167)\",\n \"rgb(166, 77, 121)\",\n \"rgb(91, 15, 0)\",\n \"rgb(102, 0, 0)\",\n \"rgb(120, 63, 4)\",\n \"rgb(127, 96, 0)\",\n \"rgb(39, 78, 19)\",\n \"rgb(12, 52, 61)\",\n \"rgb(28, 69, 135)\",\n \"rgb(7, 55, 99)\",\n \"rgb(32, 18, 77)\",\n \"rgb(76, 17, 48)\"\n ]\n ]\n }\n },\n {\n \"name\": \"boxShadow\",\n \"type\": \"boolean\",\n \"label\": \"Box shadow\",\n \"default\": true,\n \"description\": \"Adds a subtle shadow around the interaction. You might want to disable this for completely transparent interactions\"\n }\n ]\n },\n {\n \"name\": \"goto\",\n \"label\": \"Go to on click\",\n \"importance\": \"low\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"type\",\n \"label\": \"Type\",\n \"type\": \"select\",\n \"widget\": \"selectToggleFields\",\n \"options\": [\n {\n \"value\": \"timecode\",\n \"label\": \"Timecode\",\n \"hideFields\": [\n \"url\"\n ]\n },\n {\n \"value\": \"url\",\n \"label\": \"Another page (URL)\",\n \"hideFields\": [\n \"time\"\n ]\n }\n ],\n \"optional\": true\n },\n {\n \"name\": \"time\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Go To\",\n \"description\": \"The target time the user will be taken to upon pressing the hotspot. Enter timecode in the format M:SS.\",\n \"optional\": true\n },\n {\n \"name\": \"url\",\n \"type\": \"group\",\n \"label\": \"URL\",\n \"widget\": \"linkWidget\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"protocol\",\n \"type\": \"select\",\n \"label\": \"Protocol\",\n \"options\": [\n {\n \"value\": \"http:\/\/\",\n \"label\": \"http:\/\/\"\n },\n {\n \"value\": \"https:\/\/\",\n \"label\": \"https:\/\/\"\n },\n {\n \"value\": \"\/\",\n \"label\": \"(root relative)\"\n },\n {\n \"value\": \"other\",\n \"label\": \"other\"\n }\n ],\n \"optional\": true,\n \"default\": \"http:\/\/\"\n },\n {\n \"name\": \"url\",\n \"type\": \"text\",\n \"label\": \"URL\",\n \"optional\": true\n }\n ]\n },\n {\n \"name\": \"visualize\",\n \"type\": \"boolean\",\n \"label\": \"Visualize\",\n \"description\": \"Show that interaction can be clicked by adding a border and an icon\"\n }\n ]\n }\n ]\n }\n },\n {\n \"name\": \"bookmarks\",\n \"importance\": \"low\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"bookmark\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"time\",\n \"type\": \"number\"\n },\n {\n \"name\": \"label\",\n \"type\": \"text\"\n }\n ]\n }\n },\n {\n \"name\": \"endscreens\",\n \"importance\": \"low\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"endscreen\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"time\",\n \"type\": \"number\"\n },\n {\n \"name\": \"label\",\n \"type\": \"text\"\n }\n ]\n }\n }\n ]\n },\n {\n \"name\": \"summary\",\n \"type\": \"group\",\n \"label\": \"Summary task\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"task\",\n \"type\": \"library\",\n \"options\": [\n \"H5P.Summary 1.10\"\n ],\n \"default\": {\n \"library\": \"H5P.Summary 1.10\",\n \"params\": {}\n }\n },\n {\n \"name\": \"displayAt\",\n \"type\": \"number\",\n \"label\": \"Display at\",\n \"description\": \"Number of seconds before the video ends.\",\n \"default\": 3\n }\n ]\n }\n ]\n },\n {\n \"name\": \"override\",\n \"type\": \"group\",\n \"label\": \"Behavioural settings\",\n \"importance\": \"low\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"startVideoAt\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Start video at\",\n \"importance\": \"low\",\n \"optional\": true,\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"autoplay\",\n \"type\": \"boolean\",\n \"label\": \"Auto-play video\",\n \"default\": false,\n \"optional\": true,\n \"description\": \"Start playing the video automatically\"\n },\n {\n \"name\": \"loop\",\n \"type\": \"boolean\",\n \"label\": \"Loop the video\",\n \"default\": false,\n \"optional\": true,\n \"description\": \"Check if video should run in a loop\"\n },\n {\n \"name\": \"showSolutionButton\",\n \"type\": \"select\",\n \"label\": \"Override \\\"Show Solution\\\" button\",\n \"importance\": \"low\",\n \"description\": \"This option determines if the \\\"Show Solution\\\" button will be shown for all questions, disabled for all or configured for each question individually.\",\n \"optional\": true,\n \"options\": [\n {\n \"value\": \"on\",\n \"label\": \"Enabled\"\n },\n {\n \"value\": \"off\",\n \"label\": \"Disabled\"\n }\n ]\n },\n {\n \"name\": \"retryButton\",\n \"type\": \"select\",\n \"label\": \"Override \\\"Retry\\\" button\",\n \"importance\": \"low\",\n \"description\": \"This option determines if the \\\"Retry\\\" button will be shown for all questions, disabled for all or configured for each question individually.\",\n \"optional\": true,\n \"options\": [\n {\n \"value\": \"on\",\n \"label\": \"Enabled\"\n },\n {\n \"value\": \"off\",\n \"label\": \"Disabled\"\n }\n ]\n },\n {\n \"name\": \"showBookmarksmenuOnLoad\",\n \"type\": \"boolean\",\n \"label\": \"Start with bookmarks menu open\",\n \"importance\": \"low\",\n \"default\": false,\n \"description\": \"This function is not available on iPad when using YouTube as video source.\"\n },\n {\n \"name\": \"showRewind10\",\n \"type\": \"boolean\",\n \"label\": \"Show button for rewinding 10 seconds\",\n \"importance\": \"low\",\n \"default\": false\n },\n {\n \"name\": \"preventSkipping\",\n \"type\": \"boolean\",\n \"default\": false,\n \"label\": \"Prevent skipping forward in a video\",\n \"importance\": \"low\",\n \"description\": \"Enabling this options will disable user video navigation through default controls.\"\n },\n {\n \"name\": \"deactivateSound\",\n \"type\": \"boolean\",\n \"default\": false,\n \"label\": \"Deactivate sound\",\n \"importance\": \"low\",\n \"description\": \"Enabling this option will deactivate the video's sound and prevent it from being switched on.\"\n }\n ]\n },\n {\n \"name\": \"l10n\",\n \"type\": \"group\",\n \"label\": \"Localize\",\n \"importance\": \"low\",\n \"common\": true,\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"interaction\",\n \"type\": \"text\",\n \"label\": \"Interaction title\",\n \"importance\": \"low\",\n \"default\": \"Interaction\",\n \"optional\": true\n },\n {\n \"name\": \"play\",\n \"type\": \"text\",\n \"label\": \"Play title\",\n \"importance\": \"low\",\n \"default\": \"Play\",\n \"optional\": true\n },\n {\n \"name\": \"pause\",\n \"type\": \"text\",\n \"label\": \"Pause title\",\n \"importance\": \"low\",\n \"default\": \"Pause\",\n \"optional\": true\n },\n {\n \"name\": \"mute\",\n \"type\": \"text\",\n \"label\": \"Mute title\",\n \"importance\": \"low\",\n \"default\": \"Mute\",\n \"optional\": true\n },\n {\n \"name\": \"unmute\",\n \"type\": \"text\",\n \"label\": \"Unmute title\",\n \"importance\": \"low\",\n \"default\": \"Unmute\",\n \"optional\": true\n },\n {\n \"name\": \"quality\",\n \"type\": \"text\",\n \"label\": \"Video quality title\",\n \"importance\": \"low\",\n \"default\": \"Video Quality\",\n \"optional\": true\n },\n {\n \"name\": \"captions\",\n \"type\": \"text\",\n \"label\": \"Video captions title\",\n \"importance\": \"low\",\n \"default\": \"Captions\",\n \"optional\": true\n },\n {\n \"name\": \"close\",\n \"type\": \"text\",\n \"label\": \"Close button text\",\n \"importance\": \"low\",\n \"default\": \"Close\",\n \"optional\": true\n },\n {\n \"name\": \"fullscreen\",\n \"type\": \"text\",\n \"label\": \"Fullscreen title\",\n \"importance\": \"low\",\n \"default\": \"Fullscreen\",\n \"optional\": true\n },\n {\n \"name\": \"exitFullscreen\",\n \"type\": \"text\",\n \"label\": \"Exit fullscreen title\",\n \"importance\": \"low\",\n \"default\": \"Exit Fullscreen\",\n \"optional\": true\n },\n {\n \"name\": \"summary\",\n \"type\": \"text\",\n \"label\": \"Summary title\",\n \"importance\": \"low\",\n \"default\": \"Open summary dialog\",\n \"optional\": true\n },\n {\n \"name\": \"bookmarks\",\n \"type\": \"text\",\n \"label\": \"Bookmarks title\",\n \"importance\": \"low\",\n \"default\": \"Bookmarks\",\n \"optional\": true\n },\n {\n \"name\": \"endscreen\",\n \"type\": \"text\",\n \"label\": \"Submit screen title\",\n \"importance\": \"low\",\n \"default\": \"Submit screen\",\n \"optional\": true\n },\n {\n \"name\": \"defaultAdaptivitySeekLabel\",\n \"type\": \"text\",\n \"label\": \"Default label for adaptivity seek button\",\n \"importance\": \"low\",\n \"default\": \"Continue\",\n \"optional\": true\n },\n {\n \"name\": \"continueWithVideo\",\n \"type\": \"text\",\n \"label\": \"Default label for continue video button\",\n \"importance\": \"low\",\n \"default\": \"Continue with video\",\n \"optional\": true\n },\n {\n \"name\": \"playbackRate\",\n \"type\": \"text\",\n \"label\": \"Set playback rate\",\n \"importance\": \"low\",\n \"default\": \"Playback Rate\",\n \"optional\": true\n },\n {\n \"name\": \"rewind10\",\n \"type\": \"text\",\n \"label\": \"Rewind 10 Seconds\",\n \"importance\": \"low\",\n \"default\": \"Rewind 10 Seconds\",\n \"optional\": true\n },\n {\n \"name\": \"navDisabled\",\n \"type\": \"text\",\n \"label\": \"Navigation is disabled text\",\n \"importance\": \"low\",\n \"default\": \"Navigation is disabled\",\n \"optional\": true\n },\n {\n \"name\": \"sndDisabled\",\n \"type\": \"text\",\n \"label\": \"Sound is disabled text\",\n \"importance\": \"low\",\n \"default\": \"Sound is disabled\",\n \"optional\": true\n },\n {\n \"name\": \"requiresCompletionWarning\",\n \"type\": \"text\",\n \"label\": \"Warning that the user must answer the question correctly before continuing\",\n \"importance\": \"low\",\n \"default\": \"You need to answer all the questions correctly before continuing.\",\n \"optional\": true\n },\n {\n \"name\": \"back\",\n \"type\": \"text\",\n \"label\": \"Back button\",\n \"importance\": \"low\",\n \"default\": \"Back\",\n \"optional\": true\n },\n {\n \"name\": \"hours\",\n \"type\": \"text\",\n \"label\": \"Passed time hours\",\n \"importance\": \"low\",\n \"default\": \"Hours\",\n \"optional\": true\n },\n {\n \"name\": \"minutes\",\n \"type\": \"text\",\n \"label\": \"Passed time minutes\",\n \"importance\": \"low\",\n \"default\": \"Minutes\",\n \"optional\": true\n },\n {\n \"name\": \"seconds\",\n \"type\": \"text\",\n \"label\": \"Passed time seconds\",\n \"importance\": \"low\",\n \"default\": \"Seconds\",\n \"optional\": true\n },\n {\n \"name\": \"currentTime\",\n \"type\": \"text\",\n \"label\": \"Label for current time\",\n \"importance\": \"low\",\n \"default\": \"Current time:\",\n \"optional\": true\n },\n {\n \"name\": \"totalTime\",\n \"type\": \"text\",\n \"label\": \"Label for total time\",\n \"importance\": \"low\",\n \"default\": \"Total time:\",\n \"optional\": true\n },\n {\n \"name\": \"singleInteractionAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Text explaining that a single interaction with a name has come into view\",\n \"importance\": \"low\",\n \"default\": \"Interaction appeared:\",\n \"optional\": true\n },\n {\n \"name\": \"multipleInteractionsAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Text for explaining that multiple interactions have come into view\",\n \"importance\": \"low\",\n \"default\": \"Multiple interactions appeared.\",\n \"optional\": true\n },\n {\n \"name\": \"videoPausedAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Video is paused announcement\",\n \"importance\": \"low\",\n \"default\": \"Video is paused\",\n \"optional\": true\n },\n {\n \"name\": \"content\",\n \"type\": \"text\",\n \"label\": \"Content label\",\n \"importance\": \"low\",\n \"default\": \"Content\",\n \"optional\": true\n },\n {\n \"name\": \"answered\",\n \"type\": \"text\",\n \"label\": \"Answered message (@answered will be replaced with the number of answered questions)\",\n \"importance\": \"low\",\n \"default\": \"@answered answered\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTitle\",\n \"type\": \"text\",\n \"label\": \"Submit screen title\",\n \"importance\": \"low\",\n \"default\": \"@answered Question(s) answered\",\n \"description\": \"@answered will be replaced by the number of answered questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformation\",\n \"type\": \"text\",\n \"label\": \"Submit screen information\",\n \"importance\": \"low\",\n \"default\": \"You have answered @answered questions, click below to submit your answers.\",\n \"description\": \"@answered will be replaced by the number of answered questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformationNoAnswers\",\n \"type\": \"text\",\n \"label\": \"Submit screen information for missing answers\",\n \"importance\": \"low\",\n \"default\": \"You have not answered any questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformationMustHaveAnswer\",\n \"type\": \"text\",\n \"label\": \"Submit screen information for answer needed\",\n \"importance\": \"low\",\n \"default\": \"You have to answer at least one question before you can submit your answers.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardSubmitButton\",\n \"type\": \"text\",\n \"label\": \"Submit screen submit button\",\n \"importance\": \"low\",\n \"default\": \"Submit Answers\",\n \"optional\": true\n },\n {\n \"name\": \"endcardSubmitMessage\",\n \"type\": \"text\",\n \"label\": \"Submit screen submit message\",\n \"importance\": \"low\",\n \"default\": \"Your answers have been submitted!\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTableRowAnswered\",\n \"type\": \"text\",\n \"label\": \"Submit screen table row title: Answered questions\",\n \"importance\": \"low\",\n \"default\": \"Answered questions\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTableRowScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen table row title: Score\",\n \"importance\": \"low\",\n \"default\": \"Score\",\n \"optional\": true\n },\n {\n \"name\": \"endcardAnsweredScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen answered score\",\n \"importance\": \"low\",\n \"default\": \"answered\",\n \"optional\": true\n },\n {\n \"name\": \"endCardTableRowSummaryWithScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen row summary including score (for readspeakers)\",\n \"importance\": \"low\",\n \"default\": \"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\n \"optional\": true\n },\n {\n \"name\": \"endCardTableRowSummaryWithoutScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen row summary for no score (for readspeakers)\",\n \"importance\": \"low\",\n \"default\": \"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\",\n \"optional\": true\n }\n ]\n }\n]", - "tutorial_url": "", - "has_icon": 1 - }, - "created_at": "2020-09-30T20:24:58.000000Z", - "updated_at": "2020-09-30T20:24:58.000000Z" - }, - "library_name": "H5P.InteractiveVideo", - "major_version": 1, - "minor_version": 21, - "user_name": null, - "user_id": null, - "created_at": "2020-09-30T20:24:58.000000Z", - "updated_at": "2020-09-30T20:24:58.000000Z" + "organization_id": 1, + "organization_visibility_type_id": 4, + "name": "The Science of Golf", + "description": "Uncover the science, technology, engineering, and mathematics behind the game of golf.", + "thumb_url": "\/storage\/uploads\/nN5y8v8zh2ghxrKuHCv5wvJOREFw0Nr27s2DPxWq.png", + "shared": false, + "gcr_project_visibility": true, + "starter_project": false, + "order": null, + "status": 1, + "status_text": "DRAFT", + "indexing": null, + "indexing_text": "NOT REQUESTED", + "created_at": "2020-04-30T20:03:12.000000Z", + "updated_at": "2020-09-17T09:44:27.000000Z" } } ``` ### HTTP Request -`GET api/v1/activities/{activity}/detail` +`GET api/v1/suborganization/{suborganization}/projects/{project}` #### URL Parameters Parameter | Status | Description --------- | ------- | ------- | ------- - `activity` | required | The Id of a activity + `project` | required | The Id of a project + `suborganization` | required | The Id of a suborganization - + - -## H5P Activity + +## Update Project + +Update the specified project of a user. + +> Example request: + +```bash +curl -X PUT \ + "http://localhost:8000/api/v1/suborganization/1/projects/1" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{"name":"Test Project","description":"This is a test project.","thumb_url":"https:\/\/images.pexels.com\/photos\/2832382","organization_visibility_type_id":1}' + +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/suborganization/1/projects/1" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +let body = { + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "organization_visibility_type_id": 1 +} + +fetch(url, { + method: "PUT", + headers: headers, + body: body +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->put( + 'http://localhost:8000/api/v1/suborganization/1/projects/1', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + 'json' => [ + 'name' => 'Test Project', + 'description' => 'This is a test project.', + 'thumb_url' => 'https://images.pexels.com/photos/2832382', + 'organization_visibility_type_id' => 1, + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/suborganization/1/projects/1' +payload = { + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "organization_visibility_type_id": 1 +} +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('PUT', url, headers=headers, json=payload) +response.json() +``` + + +> Example response (500): + +```json +{ + "errors": [ + "Failed to update project." + ] +} +``` +> Example response (200): + +```json +{ + "project": { + "id": 1, + "organization_id": 1, + "organization_visibility_type_id": 4, + "name": "The Science of Golf", + "description": "Uncover the science, technology, engineering, and mathematics behind the game of golf.", + "thumb_url": "\/storage\/uploads\/nN5y8v8zh2ghxrKuHCv5wvJOREFw0Nr27s2DPxWq.png", + "shared": false, + "gcr_project_visibility": true, + "starter_project": false, + "order": null, + "status": 1, + "status_text": "DRAFT", + "indexing": null, + "indexing_text": "NOT REQUESTED", + "created_at": "2020-04-30T20:03:12.000000Z", + "updated_at": "2020-09-17T09:44:27.000000Z" + } +} +``` + +### HTTP Request +`PUT api/v1/suborganization/{suborganization}/projects/{project}` + +`PATCH api/v1/suborganization/{suborganization}/projects/{project}` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `project` | required | The Id of a project + `suborganization` | required | The Id of a suborganization +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `name` | string | required | Name of a project + `description` | string | required | Description of a project + `thumb_url` | string | required | Thumbnail Url of a project + `organization_visibility_type_id` | integer | required | Id of the organization visibility type + + + + +## Remove Project + +Remove the specified project of a user. + +> Example request: + +```bash +curl -X DELETE \ + "http://localhost:8000/api/v1/suborganization/1/projects/1" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/suborganization/1/projects/1" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "DELETE", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->delete( + 'http://localhost:8000/api/v1/suborganization/1/projects/1', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/suborganization/1/projects/1' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('DELETE', url, headers=headers) +response.json() +``` + + +> Example response (200): + +```json +{ + "message": "Project has been deleted successfully." +} +``` +> Example response (500): + +```json +{ + "errors": [ + "Failed to delete project." + ] +} +``` + +### HTTP Request +`DELETE api/v1/suborganization/{suborganization}/projects/{project}` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `suborganization` | required | The Id of a suborganization + `project` | required | The Id of a project + + + + +## Get the Projects by Ids + +> Example request: + +```bash +curl -X POST \ + "http://localhost:8000/api/v1/suborganization/1/projects/by-ids" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/suborganization/1/projects/by-ids" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "POST", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->post( + 'http://localhost:8000/api/v1/suborganization/1/projects/by-ids', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/suborganization/1/projects/by-ids' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('POST', url, headers=headers) +response.json() +``` + + +> Example response (200): + +```json +null +``` + +### HTTP Request +`POST api/v1/suborganization/{suborganization}/projects/by-ids` + + + + + +## Get All Organization Projects + +Get a list of the projects of an organization. + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/suborganizations/1/projects" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{"query":"Vivensity","size":10,"order_by_column":"name","order_by_type":"asc"}' + +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/suborganizations/1/projects" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +let body = { + "query": "Vivensity", + "size": 10, + "order_by_column": "name", + "order_by_type": "asc" +} + +fetch(url, { + method: "GET", + headers: headers, + body: body +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/suborganizations/1/projects', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + 'json' => [ + 'query' => 'Vivensity', + 'size' => 10, + 'order_by_column' => 'name', + 'order_by_type' => 'asc', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/suborganizations/1/projects' +payload = { + "query": "Vivensity", + "size": 10, + "order_by_column": "name", + "order_by_type": "asc" +} +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers, json=payload) +response.json() +``` + + +> Example response (200): + +```json +{ + "projects": [ + { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "is_public": true, + "gcr_project_visibility": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + { + "id": 2, + "name": "Math Project", + "description": "This is a test math project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832384", + "shared": true, + "starter_project": null, + "is_public": true, + "created_at": "2020-09-07T19:21:08.000000Z", + "updated_at": "2020-09-07T19:21:08.000000Z" + } + ] +} +``` + +### HTTP Request +`GET api/v1/suborganizations/{suborganization}/projects` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `suborganization` | required | The Id of a suborganization +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `query` | string | optional | Query to search suborganization against + `size` | integer | optional | size to show per page records + `order_by_column` | string | optional | to sort data with specific column + `order_by_type` | string | optional | to sort data in ascending or descending order + + + + +## Project Indexing + +Modify the index value of a project. > Example request: ```bash curl -X GET \ - -G "http://localhost:8082/api/api/v1/activities/1/h5p" \ + -G "http://localhost:8000/api/v1/projects/1/indexes/3" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( - "http://localhost:8082/api/api/v1/activities/1/h5p" + "http://localhost:8000/api/v1/projects/1/indexes/3" ); let headers = { @@ -6715,7 +6918,7 @@ fetch(url, { $client = new \GuzzleHttp\Client(); $response = $client->get( - 'http://localhost:8082/api/api/v1/activities/1/h5p', + 'http://localhost:8000/api/v1/projects/1/indexes/3', [ 'headers' => [ 'Content-Type' => 'application/json', @@ -6731,7 +6934,7 @@ print_r(json_decode((string) $body)); import requests import json -url = 'http://localhost:8082/api/api/v1/activities/1/h5p' +url = 'http://localhost:8000/api/v1/projects/1/indexes/3' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' @@ -6743,40 +6946,11342 @@ response.json() > Example response (200): +```json +null +``` +> Example response (500): + ```json { - "activity": { - "id": 1, - "title": "Science of Golf: Why Balls Have Dimples", - "type": "h5p", - "content": "", - "shared": false, - "order": 2, - "thumb_url": null, - "subject_id": null, - "education_level_id": null, - "h5p": { - "settings": { - "baseUrl": "https:\/\/www.currikistudio.org\/api", - "url": "https:\/\/www.currikistudio.org\/api\/storage\/h5p", - "postUserStatistics": true, - "ajax": { - "setFinished": "https:\/\/www.currikistudio.org\/api\/api\/h5p\/ajax\/url", - "contentUserData": "https:\/\/www.currikistudio.org\/api\/api\/h5p\/ajax\/content-user-data\/?content_id=:contentId&data_type=:dataType&sub_content_id=:subContentId" - }, - "saveFreq": false, - "siteUrl": "https:\/\/www.currikistudio.org\/api", - "l10n": { - "H5P": { - "fullscreen": "Fullscreen", - "disableFullscreen": "Disable fullscreen", - "download": "Download", - "copyrights": "Rights of use", - "embed": "Embed", - "reuseDescription": "Reuse this content.", - "size": "Size", - "showAdvanced": "Show advanced", - "hideAdvanced": "Hide advanced", + "errors": [ + "Invalid index value provided." + ] +} +``` + +### HTTP Request +`GET api/v1/projects/{project}/indexes/{index}` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `project` | required | Project Id. + `index` | required | New Integer Index Value, 1 => 'REQUESTED', 2 => 'NOT APPROVED', 3 => 'APPROVED'. + + + + +## Starter Project Toggle + +Toggle the starter flag of any project + +> Example request: + +```bash +curl -X POST \ + "http://localhost:8000/api/v1/projects/starter/1" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{"projects":"[1,2,3]","flag":true}' + +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/projects/starter/1" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +let body = { + "projects": "[1,2,3]", + "flag": true +} + +fetch(url, { + method: "POST", + headers: headers, + body: body +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->post( + 'http://localhost:8000/api/v1/projects/starter/1', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + 'json' => [ + 'projects' => '[1,2,3]', + 'flag' => true, + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/projects/starter/1' +payload = { + "projects": "[1,2,3]", + "flag": true +} +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('POST', url, headers=headers, json=payload) +response.json() +``` + + +> Example response (200): + +```json +null +``` +> Example response (500): + +```json +{ + "errors": [ + "Choose at-least one project." + ] +} +``` + +### HTTP Request +`POST api/v1/projects/starter/{flag}` + +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `projects` | array | required | Projects Ids array. + `flag` | boolean | required | Selected projects remove or make starter. + + + +#4. Playlist + + +APIs for playlist management + +## Get Shared Playlist + +Get the specified shared playlist of a Project. + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/playlists/1/load-shared" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/playlists/1/load-shared" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/playlists/1/load-shared', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/playlists/1/load-shared' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (400): + +```json +{ + "errors": [ + "No shareable Project found." + ] +} +``` +> Example response (200): + +```json +{ + "playlist": { + "id": 1, + "title": "Math Playlist", + "order": 0, + "is_public": true, + "project_id": 1, + "gcr_playlist_visibility": true, + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + "activities": [], + "created_at": "2020-09-07T17:01:24.000000Z", + "updated_at": "2020-09-07T17:01:24.000000Z" + } +} +``` + +### HTTP Request +`GET api/v1/playlists/{playlist}/load-shared` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `playlist` | required | The Id of a playlist + + + + +## Get Shared Playlist + +Get the specified shared playlist detail. + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/projects/1/playlists/1/load-shared-playlist" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/projects/1/playlists/1/load-shared-playlist" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/projects/1/playlists/1/load-shared-playlist', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/projects/1/playlists/1/load-shared-playlist' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (400): + +```json +{ + "errors": [ + "No shareable Playlist found." + ] +} +``` +> Example response (200): + +```json +{ + "playlist": { + "id": 1, + "title": "Math Playlist", + "order": 0, + "is_public": true, + "project_id": 1, + "gcr_playlist_visibility": true, + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + "activities": [], + "created_at": "2020-09-07T17:01:24.000000Z", + "updated_at": "2020-09-07T17:01:24.000000Z" + } +} +``` + +### HTTP Request +`GET api/v1/projects/{project}/playlists/{playlist}/load-shared-playlist` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `project` | required | The Id of a playlist + + + + +## Get All Shared Playlists of a Project + +Get the list of shared playlists detail. + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/projects/1/shared-playlists" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/projects/1/shared-playlists" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/projects/1/shared-playlists', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/projects/1/shared-playlists' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (400): + +```json +{ + "errors": [ + "No shareable Playlist found." + ] +} +``` +> Example response (200): + +```json +{ + "playlist": { + "id": 1, + "title": "Math Playlist", + "order": 0, + "is_public": true, + "project_id": 1, + "gcr_playlist_visibility": true, + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + "activities": [], + "created_at": "2020-09-07T17:01:24.000000Z", + "updated_at": "2020-09-07T17:01:24.000000Z" + } +} +``` + +### HTTP Request +`GET api/v1/projects/{project}/shared-playlists` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `project` | required | The Id of a project + + + + +## api/v1/playlists/update-order +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/playlists/update-order" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/playlists/update-order" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/playlists/update-order', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/playlists/update-order' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (500): + +```json +{ + "message": "Server Error" +} +``` + +### HTTP Request +`GET api/v1/playlists/update-order` + + + + + +## Reorder Playlists + +Reorder playlists of a project. + +> Example request: + +```bash +curl -X POST \ + "http://localhost:8000/api/v1/projects/1/playlists/reorder" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{"playlists":[]}' + +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/projects/1/playlists/reorder" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +let body = { + "playlists": [] +} + +fetch(url, { + method: "POST", + headers: headers, + body: body +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->post( + 'http://localhost:8000/api/v1/projects/1/playlists/reorder', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + 'json' => [ + 'playlists' => [], + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/projects/1/playlists/reorder' +payload = { + "playlists": [] +} +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('POST', url, headers=headers, json=payload) +response.json() +``` + + +> Example response (200): + +```json +{ + "playlists": [ + { + "id": 1, + "title": "Math Playlist", + "order": 0, + "is_public": true, + "gcr_playlist_visibility": true, + "project_id": 1, + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + "activities": [ + { + "id": 1, + "playlist_id": 1, + "title": "Audio Record", + "type": "h5p", + "content": "Audio Record content", + "shared": true, + "order": 0, + "thumb_url": "\/storage\/activities\/3vVpHHh75MJHOV6a6iZdy13luBaiNn1SrniYpBbQ.png", + "subject_id": "Career & Technical Education", + "education_level_id": null, + "h5p_content": { + "id": 19430, + "user_id": 1, + "title": "record", + "library_id": 98, + "parameters": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing \\\"Retry\\\" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", + "filtered": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing "Retry" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", + "slug": "record", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null, + "created_at": "2020-09-27T07:14:57.000000Z", + "updated_at": "2020-09-27T07:14:57.000000Z" + }, + "is_public": false, + "created_at": "2020-09-27T07:14:57.000000Z", + "updated_at": "2020-09-27T07:14:57.000000Z" + }, + { + "id": 2, + "playlist_id": 1, + "title": "Language Arts", + "type": "h5p", + "content": "Language Arts content", + "shared": true, + "order": 1, + "thumb_url": "\/storage\/activities\/w2LXV4VMPgccjJyZbs16wSzglX1s58K5NFfFp7ed.png", + "subject_id": "Language Arts", + "education_level_id": null, + "h5p_content": { + "id": 19431, + "user_id": 1, + "title": "fghfhg", + "library_id": 98, + "parameters": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing \\\"Retry\\\" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", + "filtered": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing "Retry" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", + "slug": "fghfhg", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null, + "created_at": "2020-09-07T07:15:31.000000Z", + "updated_at": "2020-09-07T07:15:31.000000Z" + }, + "is_public": false, + "created_at": "2020-09-07T07:15:31.000000Z", + "updated_at": "2020-09-07T07:15:31.000000Z" + } + ], + "created_at": "2020-09-07T17:01:24.000000Z", + "updated_at": "2020-09-07T17:01:24.000000Z" + }, + { + "id": 2, + "title": "Music Playlist", + "order": 1, + "is_public": false, + "project_id": 1, + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + "activities": [], + "created_at": "2020-09-16T18:21:29.000000Z", + "updated_at": "2020-09-16T18:21:29.000000Z" + } + ] +} +``` + +### HTTP Request +`POST api/v1/projects/{project}/playlists/reorder` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `project` | required | The Id of a project +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `playlists` | array | required | Playlists of a project + + + + +## Clone Playlist + +Clone a playlist of a project. + +> Example request: + +```bash +curl -X POST \ + "http://localhost:8000/api/v1/projects/1/playlists/1/clone" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/projects/1/playlists/1/clone" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "POST", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->post( + 'http://localhost:8000/api/v1/projects/1/playlists/1/clone', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/projects/1/playlists/1/clone' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('POST', url, headers=headers) +response.json() +``` + + +> Example response (200): + +```json +{ + "message": "Playlist is being cloned|duplicated in background!" +} +``` +> Example response (500): + +```json +{ + "errors": [ + "Not a Public Playlist." + ] +} +``` + +### HTTP Request +`POST api/v1/projects/{project}/playlists/{playlist}/clone` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `project` | required | The Id of a project + `playlist` | required | The Id of a playlist + + + + +## Get Playlists + +Get a list of the playlists of a project. + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/projects/1/playlists" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/projects/1/playlists" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/projects/1/playlists', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/projects/1/playlists' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (200): + +```json +{ + "playlists": [ + { + "id": 1, + "title": "Math Playlist", + "order": 0, + "is_public": true, + "gcr_playlist_visibility": true, + "project_id": 1, + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + "activities": [ + { + "id": 1, + "playlist_id": 1, + "title": "Audio Record", + "type": "h5p", + "content": "Audio Record content", + "shared": true, + "order": 0, + "thumb_url": "\/storage\/activities\/3vVpHHh75MJHOV6a6iZdy13luBaiNn1SrniYpBbQ.png", + "subject_id": "Career & Technical Education", + "education_level_id": null, + "h5p_content": { + "id": 19430, + "user_id": 1, + "title": "record", + "library_id": 98, + "parameters": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing \\\"Retry\\\" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", + "filtered": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing "Retry" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", + "slug": "record", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null, + "created_at": "2020-09-27T07:14:57.000000Z", + "updated_at": "2020-09-27T07:14:57.000000Z" + }, + "is_public": false, + "created_at": "2020-09-27T07:14:57.000000Z", + "updated_at": "2020-09-27T07:14:57.000000Z" + }, + { + "id": 2, + "playlist_id": 1, + "title": "Language Arts", + "type": "h5p", + "content": "Language Arts content", + "shared": true, + "order": 1, + "thumb_url": "\/storage\/activities\/w2LXV4VMPgccjJyZbs16wSzglX1s58K5NFfFp7ed.png", + "subject_id": "Language Arts", + "education_level_id": null, + "h5p_content": { + "id": 19431, + "user_id": 1, + "title": "fghfhg", + "library_id": 98, + "parameters": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing \\\"Retry\\\" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", + "filtered": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing "Retry" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", + "slug": "fghfhg", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null, + "created_at": "2020-09-07T07:15:31.000000Z", + "updated_at": "2020-09-07T07:15:31.000000Z" + }, + "is_public": false, + "created_at": "2020-09-07T07:15:31.000000Z", + "updated_at": "2020-09-07T07:15:31.000000Z" + } + ], + "created_at": "2020-09-07T17:01:24.000000Z", + "updated_at": "2020-09-07T17:01:24.000000Z" + }, + { + "id": 2, + "title": "Music Playlist", + "order": 1, + "is_public": false, + "project_id": 1, + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + "activities": [], + "created_at": "2020-09-16T18:21:29.000000Z", + "updated_at": "2020-09-16T18:21:29.000000Z" + } + ] +} +``` + +### HTTP Request +`GET api/v1/projects/{project}/playlists` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `project` | required | The Id of a project + + + + +## Create Playlist + +Create a new playlist of a project. + +> Example request: + +```bash +curl -X POST \ + "http://localhost:8000/api/v1/projects/ipsa/playlists" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{"title":"Math Playlist","order":0}' + +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/projects/ipsa/playlists" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +let body = { + "title": "Math Playlist", + "order": 0 +} + +fetch(url, { + method: "POST", + headers: headers, + body: body +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->post( + 'http://localhost:8000/api/v1/projects/ipsa/playlists', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + 'json' => [ + 'title' => 'Math Playlist', + 'order' => 0, + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/projects/ipsa/playlists' +payload = { + "title": "Math Playlist", + "order": 0 +} +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('POST', url, headers=headers, json=payload) +response.json() +``` + + +> Example response (500): + +```json +{ + "errors": [ + "Could not create playlist. Please try again later." + ] +} +``` +> Example response (201): + +```json +{ + "playlist": { + "id": 1, + "title": "Math Playlist", + "order": 0, + "is_public": true, + "project_id": 1, + "gcr_playlist_visibility": true, + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + "activities": [], + "created_at": "2020-09-07T17:01:24.000000Z", + "updated_at": "2020-09-07T17:01:24.000000Z" + } +} +``` + +### HTTP Request +`POST api/v1/projects/{project}/playlists` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `project` | required | The Id of a project Example 1 +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `title` | string | required | The title of a playlist + `order` | integer | optional | The order number of a playlist + + + + +## Get Playlist + +Get the specified playlist of a project. + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/projects/1/playlists/1" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/projects/1/playlists/1" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/projects/1/playlists/1', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/projects/1/playlists/1' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (400): + +```json +{ + "errors": [ + "Invalid project or playlist id." + ] +} +``` +> Example response (200): + +```json +{ + "playlist": { + "id": 1, + "title": "Math Playlist", + "order": 0, + "is_public": true, + "project_id": 1, + "gcr_playlist_visibility": true, + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + "activities": [], + "created_at": "2020-09-07T17:01:24.000000Z", + "updated_at": "2020-09-07T17:01:24.000000Z" + } +} +``` + +### HTTP Request +`GET api/v1/projects/{project}/playlists/{playlist}` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `project` | required | The Id of a project + `playlist` | required | The Id of a playlist + + + + +## Update Playlist + +Update the specified playlist of a project. + +> Example request: + +```bash +curl -X PUT \ + "http://localhost:8000/api/v1/projects/1/playlists/1" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{"title":"Math Playlist","order":0}' + +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/projects/1/playlists/1" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +let body = { + "title": "Math Playlist", + "order": 0 +} + +fetch(url, { + method: "PUT", + headers: headers, + body: body +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->put( + 'http://localhost:8000/api/v1/projects/1/playlists/1', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + 'json' => [ + 'title' => 'Math Playlist', + 'order' => 0, + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/projects/1/playlists/1' +payload = { + "title": "Math Playlist", + "order": 0 +} +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('PUT', url, headers=headers, json=payload) +response.json() +``` + + +> Example response (400): + +```json +{ + "errors": [ + "Invalid project or playlist id." + ] +} +``` +> Example response (500): + +```json +{ + "errors": [ + "Failed to update playlist." + ] +} +``` +> Example response (200): + +```json +{ + "playlist": { + "id": 1, + "title": "Math Playlist", + "order": 0, + "is_public": true, + "project_id": 1, + "gcr_playlist_visibility": true, + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + "activities": [], + "created_at": "2020-09-07T17:01:24.000000Z", + "updated_at": "2020-09-07T17:01:24.000000Z" + } +} +``` + +### HTTP Request +`PUT api/v1/projects/{project}/playlists/{playlist}` + +`PATCH api/v1/projects/{project}/playlists/{playlist}` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `project` | required | The Id of a project + `playlist` | required | The Id of a playlist +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `title` | string | required | The title of a playlist + `order` | integer | optional | The order number of a playlist + + + + +## Remove Playlist + +Remove the specified playlist of a project. + +> Example request: + +```bash +curl -X DELETE \ + "http://localhost:8000/api/v1/projects/1/playlists/1" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/projects/1/playlists/1" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "DELETE", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->delete( + 'http://localhost:8000/api/v1/projects/1/playlists/1', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/projects/1/playlists/1' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('DELETE', url, headers=headers) +response.json() +``` + + +> Example response (200): + +```json +{ + "message": "Playlist has been deleted successfully." +} +``` +> Example response (400): + +```json +{ + "errors": [ + "Invalid project or playlist id." + ] +} +``` +> Example response (500): + +```json +{ + "errors": [ + "Failed to delete playlist." + ] +} +``` + +### HTTP Request +`DELETE api/v1/projects/{project}/playlists/{playlist}` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `project` | required | The Id of a project + `playlist` | required | The Id of a playlist + + + + +## Get Playlist Search Preview + +Get the specified playlist search preview. + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/suborganization/1/playlists/1/search-preview" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/suborganization/1/playlists/1/search-preview" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/suborganization/1/playlists/1/search-preview', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/suborganization/1/playlists/1/search-preview' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (404): + +```json +{ + "message": [ + "Playlist is not available." + ] +} +``` +> Example response (200): + +```json +{ + "playlist": { + "id": 1, + "title": "Math Playlist", + "order": 0, + "is_public": true, + "project_id": 1, + "gcr_playlist_visibility": true, + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + "activities": [], + "created_at": "2020-09-07T17:01:24.000000Z", + "updated_at": "2020-09-07T17:01:24.000000Z" + } +} +``` + +### HTTP Request +`GET api/v1/suborganization/{suborganization}/playlists/{playlist}/search-preview` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `suborganization` | required | The Id of a suborganization + `playlist` | required | The Id of a playlist + + + + +## Share playlist + +Share the specified playlist of a user. + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/projects/1/playlists/1/share" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/projects/1/playlists/1/share" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/projects/1/playlists/1/share', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/projects/1/playlists/1/share' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (500): + +```json +{ + "errors": [ + "Failed to share playlist." + ] +} +``` +> Example response (200): + +```json +{ + "playlist": { + "id": 1, + "title": "Math Playlist", + "order": 0, + "is_public": true, + "project_id": 1, + "gcr_playlist_visibility": true, + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + "activities": [], + "created_at": "2020-09-07T17:01:24.000000Z", + "updated_at": "2020-09-07T17:01:24.000000Z" + } +} +``` + +### HTTP Request +`GET api/v1/projects/{project}/playlists/{playlist}/share` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `playlist` | required | The Id of a playlist + `project` | required | The Id of a project + + + + +## Remove Share playlist + +Remove Share the specified playlist of a user. + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/projects/1/playlists/1/remove-share" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/projects/1/playlists/1/remove-share" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/projects/1/playlists/1/remove-share', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/projects/1/playlists/1/remove-share' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (500): + +```json +{ + "errors": [ + "Failed to remove share playlist." + ] +} +``` +> Example response (200): + +```json +{ + "playlist": { + "id": 1, + "title": "Math Playlist", + "order": 0, + "is_public": true, + "project_id": 1, + "gcr_playlist_visibility": true, + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + "activities": [], + "created_at": "2020-09-07T17:01:24.000000Z", + "updated_at": "2020-09-07T17:01:24.000000Z" + } +} +``` + +### HTTP Request +`GET api/v1/projects/{project}/playlists/{playlist}/remove-share` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `playlist` | required | The Id of a playlist + `project` | required | The Id of a project + + + + +## Get Lti Playlist + +Get the lti playlist of a project. + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/playlists/1/lti" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/playlists/1/lti" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/playlists/1/lti', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/playlists/1/lti' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (200): + +```json +{ + "playlist": { + "id": 1, + "title": "Math Playlist", + "order": 0, + "is_public": true, + "project_id": 1, + "gcr_playlist_visibility": true, + "project": { + "id": 1, + "name": "Test Project", + "description": "This is a test project.", + "thumb_url": "https:\/\/images.pexels.com\/photos\/2832382", + "shared": true, + "starter_project": null, + "users": [ + { + "id": 1, + "first_name": "John", + "last_name": "Doe", + "email": "john.doe@currikistudio.org", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-09-06T19:21:08.000000Z", + "updated_at": "2020-09-06T19:21:08.000000Z" + }, + "activities": [], + "created_at": "2020-09-07T17:01:24.000000Z", + "updated_at": "2020-09-07T17:01:24.000000Z" + } +} +``` + +### HTTP Request +`GET api/v1/playlists/{playlist}/lti` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `project` | required | The Id of a project Example 1 + + + +#5. Activity + + +APIs for activity management + +## Get Activity Search Preview + +Get the specified activity search preview. + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/suborganization/1/activities/1/search-preview" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/suborganization/1/activities/1/search-preview" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/suborganization/1/activities/1/search-preview', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/suborganization/1/activities/1/search-preview' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (200): + +```json +{ + "h5p": { + "id": 59, + "title": "Science of Golf: Why Balls Have Dimples", + "params": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"},\"aspectRatio\":\"16:9\"}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"bookmarks\":[],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "filtered": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"}}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "slug": "science-of-golf-why-balls-have-dimples", + "user_id": 1, + "embedType": "div", + "disable": 9, + "libraryMajorVersion": 1, + "libraryMinorVersion": 21, + "authors": null, + "source": null, + "yearFrom": null, + "yearTo": null, + "licenseVersion": null, + "licenseExtras": null, + "authorComments": null, + "changes": null, + "defaultLanguage": null, + "metadata": { + "title": "Science of Golf: Why Balls Have Dimples", + "license": "U" + }, + "library": { + "id": 40, + "name": "H5P.InteractiveVideo", + "majorVersion": 1, + "minorVersion": 21, + "embedTypes": "iframe", + "fullscreen": 1 + }, + "language": "en", + "tags": "" + }, + "activity": { + "id": 1, + "playlist_id": 1, + "title": "Science of Golf: Why Balls Have Dimples", + "type": "h5p", + "content": "", + "shared": false, + "order": 2, + "thumb_url": null, + "subject_id": null, + "education_level_id": null, + "h5p_content": { + "id": 59, + "created_at": "2020-04-30T20:24:58.000000Z", + "updated_at": "2020-04-30T20:24:58.000000Z", + "user_id": 1, + "title": "Science of Golf: Why Balls Have Dimples", + "library_id": 40, + "parameters": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"},\"aspectRatio\":\"16:9\"}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"bookmarks\":[],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "filtered": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"}}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "slug": "science-of-golf-why-balls-have-dimples", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null + }, + "is_public": false, + "created_at": null, + "updated_at": null + }, + "playlist": { + "id": 1, + "title": "The Engineering & Design Behind Golf Balls", + "order": 0, + "is_public": true, + "project_id": 1, + "project": { + "id": 1, + "name": "The Science of Golf", + "description": "Uncover the science, technology, engineering, and mathematics behind the game of golf.", + "thumb_url": "\/storage\/projects\/nN5y8v8zh2ghxrKuHCv5wvJOREFw0Nr27s2DPxWq.png", + "shared": false, + "starter_project": false, + "users": [ + { + "id": 1, + "email": "john.doe@currikistudio.org", + "first_name": "John", + "last_name": "Doe", + "role": "owner" + } + ], + "is_public": true, + "created_at": "2020-04-30T20:03:12.000000Z", + "updated_at": "2020-07-11T12:51:07.000000Z" + }, + "activities": [ + { + "id": 4, + "playlist_id": 1, + "title": "Labeling Golf Ball - Principles of Physics", + "type": "h5p", + "content": "", + "shared": false, + "order": 0, + "thumb_url": null, + "subject_id": null, + "education_level_id": null, + "h5p_content": { + "id": 65, + "created_at": "2020-04-30T23:40:49.000000Z", + "updated_at": "2020-04-30T23:40:49.000000Z", + "user_id": 1, + "title": "Labeling Golf Ball - Principles of Physics", + "library_id": 19, + "parameters": "{\"scoreShow\":\"Check\",\"tryAgain\":\"Retry\",\"scoreExplanation\":\"Correct answers give +1 point. Incorrect answers give -1 point. The lowest possible score is 0.\",\"question\":{\"settings\":{\"size\":{\"width\":620,\"height\":310},\"background\":{\"path\":\"images\/background-5eab614083be2.png#tmp\",\"mime\":\"image\/png\",\"copyright\":{\"license\":\"U\"},\"width\":620,\"height\":310}},\"task\":{\"elements\":[{\"x\":0,\"y\":47.96909692035003,\"width\":7.812090416666667,\"height\":1.3537570833333332,\"dropZones\":[\"0\",\"1\",\"2\"],\"type\":{\"library\":\"H5P.AdvancedText 1.1\",\"params\":{\"text\":\"

Lift<\/p>\\n\"},\"subContentId\":\"be1d9b11-91ff-4e59-a7c6-9966e1bf8cb2\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Lift\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Lift\"}},\"backgroundOpacity\":100,\"multiple\":false},{\"x\":-4.63163666049382e-8,\"y\":58.810763796296285,\"width\":7.812090416666667,\"height\":1.3537570833333332,\"dropZones\":[\"0\",\"1\",\"2\"],\"type\":{\"library\":\"H5P.AdvancedText 1.1\",\"params\":{\"text\":\"

Drag<\/p>\\n\"},\"subContentId\":\"05a00202-b5dd-44a9-acf1-0cce77278b33\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Drag\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Drag\"}},\"backgroundOpacity\":100,\"multiple\":false},{\"x\":-4.63163666049382e-8,\"y\":36.89236101851851,\"width\":7.812090416666667,\"height\":1.281997824074074,\"dropZones\":[\"0\",\"1\",\"2\"],\"type\":{\"library\":\"H5P.AdvancedText 1.1\",\"params\":{\"text\":\"

Spin<\/p>\\n\"},\"subContentId\":\"140a5423-873b-46d4-8f4f-9b236cefce20\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Spin\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Spin\"}},\"backgroundOpacity\":100,\"multiple\":false}],\"dropZones\":[{\"x\":72.35516653328209,\"y\":14.75972212933847,\"width\":8.61111111111111,\"height\":2.511574074074074,\"correctElements\":[\"0\"],\"showLabel\":false,\"backgroundOpacity\":50,\"tipsAndFeedback\":{\"tip\":\"\"},\"single\":true,\"autoAlign\":true,\"type\":{\"library\":\"H5P.DragQuestionDropzone 0.1\"},\"label\":\"

Lift<\/div>\\n\"},{\"x\":72.35484909201396,\"y\":36.89236101851851,\"width\":8.61111111111111,\"height\":2.511574074074074,\"correctElements\":[\"1\"],\"showLabel\":false,\"backgroundOpacity\":50,\"tipsAndFeedback\":{\"tip\":\"\"},\"single\":true,\"autoAlign\":true,\"type\":{\"library\":\"H5P.DragQuestionDropzone 0.1\"},\"label\":\"
Drag<\/div>\\n\"},{\"x\":72.35516653328209,\"y\":51.65902745268465,\"width\":8.61111111111111,\"height\":2.511574074074074,\"correctElements\":[\"2\"],\"showLabel\":false,\"backgroundOpacity\":50,\"tipsAndFeedback\":{\"tip\":\"\"},\"single\":true,\"autoAlign\":true,\"type\":{\"library\":\"H5P.DragQuestionDropzone 0.1\"},\"label\":\"
Spin<\/div>\\n\"}]}},\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"enableRetry\":true,\"enableCheckButton\":true,\"showSolutionsRequiresInput\":true,\"singlePoint\":false,\"applyPenalties\":true,\"enableScoreExplanation\":true,\"dropZoneHighlighting\":\"dragging\",\"autoAlignSpacing\":2,\"enableFullScreen\":false,\"showScorePoints\":true,\"showTitle\":true},\"grabbablePrefix\":\"Grabbable {num} of {total}.\",\"grabbableSuffix\":\"Placed in dropzone {num}.\",\"dropzonePrefix\":\"Dropzone {num} of {total}.\",\"noDropzone\":\"No dropzone.\",\"tipLabel\":\"Show tip.\",\"tipAvailable\":\"Tip available\",\"correctAnswer\":\"Correct answer\",\"wrongAnswer\":\"Wrong answer\",\"feedbackHeader\":\"Feedback\",\"scoreBarLabel\":\"You got :num out of :total points\",\"scoreExplanationButtonLabel\":\"Show score explanation\",\"localize\":{\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit fullscreen\"}}", + "filtered": "{\"scoreShow\":\"Check\",\"tryAgain\":\"Retry\",\"scoreExplanation\":\"Correct answers give +1 point. Incorrect answers give -1 point. The lowest possible score is 0.\",\"question\":{\"settings\":{\"size\":{\"width\":620,\"height\":310},\"background\":{\"path\":\"images\/background-5eab614083be2.png\",\"mime\":\"image\/png\",\"copyright\":{\"license\":\"U\"},\"width\":620,\"height\":310}},\"task\":{\"elements\":[{\"x\":0,\"y\":47.96909692035003,\"width\":7.812090416666667,\"height\":1.3537570833333332,\"dropZones\":[\"0\",\"1\",\"2\"],\"type\":{\"library\":\"H5P.AdvancedText 1.1\",\"params\":{\"text\":\"

Lift<\/p>\\n\"},\"subContentId\":\"be1d9b11-91ff-4e59-a7c6-9966e1bf8cb2\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Lift\"}},\"backgroundOpacity\":100,\"multiple\":false},{\"x\":-4.63163666049382e-8,\"y\":58.810763796296285,\"width\":7.812090416666667,\"height\":1.3537570833333332,\"dropZones\":[\"0\",\"1\",\"2\"],\"type\":{\"library\":\"H5P.AdvancedText 1.1\",\"params\":{\"text\":\"

Drag<\/p>\\n\"},\"subContentId\":\"05a00202-b5dd-44a9-acf1-0cce77278b33\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Drag\"}},\"backgroundOpacity\":100,\"multiple\":false},{\"x\":-4.63163666049382e-8,\"y\":36.89236101851851,\"width\":7.812090416666667,\"height\":1.281997824074074,\"dropZones\":[\"0\",\"1\",\"2\"],\"type\":{\"library\":\"H5P.AdvancedText 1.1\",\"params\":{\"text\":\"

Spin<\/p>\\n\"},\"subContentId\":\"140a5423-873b-46d4-8f4f-9b236cefce20\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Spin\"}},\"backgroundOpacity\":100,\"multiple\":false}],\"dropZones\":[{\"x\":72.35516653328209,\"y\":14.75972212933847,\"width\":8.61111111111111,\"height\":2.511574074074074,\"correctElements\":[\"0\"],\"showLabel\":false,\"backgroundOpacity\":50,\"tipsAndFeedback\":{\"tip\":\"\"},\"single\":true,\"autoAlign\":true,\"label\":\"

Lift<\/div>\\n\"},{\"x\":72.35484909201396,\"y\":36.89236101851851,\"width\":8.61111111111111,\"height\":2.511574074074074,\"correctElements\":[\"1\"],\"showLabel\":false,\"backgroundOpacity\":50,\"tipsAndFeedback\":{\"tip\":\"\"},\"single\":true,\"autoAlign\":true,\"label\":\"
Drag<\/div>\\n\"},{\"x\":72.35516653328209,\"y\":51.65902745268465,\"width\":8.61111111111111,\"height\":2.511574074074074,\"correctElements\":[\"2\"],\"showLabel\":false,\"backgroundOpacity\":50,\"tipsAndFeedback\":{\"tip\":\"\"},\"single\":true,\"autoAlign\":true,\"label\":\"
Spin<\/div>\\n\"}]}},\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"enableRetry\":true,\"enableCheckButton\":true,\"showSolutionsRequiresInput\":true,\"singlePoint\":false,\"applyPenalties\":true,\"enableScoreExplanation\":true,\"dropZoneHighlighting\":\"dragging\",\"autoAlignSpacing\":2,\"enableFullScreen\":false,\"showScorePoints\":true,\"showTitle\":true},\"grabbablePrefix\":\"Grabbable {num} of {total}.\",\"grabbableSuffix\":\"Placed in dropzone {num}.\",\"dropzonePrefix\":\"Dropzone {num} of {total}.\",\"noDropzone\":\"No dropzone.\",\"tipLabel\":\"Show tip.\",\"tipAvailable\":\"Tip available\",\"correctAnswer\":\"Correct answer\",\"wrongAnswer\":\"Wrong answer\",\"feedbackHeader\":\"Feedback\",\"scoreBarLabel\":\"You got :num out of :total points\",\"scoreExplanationButtonLabel\":\"Show score explanation\",\"localize\":{\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit fullscreen\"}}", + "slug": "labeling-golf-ball-principles-of-physics", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null + }, + "is_public": false, + "created_at": null, + "updated_at": null + }, + { + "id": 17774, + "playlist_id": 1, + "title": "Latest", + "type": "h5p", + "content": "test", + "shared": false, + "order": null, + "thumb_url": "\/storage\/activities\/DrV6rZ6ZDXFMT1k51gbOqw04rqguq6CMtiiD1nDH.png", + "subject_id": "Mathematics", + "education_level_id": null, + "h5p_content": { + "id": 19334, + "created_at": "2020-08-30T20:09:56.000000Z", + "updated_at": "2020-08-30T20:09:56.000000Z", + "user_id": 1, + "title": "Latest", + "library_id": 98, + "parameters": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing \\\"Retry\\\" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", + "filtered": "", + "slug": "latest", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null + }, + "is_public": false, + "created_at": "2020-08-30T20:22:47.000000Z", + "updated_at": "2020-08-30T20:22:47.000000Z" + }, + { + "id": 17776, + "playlist_id": 1, + "title": "Latest", + "type": "h5p", + "content": "test", + "shared": false, + "order": null, + "thumb_url": "\/storage\/activities\/DrV6rZ6ZDXFMT1k51gbOqw04rqguq6CMtiiD1nDH.png", + "subject_id": "Mathematics", + "education_level_id": null, + "h5p_content": { + "id": 19334, + "created_at": "2020-08-30T20:09:56.000000Z", + "updated_at": "2020-08-30T20:09:56.000000Z", + "user_id": 1, + "title": "Latest", + "library_id": 98, + "parameters": "{\"l10n\":{\"recordAnswer\":\"Record\",\"pause\":\"Pause\",\"continue\":\"Continue\",\"download\":\"Download\",\"done\":\"Done\",\"retry\":\"Retry\",\"microphoneNotSupported\":\"Microphone not supported. Make sure you are using a browser that allows microphone recording.\",\"microphoneInaccessible\":\"Microphone is not accessible. Make sure that the browser microphone is enabled.\",\"insecureNotAllowed\":\"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS\",\"statusReadyToRecord\":\"Press a button below to record your answer.\",\"statusRecording\":\"Recording...\",\"statusPaused\":\"Recording paused. Press a button to continue recording.\",\"statusFinishedRecording\":\"You have successfully recorded your answer! Listen to the recording below.\",\"downloadRecording\":\"Download this recording or retry.\",\"retryDialogHeaderText\":\"Retry recording?\",\"retryDialogBodyText\":\"By pressing \\\"Retry\\\" you will lose your current recording.\",\"retryDialogConfirmText\":\"Retry\",\"retryDialogCancelText\":\"Cancel\",\"statusCantCreateTheAudioFile\":\"Can't create the audio file.\"}}", + "filtered": "", + "slug": "latest", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null + }, + "is_public": false, + "created_at": "2020-08-30T20:24:29.000000Z", + "updated_at": "2020-08-30T20:24:29.000000Z" + }, + { + "id": 3, + "playlist_id": 1, + "title": "Physics Vocabulary Study Guide", + "type": "h5p", + "content": "", + "shared": false, + "order": 1, + "thumb_url": null, + "subject_id": null, + "education_level_id": null, + "h5p_content": { + "id": 61, + "created_at": "2020-04-30T20:35:30.000000Z", + "updated_at": "2020-04-30T20:35:30.000000Z", + "user_id": 1, + "title": "Physics Vocabulary Study Guide", + "library_id": 63, + "parameters": "{\"panels\":[{\"content\":{\"params\":{\"text\":\"

Acceleration is the measurement of the change <\/span><\/span><\/span>in an object\\u2019s velocity. <\/span><\/span><\/span><\/p>\\n\"},\"library\":\"H5P.AdvancedText 1.1\",\"subContentId\":\"97578055-d386-46be-afe3-c19eae4108aa\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Acceleration\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Acceleration\"}},\"title\":\"Acceleration\"},{\"content\":{\"params\":{\"text\":\"

The faster the air moves, the less pressure it exerts.<\/span><\/span><\/span><\/p>\\n\"},\"library\":\"H5P.AdvancedText 1.1\",\"subContentId\":\"0ce32fbf-4ff1-465b-9c50-8876c5fef34d\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Bernoulli\\u2019s Principle\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Bernoulli\\u2019s Principle\"}},\"title\":\"Bernoulli\\u2019s Principle\"},{\"content\":{\"params\":{\"text\":\"

A vector is a quantity that has both a magnitude and a direction.<\/span><\/span><\/span><\/span><\/p>\\n\"},\"library\":\"H5P.AdvancedText 1.1\",\"subContentId\":\"cead752e-0c29-4acb-b9ae-2f61a3cd5c9b\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Vector\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Vector\"}},\"title\":\"Vector\"},{\"content\":{\"params\":{\"text\":\"

Drag is the force that acts opposite to the direction of motion. Drag is caused by friction and differences in air pressure.<\/span><\/span><\/span><\/span><\/p>\\n\"},\"library\":\"H5P.AdvancedText 1.1\",\"subContentId\":\"6ae4b819-276d-405e-b085-e894c31484d3\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Drag\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Drag\"}},\"title\":\"Drag\"},{\"content\":{\"params\":{\"text\":\"

A turbulent flow is one in which the particles have irregular, fluctuating motions and erratic paths.<\/span><\/span><\/span><\/span><\/span><\/p>\\n\"},\"library\":\"H5P.AdvancedText 1.1\",\"subContentId\":\"f9f63fdd-0a8a-4259-a3f1-ca7271b51727\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Turbulent airflow\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Turbulent airflow\"}},\"title\":\"Turbulent airflow\"},{\"content\":{\"params\":{\"text\":\"

Friction is the resistance of motion when one object rubs against another. It is a force and is measured in newtons.<\/span><\/span><\/span><\/p>\\n\"},\"library\":\"H5P.AdvancedText 1.1\",\"subContentId\":\"236c832f-f754-47d6-8d2c-1311a354d861\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Friction\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Friction\"}},\"title\":\"Friction\"}],\"hTag\":\"h2\"}", + "filtered": "{\"panels\":[{\"content\":{\"params\":{\"text\":\"

Acceleration is the measurement of the change <\/span><\/span><\/span>in an object\\u2019s velocity. <\/span><\/span><\/span><\/p>\\n\"},\"library\":\"H5P.AdvancedText 1.1\",\"subContentId\":\"97578055-d386-46be-afe3-c19eae4108aa\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Acceleration\"}},\"title\":\"Acceleration\"},{\"content\":{\"params\":{\"text\":\"

The faster the air moves, the less pressure it exerts.<\/span><\/span><\/span><\/p>\\n\"},\"library\":\"H5P.AdvancedText 1.1\",\"subContentId\":\"0ce32fbf-4ff1-465b-9c50-8876c5fef34d\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Bernoulli\\u2019s Principle\"}},\"title\":\"Bernoulli\\u2019s Principle\"},{\"content\":{\"params\":{\"text\":\"

A vector is a quantity that has both a magnitude and a direction.<\/span><\/span><\/span><\/span><\/p>\\n\"},\"library\":\"H5P.AdvancedText 1.1\",\"subContentId\":\"cead752e-0c29-4acb-b9ae-2f61a3cd5c9b\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Vector\"}},\"title\":\"Vector\"},{\"content\":{\"params\":{\"text\":\"

Drag is the force that acts opposite to the direction of motion. Drag is caused by friction and differences in air pressure.<\/span><\/span><\/span><\/span><\/p>\\n\"},\"library\":\"H5P.AdvancedText 1.1\",\"subContentId\":\"6ae4b819-276d-405e-b085-e894c31484d3\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Drag\"}},\"title\":\"Drag\"},{\"content\":{\"params\":{\"text\":\"

A turbulent flow is one in which the particles have irregular, fluctuating motions and erratic paths.<\/span><\/span><\/span><\/span><\/span><\/p>\\n\"},\"library\":\"H5P.AdvancedText 1.1\",\"subContentId\":\"f9f63fdd-0a8a-4259-a3f1-ca7271b51727\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Turbulent airflow\"}},\"title\":\"Turbulent airflow\"},{\"content\":{\"params\":{\"text\":\"

Friction is the resistance of motion when one object rubs against another. It is a force and is measured in newtons.<\/span><\/span><\/span><\/p>\\n\"},\"library\":\"H5P.AdvancedText 1.1\",\"subContentId\":\"236c832f-f754-47d6-8d2c-1311a354d861\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Friction\"}},\"title\":\"Friction\"}],\"hTag\":\"h2\"}", + "slug": "physics-vocabulary-study-guide", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null + }, + "is_public": false, + "created_at": null, + "updated_at": null + }, + { + "id": 1, + "playlist_id": 1, + "title": "Science of Golf: Why Balls Have Dimples", + "type": "h5p", + "content": "", + "shared": false, + "order": 2, + "thumb_url": null, + "subject_id": null, + "education_level_id": null, + "h5p_content": { + "id": 59, + "created_at": "2020-04-30T20:24:58.000000Z", + "updated_at": "2020-04-30T20:24:58.000000Z", + "user_id": 1, + "title": "Science of Golf: Why Balls Have Dimples", + "library_id": 40, + "parameters": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"},\"aspectRatio\":\"16:9\"}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"bookmarks\":[],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "filtered": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"}}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "slug": "science-of-golf-why-balls-have-dimples", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null + }, + "is_public": false, + "created_at": null, + "updated_at": null + }, + { + "id": 2, + "playlist_id": 1, + "title": "Physics and Golf Balls", + "type": "h5p", + "content": "", + "shared": false, + "order": 3, + "thumb_url": null, + "subject_id": null, + "education_level_id": null, + "h5p_content": { + "id": 60, + "created_at": "2020-04-30T20:31:11.000000Z", + "updated_at": "2020-04-30T20:31:11.000000Z", + "user_id": 1, + "title": "Physics and Golf Balls", + "library_id": 60, + "parameters": "{\"cards\":[{\"text\":\"Is the measurement of the change in an object\\u2019s velocity called Speed or Acceleration?\",\"answer\":\"Acceleration\",\"image\":{\"path\":\"images\/image-5eab35098aaf0.png#tmp\",\"mime\":\"image\/png\",\"copyright\":{\"license\":\"U\"},\"width\":1280,\"height\":720},\"tip\":\"\"},{\"text\":\"Dimples reduce wind resistance or aerodynamic drag. Does that make the ball go farther or faster?\",\"answer\":\"Farther\",\"image\":{\"path\":\"images\/image-5eab355f7ca78.jpg#tmp\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":1280,\"height\":720},\"tip\":\"\"},{\"text\":\"Do dimples on a ball increase or decrease the lift?\",\"answer\":\"Increase\",\"image\":{\"path\":\"images\/image-5eab3589be9e3.jpg#tmp\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":634,\"height\":508},\"tip\":\"\"}],\"progressText\":\"Card @card of @total\",\"next\":\"Next\",\"previous\":\"Previous\",\"checkAnswerText\":\"Check\",\"showSolutionsRequiresInput\":true,\"defaultAnswerText\":\"Your answer\",\"correctAnswerText\":\"Correct\",\"incorrectAnswerText\":\"Incorrect\",\"showSolutionText\":\"Correct answer\",\"results\":\"Results\",\"ofCorrect\":\"@score of @total correct\",\"showResults\":\"Show results\",\"answerShortText\":\"A:\",\"retry\":\"Retry\",\"caseSensitive\":false,\"cardAnnouncement\":\"Incorrect answer. Correct answer was @answer\",\"pageAnnouncement\":\"Page @current of @total\",\"description\":\"See if you can remember what you learned!\"}", + "filtered": "{\"cards\":[{\"text\":\"Is the measurement of the change in an object\\u2019s velocity called Speed or Acceleration?\",\"answer\":\"Acceleration\",\"image\":{\"path\":\"images\/image-5eab35098aaf0.png\",\"mime\":\"image\/png\",\"copyright\":{\"license\":\"U\"},\"width\":1280,\"height\":720},\"tip\":\"\"},{\"text\":\"Dimples reduce wind resistance or aerodynamic drag. Does that make the ball go farther or faster?\",\"answer\":\"Farther\",\"image\":{\"path\":\"images\/image-5eab355f7ca78.jpg\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":1280,\"height\":720},\"tip\":\"\"},{\"text\":\"Do dimples on a ball increase or decrease the lift?\",\"answer\":\"Increase\",\"image\":{\"path\":\"images\/image-5eab3589be9e3.jpg\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":634,\"height\":508},\"tip\":\"\"}],\"progressText\":\"Card @card of @total\",\"next\":\"Next\",\"previous\":\"Previous\",\"checkAnswerText\":\"Check\",\"showSolutionsRequiresInput\":true,\"defaultAnswerText\":\"Your answer\",\"correctAnswerText\":\"Correct\",\"incorrectAnswerText\":\"Incorrect\",\"showSolutionText\":\"Correct answer\",\"results\":\"Results\",\"ofCorrect\":\"@score of @total correct\",\"showResults\":\"Show results\",\"answerShortText\":\"A:\",\"retry\":\"Retry\",\"caseSensitive\":false,\"cardAnnouncement\":\"Incorrect answer. Correct answer was @answer\",\"pageAnnouncement\":\"Page @current of @total\",\"description\":\"See if you can remember what you learned!\"}", + "slug": "physics-and-golf-balls", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null + }, + "is_public": false, + "created_at": null, + "updated_at": null + }, + { + "id": 6, + "playlist_id": 1, + "title": "Understanding Gear Effect | Equipment and Tech | 18Birdies", + "type": "h5p", + "content": "", + "shared": false, + "order": 4, + "thumb_url": null, + "subject_id": null, + "education_level_id": null, + "h5p_content": { + "id": 75, + "created_at": "2020-05-01T04:51:11.000000Z", + "updated_at": "2020-05-01T04:51:11.000000Z", + "user_id": 1, + "title": "Understanding Gear Effect | Equipment and Tech | 18Birdies", + "library_id": 40, + "parameters": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/www.youtube.com\/watch?v=FdH0JQL5E-U&list=PLVIShUJLAj0rWw3Yr3VtFGH4IbIVMfQFo\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"},\"aspectRatio\":\"16:9\"}]},\"assets\":{\"interactions\":[{\"x\":46.87499999999999,\"y\":44.44444444444444,\"width\":10,\"height\":10,\"duration\":{\"from\":52,\"to\":52},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"c9f0c83d-2ba2-4810-843a-1ee7bec2076f\",\"question\":\"

\\\"Torque\\\" is a property of golf shafts that describes how much the shaft is prone to twisting during the golf swing.<\/p>\\n\",\"answers\":[\"

True<\/p>\\n\",\"

False<\/p>\\n\"]},{\"subContentId\":\"81f2e02c-0f04-44a3-922c-4eac61a11acb\",\"question\":\"

... A shaft with a _____ torque rating means the shaft better resists twisting; a shaft with a ____ torque rating means the shaft is more prone to twisting (all other things being equal).<\/p>\\n\",\"answers\":[\"

lower, higher<\/p>\\n\",\"

higher, lower<\/p>\\n\",\"

sharper, duller<\/p>\\n\",\"

straigher, curved<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"eadebb1e-891e-4ff3-8676-943c2616a9e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Untitled Single Choice Set\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Untitled Single Choice Set\"}},\"pause\":true,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"\"},{\"x\":46.87499999999999,\"y\":44.44444444444444,\"width\":10,\"height\":10,\"duration\":{\"from\":24.314,\"to\":34.314},\"libraryTitle\":\"Statements\",\"action\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"7bce98af-5267-4ca6-a08c-0c8f2bef5afb\",\"summary\":[\"Gear effect is the term used to explain how and why hitting the ball off-center changes the ball flight.\\n\",\"

Gear effect is the term used to explain how and why it is imprtant to adjust the pressure on the clubhead.<\/p>\\n\",\"

Gear effect is the term used to explain how and why it is imprtant to ride your bike to the course.<\/p>\\n\"],\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"3b954191-ad43-452c-95c3-868047eb55be\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Untitled Summary\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"}},\"label\":\"\"},{\"x\":46.87499999999999,\"y\":44.44444444444444,\"width\":10,\"height\":10,\"duration\":{\"from\":145.688,\"to\":155.688},\"libraryTitle\":\"Multiple Choice\",\"action\":{\"library\":\"H5P.MultiChoice 1.14\",\"params\":{\"media\":{\"type\":{\"params\":{}},\"disableImageZooming\":false},\"answers\":[{\"correct\":true,\"tipsAndFeedback\":{\"tip\":\"\",\"chosenFeedback\":\"\",\"notChosenFeedback\":\"\"},\"text\":\"

This pushes the ball to the right, causing a fade  slice curved flight.<\/div>\\n\"},{\"correct\":false,\"tipsAndFeedback\":{\"tip\":\"\",\"chosenFeedback\":\"\",\"notChosenFeedback\":\"\"},\"text\":\"
This pushes the ball to the left, causing a slice<\/strong> curved flight.<\/div>\\n\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"enableRetry\":true,\"enableSolutionsButton\":true,\"enableCheckButton\":true,\"type\":\"auto\",\"singlePoint\":false,\"randomAnswers\":true,\"showSolutionsRequiresInput\":true,\"confirmCheckDialog\":false,\"confirmRetryDialog\":false,\"autoCheck\":false,\"passPercentage\":100,\"showScorePoints\":true},\"UI\":{\"checkAnswerButton\":\"Check\",\"showSolutionButton\":\"Show solution\",\"tryAgainButton\":\"Retry\",\"tipsLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"tipAvailable\":\"Tip available\",\"feedbackAvailable\":\"Feedback available\",\"readFeedback\":\"Read feedback\",\"wrongAnswer\":\"Wrong answer\",\"correctAnswer\":\"Correct answer\",\"shouldCheck\":\"Should have been checked\",\"shouldNotCheck\":\"Should not have been checked\",\"noInput\":\"Please answer before viewing the solution\"},\"confirmCheck\":{\"header\":\"Finish ?\",\"body\":\"Are you sure you wish to finish ?\",\"cancelLabel\":\"Cancel\",\"confirmLabel\":\"Finish\"},\"confirmRetry\":{\"header\":\"Retry ?\",\"body\":\"Are you sure you wish to retry ?\",\"cancelLabel\":\"Cancel\",\"confirmLabel\":\"Confirm\"},\"question\":\"

When a ball is spinning in a clockwise direction, there is high pressure on the left hand side of the ball, and low pressure on the right.<\/p>\\n\"},\"subContentId\":\"df5e99b0-6513-4aa9-a760-e3d9e2bfefe9\",\"metadata\":{\"contentType\":\"Multiple Choice\",\"license\":\"U\",\"title\":\"Untitled Multiple Choice\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Untitled Multiple Choice\"}},\"pause\":true,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"\"}],\"bookmarks\":[],\"endscreens\":[{\"time\":358,\"label\":\"5:58 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"64506cb8-ea40-4c72-8c98-ed0bb3c3b808\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"b8eb5a4d-5e2e-4b74-95f5-ca37d1a45186\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":true,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false,\"startVideoAt\":37},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "filtered": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/www.youtube.com\/watch?v=FdH0JQL5E-U&list=PLVIShUJLAj0rWw3Yr3VtFGH4IbIVMfQFo\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"}}]},\"assets\":{\"interactions\":[{\"x\":46.87499999999999,\"y\":44.44444444444444,\"width\":10,\"height\":10,\"duration\":{\"from\":52,\"to\":52},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"c9f0c83d-2ba2-4810-843a-1ee7bec2076f\",\"question\":\"

\\\"Torque\\\" is a property of golf shafts that describes how much the shaft is prone to twisting during the golf swing.<\/p>\\n\",\"answers\":[\"

True<\/p>\\n\",\"

False<\/p>\\n\"]},{\"subContentId\":\"81f2e02c-0f04-44a3-922c-4eac61a11acb\",\"question\":\"

... A shaft with a _____ torque rating means the shaft better resists twisting; a shaft with a ____ torque rating means the shaft is more prone to twisting (all other things being equal).<\/p>\\n\",\"answers\":[\"

lower, higher<\/p>\\n\",\"

higher, lower<\/p>\\n\",\"

sharper, duller<\/p>\\n\",\"

straigher, curved<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"eadebb1e-891e-4ff3-8676-943c2616a9e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Untitled Single Choice Set\"}},\"pause\":true,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"\"},{\"x\":46.87499999999999,\"y\":44.44444444444444,\"width\":10,\"height\":10,\"duration\":{\"from\":24.314,\"to\":34.314},\"libraryTitle\":\"Statements\",\"action\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"7bce98af-5267-4ca6-a08c-0c8f2bef5afb\",\"summary\":[\"Gear effect is the term used to explain how and why hitting the ball off-center changes the ball flight.\\n\",\"

Gear effect is the term used to explain how and why it is imprtant to adjust the pressure on the clubhead.<\/p>\\n\",\"

Gear effect is the term used to explain how and why it is imprtant to ride your bike to the course.<\/p>\\n\"],\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"3b954191-ad43-452c-95c3-868047eb55be\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"}},\"label\":\"\"},{\"x\":46.87499999999999,\"y\":44.44444444444444,\"width\":10,\"height\":10,\"duration\":{\"from\":145.688,\"to\":155.688},\"libraryTitle\":\"Multiple Choice\",\"action\":{\"library\":\"H5P.MultiChoice 1.14\",\"params\":{\"media\":{\"disableImageZooming\":false},\"answers\":[{\"correct\":true,\"tipsAndFeedback\":{\"tip\":\"\",\"chosenFeedback\":\"\",\"notChosenFeedback\":\"\"},\"text\":\"

This pushes the ball to the right, causing a fade  slice curved flight.<\/div>\\n\"},{\"correct\":false,\"tipsAndFeedback\":{\"tip\":\"\",\"chosenFeedback\":\"\",\"notChosenFeedback\":\"\"},\"text\":\"
This pushes the ball to the left, causing a slice<\/strong> curved flight.<\/div>\\n\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"enableRetry\":true,\"enableSolutionsButton\":true,\"enableCheckButton\":true,\"type\":\"auto\",\"singlePoint\":false,\"randomAnswers\":true,\"showSolutionsRequiresInput\":true,\"confirmCheckDialog\":false,\"confirmRetryDialog\":false,\"autoCheck\":false,\"passPercentage\":100,\"showScorePoints\":true},\"UI\":{\"checkAnswerButton\":\"Check\",\"showSolutionButton\":\"Show solution\",\"tryAgainButton\":\"Retry\",\"tipsLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"tipAvailable\":\"Tip available\",\"feedbackAvailable\":\"Feedback available\",\"readFeedback\":\"Read feedback\",\"wrongAnswer\":\"Wrong answer\",\"correctAnswer\":\"Correct answer\",\"shouldCheck\":\"Should have been checked\",\"shouldNotCheck\":\"Should not have been checked\",\"noInput\":\"Please answer before viewing the solution\"},\"confirmCheck\":{\"header\":\"Finish ?\",\"body\":\"Are you sure you wish to finish ?\",\"cancelLabel\":\"Cancel\",\"confirmLabel\":\"Finish\"},\"confirmRetry\":{\"header\":\"Retry ?\",\"body\":\"Are you sure you wish to retry ?\",\"cancelLabel\":\"Cancel\",\"confirmLabel\":\"Confirm\"},\"question\":\"

When a ball is spinning in a clockwise direction, there is high pressure on the left hand side of the ball, and low pressure on the right.<\/p>\\n\"},\"subContentId\":\"df5e99b0-6513-4aa9-a760-e3d9e2bfefe9\",\"metadata\":{\"contentType\":\"Multiple Choice\",\"license\":\"U\",\"title\":\"Untitled Multiple Choice\"}},\"pause\":true,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"\"}],\"endscreens\":[{\"time\":358,\"label\":\"5:58 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"64506cb8-ea40-4c72-8c98-ed0bb3c3b808\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"b8eb5a4d-5e2e-4b74-95f5-ca37d1a45186\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":true,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false,\"startVideoAt\":37},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "slug": "understanding-gear-effect-equipment-and-tech-18birdies", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null + }, + "is_public": false, + "created_at": null, + "updated_at": null + }, + { + "id": 5, + "playlist_id": 1, + "title": "The Evolution of the Golf Ball", + "type": "h5p", + "content": "", + "shared": false, + "order": 5, + "thumb_url": null, + "subject_id": null, + "education_level_id": null, + "h5p_content": { + "id": 66, + "created_at": "2020-04-30T23:58:44.000000Z", + "updated_at": "2020-04-30T23:58:44.000000Z", + "user_id": 1, + "title": "The Evolution of the Golf Ball", + "library_id": 61, + "parameters": "{\"timeline\":{\"defaultZoomLevel\":\"0\",\"height\":600,\"asset\":{},\"date\":[{\"asset\":{\"thumbnail\":{\"path\":\"images\/thumbnail-5eab648fb61c9.jpeg#tmp\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":234,\"height\":216}},\"startDate\":\"1400\",\"endDate\":\"2020\",\"headline\":\"Origins of Golf\",\"text\":\"

Golf is recorded in its first recognizable form in the Eastern Coast of Scotland.<\/p>\\n\"},{\"asset\":{\"thumbnail\":{\"path\":\"images\/thumbnail-5eab64e26de00.jpg#tmp\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":475,\"height\":222}},\"startDate\":\"1600\",\"headline\":\"Wood Golf Balls\",\"text\":\"

The first known golf ball was made out of wood, most likely beech, boxroot and similar hardwoods. Wooden clubs were the golf club of choice, which in conjunction with the wood balls would have made your friendly game of golf a rather jarring experience.<\/p>\\n\"},{\"asset\":{\"thumbnail\":{\"path\":\"images\/thumbnail-5eab652f19393.png#tmp\",\"mime\":\"image\/png\",\"copyright\":{\"license\":\"U\"},\"width\":1128,\"height\":1096}},\"startDate\":\"1618\",\"headline\":\"Feathery Golf Balls\",\"text\":\"

The first \\\"real\\\" golf ball was known as a \\\"feathery\\\"golf ball. Basically, the feathery was a leather sack filled with boiled goose feathers, then stitched up and painted. Feathery golf balls were expensive to make easily damaged and only the privileged few could afford to use them. <\/p>\\n\\n

It was made of cow or horsehide which was stuffed with feathers; most often goose feather. The leather, in order to be easier to work with, was soaked in water. The feathers that were forced into the ball by using a specially designed crutch-handled filling rod were soaked as well. <\/p>\\n\\n

After the ball was carefully hand sewn together, it was left to dry. While the leather shrank, the feathers expanded, which made the ball very hard and compact. <\/p>\\n\\n

Interestingly, the featherie also had excellent flight characteristics as it could reach a distance of up to 175 yards; although the longest recorded distance is more than 361 yards.
\\n <\/p>\\n\"},{\"asset\":{\"thumbnail\":{\"path\":\"images\/thumbnail-5eab658fa6bde.jpg#tmp\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":1350,\"height\":759},\"media\":\"https:\/\/images.app.goo.gl\/MFHFL1dtDiyR5nGq7\"},\"startDate\":\"1848\",\"headline\":\"Cost of Golf Balls\",\"text\":\"

In the mid-19th century, most people could only dream of playing golf. There were at the time fewer than 20 golf clubs around the world, with just three being outside Scotland. But that was not the only thing that prevented most people from playing golf. The high cost of golf essentials, especially of golf balls, made the game pretty much inaccessible to ordinary people.31 But that was soon about to change...
\\n <\/p>\\n\"},{\"asset\":{\"thumbnail\":{\"path\":\"images\/thumbnail-5eab65cbe1adb.png#tmp\",\"mime\":\"image\/png\",\"copyright\":{\"license\":\"U\"},\"width\":944,\"height\":890}},\"startDate\":\"1848\",\"endDate\":\"1890\",\"headline\":\"Gutty Golf Balls\",\"text\":\"

It wasn't until 1848 that Rev. Dr. Robert Adams began creating golf balls out of Gutta Percha \\\"Gutty\\\". The Gutty golf ball was created from the dried sap of the Sapodilla tree. It had a rubber-like feel and was formed into ball shapes by heating it up and shaping it while hot. <\/p>\\n\\n

The arrival of the gutta percha ball or \\\"gutty\\\", as it was called, revolutionized the game of golf and allowed its spread to the masses due to its affordability, playability and durability.<\/p>\\n\"},{\"asset\":{},\"startDate\":\"1899\",\"headline\":\"Hand Hammered Gutta Ball\",\"text\":\"

American businessman and inventor Coburn Haskell (1868-1922) got a (joint) patent from the United States Patent Office for the rubber-wound ball47 which would soon lead to another revolution in golf. Widely regarded as the first modern golf ball, Haskell\\u2019s ball was made of a solid rubber-wound core that was covered by guttapercha.<\/p>\\n\"}],\"language\":\"en\",\"headline\":\"The Evolution of the Golf Ball\",\"text\":\"

A golf ball is central to the game of golf. In fact, golf is all about the ball. Well, getting it into the hole in the ground!<\/div>\\n\",\"backgroundImage\":{\"path\":\"images\/backgroundImage-5eab633e2e935.jpg#tmp\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":2139,\"height\":1179}}}", + "filtered": "{\"timeline\":{\"defaultZoomLevel\":\"0\",\"height\":600,\"asset\":{},\"date\":[{\"asset\":{\"thumbnail\":{\"path\":\"images\/thumbnail-5eab648fb61c9.jpeg\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":234,\"height\":216}},\"startDate\":\"1400\",\"endDate\":\"2020\",\"headline\":\"Origins of Golf\",\"text\":\"

Golf is recorded in its first recognizable form in the Eastern Coast of Scotland.<\/p>\\n\"},{\"asset\":{\"thumbnail\":{\"path\":\"images\/thumbnail-5eab64e26de00.jpg\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":475,\"height\":222}},\"startDate\":\"1600\",\"headline\":\"Wood Golf Balls\",\"text\":\"

The first known golf ball was made out of wood, most likely beech, boxroot and similar hardwoods. Wooden clubs were the golf club of choice, which in conjunction with the wood balls would have made your friendly game of golf a rather jarring experience.<\/p>\\n\"},{\"asset\":{\"thumbnail\":{\"path\":\"images\/thumbnail-5eab652f19393.png\",\"mime\":\"image\/png\",\"copyright\":{\"license\":\"U\"},\"width\":1128,\"height\":1096}},\"startDate\":\"1618\",\"headline\":\"Feathery Golf Balls\",\"text\":\"

The first \\\"real\\\" golf ball was known as a \\\"feathery\\\"golf ball. Basically, the feathery was a leather sack filled with boiled goose feathers, then stitched up and painted. Feathery golf balls were expensive to make easily damaged and only the privileged few could afford to use them. <\/p>\\n\\n

It was made of cow or horsehide which was stuffed with feathers; most often goose feather. The leather, in order to be easier to work with, was soaked in water. The feathers that were forced into the ball by using a specially designed crutch-handled filling rod were soaked as well. <\/p>\\n\\n

After the ball was carefully hand sewn together, it was left to dry. While the leather shrank, the feathers expanded, which made the ball very hard and compact. <\/p>\\n\\n

Interestingly, the featherie also had excellent flight characteristics as it could reach a distance of up to 175 yards; although the longest recorded distance is more than 361 yards.
\\n <\/p>\\n\"},{\"asset\":{\"thumbnail\":{\"path\":\"images\/thumbnail-5eab658fa6bde.jpg\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":1350,\"height\":759},\"media\":\"https:\/\/images.app.goo.gl\/MFHFL1dtDiyR5nGq7\"},\"startDate\":\"1848\",\"headline\":\"Cost of Golf Balls\",\"text\":\"

In the mid-19th century, most people could only dream of playing golf. There were at the time fewer than 20 golf clubs around the world, with just three being outside Scotland. But that was not the only thing that prevented most people from playing golf. The high cost of golf essentials, especially of golf balls, made the game pretty much inaccessible to ordinary people.31 But that was soon about to change...
\\n <\/p>\\n\"},{\"asset\":{\"thumbnail\":{\"path\":\"images\/thumbnail-5eab65cbe1adb.png\",\"mime\":\"image\/png\",\"copyright\":{\"license\":\"U\"},\"width\":944,\"height\":890}},\"startDate\":\"1848\",\"endDate\":\"1890\",\"headline\":\"Gutty Golf Balls\",\"text\":\"

It wasn't until 1848 that Rev. Dr. Robert Adams began creating golf balls out of Gutta Percha \\\"Gutty\\\". The Gutty golf ball was created from the dried sap of the Sapodilla tree. It had a rubber-like feel and was formed into ball shapes by heating it up and shaping it while hot. <\/p>\\n\\n

The arrival of the gutta percha ball or \\\"gutty\\\", as it was called, revolutionized the game of golf and allowed its spread to the masses due to its affordability, playability and durability.<\/p>\\n\"},{\"asset\":{},\"startDate\":\"1899\",\"headline\":\"Hand Hammered Gutta Ball\",\"text\":\"

American businessman and inventor Coburn Haskell (1868-1922) got a (joint) patent from the United States Patent Office for the rubber-wound ball47 which would soon lead to another revolution in golf. Widely regarded as the first modern golf ball, Haskell\\u2019s ball was made of a solid rubber-wound core that was covered by guttapercha.<\/p>\\n\"}],\"language\":\"en\",\"headline\":\"The Evolution of the Golf Ball\",\"text\":\"

A golf ball is central to the game of golf. In fact, golf is all about the ball. Well, getting it into the hole in the ground!<\/div>\\n\",\"backgroundImage\":{\"path\":\"images\/backgroundImage-5eab633e2e935.jpg\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":2139,\"height\":1179}}}", + "slug": "the-evolution-of-the-golf-ball", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null + }, + "is_public": false, + "created_at": null, + "updated_at": null + }, + { + "id": 7, + "playlist_id": 1, + "title": "Famous Golf Holes", + "type": "h5p", + "content": "", + "shared": false, + "order": 6, + "thumb_url": null, + "subject_id": null, + "education_level_id": null, + "h5p_content": { + "id": 76, + "created_at": "2020-05-01T05:20:54.000000Z", + "updated_at": "2020-05-01T05:20:54.000000Z", + "user_id": 1, + "title": "Famous Golf Holes", + "library_id": 60, + "parameters": "{\"cards\":[{\"answer\":\"7th Hole at Pebble Beach\",\"image\":{\"path\":\"images\/image-5eabad2e71b62.jpg#tmp\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":991,\"height\":500},\"tip\":\"

Mickey Mantle
\\nAT&T Pro Am<\/p>\\n\"},{\"answer\":\"12th hole at Augusta National\",\"image\":{\"path\":\"images\/image-5eabae675c197.jpg#tmp\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":847,\"height\":467},\"tip\":\"\"},{\"answer\":\"7th hole at TPC Sawgrass\",\"image\":{\"path\":\"images\/image-5eabaec199254.jpg#tmp\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":1024,\"height\":570},\"tip\":\"\"},{\"answer\":\"The Old Course at St Andrews, #18\",\"image\":{\"path\":\"images\/image-5eabafb2400f7.jpg#tmp\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":475,\"height\":367},\"tip\":\"\"},{\"answer\":\"Pine Valley Golf Club, #18\",\"image\":{\"path\":\"images\/image-5eabb0ced23c3.jpg#tmp\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":960,\"height\":640},\"tip\":\"\"},{\"answer\":\"Celebrity Course - Indian Wells Golf Resort, #14\",\"image\":{\"path\":\"images\/image-5eabb17c9a715.jpg#tmp\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":780,\"height\":490},\"tip\":\"\"}],\"progressText\":\"Card @card of @total\",\"next\":\"Next\",\"previous\":\"Previous\",\"checkAnswerText\":\"Check\",\"showSolutionsRequiresInput\":true,\"defaultAnswerText\":\"Your answer\",\"correctAnswerText\":\"Correct\",\"incorrectAnswerText\":\"Incorrect\",\"showSolutionText\":\"Correct answer\",\"results\":\"Results\",\"ofCorrect\":\"@score of @total correct\",\"showResults\":\"Show results\",\"answerShortText\":\"A:\",\"retry\":\"Retry\",\"caseSensitive\":false,\"cardAnnouncement\":\"Incorrect answer. Correct answer was @answer\",\"pageAnnouncement\":\"Page @current of @total\",\"description\":\"Match the Hole with the Course\"}", + "filtered": "{\"cards\":[{\"answer\":\"7th Hole at Pebble Beach\",\"image\":{\"path\":\"images\/image-5eabad2e71b62.jpg\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":991,\"height\":500},\"tip\":\"

Mickey Mantle
\\nAT&T Pro Am<\/p>\\n\"},{\"answer\":\"12th hole at Augusta National\",\"image\":{\"path\":\"images\/image-5eabae675c197.jpg\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":847,\"height\":467},\"tip\":\"\"},{\"answer\":\"7th hole at TPC Sawgrass\",\"image\":{\"path\":\"images\/image-5eabaec199254.jpg\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":1024,\"height\":570},\"tip\":\"\"},{\"answer\":\"The Old Course at St Andrews, #18\",\"image\":{\"path\":\"images\/image-5eabafb2400f7.jpg\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":475,\"height\":367},\"tip\":\"\"},{\"answer\":\"Pine Valley Golf Club, #18\",\"image\":{\"path\":\"images\/image-5eabb0ced23c3.jpg\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":960,\"height\":640},\"tip\":\"\"},{\"answer\":\"Celebrity Course - Indian Wells Golf Resort, #14\",\"image\":{\"path\":\"images\/image-5eabb17c9a715.jpg\",\"mime\":\"image\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":780,\"height\":490},\"tip\":\"\"}],\"progressText\":\"Card @card of @total\",\"next\":\"Next\",\"previous\":\"Previous\",\"checkAnswerText\":\"Check\",\"showSolutionsRequiresInput\":true,\"defaultAnswerText\":\"Your answer\",\"correctAnswerText\":\"Correct\",\"incorrectAnswerText\":\"Incorrect\",\"showSolutionText\":\"Correct answer\",\"results\":\"Results\",\"ofCorrect\":\"@score of @total correct\",\"showResults\":\"Show results\",\"answerShortText\":\"A:\",\"retry\":\"Retry\",\"caseSensitive\":false,\"cardAnnouncement\":\"Incorrect answer. Correct answer was @answer\",\"pageAnnouncement\":\"Page @current of @total\",\"description\":\"Match the Hole with the Course\"}", + "slug": "famous-golf-holes", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null + }, + "is_public": false, + "created_at": null, + "updated_at": null + } + ], + "created_at": null, + "updated_at": null + } +} +``` + +### HTTP Request +`GET api/v1/suborganization/{suborganization}/activities/{activity}/search-preview` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `suborganization` | required | The Id of a suborganization + `activity` | required | The Id of a activity + + + + +## Clone Activity + +Clone the specified activity of a playlist. + +> Example request: + +```bash +curl -X POST \ + "http://localhost:8000/api/v1/playlists/1/activities/1/clone" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/playlists/1/activities/1/clone" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "POST", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->post( + 'http://localhost:8000/api/v1/playlists/1/activities/1/clone', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/playlists/1/activities/1/clone' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('POST', url, headers=headers) +response.json() +``` + + +> Example response (200): + +```json +{ + "message": "Activity is being cloned|duplicated in background!" +} +``` +> Example response (400): + +```json +{ + "errors": [ + "Not a Public Activity." + ] +} +``` +> Example response (500): + +```json +{ + "errors": [ + "Failed to clone activity." + ] +} +``` + +### HTTP Request +`POST api/v1/playlists/{playlist}/activities/{activity}/clone` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `playlist` | required | The Id of a playlist + `activity` | required | The Id of a activity + + + + +## Upload Activity thumbnail + +Upload thumbnail image for a activity + +> Example request: + +```bash +curl -X POST \ + "http://localhost:8000/api/v1/activities/upload-thumb" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d '{"thumb":"(binary)"}' + +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/activities/upload-thumb" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +let body = { + "thumb": "(binary)" +} + +fetch(url, { + method: "POST", + headers: headers, + body: body +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->post( + 'http://localhost:8000/api/v1/activities/upload-thumb', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + 'json' => [ + 'thumb' => '(binary)', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/activities/upload-thumb' +payload = { + "thumb": "(binary)" +} +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('POST', url, headers=headers, json=payload) +response.json() +``` + + +> Example response (200): + +```json +{ + "thumbUrl": "\/storage\/activities\/1fqwe2f65ewf465qwe46weef5w5eqwq.png" +} +``` +> Example response (400): + +```json +{ + "errors": [ + "Invalid image." + ] +} +``` + +### HTTP Request +`POST api/v1/activities/upload-thumb` + +#### Body Parameters +Parameter | Type | Status | Description +--------- | ------- | ------- | ------- | ----------- + `thumb` | image | required | Thumbnail image to upload + + + + +## Share Activity + +Share the specified activity. + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/activities/1/share" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/activities/1/share" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/activities/1/share', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/activities/1/share' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (500): + +```json +{ + "errors": [ + "Failed to share activity." + ] +} +``` +> Example response (200): + +```json +{ + "activity": { + "id": 1, + "playlist_id": 1, + "title": "Science of Golf: Why Balls Have Dimples", + "type": "h5p", + "content": "", + "shared": true, + "order": 2, + "thumb_url": null, + "subject_id": null, + "education_level_id": null, + "h5p_content": { + "id": 59, + "user_id": 1, + "title": "Science of Golf: Why Balls Have Dimples", + "library_id": 40, + "parameters": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"},\"aspectRatio\":\"16:9\"}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"bookmarks\":[],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "filtered": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"}}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "slug": "science-of-golf-why-balls-have-dimples", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null, + "library": { + "id": 40, + "created_at": null, + "updated_at": null, + "name": "H5P.InteractiveVideo", + "title": "Interactive Video", + "major_version": 1, + "minor_version": 21, + "patch_version": 9, + "runnable": 1, + "restricted": 0, + "fullscreen": 1, + "embed_types": "iframe", + "preloaded_js": "dist\/h5p-interactive-video.js", + "preloaded_css": "dist\/h5p-interactive-video.css", + "drop_library_css": "", + "semantics": "[\n {\n \"name\": \"interactiveVideo\",\n \"type\": \"group\",\n \"widget\": \"wizard\",\n \"label\": \"Interactive Video Editor\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"video\",\n \"type\": \"group\",\n \"label\": \"Upload\/embed video\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"files\",\n \"type\": \"video\",\n \"label\": \"Add a video\",\n \"importance\": \"high\",\n \"description\": \"Click below to add a video you wish to use in your interactive video. You can add a video link or upload video files. It is possible to add several versions of the video with different qualities. To ensure maximum support in browsers at least add a version in webm and mp4 formats.\",\n \"extraAttributes\": [\n \"metadata\"\n ],\n \"enableCustomQualityLabel\": true\n },\n {\n \"name\": \"startScreenOptions\",\n \"type\": \"group\",\n \"label\": \"Start screen options (unsupported for YouTube videos)\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"title\",\n \"type\": \"text\",\n \"label\": \"The title of this interactive video\",\n \"importance\": \"low\",\n \"maxLength\": 60,\n \"default\": \"Interactive Video\",\n \"description\": \"Used in summaries, statistics etc.\"\n },\n {\n \"name\": \"hideStartTitle\",\n \"type\": \"boolean\",\n \"label\": \"Hide title on video start screen\",\n \"importance\": \"low\",\n \"optional\": true,\n \"default\": false\n },\n {\n \"name\": \"shortStartDescription\",\n \"type\": \"text\",\n \"label\": \"Short description (Optional)\",\n \"importance\": \"low\",\n \"optional\": true,\n \"maxLength\": 120,\n \"description\": \"Optional. Display a short description text on the video start screen. Does not work for YouTube videos.\"\n },\n {\n \"name\": \"poster\",\n \"type\": \"image\",\n \"label\": \"Poster image\",\n \"importance\": \"low\",\n \"optional\": true,\n \"description\": \"Image displayed before the user launches the video. Does not work for YouTube Videos.\"\n }\n ]\n },\n {\n \"name\": \"textTracks\",\n \"type\": \"group\",\n \"label\": \"Text tracks (unsupported for YouTube videos)\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"videoTrack\",\n \"type\": \"list\",\n \"label\": \"Available text tracks\",\n \"importance\": \"low\",\n \"optional\": true,\n \"entity\": \"Track\",\n \"min\": 0,\n \"defaultNum\": 1,\n \"field\": {\n \"name\": \"track\",\n \"type\": \"group\",\n \"label\": \"Track\",\n \"importance\": \"low\",\n \"expanded\": false,\n \"fields\": [\n {\n \"name\": \"label\",\n \"type\": \"text\",\n \"label\": \"Track label\",\n \"description\": \"Used if you offer multiple tracks and the user has to choose a track. For instance 'Spanish subtitles' could be the label of a Spanish subtitle track.\",\n \"importance\": \"low\",\n \"default\": \"Subtitles\",\n \"optional\": true\n },\n {\n \"name\": \"kind\",\n \"type\": \"select\",\n \"label\": \"Type of text track\",\n \"importance\": \"low\",\n \"default\": \"subtitles\",\n \"options\": [\n {\n \"value\": \"subtitles\",\n \"label\": \"Subtitles\"\n },\n {\n \"value\": \"captions\",\n \"label\": \"Captions\"\n },\n {\n \"value\": \"descriptions\",\n \"label\": \"Descriptions\"\n }\n ]\n },\n {\n \"name\": \"srcLang\",\n \"type\": \"text\",\n \"label\": \"Source language, must be defined for subtitles\",\n \"importance\": \"low\",\n \"default\": \"en\",\n \"description\": \"Must be a valid BCP 47 language tag. If 'Subtitles' is the type of text track selected, the source language of the track must be defined.\"\n },\n {\n \"name\": \"track\",\n \"type\": \"file\",\n \"label\": \"Track source (WebVTT file)\",\n \"importance\": \"low\"\n }\n ]\n }\n },\n {\n \"name\": \"defaultTrackLabel\",\n \"type\": \"text\",\n \"label\": \"Default text track\",\n \"description\": \"If left empty or not matching any of the text tracks the first text track will be used as the default.\",\n \"importance\": \"low\",\n \"optional\": true\n }\n ]\n }\n ]\n },\n {\n \"name\": \"assets\",\n \"type\": \"group\",\n \"label\": \"Add interactions\",\n \"importance\": \"high\",\n \"widget\": \"interactiveVideo\",\n \"video\": \"video\/files\",\n \"poster\": \"video\/startScreenOptions\/poster\",\n \"fields\": [\n {\n \"name\": \"interactions\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"interaction\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"duration\",\n \"type\": \"group\",\n \"widget\": \"duration\",\n \"label\": \"Display time\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"from\",\n \"type\": \"number\"\n },\n {\n \"name\": \"to\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"name\": \"pause\",\n \"label\": \"Pause video\",\n \"importance\": \"low\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"displayType\",\n \"label\": \"Display as\",\n \"importance\": \"low\",\n \"description\": \"Button<\/b> is a collapsed interaction the user must press to open. Poster<\/b> is an expanded interaction displayed directly on top of the video\",\n \"type\": \"select\",\n \"widget\": \"imageRadioButtonGroup\",\n \"options\": [\n {\n \"value\": \"button\",\n \"label\": \"Button\"\n },\n {\n \"value\": \"poster\",\n \"label\": \"Poster\"\n }\n ],\n \"default\": \"button\"\n },\n {\n \"name\": \"buttonOnMobile\",\n \"label\": \"Turn into button on small screens\",\n \"importance\": \"low\",\n \"type\": \"boolean\",\n \"default\": false\n },\n {\n \"name\": \"label\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"label\": \"Label\",\n \"importance\": \"low\",\n \"description\": \"Label displayed next to interaction icon.\",\n \"optional\": true,\n \"enterMode\": \"p\",\n \"tags\": [\n \"p\"\n ]\n },\n {\n \"name\": \"x\",\n \"type\": \"number\",\n \"importance\": \"low\",\n \"widget\": \"none\"\n },\n {\n \"name\": \"y\",\n \"type\": \"number\",\n \"importance\": \"low\",\n \"widget\": \"none\"\n },\n {\n \"name\": \"width\",\n \"type\": \"number\",\n \"widget\": \"none\",\n \"importance\": \"low\",\n \"optional\": true\n },\n {\n \"name\": \"height\",\n \"type\": \"number\",\n \"widget\": \"none\",\n \"importance\": \"low\",\n \"optional\": true\n },\n {\n \"name\": \"libraryTitle\",\n \"type\": \"text\",\n \"importance\": \"low\",\n \"optional\": true,\n \"widget\": \"none\"\n },\n {\n \"name\": \"action\",\n \"type\": \"library\",\n \"importance\": \"low\",\n \"options\": [\n \"H5P.Nil 1.0\",\n \"H5P.Text 1.1\",\n \"H5P.Table 1.1\",\n \"H5P.Link 1.3\",\n \"H5P.Image 1.1\",\n \"H5P.Summary 1.10\",\n \"H5P.SingleChoiceSet 1.11\",\n \"H5P.MultiChoice 1.14\",\n \"H5P.TrueFalse 1.6\",\n \"H5P.Blanks 1.12\",\n \"H5P.DragQuestion 1.13\",\n \"H5P.MarkTheWords 1.9\",\n \"H5P.DragText 1.8\",\n \"H5P.GoToQuestion 1.3\",\n \"H5P.IVHotspot 1.2\",\n \"H5P.Questionnaire 1.2\",\n \"H5P.FreeTextQuestion 1.0\"\n ]\n },\n {\n \"name\": \"adaptivity\",\n \"type\": \"group\",\n \"label\": \"Adaptivity\",\n \"importance\": \"low\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"correct\",\n \"type\": \"group\",\n \"label\": \"Action on all correct\",\n \"fields\": [\n {\n \"name\": \"seekTo\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Seek to\",\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"allowOptOut\",\n \"type\": \"boolean\",\n \"label\": \"Allow the user to opt out and continue\"\n },\n {\n \"name\": \"message\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"enterMode\": \"p\",\n \"tags\": [\n \"strong\",\n \"em\",\n \"del\",\n \"a\",\n \"code\"\n ],\n \"label\": \"Message\"\n },\n {\n \"name\": \"seekLabel\",\n \"type\": \"text\",\n \"label\": \"Label for seek button\"\n }\n ]\n },\n {\n \"name\": \"wrong\",\n \"type\": \"group\",\n \"label\": \"Action on wrong\",\n \"fields\": [\n {\n \"name\": \"seekTo\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Seek to\",\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"allowOptOut\",\n \"type\": \"boolean\",\n \"label\": \"Allow the user to opt out and continue\"\n },\n {\n \"name\": \"message\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"enterMode\": \"p\",\n \"tags\": [\n \"strong\",\n \"em\",\n \"del\",\n \"a\",\n \"code\"\n ],\n \"label\": \"Message\"\n },\n {\n \"name\": \"seekLabel\",\n \"type\": \"text\",\n \"label\": \"Label for seek button\"\n }\n ]\n },\n {\n \"name\": \"requireCompletion\",\n \"type\": \"boolean\",\n \"label\": \"Require full score for task before proceeding\",\n \"description\": \"For best functionality this option should be used in conjunction with the \\\"Prevent skipping forward in a video\\\" option of Interactive Video.\"\n }\n ]\n },\n {\n \"name\": \"visuals\",\n \"label\": \"Visuals\",\n \"importance\": \"low\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"backgroundColor\",\n \"type\": \"text\",\n \"label\": \"Background color\",\n \"widget\": \"colorSelector\",\n \"default\": \"rgb(255, 255, 255)\",\n \"spectrum\": {\n \"showInput\": true,\n \"showAlpha\": true,\n \"preferredFormat\": \"rgb\",\n \"showPalette\": true,\n \"palette\": [\n [\n \"rgba(0, 0, 0, 0)\"\n ],\n [\n \"rgb(67, 67, 67)\",\n \"rgb(102, 102, 102)\",\n \"rgb(204, 204, 204)\",\n \"rgb(217, 217, 217)\",\n \"rgb(255, 255, 255)\"\n ],\n [\n \"rgb(152, 0, 0)\",\n \"rgb(255, 0, 0)\",\n \"rgb(255, 153, 0)\",\n \"rgb(255, 255, 0)\",\n \"rgb(0, 255, 0)\",\n \"rgb(0, 255, 255)\",\n \"rgb(74, 134, 232)\",\n \"rgb(0, 0, 255)\",\n \"rgb(153, 0, 255)\",\n \"rgb(255, 0, 255)\"\n ],\n [\n \"rgb(230, 184, 175)\",\n \"rgb(244, 204, 204)\",\n \"rgb(252, 229, 205)\",\n \"rgb(255, 242, 204)\",\n \"rgb(217, 234, 211)\",\n \"rgb(208, 224, 227)\",\n \"rgb(201, 218, 248)\",\n \"rgb(207, 226, 243)\",\n \"rgb(217, 210, 233)\",\n \"rgb(234, 209, 220)\",\n \"rgb(221, 126, 107)\",\n \"rgb(234, 153, 153)\",\n \"rgb(249, 203, 156)\",\n \"rgb(255, 229, 153)\",\n \"rgb(182, 215, 168)\",\n \"rgb(162, 196, 201)\",\n \"rgb(164, 194, 244)\",\n \"rgb(159, 197, 232)\",\n \"rgb(180, 167, 214)\",\n \"rgb(213, 166, 189)\",\n \"rgb(204, 65, 37)\",\n \"rgb(224, 102, 102)\",\n \"rgb(246, 178, 107)\",\n \"rgb(255, 217, 102)\",\n \"rgb(147, 196, 125)\",\n \"rgb(118, 165, 175)\",\n \"rgb(109, 158, 235)\",\n \"rgb(111, 168, 220)\",\n \"rgb(142, 124, 195)\",\n \"rgb(194, 123, 160)\",\n \"rgb(166, 28, 0)\",\n \"rgb(204, 0, 0)\",\n \"rgb(230, 145, 56)\",\n \"rgb(241, 194, 50)\",\n \"rgb(106, 168, 79)\",\n \"rgb(69, 129, 142)\",\n \"rgb(60, 120, 216)\",\n \"rgb(61, 133, 198)\",\n \"rgb(103, 78, 167)\",\n \"rgb(166, 77, 121)\",\n \"rgb(91, 15, 0)\",\n \"rgb(102, 0, 0)\",\n \"rgb(120, 63, 4)\",\n \"rgb(127, 96, 0)\",\n \"rgb(39, 78, 19)\",\n \"rgb(12, 52, 61)\",\n \"rgb(28, 69, 135)\",\n \"rgb(7, 55, 99)\",\n \"rgb(32, 18, 77)\",\n \"rgb(76, 17, 48)\"\n ]\n ]\n }\n },\n {\n \"name\": \"boxShadow\",\n \"type\": \"boolean\",\n \"label\": \"Box shadow\",\n \"default\": true,\n \"description\": \"Adds a subtle shadow around the interaction. You might want to disable this for completely transparent interactions\"\n }\n ]\n },\n {\n \"name\": \"goto\",\n \"label\": \"Go to on click\",\n \"importance\": \"low\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"type\",\n \"label\": \"Type\",\n \"type\": \"select\",\n \"widget\": \"selectToggleFields\",\n \"options\": [\n {\n \"value\": \"timecode\",\n \"label\": \"Timecode\",\n \"hideFields\": [\n \"url\"\n ]\n },\n {\n \"value\": \"url\",\n \"label\": \"Another page (URL)\",\n \"hideFields\": [\n \"time\"\n ]\n }\n ],\n \"optional\": true\n },\n {\n \"name\": \"time\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Go To\",\n \"description\": \"The target time the user will be taken to upon pressing the hotspot. Enter timecode in the format M:SS.\",\n \"optional\": true\n },\n {\n \"name\": \"url\",\n \"type\": \"group\",\n \"label\": \"URL\",\n \"widget\": \"linkWidget\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"protocol\",\n \"type\": \"select\",\n \"label\": \"Protocol\",\n \"options\": [\n {\n \"value\": \"http:\/\/\",\n \"label\": \"http:\/\/\"\n },\n {\n \"value\": \"https:\/\/\",\n \"label\": \"https:\/\/\"\n },\n {\n \"value\": \"\/\",\n \"label\": \"(root relative)\"\n },\n {\n \"value\": \"other\",\n \"label\": \"other\"\n }\n ],\n \"optional\": true,\n \"default\": \"http:\/\/\"\n },\n {\n \"name\": \"url\",\n \"type\": \"text\",\n \"label\": \"URL\",\n \"optional\": true\n }\n ]\n },\n {\n \"name\": \"visualize\",\n \"type\": \"boolean\",\n \"label\": \"Visualize\",\n \"description\": \"Show that interaction can be clicked by adding a border and an icon\"\n }\n ]\n }\n ]\n }\n },\n {\n \"name\": \"bookmarks\",\n \"importance\": \"low\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"bookmark\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"time\",\n \"type\": \"number\"\n },\n {\n \"name\": \"label\",\n \"type\": \"text\"\n }\n ]\n }\n },\n {\n \"name\": \"endscreens\",\n \"importance\": \"low\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"endscreen\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"time\",\n \"type\": \"number\"\n },\n {\n \"name\": \"label\",\n \"type\": \"text\"\n }\n ]\n }\n }\n ]\n },\n {\n \"name\": \"summary\",\n \"type\": \"group\",\n \"label\": \"Summary task\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"task\",\n \"type\": \"library\",\n \"options\": [\n \"H5P.Summary 1.10\"\n ],\n \"default\": {\n \"library\": \"H5P.Summary 1.10\",\n \"params\": {}\n }\n },\n {\n \"name\": \"displayAt\",\n \"type\": \"number\",\n \"label\": \"Display at\",\n \"description\": \"Number of seconds before the video ends.\",\n \"default\": 3\n }\n ]\n }\n ]\n },\n {\n \"name\": \"override\",\n \"type\": \"group\",\n \"label\": \"Behavioural settings\",\n \"importance\": \"low\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"startVideoAt\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Start video at\",\n \"importance\": \"low\",\n \"optional\": true,\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"autoplay\",\n \"type\": \"boolean\",\n \"label\": \"Auto-play video\",\n \"default\": false,\n \"optional\": true,\n \"description\": \"Start playing the video automatically\"\n },\n {\n \"name\": \"loop\",\n \"type\": \"boolean\",\n \"label\": \"Loop the video\",\n \"default\": false,\n \"optional\": true,\n \"description\": \"Check if video should run in a loop\"\n },\n {\n \"name\": \"showSolutionButton\",\n \"type\": \"select\",\n \"label\": \"Override \\\"Show Solution\\\" button\",\n \"importance\": \"low\",\n \"description\": \"This option determines if the \\\"Show Solution\\\" button will be shown for all questions, disabled for all or configured for each question individually.\",\n \"optional\": true,\n \"options\": [\n {\n \"value\": \"on\",\n \"label\": \"Enabled\"\n },\n {\n \"value\": \"off\",\n \"label\": \"Disabled\"\n }\n ]\n },\n {\n \"name\": \"retryButton\",\n \"type\": \"select\",\n \"label\": \"Override \\\"Retry\\\" button\",\n \"importance\": \"low\",\n \"description\": \"This option determines if the \\\"Retry\\\" button will be shown for all questions, disabled for all or configured for each question individually.\",\n \"optional\": true,\n \"options\": [\n {\n \"value\": \"on\",\n \"label\": \"Enabled\"\n },\n {\n \"value\": \"off\",\n \"label\": \"Disabled\"\n }\n ]\n },\n {\n \"name\": \"showBookmarksmenuOnLoad\",\n \"type\": \"boolean\",\n \"label\": \"Start with bookmarks menu open\",\n \"importance\": \"low\",\n \"default\": false,\n \"description\": \"This function is not available on iPad when using YouTube as video source.\"\n },\n {\n \"name\": \"showRewind10\",\n \"type\": \"boolean\",\n \"label\": \"Show button for rewinding 10 seconds\",\n \"importance\": \"low\",\n \"default\": false\n },\n {\n \"name\": \"preventSkipping\",\n \"type\": \"boolean\",\n \"default\": false,\n \"label\": \"Prevent skipping forward in a video\",\n \"importance\": \"low\",\n \"description\": \"Enabling this options will disable user video navigation through default controls.\"\n },\n {\n \"name\": \"deactivateSound\",\n \"type\": \"boolean\",\n \"default\": false,\n \"label\": \"Deactivate sound\",\n \"importance\": \"low\",\n \"description\": \"Enabling this option will deactivate the video's sound and prevent it from being switched on.\"\n }\n ]\n },\n {\n \"name\": \"l10n\",\n \"type\": \"group\",\n \"label\": \"Localize\",\n \"importance\": \"low\",\n \"common\": true,\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"interaction\",\n \"type\": \"text\",\n \"label\": \"Interaction title\",\n \"importance\": \"low\",\n \"default\": \"Interaction\",\n \"optional\": true\n },\n {\n \"name\": \"play\",\n \"type\": \"text\",\n \"label\": \"Play title\",\n \"importance\": \"low\",\n \"default\": \"Play\",\n \"optional\": true\n },\n {\n \"name\": \"pause\",\n \"type\": \"text\",\n \"label\": \"Pause title\",\n \"importance\": \"low\",\n \"default\": \"Pause\",\n \"optional\": true\n },\n {\n \"name\": \"mute\",\n \"type\": \"text\",\n \"label\": \"Mute title\",\n \"importance\": \"low\",\n \"default\": \"Mute\",\n \"optional\": true\n },\n {\n \"name\": \"unmute\",\n \"type\": \"text\",\n \"label\": \"Unmute title\",\n \"importance\": \"low\",\n \"default\": \"Unmute\",\n \"optional\": true\n },\n {\n \"name\": \"quality\",\n \"type\": \"text\",\n \"label\": \"Video quality title\",\n \"importance\": \"low\",\n \"default\": \"Video Quality\",\n \"optional\": true\n },\n {\n \"name\": \"captions\",\n \"type\": \"text\",\n \"label\": \"Video captions title\",\n \"importance\": \"low\",\n \"default\": \"Captions\",\n \"optional\": true\n },\n {\n \"name\": \"close\",\n \"type\": \"text\",\n \"label\": \"Close button text\",\n \"importance\": \"low\",\n \"default\": \"Close\",\n \"optional\": true\n },\n {\n \"name\": \"fullscreen\",\n \"type\": \"text\",\n \"label\": \"Fullscreen title\",\n \"importance\": \"low\",\n \"default\": \"Fullscreen\",\n \"optional\": true\n },\n {\n \"name\": \"exitFullscreen\",\n \"type\": \"text\",\n \"label\": \"Exit fullscreen title\",\n \"importance\": \"low\",\n \"default\": \"Exit Fullscreen\",\n \"optional\": true\n },\n {\n \"name\": \"summary\",\n \"type\": \"text\",\n \"label\": \"Summary title\",\n \"importance\": \"low\",\n \"default\": \"Open summary dialog\",\n \"optional\": true\n },\n {\n \"name\": \"bookmarks\",\n \"type\": \"text\",\n \"label\": \"Bookmarks title\",\n \"importance\": \"low\",\n \"default\": \"Bookmarks\",\n \"optional\": true\n },\n {\n \"name\": \"endscreen\",\n \"type\": \"text\",\n \"label\": \"Submit screen title\",\n \"importance\": \"low\",\n \"default\": \"Submit screen\",\n \"optional\": true\n },\n {\n \"name\": \"defaultAdaptivitySeekLabel\",\n \"type\": \"text\",\n \"label\": \"Default label for adaptivity seek button\",\n \"importance\": \"low\",\n \"default\": \"Continue\",\n \"optional\": true\n },\n {\n \"name\": \"continueWithVideo\",\n \"type\": \"text\",\n \"label\": \"Default label for continue video button\",\n \"importance\": \"low\",\n \"default\": \"Continue with video\",\n \"optional\": true\n },\n {\n \"name\": \"playbackRate\",\n \"type\": \"text\",\n \"label\": \"Set playback rate\",\n \"importance\": \"low\",\n \"default\": \"Playback Rate\",\n \"optional\": true\n },\n {\n \"name\": \"rewind10\",\n \"type\": \"text\",\n \"label\": \"Rewind 10 Seconds\",\n \"importance\": \"low\",\n \"default\": \"Rewind 10 Seconds\",\n \"optional\": true\n },\n {\n \"name\": \"navDisabled\",\n \"type\": \"text\",\n \"label\": \"Navigation is disabled text\",\n \"importance\": \"low\",\n \"default\": \"Navigation is disabled\",\n \"optional\": true\n },\n {\n \"name\": \"sndDisabled\",\n \"type\": \"text\",\n \"label\": \"Sound is disabled text\",\n \"importance\": \"low\",\n \"default\": \"Sound is disabled\",\n \"optional\": true\n },\n {\n \"name\": \"requiresCompletionWarning\",\n \"type\": \"text\",\n \"label\": \"Warning that the user must answer the question correctly before continuing\",\n \"importance\": \"low\",\n \"default\": \"You need to answer all the questions correctly before continuing.\",\n \"optional\": true\n },\n {\n \"name\": \"back\",\n \"type\": \"text\",\n \"label\": \"Back button\",\n \"importance\": \"low\",\n \"default\": \"Back\",\n \"optional\": true\n },\n {\n \"name\": \"hours\",\n \"type\": \"text\",\n \"label\": \"Passed time hours\",\n \"importance\": \"low\",\n \"default\": \"Hours\",\n \"optional\": true\n },\n {\n \"name\": \"minutes\",\n \"type\": \"text\",\n \"label\": \"Passed time minutes\",\n \"importance\": \"low\",\n \"default\": \"Minutes\",\n \"optional\": true\n },\n {\n \"name\": \"seconds\",\n \"type\": \"text\",\n \"label\": \"Passed time seconds\",\n \"importance\": \"low\",\n \"default\": \"Seconds\",\n \"optional\": true\n },\n {\n \"name\": \"currentTime\",\n \"type\": \"text\",\n \"label\": \"Label for current time\",\n \"importance\": \"low\",\n \"default\": \"Current time:\",\n \"optional\": true\n },\n {\n \"name\": \"totalTime\",\n \"type\": \"text\",\n \"label\": \"Label for total time\",\n \"importance\": \"low\",\n \"default\": \"Total time:\",\n \"optional\": true\n },\n {\n \"name\": \"singleInteractionAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Text explaining that a single interaction with a name has come into view\",\n \"importance\": \"low\",\n \"default\": \"Interaction appeared:\",\n \"optional\": true\n },\n {\n \"name\": \"multipleInteractionsAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Text for explaining that multiple interactions have come into view\",\n \"importance\": \"low\",\n \"default\": \"Multiple interactions appeared.\",\n \"optional\": true\n },\n {\n \"name\": \"videoPausedAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Video is paused announcement\",\n \"importance\": \"low\",\n \"default\": \"Video is paused\",\n \"optional\": true\n },\n {\n \"name\": \"content\",\n \"type\": \"text\",\n \"label\": \"Content label\",\n \"importance\": \"low\",\n \"default\": \"Content\",\n \"optional\": true\n },\n {\n \"name\": \"answered\",\n \"type\": \"text\",\n \"label\": \"Answered message (@answered will be replaced with the number of answered questions)\",\n \"importance\": \"low\",\n \"default\": \"@answered answered\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTitle\",\n \"type\": \"text\",\n \"label\": \"Submit screen title\",\n \"importance\": \"low\",\n \"default\": \"@answered Question(s) answered\",\n \"description\": \"@answered will be replaced by the number of answered questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformation\",\n \"type\": \"text\",\n \"label\": \"Submit screen information\",\n \"importance\": \"low\",\n \"default\": \"You have answered @answered questions, click below to submit your answers.\",\n \"description\": \"@answered will be replaced by the number of answered questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformationNoAnswers\",\n \"type\": \"text\",\n \"label\": \"Submit screen information for missing answers\",\n \"importance\": \"low\",\n \"default\": \"You have not answered any questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformationMustHaveAnswer\",\n \"type\": \"text\",\n \"label\": \"Submit screen information for answer needed\",\n \"importance\": \"low\",\n \"default\": \"You have to answer at least one question before you can submit your answers.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardSubmitButton\",\n \"type\": \"text\",\n \"label\": \"Submit screen submit button\",\n \"importance\": \"low\",\n \"default\": \"Submit Answers\",\n \"optional\": true\n },\n {\n \"name\": \"endcardSubmitMessage\",\n \"type\": \"text\",\n \"label\": \"Submit screen submit message\",\n \"importance\": \"low\",\n \"default\": \"Your answers have been submitted!\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTableRowAnswered\",\n \"type\": \"text\",\n \"label\": \"Submit screen table row title: Answered questions\",\n \"importance\": \"low\",\n \"default\": \"Answered questions\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTableRowScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen table row title: Score\",\n \"importance\": \"low\",\n \"default\": \"Score\",\n \"optional\": true\n },\n {\n \"name\": \"endcardAnsweredScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen answered score\",\n \"importance\": \"low\",\n \"default\": \"answered\",\n \"optional\": true\n },\n {\n \"name\": \"endCardTableRowSummaryWithScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen row summary including score (for readspeakers)\",\n \"importance\": \"low\",\n \"default\": \"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\n \"optional\": true\n },\n {\n \"name\": \"endCardTableRowSummaryWithoutScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen row summary for no score (for readspeakers)\",\n \"importance\": \"low\",\n \"default\": \"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\",\n \"optional\": true\n }\n ]\n }\n]", + "tutorial_url": "", + "has_icon": 1 + }, + "created_at": "2020-09-30T20:24:58.000000Z", + "updated_at": "2020-09-30T20:24:58.000000Z" + }, + "created_at": "2020-09-30T20:24:58.000000Z", + "updated_at": "2020-09-30T20:24:58.000000Z" + } +} +``` + +### HTTP Request +`GET api/v1/activities/{activity}/share` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `activity` | required | The Id of a activity + + + + +## api/v1/activities/update-order +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/activities/update-order" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/activities/update-order" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/activities/update-order', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/activities/update-order' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (401): + +```json +{ + "message": "Unauthenticated." +} +``` + +### HTTP Request +`GET api/v1/activities/update-order` + + + + + +## Remove Share Activity + +Remove share the specified activity. + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/activities/1/remove-share" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/activities/1/remove-share" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/activities/1/remove-share', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/activities/1/remove-share' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (500): + +```json +{ + "errors": [ + "Failed to remove share activity." + ] +} +``` +> Example response (200): + +```json +{ + "activity": { + "id": 1, + "playlist_id": 1, + "title": "Science of Golf: Why Balls Have Dimples", + "type": "h5p", + "content": "", + "shared": false, + "order": 2, + "thumb_url": null, + "subjects": [ + { + "id": 4, + "name": "English", + "order": 3, + "created_at": "2022-01-06T11:59:52.000000Z", + "updated_at": "2022-01-06T12:15:10.000000Z" + }, + { + "id": 1, + "name": "Math", + "order": 1, + "created_at": "2022-01-06T11:41:46.000000Z", + "updated_at": "2022-01-06T11:41:46.000000Z" + } + ], + "education_levels": [ + { + "id": 1, + "name": "Grade A", + "order": 5, + "created_at": "2022-01-07T13:51:38.000000Z", + "updated_at": "2022-01-07T14:07:17.000000Z" + }, + { + "id": 1, + "name": "Grade B", + "order": 6, + "created_at": "2022-01-07T13:51:38.000000Z", + "updated_at": "2022-01-07T14:07:17.000000Z" + } + ], + "author_tags": [ + { + "id": 1, + "name": "Audio", + "order": 1, + "created_at": "2022-01-10T13:09:36.000000Z", + "updated_at": "2022-01-10T13:09:36.000000Z" + }, + { + "id": 2, + "name": "Video", + "order": 2, + "created_at": "2022-01-10T13:09:44.000000Z", + "updated_at": "2022-01-10T13:20:57.000000Z" + } + ], + "gcr_activity_visibility": true, + "h5p_content": { + "id": 59, + "user_id": 1, + "title": "Science of Golf: Why Balls Have Dimples", + "library_id": 40, + "parameters": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"},\"aspectRatio\":\"16:9\"}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"bookmarks\":[],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "filtered": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"}}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "slug": "science-of-golf-why-balls-have-dimples", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null, + "library": { + "id": 40, + "created_at": null, + "updated_at": null, + "name": "H5P.InteractiveVideo", + "title": "Interactive Video", + "major_version": 1, + "minor_version": 21, + "patch_version": 9, + "runnable": 1, + "restricted": 0, + "fullscreen": 1, + "embed_types": "iframe", + "preloaded_js": "dist\/h5p-interactive-video.js", + "preloaded_css": "dist\/h5p-interactive-video.css", + "drop_library_css": "", + "semantics": "[\n {\n \"name\": \"interactiveVideo\",\n \"type\": \"group\",\n \"widget\": \"wizard\",\n \"label\": \"Interactive Video Editor\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"video\",\n \"type\": \"group\",\n \"label\": \"Upload\/embed video\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"files\",\n \"type\": \"video\",\n \"label\": \"Add a video\",\n \"importance\": \"high\",\n \"description\": \"Click below to add a video you wish to use in your interactive video. You can add a video link or upload video files. It is possible to add several versions of the video with different qualities. To ensure maximum support in browsers at least add a version in webm and mp4 formats.\",\n \"extraAttributes\": [\n \"metadata\"\n ],\n \"enableCustomQualityLabel\": true\n },\n {\n \"name\": \"startScreenOptions\",\n \"type\": \"group\",\n \"label\": \"Start screen options (unsupported for YouTube videos)\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"title\",\n \"type\": \"text\",\n \"label\": \"The title of this interactive video\",\n \"importance\": \"low\",\n \"maxLength\": 60,\n \"default\": \"Interactive Video\",\n \"description\": \"Used in summaries, statistics etc.\"\n },\n {\n \"name\": \"hideStartTitle\",\n \"type\": \"boolean\",\n \"label\": \"Hide title on video start screen\",\n \"importance\": \"low\",\n \"optional\": true,\n \"default\": false\n },\n {\n \"name\": \"shortStartDescription\",\n \"type\": \"text\",\n \"label\": \"Short description (Optional)\",\n \"importance\": \"low\",\n \"optional\": true,\n \"maxLength\": 120,\n \"description\": \"Optional. Display a short description text on the video start screen. Does not work for YouTube videos.\"\n },\n {\n \"name\": \"poster\",\n \"type\": \"image\",\n \"label\": \"Poster image\",\n \"importance\": \"low\",\n \"optional\": true,\n \"description\": \"Image displayed before the user launches the video. Does not work for YouTube Videos.\"\n }\n ]\n },\n {\n \"name\": \"textTracks\",\n \"type\": \"group\",\n \"label\": \"Text tracks (unsupported for YouTube videos)\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"videoTrack\",\n \"type\": \"list\",\n \"label\": \"Available text tracks\",\n \"importance\": \"low\",\n \"optional\": true,\n \"entity\": \"Track\",\n \"min\": 0,\n \"defaultNum\": 1,\n \"field\": {\n \"name\": \"track\",\n \"type\": \"group\",\n \"label\": \"Track\",\n \"importance\": \"low\",\n \"expanded\": false,\n \"fields\": [\n {\n \"name\": \"label\",\n \"type\": \"text\",\n \"label\": \"Track label\",\n \"description\": \"Used if you offer multiple tracks and the user has to choose a track. For instance 'Spanish subtitles' could be the label of a Spanish subtitle track.\",\n \"importance\": \"low\",\n \"default\": \"Subtitles\",\n \"optional\": true\n },\n {\n \"name\": \"kind\",\n \"type\": \"select\",\n \"label\": \"Type of text track\",\n \"importance\": \"low\",\n \"default\": \"subtitles\",\n \"options\": [\n {\n \"value\": \"subtitles\",\n \"label\": \"Subtitles\"\n },\n {\n \"value\": \"captions\",\n \"label\": \"Captions\"\n },\n {\n \"value\": \"descriptions\",\n \"label\": \"Descriptions\"\n }\n ]\n },\n {\n \"name\": \"srcLang\",\n \"type\": \"text\",\n \"label\": \"Source language, must be defined for subtitles\",\n \"importance\": \"low\",\n \"default\": \"en\",\n \"description\": \"Must be a valid BCP 47 language tag. If 'Subtitles' is the type of text track selected, the source language of the track must be defined.\"\n },\n {\n \"name\": \"track\",\n \"type\": \"file\",\n \"label\": \"Track source (WebVTT file)\",\n \"importance\": \"low\"\n }\n ]\n }\n },\n {\n \"name\": \"defaultTrackLabel\",\n \"type\": \"text\",\n \"label\": \"Default text track\",\n \"description\": \"If left empty or not matching any of the text tracks the first text track will be used as the default.\",\n \"importance\": \"low\",\n \"optional\": true\n }\n ]\n }\n ]\n },\n {\n \"name\": \"assets\",\n \"type\": \"group\",\n \"label\": \"Add interactions\",\n \"importance\": \"high\",\n \"widget\": \"interactiveVideo\",\n \"video\": \"video\/files\",\n \"poster\": \"video\/startScreenOptions\/poster\",\n \"fields\": [\n {\n \"name\": \"interactions\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"interaction\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"duration\",\n \"type\": \"group\",\n \"widget\": \"duration\",\n \"label\": \"Display time\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"from\",\n \"type\": \"number\"\n },\n {\n \"name\": \"to\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"name\": \"pause\",\n \"label\": \"Pause video\",\n \"importance\": \"low\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"displayType\",\n \"label\": \"Display as\",\n \"importance\": \"low\",\n \"description\": \"Button<\/b> is a collapsed interaction the user must press to open. Poster<\/b> is an expanded interaction displayed directly on top of the video\",\n \"type\": \"select\",\n \"widget\": \"imageRadioButtonGroup\",\n \"options\": [\n {\n \"value\": \"button\",\n \"label\": \"Button\"\n },\n {\n \"value\": \"poster\",\n \"label\": \"Poster\"\n }\n ],\n \"default\": \"button\"\n },\n {\n \"name\": \"buttonOnMobile\",\n \"label\": \"Turn into button on small screens\",\n \"importance\": \"low\",\n \"type\": \"boolean\",\n \"default\": false\n },\n {\n \"name\": \"label\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"label\": \"Label\",\n \"importance\": \"low\",\n \"description\": \"Label displayed next to interaction icon.\",\n \"optional\": true,\n \"enterMode\": \"p\",\n \"tags\": [\n \"p\"\n ]\n },\n {\n \"name\": \"x\",\n \"type\": \"number\",\n \"importance\": \"low\",\n \"widget\": \"none\"\n },\n {\n \"name\": \"y\",\n \"type\": \"number\",\n \"importance\": \"low\",\n \"widget\": \"none\"\n },\n {\n \"name\": \"width\",\n \"type\": \"number\",\n \"widget\": \"none\",\n \"importance\": \"low\",\n \"optional\": true\n },\n {\n \"name\": \"height\",\n \"type\": \"number\",\n \"widget\": \"none\",\n \"importance\": \"low\",\n \"optional\": true\n },\n {\n \"name\": \"libraryTitle\",\n \"type\": \"text\",\n \"importance\": \"low\",\n \"optional\": true,\n \"widget\": \"none\"\n },\n {\n \"name\": \"action\",\n \"type\": \"library\",\n \"importance\": \"low\",\n \"options\": [\n \"H5P.Nil 1.0\",\n \"H5P.Text 1.1\",\n \"H5P.Table 1.1\",\n \"H5P.Link 1.3\",\n \"H5P.Image 1.1\",\n \"H5P.Summary 1.10\",\n \"H5P.SingleChoiceSet 1.11\",\n \"H5P.MultiChoice 1.14\",\n \"H5P.TrueFalse 1.6\",\n \"H5P.Blanks 1.12\",\n \"H5P.DragQuestion 1.13\",\n \"H5P.MarkTheWords 1.9\",\n \"H5P.DragText 1.8\",\n \"H5P.GoToQuestion 1.3\",\n \"H5P.IVHotspot 1.2\",\n \"H5P.Questionnaire 1.2\",\n \"H5P.FreeTextQuestion 1.0\"\n ]\n },\n {\n \"name\": \"adaptivity\",\n \"type\": \"group\",\n \"label\": \"Adaptivity\",\n \"importance\": \"low\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"correct\",\n \"type\": \"group\",\n \"label\": \"Action on all correct\",\n \"fields\": [\n {\n \"name\": \"seekTo\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Seek to\",\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"allowOptOut\",\n \"type\": \"boolean\",\n \"label\": \"Allow the user to opt out and continue\"\n },\n {\n \"name\": \"message\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"enterMode\": \"p\",\n \"tags\": [\n \"strong\",\n \"em\",\n \"del\",\n \"a\",\n \"code\"\n ],\n \"label\": \"Message\"\n },\n {\n \"name\": \"seekLabel\",\n \"type\": \"text\",\n \"label\": \"Label for seek button\"\n }\n ]\n },\n {\n \"name\": \"wrong\",\n \"type\": \"group\",\n \"label\": \"Action on wrong\",\n \"fields\": [\n {\n \"name\": \"seekTo\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Seek to\",\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"allowOptOut\",\n \"type\": \"boolean\",\n \"label\": \"Allow the user to opt out and continue\"\n },\n {\n \"name\": \"message\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"enterMode\": \"p\",\n \"tags\": [\n \"strong\",\n \"em\",\n \"del\",\n \"a\",\n \"code\"\n ],\n \"label\": \"Message\"\n },\n {\n \"name\": \"seekLabel\",\n \"type\": \"text\",\n \"label\": \"Label for seek button\"\n }\n ]\n },\n {\n \"name\": \"requireCompletion\",\n \"type\": \"boolean\",\n \"label\": \"Require full score for task before proceeding\",\n \"description\": \"For best functionality this option should be used in conjunction with the \\\"Prevent skipping forward in a video\\\" option of Interactive Video.\"\n }\n ]\n },\n {\n \"name\": \"visuals\",\n \"label\": \"Visuals\",\n \"importance\": \"low\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"backgroundColor\",\n \"type\": \"text\",\n \"label\": \"Background color\",\n \"widget\": \"colorSelector\",\n \"default\": \"rgb(255, 255, 255)\",\n \"spectrum\": {\n \"showInput\": true,\n \"showAlpha\": true,\n \"preferredFormat\": \"rgb\",\n \"showPalette\": true,\n \"palette\": [\n [\n \"rgba(0, 0, 0, 0)\"\n ],\n [\n \"rgb(67, 67, 67)\",\n \"rgb(102, 102, 102)\",\n \"rgb(204, 204, 204)\",\n \"rgb(217, 217, 217)\",\n \"rgb(255, 255, 255)\"\n ],\n [\n \"rgb(152, 0, 0)\",\n \"rgb(255, 0, 0)\",\n \"rgb(255, 153, 0)\",\n \"rgb(255, 255, 0)\",\n \"rgb(0, 255, 0)\",\n \"rgb(0, 255, 255)\",\n \"rgb(74, 134, 232)\",\n \"rgb(0, 0, 255)\",\n \"rgb(153, 0, 255)\",\n \"rgb(255, 0, 255)\"\n ],\n [\n \"rgb(230, 184, 175)\",\n \"rgb(244, 204, 204)\",\n \"rgb(252, 229, 205)\",\n \"rgb(255, 242, 204)\",\n \"rgb(217, 234, 211)\",\n \"rgb(208, 224, 227)\",\n \"rgb(201, 218, 248)\",\n \"rgb(207, 226, 243)\",\n \"rgb(217, 210, 233)\",\n \"rgb(234, 209, 220)\",\n \"rgb(221, 126, 107)\",\n \"rgb(234, 153, 153)\",\n \"rgb(249, 203, 156)\",\n \"rgb(255, 229, 153)\",\n \"rgb(182, 215, 168)\",\n \"rgb(162, 196, 201)\",\n \"rgb(164, 194, 244)\",\n \"rgb(159, 197, 232)\",\n \"rgb(180, 167, 214)\",\n \"rgb(213, 166, 189)\",\n \"rgb(204, 65, 37)\",\n \"rgb(224, 102, 102)\",\n \"rgb(246, 178, 107)\",\n \"rgb(255, 217, 102)\",\n \"rgb(147, 196, 125)\",\n \"rgb(118, 165, 175)\",\n \"rgb(109, 158, 235)\",\n \"rgb(111, 168, 220)\",\n \"rgb(142, 124, 195)\",\n \"rgb(194, 123, 160)\",\n \"rgb(166, 28, 0)\",\n \"rgb(204, 0, 0)\",\n \"rgb(230, 145, 56)\",\n \"rgb(241, 194, 50)\",\n \"rgb(106, 168, 79)\",\n \"rgb(69, 129, 142)\",\n \"rgb(60, 120, 216)\",\n \"rgb(61, 133, 198)\",\n \"rgb(103, 78, 167)\",\n \"rgb(166, 77, 121)\",\n \"rgb(91, 15, 0)\",\n \"rgb(102, 0, 0)\",\n \"rgb(120, 63, 4)\",\n \"rgb(127, 96, 0)\",\n \"rgb(39, 78, 19)\",\n \"rgb(12, 52, 61)\",\n \"rgb(28, 69, 135)\",\n \"rgb(7, 55, 99)\",\n \"rgb(32, 18, 77)\",\n \"rgb(76, 17, 48)\"\n ]\n ]\n }\n },\n {\n \"name\": \"boxShadow\",\n \"type\": \"boolean\",\n \"label\": \"Box shadow\",\n \"default\": true,\n \"description\": \"Adds a subtle shadow around the interaction. You might want to disable this for completely transparent interactions\"\n }\n ]\n },\n {\n \"name\": \"goto\",\n \"label\": \"Go to on click\",\n \"importance\": \"low\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"type\",\n \"label\": \"Type\",\n \"type\": \"select\",\n \"widget\": \"selectToggleFields\",\n \"options\": [\n {\n \"value\": \"timecode\",\n \"label\": \"Timecode\",\n \"hideFields\": [\n \"url\"\n ]\n },\n {\n \"value\": \"url\",\n \"label\": \"Another page (URL)\",\n \"hideFields\": [\n \"time\"\n ]\n }\n ],\n \"optional\": true\n },\n {\n \"name\": \"time\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Go To\",\n \"description\": \"The target time the user will be taken to upon pressing the hotspot. Enter timecode in the format M:SS.\",\n \"optional\": true\n },\n {\n \"name\": \"url\",\n \"type\": \"group\",\n \"label\": \"URL\",\n \"widget\": \"linkWidget\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"protocol\",\n \"type\": \"select\",\n \"label\": \"Protocol\",\n \"options\": [\n {\n \"value\": \"http:\/\/\",\n \"label\": \"http:\/\/\"\n },\n {\n \"value\": \"https:\/\/\",\n \"label\": \"https:\/\/\"\n },\n {\n \"value\": \"\/\",\n \"label\": \"(root relative)\"\n },\n {\n \"value\": \"other\",\n \"label\": \"other\"\n }\n ],\n \"optional\": true,\n \"default\": \"http:\/\/\"\n },\n {\n \"name\": \"url\",\n \"type\": \"text\",\n \"label\": \"URL\",\n \"optional\": true\n }\n ]\n },\n {\n \"name\": \"visualize\",\n \"type\": \"boolean\",\n \"label\": \"Visualize\",\n \"description\": \"Show that interaction can be clicked by adding a border and an icon\"\n }\n ]\n }\n ]\n }\n },\n {\n \"name\": \"bookmarks\",\n \"importance\": \"low\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"bookmark\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"time\",\n \"type\": \"number\"\n },\n {\n \"name\": \"label\",\n \"type\": \"text\"\n }\n ]\n }\n },\n {\n \"name\": \"endscreens\",\n \"importance\": \"low\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"endscreen\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"time\",\n \"type\": \"number\"\n },\n {\n \"name\": \"label\",\n \"type\": \"text\"\n }\n ]\n }\n }\n ]\n },\n {\n \"name\": \"summary\",\n \"type\": \"group\",\n \"label\": \"Summary task\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"task\",\n \"type\": \"library\",\n \"options\": [\n \"H5P.Summary 1.10\"\n ],\n \"default\": {\n \"library\": \"H5P.Summary 1.10\",\n \"params\": {}\n }\n },\n {\n \"name\": \"displayAt\",\n \"type\": \"number\",\n \"label\": \"Display at\",\n \"description\": \"Number of seconds before the video ends.\",\n \"default\": 3\n }\n ]\n }\n ]\n },\n {\n \"name\": \"override\",\n \"type\": \"group\",\n \"label\": \"Behavioural settings\",\n \"importance\": \"low\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"startVideoAt\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Start video at\",\n \"importance\": \"low\",\n \"optional\": true,\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"autoplay\",\n \"type\": \"boolean\",\n \"label\": \"Auto-play video\",\n \"default\": false,\n \"optional\": true,\n \"description\": \"Start playing the video automatically\"\n },\n {\n \"name\": \"loop\",\n \"type\": \"boolean\",\n \"label\": \"Loop the video\",\n \"default\": false,\n \"optional\": true,\n \"description\": \"Check if video should run in a loop\"\n },\n {\n \"name\": \"showSolutionButton\",\n \"type\": \"select\",\n \"label\": \"Override \\\"Show Solution\\\" button\",\n \"importance\": \"low\",\n \"description\": \"This option determines if the \\\"Show Solution\\\" button will be shown for all questions, disabled for all or configured for each question individually.\",\n \"optional\": true,\n \"options\": [\n {\n \"value\": \"on\",\n \"label\": \"Enabled\"\n },\n {\n \"value\": \"off\",\n \"label\": \"Disabled\"\n }\n ]\n },\n {\n \"name\": \"retryButton\",\n \"type\": \"select\",\n \"label\": \"Override \\\"Retry\\\" button\",\n \"importance\": \"low\",\n \"description\": \"This option determines if the \\\"Retry\\\" button will be shown for all questions, disabled for all or configured for each question individually.\",\n \"optional\": true,\n \"options\": [\n {\n \"value\": \"on\",\n \"label\": \"Enabled\"\n },\n {\n \"value\": \"off\",\n \"label\": \"Disabled\"\n }\n ]\n },\n {\n \"name\": \"showBookmarksmenuOnLoad\",\n \"type\": \"boolean\",\n \"label\": \"Start with bookmarks menu open\",\n \"importance\": \"low\",\n \"default\": false,\n \"description\": \"This function is not available on iPad when using YouTube as video source.\"\n },\n {\n \"name\": \"showRewind10\",\n \"type\": \"boolean\",\n \"label\": \"Show button for rewinding 10 seconds\",\n \"importance\": \"low\",\n \"default\": false\n },\n {\n \"name\": \"preventSkipping\",\n \"type\": \"boolean\",\n \"default\": false,\n \"label\": \"Prevent skipping forward in a video\",\n \"importance\": \"low\",\n \"description\": \"Enabling this options will disable user video navigation through default controls.\"\n },\n {\n \"name\": \"deactivateSound\",\n \"type\": \"boolean\",\n \"default\": false,\n \"label\": \"Deactivate sound\",\n \"importance\": \"low\",\n \"description\": \"Enabling this option will deactivate the video's sound and prevent it from being switched on.\"\n }\n ]\n },\n {\n \"name\": \"l10n\",\n \"type\": \"group\",\n \"label\": \"Localize\",\n \"importance\": \"low\",\n \"common\": true,\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"interaction\",\n \"type\": \"text\",\n \"label\": \"Interaction title\",\n \"importance\": \"low\",\n \"default\": \"Interaction\",\n \"optional\": true\n },\n {\n \"name\": \"play\",\n \"type\": \"text\",\n \"label\": \"Play title\",\n \"importance\": \"low\",\n \"default\": \"Play\",\n \"optional\": true\n },\n {\n \"name\": \"pause\",\n \"type\": \"text\",\n \"label\": \"Pause title\",\n \"importance\": \"low\",\n \"default\": \"Pause\",\n \"optional\": true\n },\n {\n \"name\": \"mute\",\n \"type\": \"text\",\n \"label\": \"Mute title\",\n \"importance\": \"low\",\n \"default\": \"Mute\",\n \"optional\": true\n },\n {\n \"name\": \"unmute\",\n \"type\": \"text\",\n \"label\": \"Unmute title\",\n \"importance\": \"low\",\n \"default\": \"Unmute\",\n \"optional\": true\n },\n {\n \"name\": \"quality\",\n \"type\": \"text\",\n \"label\": \"Video quality title\",\n \"importance\": \"low\",\n \"default\": \"Video Quality\",\n \"optional\": true\n },\n {\n \"name\": \"captions\",\n \"type\": \"text\",\n \"label\": \"Video captions title\",\n \"importance\": \"low\",\n \"default\": \"Captions\",\n \"optional\": true\n },\n {\n \"name\": \"close\",\n \"type\": \"text\",\n \"label\": \"Close button text\",\n \"importance\": \"low\",\n \"default\": \"Close\",\n \"optional\": true\n },\n {\n \"name\": \"fullscreen\",\n \"type\": \"text\",\n \"label\": \"Fullscreen title\",\n \"importance\": \"low\",\n \"default\": \"Fullscreen\",\n \"optional\": true\n },\n {\n \"name\": \"exitFullscreen\",\n \"type\": \"text\",\n \"label\": \"Exit fullscreen title\",\n \"importance\": \"low\",\n \"default\": \"Exit Fullscreen\",\n \"optional\": true\n },\n {\n \"name\": \"summary\",\n \"type\": \"text\",\n \"label\": \"Summary title\",\n \"importance\": \"low\",\n \"default\": \"Open summary dialog\",\n \"optional\": true\n },\n {\n \"name\": \"bookmarks\",\n \"type\": \"text\",\n \"label\": \"Bookmarks title\",\n \"importance\": \"low\",\n \"default\": \"Bookmarks\",\n \"optional\": true\n },\n {\n \"name\": \"endscreen\",\n \"type\": \"text\",\n \"label\": \"Submit screen title\",\n \"importance\": \"low\",\n \"default\": \"Submit screen\",\n \"optional\": true\n },\n {\n \"name\": \"defaultAdaptivitySeekLabel\",\n \"type\": \"text\",\n \"label\": \"Default label for adaptivity seek button\",\n \"importance\": \"low\",\n \"default\": \"Continue\",\n \"optional\": true\n },\n {\n \"name\": \"continueWithVideo\",\n \"type\": \"text\",\n \"label\": \"Default label for continue video button\",\n \"importance\": \"low\",\n \"default\": \"Continue with video\",\n \"optional\": true\n },\n {\n \"name\": \"playbackRate\",\n \"type\": \"text\",\n \"label\": \"Set playback rate\",\n \"importance\": \"low\",\n \"default\": \"Playback Rate\",\n \"optional\": true\n },\n {\n \"name\": \"rewind10\",\n \"type\": \"text\",\n \"label\": \"Rewind 10 Seconds\",\n \"importance\": \"low\",\n \"default\": \"Rewind 10 Seconds\",\n \"optional\": true\n },\n {\n \"name\": \"navDisabled\",\n \"type\": \"text\",\n \"label\": \"Navigation is disabled text\",\n \"importance\": \"low\",\n \"default\": \"Navigation is disabled\",\n \"optional\": true\n },\n {\n \"name\": \"sndDisabled\",\n \"type\": \"text\",\n \"label\": \"Sound is disabled text\",\n \"importance\": \"low\",\n \"default\": \"Sound is disabled\",\n \"optional\": true\n },\n {\n \"name\": \"requiresCompletionWarning\",\n \"type\": \"text\",\n \"label\": \"Warning that the user must answer the question correctly before continuing\",\n \"importance\": \"low\",\n \"default\": \"You need to answer all the questions correctly before continuing.\",\n \"optional\": true\n },\n {\n \"name\": \"back\",\n \"type\": \"text\",\n \"label\": \"Back button\",\n \"importance\": \"low\",\n \"default\": \"Back\",\n \"optional\": true\n },\n {\n \"name\": \"hours\",\n \"type\": \"text\",\n \"label\": \"Passed time hours\",\n \"importance\": \"low\",\n \"default\": \"Hours\",\n \"optional\": true\n },\n {\n \"name\": \"minutes\",\n \"type\": \"text\",\n \"label\": \"Passed time minutes\",\n \"importance\": \"low\",\n \"default\": \"Minutes\",\n \"optional\": true\n },\n {\n \"name\": \"seconds\",\n \"type\": \"text\",\n \"label\": \"Passed time seconds\",\n \"importance\": \"low\",\n \"default\": \"Seconds\",\n \"optional\": true\n },\n {\n \"name\": \"currentTime\",\n \"type\": \"text\",\n \"label\": \"Label for current time\",\n \"importance\": \"low\",\n \"default\": \"Current time:\",\n \"optional\": true\n },\n {\n \"name\": \"totalTime\",\n \"type\": \"text\",\n \"label\": \"Label for total time\",\n \"importance\": \"low\",\n \"default\": \"Total time:\",\n \"optional\": true\n },\n {\n \"name\": \"singleInteractionAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Text explaining that a single interaction with a name has come into view\",\n \"importance\": \"low\",\n \"default\": \"Interaction appeared:\",\n \"optional\": true\n },\n {\n \"name\": \"multipleInteractionsAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Text for explaining that multiple interactions have come into view\",\n \"importance\": \"low\",\n \"default\": \"Multiple interactions appeared.\",\n \"optional\": true\n },\n {\n \"name\": \"videoPausedAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Video is paused announcement\",\n \"importance\": \"low\",\n \"default\": \"Video is paused\",\n \"optional\": true\n },\n {\n \"name\": \"content\",\n \"type\": \"text\",\n \"label\": \"Content label\",\n \"importance\": \"low\",\n \"default\": \"Content\",\n \"optional\": true\n },\n {\n \"name\": \"answered\",\n \"type\": \"text\",\n \"label\": \"Answered message (@answered will be replaced with the number of answered questions)\",\n \"importance\": \"low\",\n \"default\": \"@answered answered\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTitle\",\n \"type\": \"text\",\n \"label\": \"Submit screen title\",\n \"importance\": \"low\",\n \"default\": \"@answered Question(s) answered\",\n \"description\": \"@answered will be replaced by the number of answered questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformation\",\n \"type\": \"text\",\n \"label\": \"Submit screen information\",\n \"importance\": \"low\",\n \"default\": \"You have answered @answered questions, click below to submit your answers.\",\n \"description\": \"@answered will be replaced by the number of answered questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformationNoAnswers\",\n \"type\": \"text\",\n \"label\": \"Submit screen information for missing answers\",\n \"importance\": \"low\",\n \"default\": \"You have not answered any questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformationMustHaveAnswer\",\n \"type\": \"text\",\n \"label\": \"Submit screen information for answer needed\",\n \"importance\": \"low\",\n \"default\": \"You have to answer at least one question before you can submit your answers.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardSubmitButton\",\n \"type\": \"text\",\n \"label\": \"Submit screen submit button\",\n \"importance\": \"low\",\n \"default\": \"Submit Answers\",\n \"optional\": true\n },\n {\n \"name\": \"endcardSubmitMessage\",\n \"type\": \"text\",\n \"label\": \"Submit screen submit message\",\n \"importance\": \"low\",\n \"default\": \"Your answers have been submitted!\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTableRowAnswered\",\n \"type\": \"text\",\n \"label\": \"Submit screen table row title: Answered questions\",\n \"importance\": \"low\",\n \"default\": \"Answered questions\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTableRowScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen table row title: Score\",\n \"importance\": \"low\",\n \"default\": \"Score\",\n \"optional\": true\n },\n {\n \"name\": \"endcardAnsweredScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen answered score\",\n \"importance\": \"low\",\n \"default\": \"answered\",\n \"optional\": true\n },\n {\n \"name\": \"endCardTableRowSummaryWithScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen row summary including score (for readspeakers)\",\n \"importance\": \"low\",\n \"default\": \"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\n \"optional\": true\n },\n {\n \"name\": \"endCardTableRowSummaryWithoutScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen row summary for no score (for readspeakers)\",\n \"importance\": \"low\",\n \"default\": \"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\",\n \"optional\": true\n }\n ]\n }\n]", + "tutorial_url": "", + "has_icon": 1 + }, + "created_at": "2020-09-30T20:24:58.000000Z", + "updated_at": "2020-09-30T20:24:58.000000Z" + }, + "created_at": "2020-09-30T20:24:58.000000Z", + "updated_at": "2020-09-30T20:24:58.000000Z" + } +} +``` + +### HTTP Request +`GET api/v1/activities/{activity}/remove-share` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `activity` | required | The Id of a activity + + + + +## Get Activity Detail + +Get the specified activity in detail. + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/activities/1/detail" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/activities/1/detail" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/activities/1/detail', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/activities/1/detail' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (200): + +```json +{ + "activity": { + "id": 1, + "playlist": { + "id": 1, + "title": "The Engineering & Design Behind Golf Balls", + "is_public": true, + "order": 0, + "project_id": 1, + "project": { + "id": 1, + "name": "The Science of Golf", + "description": "Uncover the science, technology, engineering, and mathematics behind the game of golf.", + "thumb_url": "\/storage\/projects\/nN5y8v8zh2ghxrKuHCv5wvJOREFw0Nr27s2DPxWq.png", + "starter_project": false, + "shared": false, + "is_public": true, + "users": [ + { + "id": 1, + "email": "john.doe@currikistudio.org", + "first_name": "John", + "last_name": "Doe", + "role": "owner" + } + ], + "created_at": "2020-04-30T20:03:12.000000Z", + "updated_at": "2020-07-11T12:51:07.000000Z" + }, + "created_at": "2020-04-30T20:03:12.000000Z", + "updated_at": "2020-07-11T12:51:07.000000Z" + }, + "title": "Science of Golf: Why Balls Have Dimples", + "type": "h5p", + "content": "", + "shared": false, + "order": 2, + "thumb_url": null, + "subjects": [ + { + "id": 4, + "name": "English", + "order": 3, + "created_at": "2022-01-06T11:59:52.000000Z", + "updated_at": "2022-01-06T12:15:10.000000Z" + }, + { + "id": 1, + "name": "Math", + "order": 1, + "created_at": "2022-01-06T11:41:46.000000Z", + "updated_at": "2022-01-06T11:41:46.000000Z" + } + ], + "education_levels": [ + { + "id": 1, + "name": "Grade A", + "order": 5, + "created_at": "2022-01-07T13:51:38.000000Z", + "updated_at": "2022-01-07T14:07:17.000000Z" + }, + { + "id": 1, + "name": "Grade B", + "order": 6, + "created_at": "2022-01-07T13:51:38.000000Z", + "updated_at": "2022-01-07T14:07:17.000000Z" + } + ], + "author_tags": [ + { + "id": 1, + "name": "Audio", + "order": 1, + "created_at": "2022-01-10T13:09:36.000000Z", + "updated_at": "2022-01-10T13:09:36.000000Z" + }, + { + "id": 2, + "name": "Video", + "order": 2, + "created_at": "2022-01-10T13:09:44.000000Z", + "updated_at": "2022-01-10T13:20:57.000000Z" + } + ], + "h5p": "{\"params\":{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"}}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}},\"metadata\":{\"title\":\"Science of Golf: Why Balls Have Dimples\",\"license\":\"U\"}}", + "h5p_content": { + "id": 59, + "user_id": 1, + "title": "Science of Golf: Why Balls Have Dimples", + "library_id": 40, + "parameters": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"},\"aspectRatio\":\"16:9\"}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"bookmarks\":[],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\",\"authors\":[],\"changes\":[],\"extraTitle\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "filtered": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"}}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "slug": "science-of-golf-why-balls-have-dimples", + "embed_type": "div", + "disable": 9, + "content_type": null, + "authors": null, + "source": null, + "year_from": null, + "year_to": null, + "license": "U", + "license_version": null, + "license_extras": null, + "author_comments": null, + "changes": null, + "default_language": null, + "library": { + "id": 40, + "created_at": null, + "updated_at": null, + "name": "H5P.InteractiveVideo", + "title": "Interactive Video", + "major_version": 1, + "minor_version": 21, + "patch_version": 9, + "runnable": 1, + "restricted": 0, + "fullscreen": 1, + "embed_types": "iframe", + "preloaded_js": "dist\/h5p-interactive-video.js", + "preloaded_css": "dist\/h5p-interactive-video.css", + "drop_library_css": "", + "semantics": "[\n {\n \"name\": \"interactiveVideo\",\n \"type\": \"group\",\n \"widget\": \"wizard\",\n \"label\": \"Interactive Video Editor\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"video\",\n \"type\": \"group\",\n \"label\": \"Upload\/embed video\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"files\",\n \"type\": \"video\",\n \"label\": \"Add a video\",\n \"importance\": \"high\",\n \"description\": \"Click below to add a video you wish to use in your interactive video. You can add a video link or upload video files. It is possible to add several versions of the video with different qualities. To ensure maximum support in browsers at least add a version in webm and mp4 formats.\",\n \"extraAttributes\": [\n \"metadata\"\n ],\n \"enableCustomQualityLabel\": true\n },\n {\n \"name\": \"startScreenOptions\",\n \"type\": \"group\",\n \"label\": \"Start screen options (unsupported for YouTube videos)\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"title\",\n \"type\": \"text\",\n \"label\": \"The title of this interactive video\",\n \"importance\": \"low\",\n \"maxLength\": 60,\n \"default\": \"Interactive Video\",\n \"description\": \"Used in summaries, statistics etc.\"\n },\n {\n \"name\": \"hideStartTitle\",\n \"type\": \"boolean\",\n \"label\": \"Hide title on video start screen\",\n \"importance\": \"low\",\n \"optional\": true,\n \"default\": false\n },\n {\n \"name\": \"shortStartDescription\",\n \"type\": \"text\",\n \"label\": \"Short description (Optional)\",\n \"importance\": \"low\",\n \"optional\": true,\n \"maxLength\": 120,\n \"description\": \"Optional. Display a short description text on the video start screen. Does not work for YouTube videos.\"\n },\n {\n \"name\": \"poster\",\n \"type\": \"image\",\n \"label\": \"Poster image\",\n \"importance\": \"low\",\n \"optional\": true,\n \"description\": \"Image displayed before the user launches the video. Does not work for YouTube Videos.\"\n }\n ]\n },\n {\n \"name\": \"textTracks\",\n \"type\": \"group\",\n \"label\": \"Text tracks (unsupported for YouTube videos)\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"videoTrack\",\n \"type\": \"list\",\n \"label\": \"Available text tracks\",\n \"importance\": \"low\",\n \"optional\": true,\n \"entity\": \"Track\",\n \"min\": 0,\n \"defaultNum\": 1,\n \"field\": {\n \"name\": \"track\",\n \"type\": \"group\",\n \"label\": \"Track\",\n \"importance\": \"low\",\n \"expanded\": false,\n \"fields\": [\n {\n \"name\": \"label\",\n \"type\": \"text\",\n \"label\": \"Track label\",\n \"description\": \"Used if you offer multiple tracks and the user has to choose a track. For instance 'Spanish subtitles' could be the label of a Spanish subtitle track.\",\n \"importance\": \"low\",\n \"default\": \"Subtitles\",\n \"optional\": true\n },\n {\n \"name\": \"kind\",\n \"type\": \"select\",\n \"label\": \"Type of text track\",\n \"importance\": \"low\",\n \"default\": \"subtitles\",\n \"options\": [\n {\n \"value\": \"subtitles\",\n \"label\": \"Subtitles\"\n },\n {\n \"value\": \"captions\",\n \"label\": \"Captions\"\n },\n {\n \"value\": \"descriptions\",\n \"label\": \"Descriptions\"\n }\n ]\n },\n {\n \"name\": \"srcLang\",\n \"type\": \"text\",\n \"label\": \"Source language, must be defined for subtitles\",\n \"importance\": \"low\",\n \"default\": \"en\",\n \"description\": \"Must be a valid BCP 47 language tag. If 'Subtitles' is the type of text track selected, the source language of the track must be defined.\"\n },\n {\n \"name\": \"track\",\n \"type\": \"file\",\n \"label\": \"Track source (WebVTT file)\",\n \"importance\": \"low\"\n }\n ]\n }\n },\n {\n \"name\": \"defaultTrackLabel\",\n \"type\": \"text\",\n \"label\": \"Default text track\",\n \"description\": \"If left empty or not matching any of the text tracks the first text track will be used as the default.\",\n \"importance\": \"low\",\n \"optional\": true\n }\n ]\n }\n ]\n },\n {\n \"name\": \"assets\",\n \"type\": \"group\",\n \"label\": \"Add interactions\",\n \"importance\": \"high\",\n \"widget\": \"interactiveVideo\",\n \"video\": \"video\/files\",\n \"poster\": \"video\/startScreenOptions\/poster\",\n \"fields\": [\n {\n \"name\": \"interactions\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"interaction\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"duration\",\n \"type\": \"group\",\n \"widget\": \"duration\",\n \"label\": \"Display time\",\n \"importance\": \"low\",\n \"fields\": [\n {\n \"name\": \"from\",\n \"type\": \"number\"\n },\n {\n \"name\": \"to\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"name\": \"pause\",\n \"label\": \"Pause video\",\n \"importance\": \"low\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"displayType\",\n \"label\": \"Display as\",\n \"importance\": \"low\",\n \"description\": \"Button<\/b> is a collapsed interaction the user must press to open. Poster<\/b> is an expanded interaction displayed directly on top of the video\",\n \"type\": \"select\",\n \"widget\": \"imageRadioButtonGroup\",\n \"options\": [\n {\n \"value\": \"button\",\n \"label\": \"Button\"\n },\n {\n \"value\": \"poster\",\n \"label\": \"Poster\"\n }\n ],\n \"default\": \"button\"\n },\n {\n \"name\": \"buttonOnMobile\",\n \"label\": \"Turn into button on small screens\",\n \"importance\": \"low\",\n \"type\": \"boolean\",\n \"default\": false\n },\n {\n \"name\": \"label\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"label\": \"Label\",\n \"importance\": \"low\",\n \"description\": \"Label displayed next to interaction icon.\",\n \"optional\": true,\n \"enterMode\": \"p\",\n \"tags\": [\n \"p\"\n ]\n },\n {\n \"name\": \"x\",\n \"type\": \"number\",\n \"importance\": \"low\",\n \"widget\": \"none\"\n },\n {\n \"name\": \"y\",\n \"type\": \"number\",\n \"importance\": \"low\",\n \"widget\": \"none\"\n },\n {\n \"name\": \"width\",\n \"type\": \"number\",\n \"widget\": \"none\",\n \"importance\": \"low\",\n \"optional\": true\n },\n {\n \"name\": \"height\",\n \"type\": \"number\",\n \"widget\": \"none\",\n \"importance\": \"low\",\n \"optional\": true\n },\n {\n \"name\": \"libraryTitle\",\n \"type\": \"text\",\n \"importance\": \"low\",\n \"optional\": true,\n \"widget\": \"none\"\n },\n {\n \"name\": \"action\",\n \"type\": \"library\",\n \"importance\": \"low\",\n \"options\": [\n \"H5P.Nil 1.0\",\n \"H5P.Text 1.1\",\n \"H5P.Table 1.1\",\n \"H5P.Link 1.3\",\n \"H5P.Image 1.1\",\n \"H5P.Summary 1.10\",\n \"H5P.SingleChoiceSet 1.11\",\n \"H5P.MultiChoice 1.14\",\n \"H5P.TrueFalse 1.6\",\n \"H5P.Blanks 1.12\",\n \"H5P.DragQuestion 1.13\",\n \"H5P.MarkTheWords 1.9\",\n \"H5P.DragText 1.8\",\n \"H5P.GoToQuestion 1.3\",\n \"H5P.IVHotspot 1.2\",\n \"H5P.Questionnaire 1.2\",\n \"H5P.FreeTextQuestion 1.0\"\n ]\n },\n {\n \"name\": \"adaptivity\",\n \"type\": \"group\",\n \"label\": \"Adaptivity\",\n \"importance\": \"low\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"correct\",\n \"type\": \"group\",\n \"label\": \"Action on all correct\",\n \"fields\": [\n {\n \"name\": \"seekTo\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Seek to\",\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"allowOptOut\",\n \"type\": \"boolean\",\n \"label\": \"Allow the user to opt out and continue\"\n },\n {\n \"name\": \"message\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"enterMode\": \"p\",\n \"tags\": [\n \"strong\",\n \"em\",\n \"del\",\n \"a\",\n \"code\"\n ],\n \"label\": \"Message\"\n },\n {\n \"name\": \"seekLabel\",\n \"type\": \"text\",\n \"label\": \"Label for seek button\"\n }\n ]\n },\n {\n \"name\": \"wrong\",\n \"type\": \"group\",\n \"label\": \"Action on wrong\",\n \"fields\": [\n {\n \"name\": \"seekTo\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Seek to\",\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"allowOptOut\",\n \"type\": \"boolean\",\n \"label\": \"Allow the user to opt out and continue\"\n },\n {\n \"name\": \"message\",\n \"type\": \"text\",\n \"widget\": \"html\",\n \"enterMode\": \"p\",\n \"tags\": [\n \"strong\",\n \"em\",\n \"del\",\n \"a\",\n \"code\"\n ],\n \"label\": \"Message\"\n },\n {\n \"name\": \"seekLabel\",\n \"type\": \"text\",\n \"label\": \"Label for seek button\"\n }\n ]\n },\n {\n \"name\": \"requireCompletion\",\n \"type\": \"boolean\",\n \"label\": \"Require full score for task before proceeding\",\n \"description\": \"For best functionality this option should be used in conjunction with the \\\"Prevent skipping forward in a video\\\" option of Interactive Video.\"\n }\n ]\n },\n {\n \"name\": \"visuals\",\n \"label\": \"Visuals\",\n \"importance\": \"low\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"backgroundColor\",\n \"type\": \"text\",\n \"label\": \"Background color\",\n \"widget\": \"colorSelector\",\n \"default\": \"rgb(255, 255, 255)\",\n \"spectrum\": {\n \"showInput\": true,\n \"showAlpha\": true,\n \"preferredFormat\": \"rgb\",\n \"showPalette\": true,\n \"palette\": [\n [\n \"rgba(0, 0, 0, 0)\"\n ],\n [\n \"rgb(67, 67, 67)\",\n \"rgb(102, 102, 102)\",\n \"rgb(204, 204, 204)\",\n \"rgb(217, 217, 217)\",\n \"rgb(255, 255, 255)\"\n ],\n [\n \"rgb(152, 0, 0)\",\n \"rgb(255, 0, 0)\",\n \"rgb(255, 153, 0)\",\n \"rgb(255, 255, 0)\",\n \"rgb(0, 255, 0)\",\n \"rgb(0, 255, 255)\",\n \"rgb(74, 134, 232)\",\n \"rgb(0, 0, 255)\",\n \"rgb(153, 0, 255)\",\n \"rgb(255, 0, 255)\"\n ],\n [\n \"rgb(230, 184, 175)\",\n \"rgb(244, 204, 204)\",\n \"rgb(252, 229, 205)\",\n \"rgb(255, 242, 204)\",\n \"rgb(217, 234, 211)\",\n \"rgb(208, 224, 227)\",\n \"rgb(201, 218, 248)\",\n \"rgb(207, 226, 243)\",\n \"rgb(217, 210, 233)\",\n \"rgb(234, 209, 220)\",\n \"rgb(221, 126, 107)\",\n \"rgb(234, 153, 153)\",\n \"rgb(249, 203, 156)\",\n \"rgb(255, 229, 153)\",\n \"rgb(182, 215, 168)\",\n \"rgb(162, 196, 201)\",\n \"rgb(164, 194, 244)\",\n \"rgb(159, 197, 232)\",\n \"rgb(180, 167, 214)\",\n \"rgb(213, 166, 189)\",\n \"rgb(204, 65, 37)\",\n \"rgb(224, 102, 102)\",\n \"rgb(246, 178, 107)\",\n \"rgb(255, 217, 102)\",\n \"rgb(147, 196, 125)\",\n \"rgb(118, 165, 175)\",\n \"rgb(109, 158, 235)\",\n \"rgb(111, 168, 220)\",\n \"rgb(142, 124, 195)\",\n \"rgb(194, 123, 160)\",\n \"rgb(166, 28, 0)\",\n \"rgb(204, 0, 0)\",\n \"rgb(230, 145, 56)\",\n \"rgb(241, 194, 50)\",\n \"rgb(106, 168, 79)\",\n \"rgb(69, 129, 142)\",\n \"rgb(60, 120, 216)\",\n \"rgb(61, 133, 198)\",\n \"rgb(103, 78, 167)\",\n \"rgb(166, 77, 121)\",\n \"rgb(91, 15, 0)\",\n \"rgb(102, 0, 0)\",\n \"rgb(120, 63, 4)\",\n \"rgb(127, 96, 0)\",\n \"rgb(39, 78, 19)\",\n \"rgb(12, 52, 61)\",\n \"rgb(28, 69, 135)\",\n \"rgb(7, 55, 99)\",\n \"rgb(32, 18, 77)\",\n \"rgb(76, 17, 48)\"\n ]\n ]\n }\n },\n {\n \"name\": \"boxShadow\",\n \"type\": \"boolean\",\n \"label\": \"Box shadow\",\n \"default\": true,\n \"description\": \"Adds a subtle shadow around the interaction. You might want to disable this for completely transparent interactions\"\n }\n ]\n },\n {\n \"name\": \"goto\",\n \"label\": \"Go to on click\",\n \"importance\": \"low\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"type\",\n \"label\": \"Type\",\n \"type\": \"select\",\n \"widget\": \"selectToggleFields\",\n \"options\": [\n {\n \"value\": \"timecode\",\n \"label\": \"Timecode\",\n \"hideFields\": [\n \"url\"\n ]\n },\n {\n \"value\": \"url\",\n \"label\": \"Another page (URL)\",\n \"hideFields\": [\n \"time\"\n ]\n }\n ],\n \"optional\": true\n },\n {\n \"name\": \"time\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Go To\",\n \"description\": \"The target time the user will be taken to upon pressing the hotspot. Enter timecode in the format M:SS.\",\n \"optional\": true\n },\n {\n \"name\": \"url\",\n \"type\": \"group\",\n \"label\": \"URL\",\n \"widget\": \"linkWidget\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"protocol\",\n \"type\": \"select\",\n \"label\": \"Protocol\",\n \"options\": [\n {\n \"value\": \"http:\/\/\",\n \"label\": \"http:\/\/\"\n },\n {\n \"value\": \"https:\/\/\",\n \"label\": \"https:\/\/\"\n },\n {\n \"value\": \"\/\",\n \"label\": \"(root relative)\"\n },\n {\n \"value\": \"other\",\n \"label\": \"other\"\n }\n ],\n \"optional\": true,\n \"default\": \"http:\/\/\"\n },\n {\n \"name\": \"url\",\n \"type\": \"text\",\n \"label\": \"URL\",\n \"optional\": true\n }\n ]\n },\n {\n \"name\": \"visualize\",\n \"type\": \"boolean\",\n \"label\": \"Visualize\",\n \"description\": \"Show that interaction can be clicked by adding a border and an icon\"\n }\n ]\n }\n ]\n }\n },\n {\n \"name\": \"bookmarks\",\n \"importance\": \"low\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"bookmark\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"time\",\n \"type\": \"number\"\n },\n {\n \"name\": \"label\",\n \"type\": \"text\"\n }\n ]\n }\n },\n {\n \"name\": \"endscreens\",\n \"importance\": \"low\",\n \"type\": \"list\",\n \"field\": {\n \"name\": \"endscreen\",\n \"type\": \"group\",\n \"fields\": [\n {\n \"name\": \"time\",\n \"type\": \"number\"\n },\n {\n \"name\": \"label\",\n \"type\": \"text\"\n }\n ]\n }\n }\n ]\n },\n {\n \"name\": \"summary\",\n \"type\": \"group\",\n \"label\": \"Summary task\",\n \"importance\": \"high\",\n \"fields\": [\n {\n \"name\": \"task\",\n \"type\": \"library\",\n \"options\": [\n \"H5P.Summary 1.10\"\n ],\n \"default\": {\n \"library\": \"H5P.Summary 1.10\",\n \"params\": {}\n }\n },\n {\n \"name\": \"displayAt\",\n \"type\": \"number\",\n \"label\": \"Display at\",\n \"description\": \"Number of seconds before the video ends.\",\n \"default\": 3\n }\n ]\n }\n ]\n },\n {\n \"name\": \"override\",\n \"type\": \"group\",\n \"label\": \"Behavioural settings\",\n \"importance\": \"low\",\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"startVideoAt\",\n \"type\": \"number\",\n \"widget\": \"timecode\",\n \"label\": \"Start video at\",\n \"importance\": \"low\",\n \"optional\": true,\n \"description\": \"Enter timecode in the format M:SS\"\n },\n {\n \"name\": \"autoplay\",\n \"type\": \"boolean\",\n \"label\": \"Auto-play video\",\n \"default\": false,\n \"optional\": true,\n \"description\": \"Start playing the video automatically\"\n },\n {\n \"name\": \"loop\",\n \"type\": \"boolean\",\n \"label\": \"Loop the video\",\n \"default\": false,\n \"optional\": true,\n \"description\": \"Check if video should run in a loop\"\n },\n {\n \"name\": \"showSolutionButton\",\n \"type\": \"select\",\n \"label\": \"Override \\\"Show Solution\\\" button\",\n \"importance\": \"low\",\n \"description\": \"This option determines if the \\\"Show Solution\\\" button will be shown for all questions, disabled for all or configured for each question individually.\",\n \"optional\": true,\n \"options\": [\n {\n \"value\": \"on\",\n \"label\": \"Enabled\"\n },\n {\n \"value\": \"off\",\n \"label\": \"Disabled\"\n }\n ]\n },\n {\n \"name\": \"retryButton\",\n \"type\": \"select\",\n \"label\": \"Override \\\"Retry\\\" button\",\n \"importance\": \"low\",\n \"description\": \"This option determines if the \\\"Retry\\\" button will be shown for all questions, disabled for all or configured for each question individually.\",\n \"optional\": true,\n \"options\": [\n {\n \"value\": \"on\",\n \"label\": \"Enabled\"\n },\n {\n \"value\": \"off\",\n \"label\": \"Disabled\"\n }\n ]\n },\n {\n \"name\": \"showBookmarksmenuOnLoad\",\n \"type\": \"boolean\",\n \"label\": \"Start with bookmarks menu open\",\n \"importance\": \"low\",\n \"default\": false,\n \"description\": \"This function is not available on iPad when using YouTube as video source.\"\n },\n {\n \"name\": \"showRewind10\",\n \"type\": \"boolean\",\n \"label\": \"Show button for rewinding 10 seconds\",\n \"importance\": \"low\",\n \"default\": false\n },\n {\n \"name\": \"preventSkipping\",\n \"type\": \"boolean\",\n \"default\": false,\n \"label\": \"Prevent skipping forward in a video\",\n \"importance\": \"low\",\n \"description\": \"Enabling this options will disable user video navigation through default controls.\"\n },\n {\n \"name\": \"deactivateSound\",\n \"type\": \"boolean\",\n \"default\": false,\n \"label\": \"Deactivate sound\",\n \"importance\": \"low\",\n \"description\": \"Enabling this option will deactivate the video's sound and prevent it from being switched on.\"\n }\n ]\n },\n {\n \"name\": \"l10n\",\n \"type\": \"group\",\n \"label\": \"Localize\",\n \"importance\": \"low\",\n \"common\": true,\n \"optional\": true,\n \"fields\": [\n {\n \"name\": \"interaction\",\n \"type\": \"text\",\n \"label\": \"Interaction title\",\n \"importance\": \"low\",\n \"default\": \"Interaction\",\n \"optional\": true\n },\n {\n \"name\": \"play\",\n \"type\": \"text\",\n \"label\": \"Play title\",\n \"importance\": \"low\",\n \"default\": \"Play\",\n \"optional\": true\n },\n {\n \"name\": \"pause\",\n \"type\": \"text\",\n \"label\": \"Pause title\",\n \"importance\": \"low\",\n \"default\": \"Pause\",\n \"optional\": true\n },\n {\n \"name\": \"mute\",\n \"type\": \"text\",\n \"label\": \"Mute title\",\n \"importance\": \"low\",\n \"default\": \"Mute\",\n \"optional\": true\n },\n {\n \"name\": \"unmute\",\n \"type\": \"text\",\n \"label\": \"Unmute title\",\n \"importance\": \"low\",\n \"default\": \"Unmute\",\n \"optional\": true\n },\n {\n \"name\": \"quality\",\n \"type\": \"text\",\n \"label\": \"Video quality title\",\n \"importance\": \"low\",\n \"default\": \"Video Quality\",\n \"optional\": true\n },\n {\n \"name\": \"captions\",\n \"type\": \"text\",\n \"label\": \"Video captions title\",\n \"importance\": \"low\",\n \"default\": \"Captions\",\n \"optional\": true\n },\n {\n \"name\": \"close\",\n \"type\": \"text\",\n \"label\": \"Close button text\",\n \"importance\": \"low\",\n \"default\": \"Close\",\n \"optional\": true\n },\n {\n \"name\": \"fullscreen\",\n \"type\": \"text\",\n \"label\": \"Fullscreen title\",\n \"importance\": \"low\",\n \"default\": \"Fullscreen\",\n \"optional\": true\n },\n {\n \"name\": \"exitFullscreen\",\n \"type\": \"text\",\n \"label\": \"Exit fullscreen title\",\n \"importance\": \"low\",\n \"default\": \"Exit Fullscreen\",\n \"optional\": true\n },\n {\n \"name\": \"summary\",\n \"type\": \"text\",\n \"label\": \"Summary title\",\n \"importance\": \"low\",\n \"default\": \"Open summary dialog\",\n \"optional\": true\n },\n {\n \"name\": \"bookmarks\",\n \"type\": \"text\",\n \"label\": \"Bookmarks title\",\n \"importance\": \"low\",\n \"default\": \"Bookmarks\",\n \"optional\": true\n },\n {\n \"name\": \"endscreen\",\n \"type\": \"text\",\n \"label\": \"Submit screen title\",\n \"importance\": \"low\",\n \"default\": \"Submit screen\",\n \"optional\": true\n },\n {\n \"name\": \"defaultAdaptivitySeekLabel\",\n \"type\": \"text\",\n \"label\": \"Default label for adaptivity seek button\",\n \"importance\": \"low\",\n \"default\": \"Continue\",\n \"optional\": true\n },\n {\n \"name\": \"continueWithVideo\",\n \"type\": \"text\",\n \"label\": \"Default label for continue video button\",\n \"importance\": \"low\",\n \"default\": \"Continue with video\",\n \"optional\": true\n },\n {\n \"name\": \"playbackRate\",\n \"type\": \"text\",\n \"label\": \"Set playback rate\",\n \"importance\": \"low\",\n \"default\": \"Playback Rate\",\n \"optional\": true\n },\n {\n \"name\": \"rewind10\",\n \"type\": \"text\",\n \"label\": \"Rewind 10 Seconds\",\n \"importance\": \"low\",\n \"default\": \"Rewind 10 Seconds\",\n \"optional\": true\n },\n {\n \"name\": \"navDisabled\",\n \"type\": \"text\",\n \"label\": \"Navigation is disabled text\",\n \"importance\": \"low\",\n \"default\": \"Navigation is disabled\",\n \"optional\": true\n },\n {\n \"name\": \"sndDisabled\",\n \"type\": \"text\",\n \"label\": \"Sound is disabled text\",\n \"importance\": \"low\",\n \"default\": \"Sound is disabled\",\n \"optional\": true\n },\n {\n \"name\": \"requiresCompletionWarning\",\n \"type\": \"text\",\n \"label\": \"Warning that the user must answer the question correctly before continuing\",\n \"importance\": \"low\",\n \"default\": \"You need to answer all the questions correctly before continuing.\",\n \"optional\": true\n },\n {\n \"name\": \"back\",\n \"type\": \"text\",\n \"label\": \"Back button\",\n \"importance\": \"low\",\n \"default\": \"Back\",\n \"optional\": true\n },\n {\n \"name\": \"hours\",\n \"type\": \"text\",\n \"label\": \"Passed time hours\",\n \"importance\": \"low\",\n \"default\": \"Hours\",\n \"optional\": true\n },\n {\n \"name\": \"minutes\",\n \"type\": \"text\",\n \"label\": \"Passed time minutes\",\n \"importance\": \"low\",\n \"default\": \"Minutes\",\n \"optional\": true\n },\n {\n \"name\": \"seconds\",\n \"type\": \"text\",\n \"label\": \"Passed time seconds\",\n \"importance\": \"low\",\n \"default\": \"Seconds\",\n \"optional\": true\n },\n {\n \"name\": \"currentTime\",\n \"type\": \"text\",\n \"label\": \"Label for current time\",\n \"importance\": \"low\",\n \"default\": \"Current time:\",\n \"optional\": true\n },\n {\n \"name\": \"totalTime\",\n \"type\": \"text\",\n \"label\": \"Label for total time\",\n \"importance\": \"low\",\n \"default\": \"Total time:\",\n \"optional\": true\n },\n {\n \"name\": \"singleInteractionAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Text explaining that a single interaction with a name has come into view\",\n \"importance\": \"low\",\n \"default\": \"Interaction appeared:\",\n \"optional\": true\n },\n {\n \"name\": \"multipleInteractionsAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Text for explaining that multiple interactions have come into view\",\n \"importance\": \"low\",\n \"default\": \"Multiple interactions appeared.\",\n \"optional\": true\n },\n {\n \"name\": \"videoPausedAnnouncement\",\n \"type\": \"text\",\n \"label\": \"Video is paused announcement\",\n \"importance\": \"low\",\n \"default\": \"Video is paused\",\n \"optional\": true\n },\n {\n \"name\": \"content\",\n \"type\": \"text\",\n \"label\": \"Content label\",\n \"importance\": \"low\",\n \"default\": \"Content\",\n \"optional\": true\n },\n {\n \"name\": \"answered\",\n \"type\": \"text\",\n \"label\": \"Answered message (@answered will be replaced with the number of answered questions)\",\n \"importance\": \"low\",\n \"default\": \"@answered answered\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTitle\",\n \"type\": \"text\",\n \"label\": \"Submit screen title\",\n \"importance\": \"low\",\n \"default\": \"@answered Question(s) answered\",\n \"description\": \"@answered will be replaced by the number of answered questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformation\",\n \"type\": \"text\",\n \"label\": \"Submit screen information\",\n \"importance\": \"low\",\n \"default\": \"You have answered @answered questions, click below to submit your answers.\",\n \"description\": \"@answered will be replaced by the number of answered questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformationNoAnswers\",\n \"type\": \"text\",\n \"label\": \"Submit screen information for missing answers\",\n \"importance\": \"low\",\n \"default\": \"You have not answered any questions.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardInformationMustHaveAnswer\",\n \"type\": \"text\",\n \"label\": \"Submit screen information for answer needed\",\n \"importance\": \"low\",\n \"default\": \"You have to answer at least one question before you can submit your answers.\",\n \"optional\": true\n },\n {\n \"name\": \"endcardSubmitButton\",\n \"type\": \"text\",\n \"label\": \"Submit screen submit button\",\n \"importance\": \"low\",\n \"default\": \"Submit Answers\",\n \"optional\": true\n },\n {\n \"name\": \"endcardSubmitMessage\",\n \"type\": \"text\",\n \"label\": \"Submit screen submit message\",\n \"importance\": \"low\",\n \"default\": \"Your answers have been submitted!\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTableRowAnswered\",\n \"type\": \"text\",\n \"label\": \"Submit screen table row title: Answered questions\",\n \"importance\": \"low\",\n \"default\": \"Answered questions\",\n \"optional\": true\n },\n {\n \"name\": \"endcardTableRowScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen table row title: Score\",\n \"importance\": \"low\",\n \"default\": \"Score\",\n \"optional\": true\n },\n {\n \"name\": \"endcardAnsweredScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen answered score\",\n \"importance\": \"low\",\n \"default\": \"answered\",\n \"optional\": true\n },\n {\n \"name\": \"endCardTableRowSummaryWithScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen row summary including score (for readspeakers)\",\n \"importance\": \"low\",\n \"default\": \"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\n \"optional\": true\n },\n {\n \"name\": \"endCardTableRowSummaryWithoutScore\",\n \"type\": \"text\",\n \"label\": \"Submit screen row summary for no score (for readspeakers)\",\n \"importance\": \"low\",\n \"default\": \"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\",\n \"optional\": true\n }\n ]\n }\n]", + "tutorial_url": "", + "has_icon": 1 + }, + "created_at": "2020-09-30T20:24:58.000000Z", + "updated_at": "2020-09-30T20:24:58.000000Z" + }, + "library_name": "H5P.InteractiveVideo", + "major_version": 1, + "minor_version": 21, + "user_name": null, + "user_id": null, + "created_at": "2020-09-30T20:24:58.000000Z", + "updated_at": "2020-09-30T20:24:58.000000Z" + } +} +``` + +### HTTP Request +`GET api/v1/activities/{activity}/detail` + +#### URL Parameters + +Parameter | Status | Description +--------- | ------- | ------- | ------- + `activity` | required | The Id of a activity + + + + +## H5P Activity + +> Example request: + +```bash +curl -X GET \ + -G "http://localhost:8000/api/v1/activities/1/h5p" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" +``` + +```javascript +const url = new URL( + "http://localhost:8000/api/v1/activities/1/h5p" +); + +let headers = { + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers: headers, +}) + .then(response => response.json()) + .then(json => console.log(json)); +``` + +```php + +$client = new \GuzzleHttp\Client(); +$response = $client->get( + 'http://localhost:8000/api/v1/activities/1/h5p', + [ + 'headers' => [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ], + ] +); +$body = $response->getBody(); +print_r(json_decode((string) $body)); +``` + +```python +import requests +import json + +url = 'http://localhost:8000/api/v1/activities/1/h5p' +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json' +} +response = requests.request('GET', url, headers=headers) +response.json() +``` + + +> Example response (200): + +```json +{ + "activity": { + "id": 1, + "title": "Science of Golf: Why Balls Have Dimples", + "type": "h5p", + "content": "", + "shared": false, + "order": 2, + "thumb_url": null, + "subject_id": null, + "education_level_id": null, + "h5p": { + "settings": { + "baseUrl": "https:\/\/www.currikistudio.org\/api", + "url": "https:\/\/www.currikistudio.org\/api\/storage\/h5p", + "postUserStatistics": true, + "ajax": { + "setFinished": "https:\/\/www.currikistudio.org\/api\/api\/h5p\/ajax\/url", + "contentUserData": "https:\/\/www.currikistudio.org\/api\/api\/h5p\/ajax\/content-user-data\/?content_id=:contentId&data_type=:dataType&sub_content_id=:subContentId" + }, + "saveFreq": false, + "siteUrl": "https:\/\/www.currikistudio.org\/api", + "l10n": { + "H5P": { + "fullscreen": "Fullscreen", + "disableFullscreen": "Disable fullscreen", + "download": "Download", + "copyrights": "Rights of use", + "embed": "Embed", + "reuseDescription": "Reuse this content.", + "size": "Size", + "showAdvanced": "Show advanced", + "hideAdvanced": "Hide advanced", + "advancedHelp": "Include this script on your website if you want dynamic sizing of the embedded content:", + "copyrightInformation": "Rights of use", + "close": "Close", + "title": "Title", + "author": "Author", + "year": "Year", + "source": "Source", + "license": "License", + "thumbnail": "Thumbnail", + "noCopyrights": "No copyright information available for this content.", + "downloadDescription": "Download this content as a H5P file.", + "copyrightsDescription": "View copyright information for this content.", + "embedDescription": "View the embed code for this content.", + "h5pDescription": "Visit H5P.org to check out more cool content.", + "contentChanged": "This content has changed since you last used it.", + "startingOver": "You'll be starting over.", + "confirmDialogHeader": "Confirm action", + "confirmDialogBody": "Please confirm that you wish to proceed. This action is not reversible.", + "cancelLabel": "Cancel", + "confirmLabel": "Confirm", + "reuse": "Reuse", + "reuseContent": "Reuse Content" + } + }, + "hubIsEnabled": false, + "user": { + "name": "John Doe", + "email": "john.doe@currikistudio.org" + }, + "editor": { + "filesPath": "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/editor", + "fileIcon": { + "path": "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/images\/binary-file.png", + "width": 50, + "height": 50 + }, + "ajaxPath": "https:\/\/www.currikistudio.org\/api\/api\/v1\/h5p\/ajax\/", + "libraryUrl": "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/", + "copyrightSemantics": { + "name": "copyright", + "type": "group", + "label": "Copyright information", + "fields": [ + { + "name": "title", + "type": "text", + "label": "Title", + "placeholder": "La Gioconda", + "optional": true + }, + { + "name": "author", + "type": "text", + "label": "Author", + "placeholder": "Leonardo da Vinci", + "optional": true + }, + { + "name": "year", + "type": "text", + "label": "Year(s)", + "placeholder": "1503 - 1517", + "optional": true + }, + { + "name": "source", + "type": "text", + "label": "Source", + "placeholder": "http:\/\/en.wikipedia.org\/wiki\/Mona_Lisa", + "optional": true, + "regexp": { + "pattern": "^http[s]?:\/\/.+", + "modifiers": "i" + } + }, + { + "name": "license", + "type": "select", + "label": "License", + "default": "U", + "options": [ + { + "value": "U", + "label": "Undisclosed" + }, + { + "value": "CC BY", + "label": "Attribution", + "versions": [ + { + "value": "4.0", + "label": "4.0 International" + }, + { + "value": "3.0", + "label": "3.0 Unported" + }, + { + "value": "2.5", + "label": "2.5 Generic" + }, + { + "value": "2.0", + "label": "2.0 Generic" + }, + { + "value": "1.0", + "label": "1.0 Generic" + } + ] + }, + { + "value": "CC BY-SA", + "label": "Attribution-ShareAlike", + "versions": [ + { + "value": "4.0", + "label": "4.0 International" + }, + { + "value": "3.0", + "label": "3.0 Unported" + }, + { + "value": "2.5", + "label": "2.5 Generic" + }, + { + "value": "2.0", + "label": "2.0 Generic" + }, + { + "value": "1.0", + "label": "1.0 Generic" + } + ] + }, + { + "value": "CC BY-ND", + "label": "Attribution-NoDerivs", + "versions": [ + { + "value": "4.0", + "label": "4.0 International" + }, + { + "value": "3.0", + "label": "3.0 Unported" + }, + { + "value": "2.5", + "label": "2.5 Generic" + }, + { + "value": "2.0", + "label": "2.0 Generic" + }, + { + "value": "1.0", + "label": "1.0 Generic" + } + ] + }, + { + "value": "CC BY-NC", + "label": "Attribution-NonCommercial", + "versions": [ + { + "value": "4.0", + "label": "4.0 International" + }, + { + "value": "3.0", + "label": "3.0 Unported" + }, + { + "value": "2.5", + "label": "2.5 Generic" + }, + { + "value": "2.0", + "label": "2.0 Generic" + }, + { + "value": "1.0", + "label": "1.0 Generic" + } + ] + }, + { + "value": "CC BY-NC-SA", + "label": "Attribution-NonCommercial-ShareAlike", + "versions": [ + { + "value": "4.0", + "label": "4.0 International" + }, + { + "value": "3.0", + "label": "3.0 Unported" + }, + { + "value": "2.5", + "label": "2.5 Generic" + }, + { + "value": "2.0", + "label": "2.0 Generic" + }, + { + "value": "1.0", + "label": "1.0 Generic" + } + ] + }, + { + "value": "CC BY-NC-ND", + "label": "Attribution-NonCommercial-NoDerivs", + "versions": [ + { + "value": "4.0", + "label": "4.0 International" + }, + { + "value": "3.0", + "label": "3.0 Unported" + }, + { + "value": "2.5", + "label": "2.5 Generic" + }, + { + "value": "2.0", + "label": "2.0 Generic" + }, + { + "value": "1.0", + "label": "1.0 Generic" + } + ] + }, + { + "value": "GNU GPL", + "label": "General Public License", + "versions": [ + { + "value": "v3", + "label": "Version 3" + }, + { + "value": "v2", + "label": "Version 2" + }, + { + "value": "v1", + "label": "Version 1" + } + ] + }, + { + "value": "PD", + "label": "Public Domain", + "versions": [ + { + "value": "-", + "label": "-" + }, + { + "value": "CC0 1.0", + "label": "CC0 1.0 Universal" + }, + { + "value": "CC PDM", + "label": "Public Domain Mark" + } + ] + }, + { + "value": "C", + "label": "Copyright" + } + ] + }, + { + "name": "version", + "type": "select", + "label": "License Version", + "options": [] + } + ] + }, + "metadataSemantics": [ + { + "name": "title", + "type": "text", + "label": "Title", + "placeholder": "La Gioconda" + }, + { + "name": "license", + "type": "select", + "label": "License", + "default": "U", + "options": [ + { + "value": "U", + "label": "Undisclosed" + }, + { + "type": "optgroup", + "label": "Creative Commons", + "options": [ + { + "value": "CC BY", + "label": "Attribution (CC BY)", + "versions": [ + { + "value": "4.0", + "label": "4.0 International" + }, + { + "value": "3.0", + "label": "3.0 Unported" + }, + { + "value": "2.5", + "label": "2.5 Generic" + }, + { + "value": "2.0", + "label": "2.0 Generic" + }, + { + "value": "1.0", + "label": "1.0 Generic" + } + ] + }, + { + "value": "CC BY-SA", + "label": "Attribution-ShareAlike (CC BY-SA)", + "versions": [ + { + "value": "4.0", + "label": "4.0 International" + }, + { + "value": "3.0", + "label": "3.0 Unported" + }, + { + "value": "2.5", + "label": "2.5 Generic" + }, + { + "value": "2.0", + "label": "2.0 Generic" + }, + { + "value": "1.0", + "label": "1.0 Generic" + } + ] + }, + { + "value": "CC BY-ND", + "label": "Attribution-NoDerivs (CC BY-ND)", + "versions": [ + { + "value": "4.0", + "label": "4.0 International" + }, + { + "value": "3.0", + "label": "3.0 Unported" + }, + { + "value": "2.5", + "label": "2.5 Generic" + }, + { + "value": "2.0", + "label": "2.0 Generic" + }, + { + "value": "1.0", + "label": "1.0 Generic" + } + ] + }, + { + "value": "CC BY-NC", + "label": "Attribution-NonCommercial (CC BY-NC)", + "versions": [ + { + "value": "4.0", + "label": "4.0 International" + }, + { + "value": "3.0", + "label": "3.0 Unported" + }, + { + "value": "2.5", + "label": "2.5 Generic" + }, + { + "value": "2.0", + "label": "2.0 Generic" + }, + { + "value": "1.0", + "label": "1.0 Generic" + } + ] + }, + { + "value": "CC BY-NC-SA", + "label": "Attribution-NonCommercial-ShareAlike (CC BY-NC-SA)", + "versions": [ + { + "value": "4.0", + "label": "4.0 International" + }, + { + "value": "3.0", + "label": "3.0 Unported" + }, + { + "value": "2.5", + "label": "2.5 Generic" + }, + { + "value": "2.0", + "label": "2.0 Generic" + }, + { + "value": "1.0", + "label": "1.0 Generic" + } + ] + }, + { + "value": "CC BY-NC-ND", + "label": "Attribution-NonCommercial-NoDerivs (CC BY-NC-ND)", + "versions": [ + { + "value": "4.0", + "label": "4.0 International" + }, + { + "value": "3.0", + "label": "3.0 Unported" + }, + { + "value": "2.5", + "label": "2.5 Generic" + }, + { + "value": "2.0", + "label": "2.0 Generic" + }, + { + "value": "1.0", + "label": "1.0 Generic" + } + ] + }, + { + "value": "CC0 1.0", + "label": "Public Domain Dedication (CC0)" + }, + { + "value": "CC PDM", + "label": "Public Domain Mark (PDM)" + } + ] + }, + { + "value": "GNU GPL", + "label": "General Public License v3" + }, + { + "value": "PD", + "label": "Public Domain" + }, + { + "value": "ODC PDDL", + "label": "Public Domain Dedication and Licence" + }, + { + "value": "C", + "label": "Copyright" + } + ] + }, + { + "name": "licenseVersion", + "type": "select", + "label": "License Version", + "options": [ + { + "value": "4.0", + "label": "4.0 International" + }, + { + "value": "3.0", + "label": "3.0 Unported" + }, + { + "value": "2.5", + "label": "2.5 Generic" + }, + { + "value": "2.0", + "label": "2.0 Generic" + }, + { + "value": "1.0", + "label": "1.0 Generic" + } + ], + "optional": true + }, + { + "name": "yearFrom", + "type": "number", + "label": "Years (from)", + "placeholder": "1991", + "min": "-9999", + "max": "9999", + "optional": true + }, + { + "name": "yearTo", + "type": "number", + "label": "Years (to)", + "placeholder": "1992", + "min": "-9999", + "max": "9999", + "optional": true + }, + { + "name": "source", + "type": "text", + "label": "Source", + "placeholder": "https:\/\/", + "optional": true + }, + { + "name": "authors", + "type": "list", + "field": { + "name": "author", + "type": "group", + "fields": [ + { + "label": "Author's name", + "name": "name", + "optional": true, + "type": "text" + }, + { + "name": "role", + "type": "select", + "label": "Author's role", + "default": "Author", + "options": [ + { + "value": "Author", + "label": "Author" + }, + { + "value": "Editor", + "label": "Editor" + }, + { + "value": "Licensee", + "label": "Licensee" + }, + { + "value": "Originator", + "label": "Originator" + } + ] + } + ] + } + }, + { + "name": "licenseExtras", + "type": "text", + "widget": "textarea", + "label": "License Extras", + "optional": true, + "description": "Any additional information about the license" + }, + { + "name": "changes", + "type": "list", + "field": { + "name": "change", + "type": "group", + "label": "Changelog", + "fields": [ + { + "name": "date", + "type": "text", + "label": "Date", + "optional": true + }, + { + "name": "author", + "type": "text", + "label": "Changed by", + "optional": true + }, + { + "name": "log", + "type": "text", + "widget": "textarea", + "label": "Description of change", + "placeholder": "Photo cropped, text changed, etc.", + "optional": true + } + ] + } + }, + { + "name": "authorComments", + "type": "text", + "widget": "textarea", + "label": "Author comments", + "description": "Comments for the editor of the content (This text will not be published as a part of copyright info)", + "optional": true + }, + { + "name": "contentType", + "type": "text", + "widget": "none" + }, + { + "name": "defaultLanguage", + "type": "text", + "widget": "none" + } + ], + "assets": { + "css": [ + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/laravel-h5p\/css\/laravel-h5p.css", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/styles\/h5p.css", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/styles\/h5p-confirmation-dialog.css", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/styles\/h5p-core-button.css", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/libs\/darkroom.css", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/styles\/css\/h5p-hub-client.css", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/styles\/css\/fonts.css", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/styles\/css\/application.css", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/styles\/css\/libs\/zebra_datepicker.min.css" + ], + "js": [ + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/jquery.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/h5p.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/h5p-event-dispatcher.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/h5p-x-api-event.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/h5p-x-api.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/h5p-content-type.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/h5p-confirmation-dialog.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/h5p-action-bar.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/request-queue.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-editor.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/laravel-h5p\/js\/laravel-h5p.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-help-dialog.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-message-dialog.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-progress-circle.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-simple-rounded-button.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-speech-bubble.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-throbber.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-tip.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-slider.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-score-bar.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-progressbar.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-ui.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/laravel-h5p\/js\/laravel-h5p-editor.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5p-hub-client.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-semantic-structure.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-library-selector.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-fullscreen-bar.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-form.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-text.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-html.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-number.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-textarea.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-file-uploader.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-file.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-image.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-image-popup.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-av.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-group.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-boolean.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-list.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-list-editor.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-library.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-library-list-cache.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-select.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-selector-hub.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-selector-legacy.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-dimensions.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-coordinates.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-none.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-metadata.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-metadata-author-widget.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-metadata-changelog-widget.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-pre-save.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/ckeditor\/ckeditor.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/language\/en.js" + ] + }, + "deleteMessage": "laravel-h5p.content.destoryed", + "apiVersion": { + "majorVersion": 1, + "minorVersion": 24 + } + }, + "loadedJs": [], + "loadedCss": [], + "core": { + "styles": [ + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/laravel-h5p\/css\/laravel-h5p.css", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/styles\/h5p.css", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/styles\/h5p-confirmation-dialog.css", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/styles\/h5p-core-button.css" + ], + "scripts": [ + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/jquery.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/h5p.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/h5p-event-dispatcher.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/h5p-x-api-event.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/h5p-x-api.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/h5p-content-type.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/h5p-confirmation-dialog.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/h5p-action-bar.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-core\/js\/request-queue.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/h5p-editor\/scripts\/h5peditor-editor.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/laravel-h5p\/js\/laravel-h5p.js", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-help-dialog.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-message-dialog.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-progress-circle.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-simple-rounded-button.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-speech-bubble.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-throbber.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-tip.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-slider.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-score-bar.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-progressbar.js?ver=1.3.9", + "https:\/\/www.currikistudio.org\/api\/storage\/h5p\/libraries\/H5P.JoubelUI-1.3\/js\/joubel-ui.js?ver=1.3.9" + ] + }, + "contents": { + "cid-59": { + "library": "H5P.InteractiveVideo 1.21", + "jsonContent": "{\"interactiveVideo\":{\"video\":{\"startScreenOptions\":{\"title\":\"Interactive Video\",\"hideStartTitle\":false},\"textTracks\":{\"videoTrack\":[{\"label\":\"Subtitles\",\"kind\":\"subtitles\",\"srcLang\":\"en\"}]},\"files\":[{\"path\":\"https:\/\/youtu.be\/fcjaxC-e8oY\",\"mime\":\"video\/YouTube\",\"copyright\":{\"license\":\"U\"}}]},\"assets\":{\"interactions\":[{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":58.33,\"to\":68.33},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"133bca3d-cfe9-442d-a887-8bf1e2ce682a\",\"question\":\"

Why do golf balls have dimples?<\/p>\\n\",\"answers\":[\"

They reduce wind resistance.<\/p>\\n\",\"

They make the ball more visually interesting.<\/p>\\n\",\"

They grip the putting green better than a smooth ball.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"ac029b43-7225-49ed-a2d7-8656037748e0\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Why do golf balls have dimples?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Why do golf balls have dimples?<\/p>\\n\"},{\"x\":45.96541786743516,\"y\":42.78350515463918,\"width\":10,\"height\":10,\"duration\":{\"from\":132.969,\"to\":142.969},\"libraryTitle\":\"Single Choice Set\",\"action\":{\"library\":\"H5P.SingleChoiceSet 1.11\",\"params\":{\"choices\":[{\"subContentId\":\"308503f3-8d41-4f4f-b016-587bcce3dfac\",\"question\":\"

A smooth ball will have a detached airflow, which causes what?<\/p>\\n\",\"answers\":[\"

A low pressure zone, which is what causes drag.<\/p>\\n\",\"

The ball has no spin.<\/p>\\n\",\"

The ball travels higher, but for a shorter distance.<\/p>\\n\"]}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"autoContinue\":true,\"timeoutCorrect\":2000,\"timeoutWrong\":3000,\"soundEffectsEnabled\":true,\"enableRetry\":true,\"enableSolutionsButton\":true,\"passPercentage\":100},\"l10n\":{\"nextButtonLabel\":\"Next question\",\"showSolutionButtonLabel\":\"Show solution\",\"retryButtonLabel\":\"Retry\",\"solutionViewTitle\":\"Solution list\",\"correctText\":\"Correct!\",\"incorrectText\":\"Incorrect!\",\"muteButtonLabel\":\"Mute feedback sound\",\"closeButtonLabel\":\"Close\",\"slideOfTotal\":\"Slide :num of :total\",\"scoreBarLabel\":\"You got :num out of :total points\",\"solutionListQuestionNumber\":\"Question :num\"}},\"subContentId\":\"f70c849d-9542-4f30-9116-8b60b7da708d\",\"metadata\":{\"contentType\":\"Single Choice Set\",\"license\":\"U\",\"title\":\"Smooth Ball?\"}},\"pause\":false,\"displayType\":\"button\",\"buttonOnMobile\":false,\"adaptivity\":{\"correct\":{\"allowOptOut\":false,\"message\":\"\"},\"wrong\":{\"allowOptOut\":false,\"message\":\"\"},\"requireCompletion\":false},\"label\":\"

Smooth Ball<\/p>\\n\"}],\"endscreens\":[{\"time\":295,\"label\":\"4:55 Submit screen\"}]},\"summary\":{\"task\":{\"library\":\"H5P.Summary 1.10\",\"params\":{\"intro\":\"Choose the correct statement.\",\"summaries\":[{\"subContentId\":\"8e2cf84f-4557-4f79-a03e-526838498a7d\",\"tip\":\"\"}],\"overallFeedback\":[{\"from\":0,\"to\":100}],\"solvedLabel\":\"Progress:\",\"scoreLabel\":\"Wrong answers:\",\"resultLabel\":\"Your result\",\"labelCorrect\":\"Correct.\",\"labelIncorrect\":\"Incorrect! Please try again.\",\"alternativeIncorrectLabel\":\"Incorrect\",\"labelCorrectAnswers\":\"Correct answers.\",\"tipButtonLabel\":\"Show tip\",\"scoreBarLabel\":\"You got :num out of :total points\",\"progressText\":\"Progress :num of :total\"},\"subContentId\":\"8d5527ef-3601-4ad9-9e63-2782c9775173\",\"metadata\":{\"contentType\":\"Summary\",\"license\":\"U\",\"title\":\"Untitled Summary\"}},\"displayAt\":3}},\"override\":{\"autoplay\":false,\"loop\":false,\"showBookmarksmenuOnLoad\":false,\"showRewind10\":false,\"preventSkipping\":false,\"deactivateSound\":false},\"l10n\":{\"interaction\":\"Interaction\",\"play\":\"Play\",\"pause\":\"Pause\",\"mute\":\"Mute\",\"unmute\":\"Unmute\",\"quality\":\"Video Quality\",\"captions\":\"Captions\",\"close\":\"Close\",\"fullscreen\":\"Fullscreen\",\"exitFullscreen\":\"Exit Fullscreen\",\"summary\":\"Open summary dialog\",\"bookmarks\":\"Bookmarks\",\"endscreen\":\"Submit screen\",\"defaultAdaptivitySeekLabel\":\"Continue\",\"continueWithVideo\":\"Continue with video\",\"playbackRate\":\"Playback Rate\",\"rewind10\":\"Rewind 10 Seconds\",\"navDisabled\":\"Navigation is disabled\",\"sndDisabled\":\"Sound is disabled\",\"requiresCompletionWarning\":\"You need to answer all the questions correctly before continuing.\",\"back\":\"Back\",\"hours\":\"Hours\",\"minutes\":\"Minutes\",\"seconds\":\"Seconds\",\"currentTime\":\"Current time:\",\"totalTime\":\"Total time:\",\"singleInteractionAnnouncement\":\"Interaction appeared:\",\"multipleInteractionsAnnouncement\":\"Multiple interactions appeared.\",\"videoPausedAnnouncement\":\"Video is paused\",\"content\":\"Content\",\"answered\":\"@answered answered\",\"endcardTitle\":\"@answered Question(s) answered\",\"endcardInformation\":\"You have answered @answered questions, click below to submit your answers.\",\"endcardInformationNoAnswers\":\"You have not answered any questions.\",\"endcardInformationMustHaveAnswer\":\"You have to answer at least one question before you can submit your answers.\",\"endcardSubmitButton\":\"Submit Answers\",\"endcardSubmitMessage\":\"Your answers have been submitted!\",\"endcardTableRowAnswered\":\"Answered questions\",\"endcardTableRowScore\":\"Score\",\"endcardAnsweredScore\":\"answered\",\"endCardTableRowSummaryWithScore\":\"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.\",\"endCardTableRowSummaryWithoutScore\":\"You have answered the @question that appeared after @minutes minutes and @seconds seconds.\"}}", + "fullScreen": 1, + "exportUrl": "https:\/\/www.currikistudio.org\/api\/h5p\/export\/59", + "embedCode": "