Commit 932e6649 authored by Konstantin Schulz's avatar Konstantin Schulz
Browse files

introducing new exercise type: Mark Words

parent 7f926023
......@@ -14,6 +14,7 @@ import {ChangeLanguagePage} from 'src/app/change-language/change-language.page';
import {ChangeLanguagePageModule} from 'src/app/change-language/change-language.module';
import {HelperService} from 'src/app/helper.service';
import {ConfirmCancelPageModule} from 'src/app/confirm-cancel/confirm-cancel.module';
import {APP_BASE_HREF} from '@angular/common';
@NgModule({
declarations: [AppComponent],
......@@ -34,6 +35,10 @@ import {ConfirmCancelPageModule} from 'src/app/confirm-cancel/confirm-cancel.mod
ChangeLanguagePageModule
],
providers: [
{
provide: APP_BASE_HREF,
useValue: window.location.pathname.split('/').slice(0, -1).join('/'),
},
StatusBar,
SplashScreen,
{provide: RouteReuseStrategy, useClass: IonicRouteStrategy}
......
......@@ -22,6 +22,7 @@ import {LinkMC} from 'src/app/models/linkMC';
import {QueryMC} from 'src/app/models/queryMC';
import {Exercise} from 'src/app/models/exercise';
import {Feedback} from 'src/app/models/feedback';
import {PhenomenonMap} from 'src/app/models/phenomenonMap';
@Injectable({
providedIn: 'root'
......@@ -47,13 +48,7 @@ export class CorpusService {
instructionsTranslation: ''
});
public isTextRangeCorrect = false;
public phenomenonMap: {
[phenomenonName: string]: [
{ [translationsKey: string]: string },
object,
{ [specificValue: string]: number }
]
} = {};
public phenomenonMap: PhenomenonMap = {};
constructor(public translate: TranslateService,
public http: HttpClient,
......@@ -67,8 +62,8 @@ export class CorpusService {
Object.keys(Phenomenon).forEach((key) => {
if (key !== Phenomenon[Phenomenon.lemma]) {
const translationObject: object = this.phenomenonMap[key][1];
Object.keys(translationObject).forEach((k) => {
if (k.toUpperCase() !== k) {
Object.keys(translationObject).forEach((k: string) => {
if (k !== k.toUpperCase()) {
this.translate.get(translationObject[k]).subscribe(v => this.phenomenonMap[key][0][k] = v);
}
});
......
......@@ -60,7 +60,7 @@
</ion-row>
<ion-row>
<ion-col>
<label *ngIf="corpusService.exercise.type === ExerciseType.cloze; else matching">
<label *ngIf="[ExerciseType.cloze, ExerciseType.markWords].indexOf(corpusService.exercise.type) > -1; else matching">
<span class="label">
{{ 'QUERY_VALUE' | translate }}
</span>
......
......@@ -16,6 +16,7 @@ import {TranslateService} from '@ngx-translate/core';
import {ExerciseService} from 'src/app/exercise.service';
import {HelperService} from 'src/app/helper.service';
import {CorpusService} from 'src/app/corpus.service';
import {PhenomenonMap} from 'src/app/models/phenomenonMap';
@Component({
selector: 'app-exercise-parameters',
......@@ -47,7 +48,7 @@ export class ExerciseParametersPage {
adjustTranslations() {
this.translateService.get(ExerciseTypeTranslation[this.corpusService.exercise.type]).subscribe(
value => this.corpusService.exercise.typeTranslation = value);
if ([ExerciseType.cloze, ExerciseType.matching].indexOf(this.corpusService.exercise.type) > -1) {
if ([ExerciseType.cloze, ExerciseType.matching, ExerciseType.markWords].indexOf(this.corpusService.exercise.type) > -1) {
this.translateService.get(InstructionsTranslation[this.corpusService.exercise.type]).subscribe(
value => this.corpusService.exercise.instructionsTranslation = value);
}
......@@ -94,9 +95,15 @@ export class ExerciseParametersPage {
formData.append('search_values', JSON.stringify(searchValues));
HelperService.currentError = null;
HelperService.isLoading = true;
let instructions: string = this.corpusService.exercise.instructionsTranslation;
if (this.corpusService.exercise.type === ExerciseType.kwic) {
this.getKwicExercise(formData);
return;
} else if (this.corpusService.exercise.type === ExerciseType.markWords) {
const phenomenon: Phenomenon = this.corpusService.exercise.queryItems[0].phenomenon;
const map: object[] = this.corpusService.phenomenonMap[phenomenon];
const values: string[] = this.corpusService.exercise.queryItems[0].values as string[];
instructions += ` [${values.map(x => map[0][x]).join(', ')}]`;
}
// TODO: change the corpus title to something meaningful, e.g. concatenate user ID and wanted exercise title
const workTitle: string = this.corpusService.currentCorpus.title + ':' + this.corpusService.currentTextRange.start + '-' +
......@@ -104,7 +111,7 @@ export class ExerciseParametersPage {
formData.append('work_title', workTitle);
formData.append('type', MoodleExerciseType[this.corpusService.exercise.type]);
formData.append('type_translation', this.corpusService.exercise.typeTranslation);
formData.append('instructions', this.corpusService.exercise.instructionsTranslation);
formData.append('instructions', instructions);
formData.append('correct_feedback', this.corpusService.exercise.feedback.correct);
formData.append('partially_correct_feedback', this.corpusService.exercise.feedback.partiallyCorrect);
formData.append('incorrect_feedback', this.corpusService.exercise.feedback.incorrect);
......
......@@ -91,6 +91,7 @@ export enum DependencyTranslation {
export enum ExerciseType {
cloze = 'cloze' as any,
kwic = 'kwic' as any,
markWords = 'markWords' as any,
matching = 'matching' as any,
}
......@@ -98,6 +99,7 @@ export enum ExerciseTypeTranslation {
cloze = 'EXERCISE_TYPE_CLOZE' as any,
kwic = 'EXERCISE_TYPE_KWIC' as any,
matching = 'EXERCISE_TYPE_MATCHING' as any,
markWords = 'EXERCISE_TYPE_MARK_WORDS' as any,
}
export enum FileType {
......@@ -109,12 +111,14 @@ export enum FileType {
export enum InstructionsTranslation {
cloze = 'INSTRUCTIONS_CLOZE' as any,
kwic = 'INSTRUCTIONS_KWIC' as any,
markWords = 'INSTRUCTIONS_MARK_WORDS' as any,
matching = 'INSTRUCTIONS_MATCHING' as any,
}
export enum MoodleExerciseType {
cloze = 'ddwtos' as any,
kwic = 'kwic' as any,
markWords = 'markWords' as any,
matching = 'matching' as any,
}
......
export interface PhenomenonMap {
[phenomenonName: string]: [
{ [translationsKey: string]: string },
object,
{ [specificValue: string]: number }
];
}
......@@ -28,8 +28,7 @@
<ion-row>
<ion-col>
<!-- TODO: enable solution shuffling for H5P ? -->
<div *ngIf="[ExerciseType.cloze, ExerciseType.matching].includes(corpusService.exercise.type)"
class="h5p-container"></div>
<div *ngIf="corpusService.exercise.type !== ExerciseType.kwic" class="h5p-container"></div>
</ion-col>
</ion-row>
<ion-row>
......@@ -39,7 +38,8 @@ beginning that it is going to be a download (instead of an ordinary link or clic
<a href="{{urlBase + FileType[FileType.pdf] + solutionIndicesString}}"
download>{{ 'FILE_TYPE_PDF' | translate }}</a>
</ion-col>
<ion-col>
<!-- TODO: ADD MOODLE SUPPORT FOR MARK WORDS EXERCISES -->
<ion-col *ngIf="corpusService.exercise.type !== ExerciseType.markWords">
<a href="{{urlBase + FileType[FileType.xml] + solutionIndicesString}}" download>{{ 'FILE_TYPE_XML' |
translate }}</a>
</ion-col>
......
......@@ -42,15 +42,15 @@ export class PreviewPage implements OnDestroy {
}
initH5P() {
if ([ExerciseType.cloze, ExerciseType.matching].indexOf(this.corpusService.exercise.type) > -1) {
if (this.corpusService.exercise.type !== ExerciseType.kwic) {
const solutionIndicesString: string = this.exerciseService.excludeOOV ? '&solution_indices=' +
JSON.stringify(this.currentSolutions.map(x => this.corpusService.annisResponse.solutions.indexOf(x))) : '';
// this will be called via GET request from the h5p standalone javascript library
const url: string = HelperService.config['backendBaseUrl'] + HelperService.config['backendApiH5pPath'] + '?' + 'eid='
+ this.corpusService.annisResponse.exercise_id + '&lang=' + this.translateService.getBrowserLang() +
solutionIndicesString;
+ this.corpusService.annisResponse.exercise_id + '&lang=' + this.translateService.getBrowserLang() + solutionIndicesString;
window.localStorage.setItem(HelperService.config['localStorageKeyH5P'], url);
this.exerciseService.initH5P('drag_text');
const exerciseTypePath: string = this.corpusService.exercise.type === ExerciseType.markWords ? 'mark_words' : 'drag_text';
this.exerciseService.initH5P(exerciseTypePath);
}
this.updateFileUrl();
}
......
.drop-element,.drop-element *,.drop-element :after,.drop-element :before,.drop-element:after,.drop-element:before{box-sizing:border-box}.drop-element{position:absolute;display:none}.drop-element.drop-open{display:block}.drop-element.drop-theme-arrows-bounce .drop-content{border-radius:5px;position:relative;font-family:inherit;background:#fff;color:#444;padding:1em;font-size:1.1em;line-height:1.5em;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-filter:drop-shadow(0 1px 4px rgba(0, 0, 0, .2));filter:drop-shadow(0 1px 4px rgba(0, 0, 0, .2))}.drop-element.drop-theme-arrows-bounce .drop-content:before{content:"";display:block;position:absolute;width:0;height:0;border-color:transparent;border-width:12px;border-style:solid}.drop-element.drop-theme-arrows-bounce.drop-element-attached-bottom.drop-element-attached-center .drop-content:before{top:100%;left:50%;margin-left:-12px;border-top-color:#fff}.drop-element.drop-theme-arrows-bounce.drop-element-attached-top.drop-element-attached-center .drop-content{margin-top:12px}.drop-element.drop-theme-arrows-bounce.drop-element-attached-top.drop-element-attached-center .drop-content:before{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#fff}.drop-element.drop-theme-arrows-bounce.drop-element-attached-right.drop-element-attached-middle .drop-content:before{left:100%;top:50%;margin-top:-12px;border-left-color:#fff}.drop-element.drop-theme-arrows-bounce.drop-element-attached-left.drop-element-attached-middle .drop-content:before{right:100%;top:50%;margin-top:-12px;border-right-color:#fff}.drop-element.drop-theme-arrows-bounce.drop-element-attached-top.drop-element-attached-left.drop-target-attached-bottom .drop-content:before{bottom:100%;left:12px;border-bottom-color:#fff}.drop-element.drop-theme-arrows-bounce.drop-element-attached-top.drop-element-attached-right.drop-target-attached-bottom .drop-content:before{bottom:100%;right:12px;border-bottom-color:#fff}.drop-element.drop-theme-arrows-bounce.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-top .drop-content:before{top:100%;left:12px;border-top-color:#fff}.drop-element.drop-theme-arrows-bounce.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-top .drop-content:before{top:100%;right:12px;border-top-color:#fff}.drop-element.drop-theme-arrows-bounce.drop-element-attached-top.drop-element-attached-right.drop-target-attached-left .drop-content:before{top:12px;left:100%;border-left-color:#fff}.drop-element.drop-theme-arrows-bounce.drop-element-attached-top.drop-element-attached-left.drop-target-attached-right .drop-content:before{top:12px;right:100%;border-right-color:#fff}.drop-element.drop-theme-arrows-bounce.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-left .drop-content:before{bottom:12px;left:100%;border-left-color:#fff}.drop-element.drop-theme-arrows-bounce.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-right .drop-content:before{bottom:12px;right:100%;border-right-color:#fff}.drop-element.drop-theme-arrows-bounce{max-width:100%;max-height:100%;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition:opacity .1s;transition:opacity .1s;opacity:0}.drop-element.drop-theme-arrows-bounce .drop-content{-webkit-transition:-webkit-transform .3s cubic-bezier(0,0,.265,1.55);transition:transform .3s cubic-bezier(0,0,.265,1.55);-webkit-transform:scale(0) translateZ(0);transform:scale(0) translateZ(0)}.drop-element.drop-theme-arrows-bounce.drop-open{display:none}.drop-element.drop-theme-arrows-bounce.drop-open-transitionend{display:block}.drop-element.drop-theme-arrows-bounce.drop-after-open{-webkit-transition:none;transition:none;opacity:1}.drop-element.drop-theme-arrows-bounce.drop-after-open .drop-content{-webkit-transform:scale(1) translateZ(0);transform:scale(1) translateZ(0)}.drop-element.drop-theme-arrows-bounce.drop-element-attached-bottom.drop-element-attached-center .drop-content{margin-bottom:12px;-webkit-transform-origin:50%,calc(100% + 12px);-ms-transform-origin:50%,calc(100% + 12px);transform-origin:50%,calc(100% + 12px)}.drop-element.drop-theme-arrows-bounce.drop-element-attached-top.drop-element-attached-center .drop-content{-webkit-transform-origin:50%,-12px;-ms-transform-origin:50%,-12px;transform-origin:50%,-12px}.drop-element.drop-theme-arrows-bounce.drop-element-attached-right.drop-element-attached-middle .drop-content{margin-right:12px;-webkit-transform-origin:calc(100% + 12px),50%;-ms-transform-origin:calc(100% + 12px),50%;transform-origin:calc(100% + 12px),50%}.drop-element.drop-theme-arrows-bounce.drop-element-attached-left.drop-element-attached-middle .drop-content{margin-left:12px;-webkit-transform-origin:-12px,50%;-ms-transform-origin:-12px,50%;transform-origin:-12px,50%}.drop-element.drop-theme-arrows-bounce.drop-element-attached-top.drop-element-attached-left.drop-target-attached-bottom .drop-content{margin-top:12px;-webkit-transform-origin:0,-12px;-ms-transform-origin:0,-12px;transform-origin:0,-12px}.drop-element.drop-theme-arrows-bounce.drop-element-attached-top.drop-element-attached-right.drop-target-attached-bottom .drop-content{margin-top:12px;-webkit-transform-origin:100%,-12px;-ms-transform-origin:100%,-12px;transform-origin:100%,-12px}.drop-element.drop-theme-arrows-bounce.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-top .drop-content{margin-bottom:12px;-webkit-transform-origin:0,calc(100% + 12px);-ms-transform-origin:0,calc(100% + 12px);transform-origin:0,calc(100% + 12px)}.drop-element.drop-theme-arrows-bounce.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-top .drop-content{margin-bottom:12px;-webkit-transform-origin:100%,calc(100% + 12px);-ms-transform-origin:100%,calc(100% + 12px);transform-origin:100%,calc(100% + 12px)}.drop-element.drop-theme-arrows-bounce.drop-element-attached-top.drop-element-attached-right.drop-target-attached-left .drop-content{margin-right:12px;-webkit-transform-origin:calc(100% + 12px),0;-ms-transform-origin:calc(100% + 12px),0;transform-origin:calc(100% + 12px),0}.drop-element.drop-theme-arrows-bounce.drop-element-attached-top.drop-element-attached-left.drop-target-attached-right .drop-content{margin-left:12px;-webkit-transform-origin:-12px,0;-ms-transform-origin:-12px,0;transform-origin:-12px,0}.drop-element.drop-theme-arrows-bounce.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-left .drop-content{margin-right:12px;-webkit-transform-origin:calc(100% + 12px),100%;-ms-transform-origin:calc(100% + 12px),100%;transform-origin:calc(100% + 12px),100%}.drop-element.drop-theme-arrows-bounce.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-right .drop-content{margin-left:12px;-webkit-transform-origin:-12px,100%;-ms-transform-origin:-12px,100%;transform-origin:-12px,100%}
\ No newline at end of file
var oldDrop = window.Drop;
var oldTether = window.Tether;
Tether = H5P.Tether;
!function(t,e){"function"==typeof define&&define.amd?define(["tether"],e):"object"==typeof exports?module.exports=e(require("tether")):t.Drop=e(t.Tether)}(this,function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function o(t){var e=t.split(" "),n=a(e,2),o=n[0],i=n[1];if(["left","right"].indexOf(o)>=0){var s=[i,o];o=s[0],i=s[1]}return[o,i].join(" ")}function i(t,e){for(var n=void 0,o=[];-1!==(n=t.indexOf(e));)o.push(t.splice(n,1));return o}function s(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],u=function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return new(r.apply(b,[null].concat(e)))};p(u,{createContext:s,drops:[],defaults:{}});var g={classPrefix:"drop",defaults:{position:"bottom left",openOn:"click",beforeClose:null,constrainToScrollParent:!0,constrainToWindow:!0,classes:"",remove:!1,tetherOptions:{}}};p(u,g,a),p(u.defaults,g.defaults,a.defaults),"undefined"==typeof x[u.classPrefix]&&(x[u.classPrefix]=[]),u.updateBodyClasses=function(){for(var t=!1,e=x[u.classPrefix],n=e.length,o=0;n>o;++o)if(e[o].isOpened()){t=!0;break}t?d(document.body,u.classPrefix+"-open"):c(document.body,u.classPrefix+"-open")};var b=function(s){function r(t){if(e(this,r),l(Object.getPrototypeOf(r.prototype),"constructor",this).call(this),this.options=p({},u.defaults,t),this.target=this.options.target,"undefined"==typeof this.target)throw new Error("Drop Error: You must provide a target.");var n="data-"+u.classPrefix,o=this.target.getAttribute(n);o&&(this.options.content=o);for(var i=["position","openOn"],s=0;s<i.length;++s){var a=this.target.getAttribute(n+"-"+i[s]);a&&(this.options[i[s]]=a)}this.options.classes&&this.options.addTargetClasses!==!1&&d(this.target,this.options.classes),u.drops.push(this),x[u.classPrefix].push(this),this._boundEvents=[],this.bindMethods(),this.setupElements(),this.setupEvents(),this.setupTether()}return n(r,s),h(r,[{key:"_on",value:function(t,e,n){this._boundEvents.push({element:t,event:e,handler:n}),t.addEventListener(e,n)}},{key:"bindMethods",value:function(){this.transitionEndHandler=this._transitionEndHandler.bind(this)}},{key:"setupElements",value:function(){var t=this;if(this.drop=document.createElement("div"),d(this.drop,u.classPrefix),this.options.classes&&d(this.drop,this.options.classes),this.content=document.createElement("div"),d(this.content,u.classPrefix+"-content"),"function"==typeof this.options.content){var e=function(){var e=t.options.content.call(t,t);if("string"==typeof e)t.content.innerHTML=e;else{if("object"!=typeof e)throw new Error("Drop Error: Content function should return a string or HTMLElement.");t.content.innerHTML="",t.content.appendChild(e)}};e(),this.on("open",e.bind(this))}else"object"==typeof this.options.content?this.content.appendChild(this.options.content):this.content.innerHTML=this.options.content;this.drop.appendChild(this.content)}},{key:"setupTether",value:function(){var e=this.options.position.split(" ");e[0]=E[e[0]],e=e.join(" ");var n=[];this.options.constrainToScrollParent?n.push({to:"scrollParent",pin:"top, bottom",attachment:"together none"}):n.push({to:"scrollParent"}),this.options.constrainToWindow!==!1?n.push({to:"window",attachment:"together"}):n.push({to:"window"});var i={element:this.drop,target:this.target,attachment:o(e),targetAttachment:o(this.options.position),classPrefix:u.classPrefix,offset:"0 0",targetOffset:"0 0",enabled:!1,constraints:n,addTargetClasses:this.options.addTargetClasses};this.options.tetherOptions!==!1&&(this.tether=new t(p({},i,this.options.tetherOptions)))}},{key:"setupEvents",value:function(){var t=this;if(this.options.openOn){if("always"===this.options.openOn)return void setTimeout(this.open.bind(this));var e=this.options.openOn.split(" ");if(e.indexOf("click")>=0)for(var n=function(e){t.toggle(e),e.preventDefault()},o=function(e){t.isOpened()&&(e.target===t.drop||t.drop.contains(e.target)||e.target===t.target||t.target.contains(e.target)||t.close(e))},i=0;i<y.length;++i){var s=y[i];this._on(this.target,s,n),this._on(document,s,o)}var r=!1,a=null,h=function(e){r=!0,t.open(e)},l=function(e){r=!1,"undefined"!=typeof a&&clearTimeout(a),a=setTimeout(function(){r||t.close(e),a=null},50)};e.indexOf("hover")>=0&&(this._on(this.target,"mouseover",h),this._on(this.drop,"mouseover",h),this._on(this.target,"mouseout",l),this._on(this.drop,"mouseout",l)),e.indexOf("focus")>=0&&(this._on(this.target,"focus",h),this._on(this.drop,"focus",h),this._on(this.target,"blur",l),this._on(this.drop,"blur",l))}}},{key:"isOpened",value:function(){return this.drop?f(this.drop,u.classPrefix+"-open"):void 0}},{key:"toggle",value:function(t){this.isOpened()?this.close(t):this.open(t)}},{key:"open",value:function(t){var e=this;this.isOpened()||(this.drop.parentNode||document.body.appendChild(this.drop),"undefined"!=typeof this.tether&&this.tether.enable(),d(this.drop,u.classPrefix+"-open"),d(this.drop,u.classPrefix+"-open-transitionend"),setTimeout(function(){e.drop&&d(e.drop,u.classPrefix+"-after-open")}),"undefined"!=typeof this.tether&&this.tether.position(),this.trigger("open"),u.updateBodyClasses())}},{key:"_transitionEndHandler",value:function(t){t.target===t.currentTarget&&(f(this.drop,u.classPrefix+"-open")||c(this.drop,u.classPrefix+"-open-transitionend"),this.drop.removeEventListener(m,this.transitionEndHandler))}},{key:"beforeCloseHandler",value:function(t){var e=!0;return this.isClosing||"function"!=typeof this.options.beforeClose||(this.isClosing=!0,e=this.options.beforeClose(t,this)!==!1),this.isClosing=!1,e}},{key:"close",value:function(t){this.isOpened()&&this.beforeCloseHandler(t)&&(c(this.drop,u.classPrefix+"-open"),c(this.drop,u.classPrefix+"-after-open"),this.drop.addEventListener(m,this.transitionEndHandler),this.trigger("close"),"undefined"!=typeof this.tether&&this.tether.disable(),u.updateBodyClasses(),this.options.remove&&this.remove(t))}},{key:"remove",value:function(t){this.close(t),this.drop.parentNode&&this.drop.parentNode.removeChild(this.drop)}},{key:"position",value:function(){this.isOpened()&&"undefined"!=typeof this.tether&&this.tether.position()}},{key:"destroy",value:function(){this.remove(),"undefined"!=typeof this.tether&&this.tether.destroy();for(var t=0;t<this._boundEvents.length;++t){var e=this._boundEvents[t],n=e.element,o=e.event,s=e.handler;n.removeEventListener(o,s)}this._boundEvents=[],this.tether=null,this.drop=null,this.content=null,this.target=null,i(x[u.classPrefix],this),i(u.drops,this)}}]),r}(v);return u}var r=Function.prototype.bind,a=function(){function t(t,e){var n=[],o=!0,i=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(n.push(r.value),!e||n.length!==e);o=!0);}catch(h){i=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(i)throw s}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),l=function(t,e,n){for(var o=!0;o;){var i=t,s=e,r=n;a=l=h=void 0,o=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,s);if(void 0!==a){if("value"in a)return a.value;var h=a.get;return void 0===h?void 0:h.call(r)}var l=Object.getPrototypeOf(i);if(null===l)return void 0;t=l,e=s,n=r,o=!0}},u=t.Utils,p=u.extend,d=u.addClass,c=u.removeClass,f=u.hasClass,v=u.Evented,y=["click"];"ontouchstart"in document.documentElement&&y.push("touchstart");var g={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"},m="";for(var b in g)if({}.hasOwnProperty.call(g,b)){var O=document.createElement("p");"undefined"!=typeof O.style[b]&&(m=g[b])}var E={left:"right",right:"left",top:"bottom",bottom:"top",middle:"middle",center:"center"},x={},P=s();return document.addEventListener("DOMContentLoaded",function(){P.updateBodyClasses()}),P});
H5P.Drop = Drop;
window.Drop = oldDrop;
window.Tether = oldTether;
{
"title": "Drop",
"description": "Drop.js is a powerful Javascript and CSS library for creating dropdowns and other floating displays.",
"majorVersion": 1,
"minorVersion": 0,
"patchVersion": 2,
"runnable": 0,
"author": "Hubspot. Wrapped as H5P by Joubel (fnoks)",
"license": "MIT",
"machineName": "Drop",
"preloadedJs": [
{
"path": "js/drop.min.js"
}
],
"preloadedCss": [
{
"path": "css/drop-theme-arrows-bounce.min.css"
}
],
"preloadedDependencies": [
{
"machineName": "Tether",
"majorVersion": 1,
"minorVersion": 0
}
]
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"title": "Font Awesome",
"contentType": "Font",
"majorVersion": 4,
"minorVersion": 5,
"patchVersion": 4,
"runnable": 0,
"machineName": "FontAwesome",
"license": "MIT",
"author": "Dave Gandy",
"preloadedCss": [
{
"path": "h5p-font-awesome.min.css"
}
]
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment