mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-49557 mod_scorm: optionally strip quotes.
This commit is contained in:
parent
39eee56fa6
commit
e68cdceee3
@ -251,8 +251,12 @@ function scorm_parse_aicc(&$scorm) {
|
||||
$regexp = scorm_forge_cols_regexp($columns->columns, '(.+),');
|
||||
for ($i = 1; $i < count($rows); $i++) {
|
||||
if (preg_match($regexp, $rows[$i], $matches)) {
|
||||
$elementid = substr(trim($matches[$columns->mastercol + 1]), 1, -1);
|
||||
$prereq = substr(trim($matches[2 - $columns->mastercol]), 1, -1);
|
||||
$elementid = trim($matches[$columns->mastercol + 1]);
|
||||
$elementid = trim(trim($elementid, '"'), "'"); // Remove any quotes.
|
||||
|
||||
$prereq = trim($matches[2 - $columns->mastercol]);
|
||||
$prereq = trim(trim($prereq, '"'), "'"); // Remove any quotes.
|
||||
|
||||
$courses[$courseid]->elements[$elementid]->prerequisites = $prereq;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user