Commit 35be9a16 authored by Daniel Caillibaud's avatar Daniel Caillibaud

on repasse resultatFormatters en commonJs

parent 59d0975e
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
module.exports=function(t){var e={};function n(o){if(e[o]){return e[o].exports}var r=e[o]={i:o,l:false,exports:{}};t[o].call(r.exports,r,r.exports,n);r.l=true;return r.exports}n.m=t;n.c=e;n.d=function(t,e,o){if(!n.o(t,e)){Object.defineProperty(t,e,{enumerable:true,get:o})}};n.r=function(t){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})};n.t=function(t,e){if(e&1)t=n(t);if(e&8)return t;if(e&4&&typeof t==="object"&&t&&t.__esModule)return t;var o=Object.create(null);n.r(o);Object.defineProperty(o,"default",{enumerable:true,value:t});if(e&2&&typeof t!="string")for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o};n.n=function(t){var e=t&&t.__esModule?function e(){return t["default"]}:function e(){return t};n.d(e,"a",e);return e};n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};n.p="";return n(n.s=38)}({38:function(t,e,n){t.exports=n(39)},39:function(t,e,n){"use strict";function o(t){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){o=function t(e){return typeof e}}else{o=function t(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return o(t)}function r(t){if(!t||o(t)!=="object")t={};this.oid=t.oid||undefined;this.nom=typeof t.nom==="string"?t.nom.trim():"";this.description=typeof t.description==="string"?t.description:"";this.ouvert=!!t.ouvert;this.public=!!t.public;this.gestionnaires=t.gestionnaires||[];if(t.dateCreation){if(typeof t.dateCreation==="string")this.dateCreation=new Date(t.dateCreation);else if(t.dateCreation instanceof Date)this.dateCreation=t.dateCreation}}t.exports=r}});
module.exports=function(t){var e={};function n(o){if(e[o]){return e[o].exports}var r=e[o]={i:o,l:false,exports:{}};t[o].call(r.exports,r,r.exports,n);r.l=true;return r.exports}n.m=t;n.c=e;n.d=function(t,e,o){if(!n.o(t,e)){Object.defineProperty(t,e,{enumerable:true,get:o})}};n.r=function(t){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})};n.t=function(t,e){if(e&1)t=n(t);if(e&8)return t;if(e&4&&typeof t==="object"&&t&&t.__esModule)return t;var o=Object.create(null);n.r(o);Object.defineProperty(o,"default",{enumerable:true,value:t});if(e&2&&typeof t!="string")for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o};n.n=function(t){var e=t&&t.__esModule?function e(){return t["default"]}:function e(){return t};n.d(e,"a",e);return e};n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};n.p="";return n(n.s=44)}({44:function(t,e,n){t.exports=n(45)},45:function(t,e,n){"use strict";function o(t){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){o=function t(e){return typeof e}}else{o=function t(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return o(t)}function r(t){if(!t||o(t)!=="object")t={};this.oid=t.oid||undefined;this.nom=typeof t.nom==="string"?t.nom.trim():"";this.description=typeof t.description==="string"?t.description:"";this.ouvert=!!t.ouvert;this.public=!!t.public;this.gestionnaires=t.gestionnaires||[];if(t.dateCreation){if(typeof t.dateCreation==="string")this.dateCreation=new Date(t.dateCreation);else if(t.dateCreation instanceof Date)this.dateCreation=t.dateCreation}}t.exports=r}});
//# sourceMappingURL=Groupe.js.map
\ No newline at end of file
This diff is collapsed.
module.exports=function(e){var t={};function r(i){if(t[i]){return t[i].exports}var n=t[i]={i:i,l:false,exports:{}};e[i].call(n.exports,n,n.exports,r);n.l=true;return n.exports}r.m=e;r.c=t;r.d=function(e,t,i){if(!r.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:i})}};r.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};r.t=function(e,t){if(t&1)e=r(e);if(t&8)return e;if(t&4&&typeof e==="object"&&e&&e.__esModule)return e;var i=Object.create(null);r.r(i);Object.defineProperty(i,"default",{enumerable:true,value:e});if(t&2&&typeof e!="string")for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i};r.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};r.d(t,"a",t);return t};r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};r.p="";return r(r.s=40)}({14:function(e,t,r){"use strict";function i(e){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){i=function e(t){return typeof t}}else{i=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return i(e)}var n=function e(t){return typeof t==="string"?t:""};var o=function e(t){return Math.floor(Number(t))||0};function s(e){if(i(e)!=="object")e={};if(e.aliasOf){this.aliasOf=e.aliasOf;if(e.rid){this.aliasRid=e.rid}}else if(e.rid){this.aliasOf=e.rid}this.titre=n(e.titre);this.resume=n(e.resume);this.description=n(e.description);this.commentaires=n(e.commentaires);this.type=n(e.type);this.categories=Array.isArray(e.categories)?e.categories:[];this.public=true;if(e.hasOwnProperty("public")&&!e.public){this.public=false}else if(e.restriction){this.public=false}else if(e.hasOwnProperty("publie")&&!e.publie){this.public=false}if(!this.public){if(e.cle){this.cle=e.cle}if(e.hasOwnProperty("partage")){this.partage=e.partage}if(e.groupes&&e.groupes.length)this.partage=true;else if(e.groupesAuteurs&&e.groupesAuteurs.length)this.partage=true}this.inc=o(e.inc);if(this.type==="arbre"&&Array.isArray(e.enfants)){this.enfants=e.enfants}else if(this.type==="sequenceModele"&&e.parametres){this.parametres=Object.assign({},e.parametres)}}s.prototype.toString=function(){return"".concat(this.titre," (").concat(this.aliasOf,")")};e.exports=s},40:function(e,t,r){e.exports=r(14)}});
module.exports=function(e){var t={};function r(i){if(t[i]){return t[i].exports}var n=t[i]={i:i,l:false,exports:{}};e[i].call(n.exports,n,n.exports,r);n.l=true;return n.exports}r.m=e;r.c=t;r.d=function(e,t,i){if(!r.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:i})}};r.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};r.t=function(e,t){if(t&1)e=r(e);if(t&8)return e;if(t&4&&typeof e==="object"&&e&&e.__esModule)return e;var i=Object.create(null);r.r(i);Object.defineProperty(i,"default",{enumerable:true,value:e});if(t&2&&typeof e!="string")for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i};r.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};r.d(t,"a",t);return t};r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};r.p="";return r(r.s=46)}({14:function(e,t,r){"use strict";function i(e){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){i=function e(t){return typeof t}}else{i=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return i(e)}var n=function e(t){return typeof t==="string"?t:""};var o=function e(t){return Math.floor(Number(t))||0};function s(e){if(i(e)!=="object")e={};if(e.aliasOf){this.aliasOf=e.aliasOf;if(e.rid){this.aliasRid=e.rid}}else if(e.rid){this.aliasOf=e.rid}this.titre=n(e.titre);this.resume=n(e.resume);this.description=n(e.description);this.commentaires=n(e.commentaires);this.type=n(e.type);this.categories=Array.isArray(e.categories)?e.categories:[];this.public=true;if(e.hasOwnProperty("public")&&!e.public){this.public=false}else if(e.restriction){this.public=false}else if(e.hasOwnProperty("publie")&&!e.publie){this.public=false}if(!this.public){if(e.cle){this.cle=e.cle}if(e.hasOwnProperty("partage")){this.partage=e.partage}if(e.groupes&&e.groupes.length)this.partage=true;else if(e.groupesAuteurs&&e.groupesAuteurs.length)this.partage=true}this.inc=o(e.inc);if(this.type==="arbre"&&Array.isArray(e.enfants)){this.enfants=e.enfants}else if(this.type==="sequenceModele"&&e.parametres){this.parametres=Object.assign({},e.parametres)}}s.prototype.toString=function(){return"".concat(this.titre," (").concat(this.aliasOf,")")};e.exports=s},46:function(e,t,r){e.exports=r(14)}});
//# sourceMappingURL=Ref.js.map
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
module.exports=function(e){var t={};function r(o){if(t[o]){return t[o].exports}var n=t[o]={i:o,l:false,exports:{}};e[o].call(n.exports,n,n.exports,r);n.l=true;return n.exports}r.m=e;r.c=t;r.d=function(e,t,o){if(!r.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:o})}};r.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};r.t=function(e,t){if(t&1)e=r(e);if(t&8)return e;if(t&4&&typeof e==="object"&&e&&e.__esModule)return e;var o=Object.create(null);r.r(o);Object.defineProperty(o,"default",{enumerable:true,value:e});if(t&2&&typeof e!="string")for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o};r.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};r.d(t,"a",t);return t};r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};r.p="";return r(r.s=42)}({42:function(e,t,r){e.exports=r(43)},43:function(e,t,r){"use strict";function o(e){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){o=function e(t){return typeof t}}else{o=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return o(e)}function n(e){var t=this;if(!e)e={};if(o(e)!=="object")throw Error("Paramètre invalide pour un résultat");this.rid=e.rid;this.type=e.type;this.date=e.date||new Date;this.duree=e.duree||null;this.fin=e.fin;if(e.hasOwnProperty("score")){this.score=Number(e.score);if(Number.isNaN(this.score))throw new TypeError("score invalide (pas un nombre)");if(this.score<0)throw new TypeError("score invalide (négatif)");if(this.score>1)throw new TypeError("score invalide (> 1)")}else{this.score=undefined}this.reponse=e.reponse||"";["contenu","oid","original","$resetDelay"].forEach(function(r){if(e.hasOwnProperty(r))t[r]=e[r]})}n.prototype.toString=function(){return typeof this.reponse==="string"?this.reponse:this.reponse?this.reponse.toString():""};e.exports=n}});
module.exports=function(e){var t={};function r(o){if(t[o]){return t[o].exports}var n=t[o]={i:o,l:false,exports:{}};e[o].call(n.exports,n,n.exports,r);n.l=true;return n.exports}r.m=e;r.c=t;r.d=function(e,t,o){if(!r.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:o})}};r.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};r.t=function(e,t){if(t&1)e=r(e);if(t&8)return e;if(t&4&&typeof e==="object"&&e&&e.__esModule)return e;var o=Object.create(null);r.r(o);Object.defineProperty(o,"default",{enumerable:true,value:e});if(t&2&&typeof e!="string")for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o};r.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};r.d(t,"a",t);return t};r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};r.p="";return r(r.s=48)}({48:function(e,t,r){e.exports=r(49)},49:function(e,t,r){"use strict";function o(e){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){o=function e(t){return typeof t}}else{o=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return o(e)}function n(e){var t=this;if(!e)e={};if(o(e)!=="object")throw Error("Paramètre invalide pour un résultat");this.rid=e.rid;this.type=e.type;this.date=e.date||new Date;this.duree=e.duree||null;this.fin=e.fin;if(e.hasOwnProperty("score")){this.score=Number(e.score);if(Number.isNaN(this.score))throw new TypeError("score invalide (pas un nombre)");if(this.score<0)throw new TypeError("score invalide (négatif)");if(this.score>1)throw new TypeError("score invalide (> 1)")}else{this.score=undefined}this.reponse=e.reponse||"";["contenu","oid","original","$resetDelay"].forEach(function(r){if(e.hasOwnProperty(r))t[r]=e[r]})}n.prototype.toString=function(){return typeof this.reponse==="string"?this.reponse:this.reponse?this.reponse.toString():""};e.exports=n}});
//# sourceMappingURL=Resultat.js.map
\ No newline at end of file
This diff is collapsed.
module.exports=function(e){var t={};function n(r){if(t[r]){return t[r].exports}var i=t[r]={i:r,l:false,exports:{}};e[r].call(i.exports,i,i.exports,n);i.l=true;return i.exports}n.m=e;n.c=t;n.d=function(e,t,r){if(!n.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:r})}};n.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};n.t=function(e,t){if(t&1)e=n(e);if(t&8)return e;if(t&4&&typeof e==="object"&&e&&e.__esModule)return e;var r=Object.create(null);n.r(r);Object.defineProperty(r,"default",{enumerable:true,value:e});if(t&2&&typeof e!="string")for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r};n.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};n.d(t,"a",t);return t};n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};n.p="";return n(n.s=44)}({44:function(e,t,n){e.exports=n(45)},45:function(e,t,n){"use strict";function r(e){this.nom=e.nom||"";this.sousSequences=e.sousSequences||[];this.prioritaire=Boolean(e.prioritaire);this.active=e.hasOwnProperty("active")?Boolean(e.active):true;this.type=e.type||0;if([0,1,2].indexOf(this.type)===-1)throw Error("Type ".concat(e.type," invalide"));this.description=e.description||"";this.message=e.message||"";this.fromTs=e.fromTs;this.toTs=e.toTs;this.nonZapping=e.nonZapping||10;this.maximumVisionnage=e.maximumVisionnage;this.minimumReussite=e.minimumReussite}e.exports=r}});
module.exports=function(e){var t={};function n(r){if(t[r]){return t[r].exports}var i=t[r]={i:r,l:false,exports:{}};e[r].call(i.exports,i,i.exports,n);i.l=true;return i.exports}n.m=e;n.c=t;n.d=function(e,t,r){if(!n.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:r})}};n.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};n.t=function(e,t){if(t&1)e=n(e);if(t&8)return e;if(t&4&&typeof e==="object"&&e&&e.__esModule)return e;var r=Object.create(null);n.r(r);Object.defineProperty(r,"default",{enumerable:true,value:e});if(t&2&&typeof e!="string")for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r};n.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};n.d(t,"a",t);return t};n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};n.p="";return n(n.s=50)}({50:function(e,t,n){e.exports=n(51)},51:function(e,t,n){"use strict";function r(e){this.nom=e.nom||"";this.sousSequences=e.sousSequences||[];this.prioritaire=Boolean(e.prioritaire);this.active=e.hasOwnProperty("active")?Boolean(e.active):true;this.type=e.type||0;if([0,1,2].indexOf(this.type)===-1)throw Error("Type ".concat(e.type," invalide"));this.description=e.description||"";this.message=e.message||"";this.fromTs=e.fromTs;this.toTs=e.toTs;this.nonZapping=e.nonZapping||10;this.maximumVisionnage=e.maximumVisionnage;this.minimumReussite=e.minimumReussite}e.exports=r}});
//# sourceMappingURL=Sequence.js.map
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
module.exports=function(e){var t={};function n(r){if(t[r]){return t[r].exports}var i=t[r]={i:r,l:false,exports:{}};e[r].call(i.exports,i,i.exports,n);i.l=true;return i.exports}n.m=e;n.c=t;n.d=function(e,t,r){if(!n.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:r})}};n.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};n.t=function(e,t){if(t&1)e=n(e);if(t&8)return e;if(t&4&&typeof e==="object"&&e&&e.__esModule)return e;var r=Object.create(null);n.r(r);Object.defineProperty(r,"default",{enumerable:true,value:e});if(t&2&&typeof e!="string")for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r};n.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};n.d(t,"a",t);return t};n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};n.p="";return n(n.s=50)}({50:function(e,t,n){e.exports=n(51)},51:function(e,t,n){"use strict";function r(e){this.nom=e.nom||"";this.serie=e.serie;this.eleves=e.eleves||[];this.groupes=e.groupes;this.nonZapping=e.nonZapping||10;this.maximumVisionnage=e.maximumVisionnage;this.minimumReussite=e.minimumReussite}e.exports=r}});
module.exports=function(e){var t={};function n(r){if(t[r]){return t[r].exports}var i=t[r]={i:r,l:false,exports:{}};e[r].call(i.exports,i,i.exports,n);i.l=true;return i.exports}n.m=e;n.c=t;n.d=function(e,t,r){if(!n.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:r})}};n.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};n.t=function(e,t){if(t&1)e=n(e);if(t&8)return e;if(t&4&&typeof e==="object"&&e&&e.__esModule)return e;var r=Object.create(null);n.r(r);Object.defineProperty(r,"default",{enumerable:true,value:e});if(t&2&&typeof e!="string")for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r};n.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};n.d(t,"a",t);return t};n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};n.p="";return n(n.s=56)}({56:function(e,t,n){e.exports=n(57)},57:function(e,t,n){"use strict";function r(e){this.nom=e.nom||"";this.serie=e.serie;this.eleves=e.eleves||[];this.groupes=e.groupes;this.nonZapping=e.nonZapping||10;this.maximumVisionnage=e.maximumVisionnage;this.minimumReussite=e.minimumReussite}e.exports=r}});
//# sourceMappingURL=SousSequence.js.map
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -34,7 +34,7 @@
* @type TypeFormatters
* @memberOf resultatFormatters
*/
export const am = {
const am = {
/**
* Retourne le score à afficher sur la page html des bilans (ici toujours vu)
* @param {Resultat} resultat
......@@ -64,3 +64,5 @@ export const am = {
}
}
am.getTxtReponse = am.getHtmlReponse
module.exports = am
......@@ -29,7 +29,7 @@
* pour une explication en français)
*/
import {getBaseUrlFromResultat} from './helper'
const {getBaseUrlFromResultat} = require('./helper')
/**
* Récupère des résultats incohérents
......@@ -54,7 +54,7 @@ const checkEmResultat = (resultat) => {
* @type TypeFormatters
* @memberOf resultatFormatters
*/
export const em = {
const em = {
/**
* Retourne le score à afficher sur la page html des bilans (pas forcément un nombre)
* @param {Resultat} resultat
......@@ -111,3 +111,5 @@ export const em = {
* Retourne le score sous sa forme txt
*/
em.getTxtReponse = em.getHtmlScore
module.exports = em
......@@ -29,9 +29,9 @@
* pour une explication en français)
*/
import {getBaseIdFromRid, getBaseUrl} from '../sesatheques'
const {getBaseIdFromRid, getBaseUrl} = require('../sesatheques')
export function getBaseUrlFromResultat (resultat) {
function getBaseUrlFromResultat (resultat) {
try {
const baseId = getBaseIdFromRid(resultat.ressource.rid)
return getBaseUrl(baseId)
......@@ -40,3 +40,7 @@ export function getBaseUrlFromResultat (resultat) {
return '/'
}
}
module.exports = {
getBaseUrlFromResultat
}
......@@ -55,8 +55,10 @@
* @property {resultatFormatter} getTxtReponse
*/
// on rééexporte nos formatters
export {am} from './am'
export {em} from './em'
export {j3p} from './j3p'
export {mathgraph} from './mathgraph'
// on rééexporte tous nos formatters, en commonjs car un contrôleun node de sesalab les utilise
module.exports = {
am: require('./am'),
em: require('./em'),
j3p: require('./j3p'),
mathgraph: require('./mathgraph')
}
......@@ -29,14 +29,14 @@
* pour une explication en français)
*/
import {getBaseUrlFromResultat} from './helper'
const {getBaseUrlFromResultat} = require('./helper')
/**
* Exo j3p (graphe d'exercices en js), avec getHtmlFullReponse dispo
* @type TypeFormatters
* @memberOf resultatFormatters
*/
export const j3p = {
module.exports = {
/**
* Retourne le score à afficher sur la page html des bilans (pas forcément un nombre)
* @param {Resultat} resultat
......
......@@ -29,8 +29,8 @@
* pour une explication en français)
*/
import {addCss} from 'sesajstools/dom'
import {stringify} from 'sesajstools'
const {addCss} = require('sesajstools/dom')
const {stringify} = require('sesajstools')
/**
* Retourne le score à afficher sur la page html des bilans (pas forcément un nombre)
......@@ -150,7 +150,7 @@ function getHtmlFullReponse (resultat) {
* @type TypeFormatters
* @memberOf resultatFormatters
*/
export const mathgraph = {
module.exports = {
getHtmlScore,
/**
......
......@@ -55,7 +55,7 @@ const conf = {
path: path.resolve(__dirname, 'dist'),
// [name] est remplacé par le nom de la propriété de entry
filename: '[name].js',
// https://webpack.github.io/docs/configuration.html#output-librarytarget
// https://webpack.js.org/configuration/output/#output-librarytarget
libraryTarget: 'commonjs2'
},
devtool: 'source-map', // même en prod
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment