Skip to content

Commit

Permalink
MDL-72588 reportbuilder: interface for managing report audiences.
Browse files Browse the repository at this point in the history
Add new tab to editor, allowing user to select from available audience
types in order to grant access to their reports.

Co-authored-by: David Matamoros <davidmc@moodle.com>
  • Loading branch information
roland04 and dravek committed Oct 29, 2021
1 parent 70085ef commit 144084a
Show file tree
Hide file tree
Showing 32 changed files with 1,100 additions and 22 deletions.
1 change: 1 addition & 0 deletions lang/en/cohort.php
Expand Up @@ -60,6 +60,7 @@
$string['external'] = 'External cohort';
$string['invalidtheme'] = 'Cohort theme does not exist';
$string['idnumber'] = 'Cohort ID';
$string['memberofcohort'] = 'Member of cohort';
$string['memberscount'] = 'Cohort size';
$string['name'] = 'Name';
$string['namecolumnmissing'] = 'There is something wrong with the format of the CSV file. Please check that it includes the correct column names. To add users to a cohort, go to \'Upload users\' in the Site administration.';
Expand Down
11 changes: 11 additions & 0 deletions lang/en/reportbuilder.php
Expand Up @@ -23,6 +23,8 @@
*/

$string['actions'] = 'Actions';
$string['addaudience'] = 'Add audience \'{$a}\'';
$string['addaudiences'] = 'Add an audience to this report';
$string['addcolumn'] = 'Add column \'{$a}\'';
$string['addusers'] = 'Add users manually';
$string['aggregatecolumn'] = 'Aggregate column \'{$a}\'';
Expand All @@ -39,6 +41,11 @@
$string['allsiteusers'] = 'All site users';
$string['allusers'] = 'All users';
$string['apply'] = 'Apply';
$string['audience'] = 'Audience';
$string['audienceadded'] = 'Added audience \'{$a}\'';
$string['audiencedeleted'] = 'Deleted audience \'{$a}\'';
$string['audiencemultiselectpostfix'] = '{$a->elements} plus {$a->morecount} more';
$string['audiencenotsaved'] = 'Audience not saved';
$string['columnadded'] = 'Added column \'{$a}\'';
$string['columnaggregated'] = 'Aggregated column \'{$a}\'';
$string['columndeleted'] = 'Deleted column \'{$a}\'';
Expand All @@ -60,6 +67,8 @@
$string['courseshortnamewithlink'] = 'Course short name with link';
$string['customfieldcolumn'] = '{$a}';
$string['customreports'] = 'Custom reports';
$string['deleteaudience'] = 'Delete audience \'{$a}\'';
$string['deleteaudienceconfirm'] = 'Are you sure you want to delete the audience \'{$a}\'?';
$string['deletecolumn'] = 'Delete column \'{$a}\'';
$string['deletecolumnconfirm'] = 'Are you sure you want to delete the column \'{$a}\'?';
$string['deletecondition'] = 'Delete condition \'{$a}\'';
Expand All @@ -68,6 +77,7 @@
$string['deletefilterconfirm'] = 'Are you sure you want to delete the filter \'{$a}\'?';
$string['deletereport'] = 'Delete report';
$string['deletereportconfirm'] = 'Are you sure you want to delete the report \'{$a}\' and all associated data?';
$string['editaudience'] = 'Edit audience \'{$a}\'';
$string['editdetails'] = 'Edit details';
$string['editor'] = 'Editor';
$string['editreportcontent'] = 'Edit report content';
Expand Down Expand Up @@ -130,6 +140,7 @@
$string['noconditions'] = 'There are no conditions selected';
$string['nofilters'] = 'There are no filters selected';
$string['nosortablecolumns'] = 'There are no sortable columns';
$string['or'] = 'or';
$string['privacy:metadata:audience'] = 'Report audience definitions';
$string['privacy:metadata:audience:classname'] = 'Class used by the audience';
$string['privacy:metadata:audience:usercreated'] = 'The ID of the user who created the audience';
Expand Down
6 changes: 6 additions & 0 deletions lib/db/services.php
Expand Up @@ -2888,6 +2888,12 @@
'type' => 'write',
'ajax' => true,
],
'core_reportbuilder_audiences_delete' => [
'classname' => 'core_reportbuilder\external\audiences\delete',
'description' => 'Delete audience from report',
'type' => 'write',
'ajax' => true,
],
);

$services = array(
Expand Down
2 changes: 2 additions & 0 deletions reportbuilder/amd/build/audience.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions reportbuilder/amd/build/audience.min.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions reportbuilder/amd/build/local/repository/audiences.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion reportbuilder/amd/build/local/selectors.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 144084a

Please sign in to comment.