Skip to content

Commit

Permalink
Merge pull request #75 from clpetersonucf/hotfix/accessibility-and-zi…
Browse files Browse the repository at this point in the history
…parchive-fix

Accessibility metadata & ZipArchive fix
  • Loading branch information
clpetersonucf authored Oct 18, 2023
2 parents b34c42b + dc1c13d commit 0eced14
Show file tree
Hide file tree
Showing 4 changed files with 2,945 additions and 2,144 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"version": "2.3.1",
"dependencies": {
"materia-widget-development-kit": "^2.5.2",
"materia-widget-development-kit": "2.5.2",
"micromarkdown": "^0.3.0"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions src/_exports/playdata_exporters.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
$cur_csv['question_text'] = "";
foreach ($questions as $q)
{
$clean_str = str_replace(["\r","\n", ","], "", $q->questions[0]['text']);
$clean_str = is_string($q->questions[0]['text']) ? str_replace(["\r","\n", ","], "", $q->questions[0]['text']) : "";

if (strlen($clean_str) > 80)
{
Expand Down Expand Up @@ -124,7 +124,7 @@
if (array_search($r['item_id'], $cur_csv['questions']) !== FALSE)
{
$position = array_search($r['item_id'], $cur_csv['questions']);
$logs[5 + $position] = str_replace(["\r","\n", ","], "", $r['text']);
$logs[5 + $position] = is_string($r['text']) ? str_replace(["\r","\n", ","], "", $r['text']) : "";
}
}
}
Expand All @@ -136,7 +136,7 @@
// Return the csv zip.
$tempname = tempnam('/tmp', 'materia_raw_log_csv');
$zip = new \ZipArchive();
$zip->open($tempname);
$zip->open($tempname, \ZipArchive::OVERWRITE);
foreach ($csvs as $key => $csv)
{
$string = $headers . $csv['question_text'] . "\r\n" . implode("\r\n", $csv['rows']);
Expand Down
2 changes: 2 additions & 0 deletions src/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ meta_data:
Build branching scenarios where your student's choices lead them down different paths.
about: >
An advanced flexible scenario-building tool.
accessibility_keyboard: Full
accessibility_reader: Full
Loading

0 comments on commit 0eced14

Please sign in to comment.