Forums | Mahara Community
Support
/
Not a valid .matrix file
01 December 2017, 5:42
Hello
I'm having a problem uploading a .matrix file. Keep getting "Not a valid .matrix file". I'm comparing it line by line with other .matrix files that have uploaded OK. It validates in a number of different validators. I can't see anything wrong with it. Does the file have to be ANSI, UTF-8 or Unicode? Does it matter?
Regards
Marion
01 December 2017, 10:40
Hi Marion
If you are getting the error: "This is not a valid .matrix file." it means the file you are trying to upload needs to have suffix '.matrix', eg test.matrix
If you are getting the error: "This is not a valid .matrix file: Unable to parse the JSON content" it means the json content is not correct.
If it is the second error can you paste your matrix content here so I can verify the error?
Cheers
Robert
01 December 2017, 12:10
Thanks Robert, I appreciate that. Here's the code:
{"framework":
{"institution":"all",
"name":"PAP",
"description":"Professional Adventure Project",
"selfassess":false,
"evidencestatuses":
[
{"begun":"Ready for assessment"},
{"incomplete":"Doesn't meet the standard"},
{"partialcomplete":"Partially meets the standard"},
{"completed":"Meets the standard"}
],
"standards":
[
{
"shortname":"1",
"name":"Planning and Development",
"description":"Planning and Development",
"standardid":1
},
{
"shortname":"2",
"name":"Implementation and Project Operation",
"description":"Implementation and Project Operation",
"standardid":2
},
{
"shortname":"3",
"name":"Critical Evaluation, Discussion and Conclusions",
"description":"Critical Evaluation, Discussion and Conclusions",
"standardid":3
}
],
"standardelements":
[
{
"shortname":"1.1",
"name":"1.1 - Introduction",
"description":"Introduction",
"standardid":1,
"elementid": "1.1"
},
{
"shortname":"1.2",
"name":"1.2 - Background",
"description":"Background and justification of the project area",
"standardid":1,
"elementid": "1.2"
},
{
"shortname":"1.3",
"name":"1.3 - Literature Review",
"description":"Review of relevant literature and underpinning concepts/principles",
"standardid":1,
"elementid": "1.3"
},
{
"shortname":"1.4",
"name":"1.4 - Research Method",
"description":"Research method(s) undertaken in project development",
"standardid":1,
"elementid": "1.4"
},
{
"shortname":"1.5",
"name":"1.5 - Discussion",
"description":"Discussion and key findings of research",
"standardid":1,
"elementid": "1.5"
},
{
"shortname":"2.1",
"name":"2.1 - Project Definition",
"description":"Definition of the project – deliverable outcomes, aims, identification of legacy aims, customers and stakeholders",
"standardid":2,
"elementid": "2.1"
},
{
"shortname":"2.2",
"name":"2.2 - Operational Plan",
"description":"Detailed description of operational plan (supporting statistical data and resource lists may be included as appendices)",
"standardid":2,
"elementid": "2.2"
},
{
"shortname":"2.3",
"name":"2.3 - Quality Assessment Methods",
"description":"Methods of assessment of quality and effectiveness of the project",
"standardid":2,
"elementid": "2.3"
},
{
"shortname":"3.1",
"name":"3.1 - Teaching and Learning",
"description":"3.1 Professional Skills and Abilities: Teaching and Learning",
"standardid":3,
"elementid": "3.1"
},
{
"shortname":"3.2",
"name":"3.2 - Evaluation Results",
"description":"Evaluation Results",
"standardid":3,
"elementid": "3.2"
},
{
"shortname":"3.3",
"name":"3.3 - Personal reflections",
"description":"Personal reflections",
"standardid":3,
"elementid": "3.3"
},
{
"shortname":"3.4",
"name":"3.4 - Critical Discussion",
"description":"3.4 Critical discussion of project implementation processes and evaluation outcomes",
"standardid":3,
"elementid": "3.4"
},
{
"shortname":"3.5",
"name":"3.5 - Critical Evaluation",
"description":"Critical evaluation of project legacy aims",
"standardid":3,
"elementid": "3.5"
},
{
"shortname":"3.6",
"name":"3.6 - Conclusions",
"description":"Project conclusions and recommendations",
"standardid":3,
"elementid": "3.6"
}
]
}
}
01 December 2017, 12:20
Hi Marion,
I was able to save you code in a file called 'test.matrix' and upload it fine to my version 17.10 site without any problems
What version of Mahara are you using, please?
Cheers
Robert
01 December 2017, 12:23
Also can you check what version of PHP the site is using?
The function to read the uploaded file is http://php.net/manual/en/function.json-decode.php and only exists in newer versions of PHP
I did my test using PHP 7
02 December 2017, 0:26
Thanks Robert
At least that means I can stop looking for commas! I am still having the same problem, can't upload to either our live or development sites. I have other frameworks in use in both.
We are on version 17.04.1 and I'm told we're running on PHP 5.6 (externally hosted). I have checked that SmartEvidence is enabled everywhere (I have other people using it) and gone through all settings I can think of.
Regards
Marion
04 December 2017, 10:36
Hello
Got that working eventually - version 5. No different from version 1 except that the file was saved in Unicode Normalisation Form C. Oh well ... Thanks for looking at it for me.
Regards
Marion