Skip to content

Commit 2fb30ed

Browse files
authored
Merge pull request #328 from ReproNim/fix/audio
update reproschema context and fix audio export
2 parents 41c1b92 + f331ce1 commit 2fb30ed

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ export default {
474474
// default to false
475475
this.visibility[index] = false;
476476
}
477-
console.log('making request', request, 'cache', this.cache);
477+
// console.log('making request', request, 'cache', this.cache);
478478
const resp = await axios(request);
479479
// this.visibility[index] = resp.data;
480480
this.cache[cacheKey] = resp.data.qualified;

src/components/Section/Section.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export default {
243243
const responseUuid = uuidv4();
244244
// eslint-disable-next-line no-unused-vars
245245
const responseActivity = {
246-
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0-rc2/contexts/generic',
246+
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0/contexts/reproschema',
247247
'@type': 'reproschema:ResponseActivity',
248248
'@id': `uuid:${respActivityUuid}`,
249249
used: [`${itemUrl}`,
@@ -260,7 +260,7 @@ export default {
260260
generated: `uuid:${responseUuid}`,
261261
};
262262
const respData = {
263-
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0-rc2/contexts/generic',
263+
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0/contexts/reproschema',
264264
'@type': 'reproschema:Response',
265265
'@id': `uuid:${responseUuid}`,
266266
wasAttributedTo: {

src/components/Survey/Survey.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,12 @@
247247
},
248248
setResponse(val, index, mp_progress=100) {
249249
const itemUrl = this.context[index]['@id'];
250+
//console.log(val, index, mp_progress, itemUrl);
250251
let exportVal = val;
251252
let usedList = [];
252253
let isAboutUrl = itemUrl;
253254
// eslint-disable-next-line no-prototype-builtins
254-
if (_.isObject(val) && !val.hasOwnProperty('unitCode')) { // to find sub-activities; condition might need to be changed
255+
if (_.isObject(val) && !val.hasOwnProperty('unitCode') && !(val instanceof Blob)) { // to find sub-activities; condition might need to be changed
255256
const sectionItemKey = Object.keys(val)[0];
256257
const sectionItemValue = Object.values(val)[0];
257258
exportVal = sectionItemValue;
@@ -269,7 +270,7 @@
269270
const respActivityUuid = uuidv4();
270271
const responseUuid = uuidv4();
271272
const responseActivity = {
272-
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0-rc2/contexts/generic',
273+
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0/contexts/reproschema',
273274
'@type': 'reproschema:ResponseActivity',
274275
'@id': `uuid:${respActivityUuid}`,
275276
used: usedList,
@@ -284,7 +285,7 @@
284285
generated: `uuid:${responseUuid}`,
285286
};
286287
const respData = {
287-
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0-rc2/contexts/generic',
288+
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0/contexts/reproschema',
288289
'@type': 'reproschema:Response',
289290
'@id': `uuid:${responseUuid}`,
290291
wasAttributedTo: {
@@ -462,7 +463,7 @@
462463
},
463464
formatData(data) {
464465
const currentIndex = parseInt(this.$store.state.activityIndex);
465-
console.log(464, 'data response: ', data.response[currentIndex]);
466+
// console.log(464, 'data response: ', data.response[currentIndex]);
466467
const TOKEN = this.$store.getters.getAuthToken;
467468
const expiryMinutes = this.$store.state.expiryMinutes;
468469
const jszip = new JSZip();

0 commit comments

Comments
 (0)