Skip to content

Commit

Permalink
MDL-53923 mod_assign: Put messages into notifications.
Browse files Browse the repository at this point in the history
The unoconv test page was before just outputting text to
page. Now it is wrapped in a nice notification. One of the
warnings has been improved as well.
  • Loading branch information
abgreeve authored and David Monllao committed May 17, 2016
1 parent 1370887 commit 897444d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lang/en/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@
$string['unicoderequired'] = 'It is required that you store all your data in Unicode format (UTF-8). New installations must be performed into databases that have their default character set as Unicode. If you are upgrading, you should perform the UTF-8 migration process (see the Admin page).';
$string['uninstallplugin'] = 'Uninstall';
$string['unlockaccount'] = 'Unlock account';
$string['unoconvwarning'] = 'The installed version of your unoconv is not supported, the required version to support assignment grading features is 0.7.';
$string['unoconvwarning'] = 'The version of unoconv you have installed is not supported. Moodle\'s assignment grading feature requires version 0.7 or higher.';
$string['unsettheme'] = 'Unset theme';
$string['unsupported'] = 'Unsupported';
$string['unsupporteddbstorageengine'] = 'The database storage engine being used is no longer supported.';
Expand Down
10 changes: 5 additions & 5 deletions mod/assign/feedback/editpdf/lang/en/assignfeedback_editpdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@
$string['test_empty'] = 'The ghostscript path is empty - please enter the correct path';
$string['test_unoconv'] = 'Test unoconv path';
$string['test_unoconvdoesnotexist'] = 'The unoconv path does not point to the unoconv program. Please review your path settings.';
$string['test_unoconvdownload'] = 'Download converted pdf test file.';
$string['test_unoconvdownload'] = 'Download the converted pdf test file.';
$string['test_unoconvisdir'] = 'The unoconv path points to a folder, please include the unoconv program in the path you specify';
$string['test_unoconvnotestfile'] = 'The test DOC is missing';
$string['test_unoconvnotexecutable'] = 'The unoconv points to a file that is not executable';
$string['test_unoconvok'] = 'The unoconv path appears to properly configured.';
$string['test_unoconvversionnotsupported'] = 'The minimum supported version for unoconv is 0.7';
$string['test_unoconvnotestfile'] = 'The test document to be coverted into a PDF is missing';
$string['test_unoconvnotexecutable'] = 'The unoconv path points to a file that is not executable';
$string['test_unoconvok'] = 'The unoconv path appears to be properly configured.';
$string['test_unoconvversionnotsupported'] = 'The version of unoconv you have installed is not supported. Moodle\'s assignment grading feature requires version 0.7 or higher.';
$string['toolbarbutton'] = '{$a->tool} {$a->shortcut}';
$string['tool'] = 'Tool';
$string['viewfeedbackonline'] = 'View annotated PDF...';
Expand Down
7 changes: 3 additions & 4 deletions mod/assign/feedback/editpdf/testunoconv.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,18 @@
$result = file_storage::test_unoconv_path();
switch ($result->status) {
case file_storage::UNOCONVPATH_OK:
$msg = get_string('test_unoconvok', 'assignfeedback_editpdf');
$msg .= html_writer::empty_tag('br');
$msg = $OUTPUT->notification(get_string('test_unoconvok', 'assignfeedback_editpdf'), 'success');
$pdflink = new moodle_url($PAGE->url, array('sendpdf' => 1, 'sesskey' => sesskey()));
$msg .= html_writer::link($pdflink, get_string('test_unoconvdownload', 'assignfeedback_editpdf'));
$msg .= html_writer::empty_tag('br');
break;

case file_storage::UNOCONVPATH_ERROR:
$msg = $result->message;
$msg = $OUTPUT->notification($result->message, 'warning');
break;

default:
$msg = get_string("test_unoconv{$result->status}", 'assignfeedback_editpdf');
$msg = $OUTPUT->notification(get_string("test_unoconv{$result->status}", 'assignfeedback_editpdf'), 'warning');
break;
}
$returl = new moodle_url('/admin/settings.php', array('section' => 'assignfeedback_editpdf'));
Expand Down

0 comments on commit 897444d

Please sign in to comment.