Commit f8b2a68a authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon
Browse files

Bug 1823864: JSON editor- uploading matrix error string

behatnotneeded

Change-Id: I33163939fb71a5484b1d71f6ff00ba2d1506b0bb
parent 89a69286
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ $content = json_decode($matrix);

if (is_null($content)) {
    $ok['error'] = true;
    $ok['message'] = get_string('invalidjson', 'module.framework');
    $ok['message'] = get_string('invalidjsonineditor', 'module.framework');
}
else {
    $content->evidencestatuses = array();
+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ else if ($upload) {
        'standardiddesc1' => 'module.framework',
        'elementid' => 'module.framework',
        'elementiddesc' => 'module.framework',
        'invalidjson' => 'module.framework',
        'invalidjsonineditor' => 'module.framework',
        'validjson' => 'module.framework',
        'moveright' => 'module.framework',
        'moveleft' => 'module.framework',
+1 −1
Original line number Diff line number Diff line
@@ -553,7 +553,7 @@ function refresh_editor() {
        var errors = editor.validate();
        // Not valid
        if (errors.length) {
            $('#messages').empty().append($('<div>', {'class':'alert alert-danger', 'text':get_string('invalidjson', 'module.framework')}));
            $('#messages').empty().append($('<div>', {'class':'alert alert-danger', 'text':get_string('invalidjsonineditor', 'module.framework')}));
        }
        // Valid
        else {
+2 −2
Original line number Diff line number Diff line
@@ -110,8 +110,8 @@ $string['standardelementdefault'] = 'Description of the standard element';
$string['standardiddesc1'] = 'This needs to match the ID of the standard category under which you are creating this standard element.';
$string['elementid'] = 'Element ID';
$string['elementiddesc'] = 'This is the ID for this standard element. This can be a number or a short word. A sequence of numbers is easiest to indicate hierarchy.';
$string['invalidjson'] = 'The current form has invalid json. Please scroll down the page to see the specific error.';//a bit useless
$string['validjson'] = 'The current form contents are valid and ok to submit';//needed for reassurance or better without?
$string['invalidjsonineditor'] = 'The current form has invalid json. Please scroll down the page to see the specific error.';
$string['validjson'] = 'The current form contents are valid and ok to submit';
$string['moveright'] = 'Move right';
$string['moveleft'] = 'Move left';
$string['deletelast'] = 'Delete last';