diff --git a/admin/tool/brickfield/classes/accessibility.php b/admin/tool/brickfield/classes/accessibility.php index 4121e2ef1277e..32d85681179e9 100644 --- a/admin/tool/brickfield/classes/accessibility.php +++ b/admin/tool/brickfield/classes/accessibility.php @@ -125,12 +125,7 @@ public static function get_title(local\tool\filter $filter, int $countdata): str if ($filter->courseid != 0) { $thiscourse = get_fast_modinfo($filter->courseid)->get_course(); - $tmp->type = get_string('course'); $tmp->name = $thiscourse->fullname; - } else if ($filter->categoryid != 0) { - $category = $DB->get_record('course_categories', ['id' => $filter->categoryid]); - $tmp->type = get_string('category'); - $tmp->name = $category->name; } else { $langstr = 'title' . $filter->tab . 'all'; } diff --git a/admin/tool/brickfield/lang/en/tool_brickfield.php b/admin/tool/brickfield/lang/en/tool_brickfield.php index 61bdeecc8aafe..8a9d1d3ae668e 100644 --- a/admin/tool/brickfield/lang/en/tool_brickfield.php +++ b/admin/tool/brickfield/lang/en/tool_brickfield.php @@ -28,7 +28,7 @@ $string['pluginname'] = 'Accessibility toolkit'; $string['accessibility'] = 'Accessibility'; $string['accessibilitydisabled'] = 'The Brickfield accessibility toolkit is not enabled on this site. Contact your site administrator to enable.'; -$string['accessibilityreport'] = 'Accessibility Report'; +$string['accessibilityreport'] = 'Accessibility report'; $string['analysistype'] = 'Enable analysis requests'; $string['analysistypedisabled'] = 'Content analysis is disabled'; $string['analysistype_desc'] = 'Prevent content analysis from being requested'; @@ -63,9 +63,9 @@ $string['contactadmin'] = 'Please contact your administrator to complete the registration.'; $string['contextid'] = 'Contextid'; $string['core_course'] = 'Course'; -$string['core_question'] = 'Question Banks'; +$string['core_question'] = 'Question banks'; $string['count'] = 'Count'; -$string['coursecount'] = 'Num of Courses'; +$string['coursecount'] = 'Num of courses'; $string['deletehistoricaldata'] = 'Delete historical checks results'; $string['dependency'] = 'Dependent on'; $string['emptycategory'] = 'No courses found for category {$a}'; @@ -84,15 +84,7 @@ $string['failed'] = 'Failed'; $string['failedcount'] = 'Failed: {$a}'; $string['tools'] = 'Reports'; -$string['formcorrectlysubmitted'] = 'Check Process successfully added'; -$string['formdescription'] = 'This will add a new check process record which will run as a scheduled task'; -$string['formtitle'] = 'Add Check Process'; $string['fullcachedone'] = 'Disable to rerun caching'; -$string['googleapikey'] = 'Google API Key'; -$string['googleapikeydesc'] = 'Allows access to check Google YouTube video captioning data, see - Google Developers Guide'; -$string['grouppercentage'] = 'Percentage passed/not per check group'; -$string['groupratio'] = 'Ratio of area instances passed/not per check group'; $string['hideshow'] = 'Hide/show'; $string['innercontextid'] = 'Inner contextid'; $string['invalidaccessibilitytool'] = 'Invalid accessibility subplugin requested.'; @@ -101,23 +93,8 @@ $string['invalidlinkphrases'] = 'click|click here|here|more|more here|info|info here|information|information here|read more|read more here|further information|further information here|further details|further details here'; $string['module'] = 'Module'; $string['modulename'] = 'Name'; -$string['linkdesc:advanced'] = 'There are many more tools available with a premium subscription. Information here.'; -$string['linkdesc:activityresults'] = 'View your rates of accessibility compliance across Moodle activity types'; -$string['linkdesc:checkdescriptions'] = 'Details of accessibility checks conducted'; -$string['linkdesc:checkresults'] = 'View your rates of accessibility compliance across each accessibility check'; -$string['linkdesc:checktyperesults'] = 'View your rates of accessibility compliance across each HTML content type'; -$string['linkdesc:coursecategories'] = 'View your rates of accessibility compliance across each top level category'; -$string['linkdesc:courses'] = 'View your rates of accessibility compliance across each course'; -$string['linkdesc:coursetags'] = 'View your rates of accessibility compliance across each course tag'; -$string['linkdesc:errors'] = 'Review your accessibility error findings, and find and fix them quickly'; -$string['linkdesc:printable'] = 'Review and download your course\'s accessibility transcript.'; -$string['managetools'] = 'Manage tools'; -$string['lookuppending'] = 'Lookup pending'; $string['noerrorsfound'] = 'No common accessibility errors were found for your search parameters, congratulations!'; $string['norecords'] = 'No relevant records were found for your search parameters.'; -$string['excludedcategories'] = 'Excluded category IDs'; -$string['excludedcategoriesdesc'] = 'Comma separated string of excluded category IDs, -to limit all processing to exclude courses within these categories and sub-categories'; $string['notregistered'] = 'Your accessibility toolkit needs to be registered.'; $string['notvalidated'] = 'Your accessibility toolkit is still being validated.'; $string['numinstances'] = 'Number of instances'; @@ -131,7 +108,6 @@ $string['perpage'] = 'Items to show per page'; $string['privacy:metadata'] = 'The Accessibility checks report plugin does not store any personal data.'; $string['processanalysisrequests'] = 'Process content analysis requests'; -$string['processlinktitle'] = 'Process Link Title'; $string['registernow'] = 'Please register now.'; $string['registrationinfo'] = '

This registration process allows you to use the Brickfield accessibility toolkit freemium version for your registered Moodle site.

@@ -140,34 +116,16 @@ $string['remaining'] = ' ({$a} errors remaining)'; $string['response:0'] = 'This URL doesn\'t point anywhere'; $string['response:404'] = 'This URL page was not found'; -$string['returntomain'] = 'Return to Overview'; $string['schedule:blocknotscheduled'] = '

This course has not yet been scheduled for analysis, to find common accessibility issues.

Please view the Accessibility toolkit help page for further details.

'; $string['schedule:notscheduled'] = '

This course has not yet been scheduled for analysis, to find common accessibility issues.

By clicking on the "Submit for analysis" button, you confirm that you want all your relevant course HTML content, such as course section descriptions, activity descriptions, questions, pages, and more, to be scheduled for analysis.

This analysis will conduct multiple common accessibility checks on your course HTML content, and those results will then display on these Accessibility toolkit report pages.

Please view the Accessibility toolkit help page for further details.

This analysis will be processed in the background, by the Moodle scheduled tasks, so its speed of completion will depend on task timings and task run schedules.'; $string['schedule:requestanalysis'] = 'Submit for analysis'; $string['schedule:scheduled'] = 'This course has been scheduled for analysis.'; $string['schedule:sitenotscheduled'] = 'The global (course independent) content has not yet been scheduled for analysis, to find common accessibility issues.

By clicking on the "Submit for analysis" button, you confirm that you want all your relevant global (course independant) content to be scheduled for analysis.

This analysis will conduct multiple common accessibility checks on this content, and those results will then display on these Accessibility toolkit report pages.

Please view the Accessibility toolkit help page for further details.

This analysis will be processed in the background, by the Moodle scheduled tasks, so its speed of completion will depend on task timings and task run schedules.'; $string['schedule:sitescheduled'] = 'The global (course independent) content has been scheduled for analysis.'; -$string['setting:checktypestr'] = 'Explanation display for checktype chart'; -$string['setting:pertargetstr'] = 'Explanation display for per activity chart'; -$string['tabamount'] = 'Display Amount'; $string['taberrors'] = 'Check Errors'; -$string['taberrortotal'] = 'Display Error Totals'; -$string['tabpassrate'] = 'Display Pass Rate'; -$string['tabpercheck'] = 'Per Check Results'; -$string['tabpercent'] = 'Display Percentage'; -$string['tabpercourse'] = 'Courses breakdown'; -$string['tabpertag'] = 'Course tags breakdown'; -$string['tabpertarget'] = 'Per Activity Results'; -$string['tabpertype'] = 'Checktype Results'; -$string['tabresults'] = 'Overview'; -$string['tabshowerrors'] = 'Show Checks With Errors'; -$string['tabshowall'] = 'Show All Checks'; -$string['tabtags'] = 'Tags'; -$string['tagnotshowing'] = 'If your course tag is not showing here, check with your Moodle administrator to add it to the configured tags for this report'; -$string['tagnotshowingadmin'] = 'Click here to add or remove configured tags'; $string['targetavetitle'] = 'Average errors per activity'; $string['targetpercentage'] = 'Percentage of instances passed/not per activity'; -$string['targetratio'] = 'Activity Pass Ratio'; +$string['targetratio'] = 'Activity pass ratio'; $string['tblcheck'] = 'Check'; $string['tblcheckexample'] = 'Example'; $string['tblcheckfailed'] = 'Checks failed'; @@ -184,17 +142,17 @@ $string['tblupdateto'] = 'Update to'; $string['termsandconditions'] = '

These are the terms and conditions you agree to... blah blah...

'; $string['termsandconditionslink'] = 'terms and conditions'; -$string['titleerrorscount'] = 'Error details: (Showing first {$a} errors)'; -$string['titleactivityresultsall'] = 'Results per activity: All reviewed courses ({$a->count} courses)'; -$string['titleactivityresultspartial'] = 'Results per activity: {$a->type} {$a->name}'; -$string['titleall'] = 'Error details: All reviewed courses ({$a->count} courses)'; -$string['titlechecktyperesultsall'] = 'Results per content type: All reviewed courses ({$a->count} courses)'; -$string['titlechecktyperesultspartial'] = 'Results per content type: {$a->type} {$a->name}'; -$string['titleerrorsall'] = 'Error details: All reviewed courses ({$a->count} courses)'; -$string['titleerrorspartial'] = 'Error details: {$a->type} {$a->name}'; -$string['titlepartial'] = 'Error details: {$a->type} {$a->name}'; -$string['titleprintableall'] = '{$a->type} {$a->name}'; -$string['titleprintablepartial'] = '{$a->type} {$a->name}'; +$string['titleerrorscount'] = 'Error details: (showing first {$a} errors)'; +$string['titleactivityresultsall'] = 'Results per activity: all reviewed courses ({$a->count} courses)'; +$string['titleactivityresultspartial'] = 'Results per activity: course {$a->name}'; +$string['titleall'] = 'Error details: all reviewed courses ({$a->count} courses)'; +$string['titlechecktyperesultsall'] = 'Results per content type: all reviewed courses ({$a->count} courses)'; +$string['titlechecktyperesultspartial'] = 'Results per content type: course {$a->name}'; +$string['titleerrorsall'] = 'Error details: all reviewed courses ({$a->count} courses)'; +$string['titleerrorspartial'] = 'Error details: course {$a->name}'; +$string['titlepartial'] = 'Error details: course {$a->name}'; +$string['titleprintableall'] = 'Course {$a->name}'; +$string['titleprintablepartial'] = 'Course {$a->name}'; $string['toptargets'] = 'Failed activities'; $string['toperrors'] = 'Top errors'; $string['totalactivities'] = 'Total activities'; @@ -206,7 +164,7 @@ $string['messageprovider:warningcheckid'] = 'Warning of invalid checkids'; $string['warningcheckidbody'] = 'There is an issue with a Brickfield check which is active but not listed in the database. Please investigate.'; -$string['warningcheckidsubject'] = 'Brickfield Toolkit CheckID warning'; +$string['warningcheckidsubject'] = 'Brickfield Toolkit checkID warning'; $string['warningscontact'] = 'Email address for receiving warnings'; $string['warningscontact_desc'] = 'An email address to receive any Brickfield Toolkit warnings'; @@ -247,7 +205,7 @@ $string['activate'] = 'Activate'; $string['activated'] = 'The plugin is activated and ready to use.'; $string['activationform'] = 'Brickfield registration'; -$string['activationheader'] = 'Brickfield Activation'; +$string['activationheader'] = 'Brickfield activation'; $string['activationinfo'] = 'In order to use this plugin, you must be registered, or have a valid code for this platform. If you are not already registered, please {$a}register your details.
After registration, you will then have online access to the keys that you must submit in this form.
Registration validation is then triggered by running the Accessibility toolkit cron scheduled tasks.'; $string['automatedsentdaily'] = ''; $string['country'] = 'Country'; @@ -272,11 +230,11 @@ $string['numusers'] = 'Number of users ({$a})'; $string['privacy'] = 'Privacy notice and data processing agreement'; $string['privacy_help'] = 'Access the link to read the entire policy'; -$string['privacydesc'] = 'I agree to the Privacy notice and data processing agreement for someurl.com'; +$string['privacydesc'] = 'I agree to the privacy notice and data processing agreement for someurl.com'; $string['registerplugin'] = 'Register with {$a}'; -$string['registration'] = 'Registration Form'; +$string['registration'] = 'Registration form'; $string['registrationheader'] = 'Register here'; -$string['registrationheaderinfo'] = '

This registration process allows you to use the Brickfield accessibility toolkit freemium version for your registered Moodle site.

This usage is subject to the terms and conditions as stated here and which you agree to, by using this product.

'; +$string['registrationheaderinfo'] = '

This registration process allows you to use the Brickfield accessibility toolkit version for your registered Moodle site.

This usage is subject to the terms and conditions as stated here and which you agree to, by using this product.

'; $string['release'] = 'Moodle release ({$a})'; $string['secretkey'] = 'API key'; $string['secretkey_help'] = 'This code is received by email after registration.'; diff --git a/admin/tool/brickfield/tests/accessibility_test.php b/admin/tool/brickfield/tests/accessibility_test.php index 2d5c1d0977c30..21cb64d8f5e09 100644 --- a/admin/tool/brickfield/tests/accessibility_test.php +++ b/admin/tool/brickfield/tests/accessibility_test.php @@ -42,22 +42,14 @@ public function test_get_title() { // Testing the else statement. $output = $object->get_title($filter, 0); - $this->assertEquals($output, 'Error details: All reviewed courses (0 courses)'); + $this->assertEquals($output, 'Error details: all reviewed courses (0 courses)'); $output = $object->get_title($filter, 5); - $this->assertEquals($output, 'Error details: All reviewed courses (5 courses)'); + $this->assertEquals($output, 'Error details: all reviewed courses (5 courses)'); // Testing the if statement. $filter->courseid = 1; $output = $object->get_title($filter, 0); - $this->assertEquals($output, 'Error details: Course PHPUnit test site'); - - // Testing the else if statement. - $filter->categoryid = 1; - $filter->courseid = 0; - $output = $object->get_title($filter, 0); - $this->assertEquals($output, 'Error details: Category Miscellaneous'); - $output = $object->get_title($filter, 2); - $this->assertEquals($output, 'Error details: Category Miscellaneous'); + $this->assertEquals($output, 'Error details: course PHPUnit test site'); } /** diff --git a/admin/tool/brickfield/tests/behat/accessresults.feature b/admin/tool/brickfield/tests/behat/accessresults.feature index 29bd478e21fcc..0036be6a50c16 100644 --- a/admin/tool/brickfield/tests/behat/accessresults.feature +++ b/admin/tool/brickfield/tests/behat/accessresults.feature @@ -29,19 +29,19 @@ Feature: Brickfield activityresults And I run the scheduled task "\tool_brickfield\task\bulk_process_courses" And I run the scheduled task "\tool_brickfield\task\bulk_process_caches" And I navigate to "Accessibility toolkit" in current page administration - And I should see "Error details: Course Course 1" + And I should see "Error details: course Course 1" And I should see "Overall page content length" And I should see "\"Bold\" (b) elements should not be used" And I should see "Link text should be descriptive" And I follow "Activity breakdown" - Then I should see "Results per activity: Course Course 1" + Then I should see "Results per activity: course Course 1" And I navigate to "Plugins > Admin tools > Accessibility > Brickfield registration" in site administration And I set the field "id_key" to "123456789012345678901234567890ab" And I set the field "id_hash" to "ab123456789012345678901234567890" And I press "Activate" And I navigate to "Plugins > Admin tools > Accessibility > Reports" in site administration - And I should see "Error details: All reviewed courses (2 courses)" + And I should see "Error details: all reviewed courses (2 courses)" And I follow "Activity breakdown" - Then I should see "Results per activity: All reviewed courses (2 courses)" + Then I should see "Results per activity: all reviewed courses (2 courses)" And I follow "Content types" - Then I should see "Results per content type: All reviewed courses (2 courses)" + Then I should see "Results per content type: all reviewed courses (2 courses)"