Skip to content

Commit 29a8601

Browse files
Dave Richerdavericher
Dave Richer
authored andcommittedApr 13, 2016
Major clean up of both syntactical errors and spelling
1 parent e26a662 commit 29a8601

5 files changed

+226
-168
lines changed
 

‎README.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
This folder contains the h5p general library. The files within this folder are not specific to any framework.
22

3-
Any interaction with LMS, CMS or other frameworks is done through interfaces. Plattforms needs to implement
3+
Any interaction with LMS, CMS or other frameworks is done through interfaces. Platforms needs to implement
44
the H5PFrameworkInterface(in h5p.classes.php) and also do the following:
55

66
- Provide a form for uploading h5p packages.

‎doc/spec_en.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<h2>Overview</h2>
2-
<p>H5P is a file format for content/applications made using modern, open web technlogies (HTML5). The format enables easy installation and transfer of applications/content on different CMSes, LMSes and other platforms. An H5P can be uploaded and published on a platform in mostly the same way one would publish a Flash file today. H5P files may also be updated by simply uploading a new version of the file, the same way as one would using Flash.</p>
2+
<p>H5P is a file format for content/applications made using modern, open web technologies (HTML5). The format enables easy installation and transfer of applications/content on different CMSes, LMSes and other platforms. An H5P can be uploaded and published on a platform in mostly the same way one would publish a Flash file today. H5P files may also be updated by simply uploading a new version of the file, the same way as one would using Flash.</p>
33
<p>H5P opens for extensive reuse of code and wide flexibility regarding what may be developed as an H5P.</p>
44
<p>The system uses package files containing all necessary files and libraries for the application to function. These files are based on open formats.</p>
55
<h2>Overview of package files</h2>
@@ -74,7 +74,7 @@ <h2>Library folders</h2>
7474

7575
<p>The root of a library folder shall contain a file name <i>library.json</i> formatted similar to the package's <i>hp5.json</i>, but with a few differences. The library shall also have one or more images in the root folder, named <i>library.jpg</i>, <i>library1.jpg</i> etc. Image sizes 512px × 512px, and will be used in the H5P editor tool.</p>
7676

77-
<p>Libraries are not allowed to modify the document tree in ways that will have consequences for the web site or will be noticable by the user without the library explicitly being initialized from the main package library or another invoked library.</p>
77+
<p>Libraries are not allowed to modify the document tree in ways that will have consequences for the web site or will be noticeable by the user without the library explicitly being initialized from the main package library or another invoked library.</p>
7878

7979
<p>The library shall always include a JavaScript object function named the same as the defined library <i>machineName</i> (defined in <i>library.json</i> and used as the library folder name). This object will be instantiated with the library options as parameter. The resulting object must contain a function <i>attach(target)</i> that will be called after instantiation to attach the library DOM to the main DOM inside <i>target</i></p>
8080

‎h5p-development.class.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ class H5PDevelopment {
1414
/**
1515
* Constructor.
1616
*
17-
* @param object $H5PFramework
17+
* @param H5PFrameworkInterface|object $H5PFramework
1818
* The frameworks implementation of the H5PFrameworkInterface
1919
* @param string $filesPath
2020
* Path to where H5P should store its files
21+
* @param $language
2122
* @param array $libraries Optional cache input.
2223
*/
23-
public function __construct($H5PFramework, $filesPath, $language, $libraries = NULL) {
24+
public function __construct(H5PFrameworkInterface $H5PFramework, $filesPath, $language, $libraries = NULL) {
2425
$this->h5pF = $H5PFramework;
2526
$this->language = $language;
2627
$this->filesPath = $filesPath;
@@ -35,7 +36,7 @@ public function __construct($H5PFramework, $filesPath, $language, $libraries = N
3536
/**
3637
* Get contents of file.
3738
*
38-
* @param string File path.
39+
* @param string $file File path.
3940
* @return mixed String on success or NULL on failure.
4041
*/
4142
private function getFileContents($file) {
@@ -111,7 +112,7 @@ private function findLibraries($path) {
111112
}
112113

113114
/**
114-
* @return array Libraris in development folder.
115+
* @return array Libraries in development folder.
115116
*/
116117
public function getLibraries() {
117118
return $this->libraries;
@@ -152,6 +153,7 @@ public function getSemantics($name, $majorVersion, $minorVersion) {
152153
* @param string $name of the library.
153154
* @param int $majorVersion of the library.
154155
* @param int $minorVersion of the library.
156+
* @param $language
155157
* @return string Translation
156158
*/
157159
public function getLanguage($name, $majorVersion, $minorVersion, $language) {
@@ -169,7 +171,7 @@ public function getLanguage($name, $majorVersion, $minorVersion, $language) {
169171
*
170172
* @param string $name Machine readable library name
171173
* @param integer $majorVersion
172-
* @param integer $majorVersion
174+
* @param $minorVersion
173175
* @return string Library identifier.
174176
*/
175177
public static function libraryToString($name, $majorVersion, $minorVersion) {

‎h5p-event-base.class.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ abstract class H5PEventBase {
5050
* @param string $sub_type
5151
* Name of event sub type
5252
* @param string $content_id
53-
* Identifier for content affacted by the event
53+
* Identifier for content affected by the event
5454
* @param string $content_title
5555
* Content title (makes it easier to know which content was deleted etc.)
5656
* @param string $library_name
57-
* Name of the library affacted by the event
57+
* Name of the library affected by the event
5858
* @param string $library_version
5959
* Library version
6060
*/
@@ -178,14 +178,14 @@ protected function getFormatArray() {
178178
/**
179179
* Stores the event data in the database.
180180
*
181-
* Must be overriden by plugin.
181+
* Must be overridden by plugin.
182182
*/
183183
abstract protected function save();
184184

185185
/**
186186
* Add current event data to statistics counter.
187187
*
188-
* Must be overriden by plugin.
188+
* Must be overridden by plugin.
189189
*/
190190
abstract protected function saveStats();
191191
}

0 commit comments

Comments
 (0)
Please sign in to comment.