Skip to content

Commit

Permalink
MDL-70795 reportbuilder: beginnings of the report editor.
Browse files Browse the repository at this point in the history
Implement UI elements for editing columns of a report, taking their
definitions from the selected datasource.

Co-authored-By: David Matamoros <davidmc@moodle.com>
Co-authored-By: Mikel Martín <mikel@moodle.com>
  • Loading branch information
3 people committed Oct 19, 2021
1 parent 22d896e commit 8ca9e04
Show file tree
Hide file tree
Showing 63 changed files with 3,282 additions and 145 deletions.
12 changes: 12 additions & 0 deletions lang/en/reportbuilder.php
Expand Up @@ -23,16 +23,22 @@
*/

$string['actions'] = 'Actions';
$string['addcolumn'] = 'Add column \'{$a}\'';
$string['apply'] = 'Apply';
$string['coursefullnamewithlink'] = 'Course full name with link';
$string['courseidnumberewithlink'] = 'Course ID number with link';
$string['courseshortnamewithlink'] = 'Course short name with link';
$string['customfieldcolumn'] = '{$a}';
$string['deletereport'] = 'Delete report';
$string['deletereportconfirm'] = 'Are you sure you want to delete the report \'{$a}\' and all associated data?';
$string['editdetails'] = 'Edit details';
$string['editreportcontent'] = 'Edit report content';
$string['editreportdetails'] = 'Edit report details';
$string['editreportname'] = 'Edit report name';
$string['columnmoved'] = 'Moved column \'{$a}\'';
$string['customreports'] = 'Custom reports';
$string['deletecolumn'] = 'Delete column \'{$a}\'';
$string['deletecolumnconfirm'] = 'Are you sure you want to delete the column \'{$a}\'?';
$string['entitycourse'] = 'Course';
$string['entityuser'] = 'User';
$string['errorreportaccess'] = 'You can not view this report';
Expand Down Expand Up @@ -73,6 +79,7 @@
$string['filterstartswith'] = 'Starts with';
$string['includedefaultsetup'] = 'Include default setup';
$string['includedefaultsetup_help'] = 'Populate report with default layout as defined by the selected source. These include pre-defined columns, filters and conditions.';
$string['movecolumn'] = 'Move column \'{$a}\'';
$string['newreport'] = 'New report';
$string['privacy:metadata:column'] = 'Report column definitions';
$string['privacy:metadata:column:uniqueidentifier'] = 'Unique identifier of the column';
Expand All @@ -87,15 +94,20 @@
$string['privacy:metadata:report:name'] = 'The name of the report';
$string['privacy:metadata:report:usercreated'] = 'The ID of the user who created the report';
$string['privacy:metadata:report:usermodified'] = 'The ID of the user who last modified the report';
$string['renamecolumn'] = 'Rename column \'{$a}\'';
$string['reportbuilder'] = 'Report builder';
$string['reportcreated'] = 'Report created';
$string['reportdeleted'] = 'Report deleted';
$string['reportsettingstoggle'] = 'Show/hide settings sidebar';
$string['reportsource'] = 'Report source';
$string['reportsource_help'] = 'The report source defines where the data for the report will come from';
$string['reportupdated'] = 'Report updated';
$string['resetall'] = 'Reset all';
$string['selectareportsource'] = 'Select a report source';
$string['selectcourses'] = 'Select courses';
$string['showhide'] = 'Show/hide \'{$a}\'';
$string['switchedit'] = 'Switch to edit mode';
$string['switchpreview'] = 'Switch to preview mode';
$string['timeadded'] = 'Time added';
$string['timecreated'] = 'Time created';
$string['timemodified'] = 'Time modified';
Expand Down
78 changes: 78 additions & 0 deletions lib/db/services.php
Expand Up @@ -2804,6 +2804,84 @@
'type' => 'write',
'ajax' => true,
],
'core_reportbuilder_reports_get' => [
'classname' => 'core_reportbuilder\external\reports\get',
'description' => 'Get custom report',
'type' => 'read',
'ajax' => true,
],
'core_reportbuilder_columns_add' => [
'classname' => 'core_reportbuilder\external\columns\add',
'description' => 'Add column to report',
'type' => 'write',
'ajax' => true,
],
'core_reportbuilder_columns_delete' => [
'classname' => 'core_reportbuilder\external\columns\delete',
'description' => 'Delete column from report',
'type' => 'write',
'ajax' => true,
],
'core_reportbuilder_columns_reorder' => [
'classname' => 'core_reportbuilder\external\columns\reorder',
'description' => 'Re-order column within report',
'type' => 'write',
'ajax' => true,
],
'core_reportbuilder_columns_sort_reorder' => [
'classname' => 'core_reportbuilder\external\columns\sort\reorder',
'description' => 'Re-order column sorting within report',
'type' => 'write',
'ajax' => true,
],
'core_reportbuilder_columns_sort_toggle' => [
'classname' => 'core_reportbuilder\external\columns\sort\toggle',
'description' => 'Toggle sorting of column within report',
'type' => 'write',
'ajax' => true,
],
'core_reportbuilder_conditions_add' => [
'classname' => 'core_reportbuilder\external\conditions\add',
'description' => 'Add condition to report',
'type' => 'write',
'ajax' => true,
],
'core_reportbuilder_conditions_delete' => [
'classname' => 'core_reportbuilder\external\conditions\delete',
'description' => 'Delete condition from report',
'type' => 'write',
'ajax' => true,
],
'core_reportbuilder_conditions_reorder' => [
'classname' => 'core_reportbuilder\external\conditions\reorder',
'description' => 'Re-order condition within report',
'type' => 'write',
'ajax' => true,
],
'core_reportbuilder_conditions_reset' => [
'classname' => 'core_reportbuilder\external\conditions\reset',
'description' => 'Reset conditions for given report',
'type' => 'write',
'ajax' => true,
],
'core_reportbuilder_filters_add' => [
'classname' => 'core_reportbuilder\external\filters\add',
'description' => 'Add filter to report',
'type' => 'write',
'ajax' => true,
],
'core_reportbuilder_filters_delete' => [
'classname' => 'core_reportbuilder\external\filters\delete',
'description' => 'Delete filter from report',
'type' => 'write',
'ajax' => true,
],
'core_reportbuilder_filters_reorder' => [
'classname' => 'core_reportbuilder\external\filters\reorder',
'description' => 'Re-order filter within report',
'type' => 'write',
'ajax' => true,
],
);

$services = array(
Expand Down
2 changes: 2 additions & 0 deletions reportbuilder/amd/build/editor.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/editor.min.js.map

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/filters.min.js

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

0 comments on commit 8ca9e04

Please sign in to comment.