Giter VIP home page Giter VIP logo

Digiõppevara

Coding standards

All code should follow the coding standards established by Drupal Core team.

Requirements

Submodules

ov_access

Configuration

  1. Create the role for Expert.
  2. Make sure that the h5p_content and user have taxonomy based fields, these should be based on the same hierarchy.
    • Make sure that the field on h5p_content is configured to be single-valued.
    • The one for user will only be available to people with administrating rights, once properly configured.
  3. Go to the settings page, select suitable role and fields and save that configuration.

Applied logic

System will then try to check if any of the terms within the user profile would match with the one (or any of its parents) selected within the entity. In case of successful match, user will be granted an update permission to certain entities.

Quirks and fixes

  1. By default, the server does not know about the .h5p file type, this raises an issue with files not being downloaded but shown inline instead. See this and this for more insights and detailed explanations. There are a few ways to fix that (first two solutions are initially the same and require a restart to the service; the third one could be written in a different way and should work without any extensive rights or restarts):

    • Add this line to application/x-h5p h5p mime.types file used by the server
    • Add this directive AddType application/x-h5p .h5p to the mod_mime portion of httpd.conf file
    • Add this to the .htaccess file of the instance (a standalone file could be added directly into the directory with all the exportable packages; this one seems to be the default DRUPAL_ROOT/sites/default/files/h5p/exports)
      <FilesMatch "\.(?i:h5p)$">
          ForceType application/octet-stream
          Header set Content-Disposition attachment
      </FilesMatch>
      
  2. As of Drupal 7.50, Drupal core now protects against clickjacking by default by emitting the 'X-Frame-Options: SAMEORIGIN' header. This prevents the site from being embedded in an iframe on another domain. Documentation

    To override the default behaviour, easiest is to set the 'x_frame_option' variable in settings.php:

      // Turn off the X-Frame-Options header entirely, to restore the previous
      // behavior of allowing the site to be embedded in a frame on another site.
      $conf['x_frame_options'] = '';
    
  3. Fix tooltips in fullscreen mode for embedded content as described in this issue.

  • Fix should be added into the h5p.js file before this line.
// CUSTOM START
if ($element.hasClass('h5p-container') && $element.hasClass('h5p-standalone') && $element.hasClass('h5p-course-presentation') && $element.parent().hasClass('h5p-content')) {
  $element = $element.parent();
}
// CUSTOM END

oppevara's Projects

oppevara icon oppevara

Main Drupal 7 module and submodules for extending Drupal and supporting custom H5P content types that need backend support

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.