-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #438 from oat-sa/hotfix/TR-1473/pause-timer-after-…
…connectivity-issue-while-waiting-for-reconnection-2 [Backport] fix/tr 1473/pause timer after connectivity issue while waiting for reconnection
- Loading branch information
Showing
37 changed files
with
2,225 additions
and
256 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; under version 2 | ||
* of the License (non-upgradable). | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* Copyright (c) 2021 Open Assessment Technologies SA | ||
*/ | ||
|
||
import preloaders from 'taoQtiTest/runner/proxy/cache/preloaders/assets/preloaders'; | ||
import preloaderManagerFactory from 'taoQtiTest/runner/proxy/cache/preloaderManager'; | ||
|
||
/** | ||
* @callback assetPreloaderManagerAction | ||
* @param {string} type - The type of asset to preload | ||
* @param {string} url - the url of the asset to load/unload | ||
* @param {string} [sourceUrl] - the unresolved URL (used to index) | ||
* @param {string} [itemIdentifier] - the id of the item the asset belongs to | ||
*/ | ||
|
||
/** | ||
* @callback assetPreloaderAction | ||
* @param {string} url - the url of the asset to load/unload | ||
* @param {string} [sourceUrl] - the unresolved URL (used to index) | ||
* @param {string} [itemIdentifier] - the id of the item the asset belongs to | ||
*/ | ||
|
||
/** | ||
* @typedef {object} assetPreloaderManager | ||
* @property {string} name - The name of the preloader | ||
* @property {assetPreloaderManagerAction} loaded - Tells whether an asset is loaded or not | ||
* @property {assetPreloaderManagerAction} load - Preload an asset | ||
* @property {assetPreloaderManagerAction} unload - Unload an asset | ||
*/ | ||
|
||
/** | ||
* @typedef {object} assetPreloader | ||
* @property {string} name - The name of the preloader | ||
* @property {assetPreloaderAction} loaded - Tells whether an asset is loaded or not | ||
* @property {assetPreloaderAction} load - Preload an asset | ||
* @property {assetPreloaderAction} unload - Unload an asset | ||
*/ | ||
|
||
/** | ||
* Manages the preloading of assets | ||
* @function assetPreloaderFactory | ||
* @param assetManager - A reference to the assetManager | ||
* @return {assetPreloaderManager} | ||
*/ | ||
const assetPreloaderFactory = preloaderManagerFactory(); | ||
preloaders.forEach(preloader => assetPreloaderFactory.registerProvider(preloader.name, preloader)); | ||
|
||
export default assetPreloaderFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; under version 2 | ||
* of the License (non-upgradable). | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* Copyright (c) 2021 Open Assessment Technologies SA | ||
*/ | ||
|
||
import preloaders from 'taoQtiTest/runner/proxy/cache/preloaders/interactions/preloaders'; | ||
import preloaderManagerFactory from 'taoQtiTest/runner/proxy/cache/preloaderManager'; | ||
|
||
/** | ||
* @callback interactionPreloaderManagerAction | ||
* @param {string} type - The type of asset to preload | ||
* @param {object} interaction - The interaction | ||
* @param {object} itemData - The item data | ||
* @param {string} itemIdentifier - the id of the item the interaction belongs to | ||
*/ | ||
|
||
/** | ||
* @callback interactionPreloaderAction | ||
* @param {object} interaction - The interaction | ||
* @param {object} itemData - The item data | ||
* @param {string} itemIdentifier - the id of the item the interaction belongs to | ||
*/ | ||
|
||
/** | ||
* @typedef {object} interactionPreloaderManager | ||
* @property {string} name - The name of the preloader | ||
* @property {interactionPreloaderManagerAction} loaded - Tells whether an interaction is loaded or not | ||
* @property {interactionPreloaderManagerAction} load - Preload an interaction | ||
* @property {interactionPreloaderManagerAction} unload - Unload an interaction | ||
*/ | ||
|
||
/** | ||
* @typedef {object} interactionPreloader | ||
* @property {string} name - The name of the preloader | ||
* @property {interactionPreloaderAction} loaded - Tells whether an interaction is loaded or not | ||
* @property {interactionPreloaderAction} load - Preload an interaction | ||
* @property {interactionPreloaderAction} unload - Unload an interaction | ||
*/ | ||
|
||
/** | ||
* Manages the preloading of assets | ||
* @function assetPreloaderFactory | ||
* @param assetManager - A reference to the assetManager | ||
* @return {assetPreloaderManager} | ||
*/ | ||
const interactionPreloaderFactory = preloaderManagerFactory(); | ||
preloaders.forEach(preloader => interactionPreloaderFactory.registerProvider(preloader.name, preloader)); | ||
|
||
export default interactionPreloaderFactory; |
Oops, something went wrong.