function MarkTheWords(params, contentId, contentData) {
    var self = this;
    this.contentId = contentId;
    this.introductionId = 'mark-the-words-introduction-' + contentId;

    Question.call(this, 'mark-the-words');

    // Set default behavior.
    this.params = $.extend({}, {
      taskDescription: "",
      textField: "This is a *nice*, *flexible* content type.",
      behaviour: {
        enableRetry: true,
        enableSolutionsButton: true
      },
      checkAnswerButton: "Check",
      tryAgainButton: "Retry",
      showSolutionButton: "Show solution",
      score: "You got @score of @total points",
      correctAnswer: "Correct!",
      incorrectAnswer: "Incorrect!",
      missedAnswer: "Missed!",
      displaySolutionDescription:  "Task is updated to contain the solution."
    }, params);

    this.contentData = contentData;
    if (this.contentData !== undefined && this.contentData.previousState !== undefined) {
      this.previousState = this.contentData.previousState;
    }

    // Add keyboard navigation helper
    this.keyboardNav = new KeyboardNav();

    // on word clicked
    this.keyboardNav.on('select', function(event){
      self.isAnswered = true;
      self.triggerXAPI('interacted');
    });

    this.initMarkTheWords();
    this.XapiGenerator = new XapiGenerator(this);
  }
/**
   * Initialize module.
   *
   * @class H5P.MarkTheWords
   * @extends H5P.Question
   * @param {Object} params Behavior settings
   * @param {Number} contentId Content identification
   * @param {Object} contentData Object containing task specific content data
   *
   * @returns {Object} MarkTheWords Mark the words instance
   */
Initialize module.

@returns {Object} MarkTheWords Mark the words instance
Initialize module . @returns { Object } MarkTheWords Mark the words instance
function MarkTheWords(params, contentId, contentData) {
    var self = this;
    this.contentId = contentId;
    this.introductionId = 'mark-the-words-introduction-' + contentId;
    Question.call(this, 'mark-the-words');
    this.params = $.extend({}, {
      taskDescription: "",
      textField: "This is a *nice*, *flexible* content type.",
      behaviour: {
        enableRetry: true,
        enableSolutionsButton: true
      },
      checkAnswerButton: "Check",
      tryAgainButton: "Retry",
      showSolutionButton: "Show solution",
      score: "You got @score of @total points",
      correctAnswer: "Correct!",
      incorrectAnswer: "Incorrect!",
      missedAnswer: "Missed!",
      displaySolutionDescription:  "Task is updated to contain the solution."
    }, params);
    this.contentData = contentData;
    if (this.contentData !== undefined && this.contentData.previousState !== undefined) {
      this.previousState = this.contentData.previousState;
    }
    this.keyboardNav = new KeyboardNav();
    this.keyboardNav.on('select', function(event){
      self.isAnswered = true;
      self.triggerXAPI('interacted');
    });
    this.initMarkTheWords();
    this.XapiGenerator = new XapiGenerator(this);
  }
function MarkTheWords ( params , contentId , contentData ) { var self = this ; this . contentId = contentId ; this . introductionId = 'mark-the-words-introduction-' + contentId ; Question . call ( this , 'mark-the-words' ) ; this . params = $ . extend ( { } , { taskDescription : "" , textField : "This is a *nice*, *flexible* content type." , behaviour : { enableRetry : true , enableSolutionsButton : true } , checkAnswerButton : "Check" , tryAgainButton : "Retry" , showSolutionButton : "Show solution" , score : "You got @score of @total points" , correctAnswer : "Correct!" , incorrectAnswer : "Incorrect!" , missedAnswer : "Missed!" , displaySolutionDescription : "Task is updated to contain the solution." } , params ) ; this . contentData = contentData ; if ( this . contentData !== undefined && this . contentData . previousState !== undefined ) { this . previousState = this . contentData . previousState ; } this . keyboardNav = new KeyboardNav ( ) ; this . keyboardNav . on ( 'select' , function ( event ) { self . isAnswered = true ; self . triggerXAPI ( 'interacted' ) ; } ) ; this . initMarkTheWords ( ) ; this . XapiGenerator = new XapiGenerator ( this ) ; }
Initialize module.
Initialize module .
// Set default behavior. // Add keyboard navigation helper // on word clicked