Skip to content

Commit

Permalink
Merge pull request #328 from ReproNim/fix/audio
Browse files Browse the repository at this point in the history
update reproschema context and fix audio export
  • Loading branch information
satra authored Jul 10, 2024
2 parents 41c1b92 + f331ce1 commit 2fb30ed
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ export default {
// default to false
this.visibility[index] = false;
}
console.log('making request', request, 'cache', this.cache);
// console.log('making request', request, 'cache', this.cache);
const resp = await axios(request);
// this.visibility[index] = resp.data;
this.cache[cacheKey] = resp.data.qualified;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Section/Section.vue
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export default {
const responseUuid = uuidv4();
// eslint-disable-next-line no-unused-vars
const responseActivity = {
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0-rc2/contexts/generic',
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0/contexts/reproschema',
'@type': 'reproschema:ResponseActivity',
'@id': `uuid:${respActivityUuid}`,
used: [`${itemUrl}`,
Expand All @@ -260,7 +260,7 @@ export default {
generated: `uuid:${responseUuid}`,
};
const respData = {
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0-rc2/contexts/generic',
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0/contexts/reproschema',
'@type': 'reproschema:Response',
'@id': `uuid:${responseUuid}`,
wasAttributedTo: {
Expand Down
9 changes: 5 additions & 4 deletions src/components/Survey/Survey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,12 @@
},
setResponse(val, index, mp_progress=100) {
const itemUrl = this.context[index]['@id'];
//console.log(val, index, mp_progress, itemUrl);
let exportVal = val;
let usedList = [];
let isAboutUrl = itemUrl;
// eslint-disable-next-line no-prototype-builtins
if (_.isObject(val) && !val.hasOwnProperty('unitCode')) { // to find sub-activities; condition might need to be changed
if (_.isObject(val) && !val.hasOwnProperty('unitCode') && !(val instanceof Blob)) { // to find sub-activities; condition might need to be changed
const sectionItemKey = Object.keys(val)[0];
const sectionItemValue = Object.values(val)[0];
exportVal = sectionItemValue;
Expand All @@ -269,7 +270,7 @@
const respActivityUuid = uuidv4();
const responseUuid = uuidv4();
const responseActivity = {
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0-rc2/contexts/generic',
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0/contexts/reproschema',
'@type': 'reproschema:ResponseActivity',
'@id': `uuid:${respActivityUuid}`,
used: usedList,
Expand All @@ -284,7 +285,7 @@
generated: `uuid:${responseUuid}`,
};
const respData = {
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0-rc2/contexts/generic',
'@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0/contexts/reproschema',
'@type': 'reproschema:Response',
'@id': `uuid:${responseUuid}`,
wasAttributedTo: {
Expand Down Expand Up @@ -462,7 +463,7 @@
},
formatData(data) {
const currentIndex = parseInt(this.$store.state.activityIndex);
console.log(464, 'data response: ', data.response[currentIndex]);
// console.log(464, 'data response: ', data.response[currentIndex]);
const TOKEN = this.$store.getters.getAuthToken;
const expiryMinutes = this.$store.state.expiryMinutes;
const jszip = new JSZip();
Expand Down

0 comments on commit 2fb30ed

Please sign in to comment.