How do I create a SQL query in Moodle?
General rules
- Use parameter placeholders!
- All SQL keywords are in UPPER CASE.
- All SQL queries and fragments should be enclosed in double quotes.
- Complex SQL queries should be on multiple lines.
- Multiline SQL queries should be right aligned on SELECT, FROM, JOIN, WHERE, GROUPY BY and HAVING.
How do I run a query in Moodle?
To run an on-demand query, click on its name in the list of queries. The query will be run, and the results will be displayed as a table. Any URLs in the table will automatically be made into hyperlinks. A description of the query may appear above the table.
How do you get a report from Moodle?
To request a Log report from Moodle:
- From the Course Management Panel (black gear icon.
- You will see an array of drop-down menus.
- To view the logs, click Get these logs.
- To download the report as a file, use the Download table data as drop-down menu.
- Click Download (at right) to download the report file to your computer.
Can a report be built on a query?
You can use a query to supply data to a form or report in Access. You can use a query when you create the form or report, or you can change an existing form or report by setting its Record Source property.
What is a report query?
A query is a question you define and send to the data source to retrieve the data. A report is an organized and formatted view of the data the query retrieved. You saved time because you only had to run the query once to retrieve all the data items. …
How do you create a database in Moodle?
Moodle supports MySQL, PostgreSQL and MS SQL 2005 and Oracle databases….To create a database using cPanel:
- Click on the MySQL Databases icon.
- Type moodle in the New Database field and click Create Database.
- Type a username and password (not one you use elsewhere) in the respective fields and click Create User.
How do I insert data into a Moodle database?
Databases: Insert data in database $record = new stdClass(); $record->id = 1; $record->name = ‘value’; $DB->insert_record(‘table1’, $record, false);
How do I install configurable reports in Moodle?
Installation
- Download the Configurable Reports installation file and unzip it to the \blocks directory in your Moodle folder.
- Be sure that the final name of the directory is: configurable_reports, the full path in your Moodle installation will be blocks/configurable_reports.
How do I access my Moodle database?
The MoodleBox allows access to the Moodle database for administration purpose, via the Adminer software. To access to login interface, type the following URL http://moodlebox.home/adminer.php in the address bar of your browser, and type the credentials below. Of course the password is different if you have changed it.
Download the Configurable Reports installation file and unzip it to the blocks directory in your Moodle folder. Be sure that the final name of the directory is: configurable_reports, the full path in your Moodle installation will be blocks/configurable_reports.
Where can I find old queries in Moodle?
If you wish to find and use queries from this old system, you should search in the Ad-hoc pages for earlier versions of Moodle to find such reports, which will use the table prefix_log or mdl_log. Reports from Moodle 2.0to 3.10will contain such queries.
What is a skeleton log report in Moodle?
Logs Skeleton Report Containing All Log Columns Contributed by: Randy Thornton. This query contains all the columns in the standard log table (as of Moodle 3.11 anyway). You can use this to uncomment the various fields that you want to have in a report.
Why are there two percentage signs in my Moodle queries?
You will see a number of queries with variables in them that start and end with two %% percentage signs, e.g. %%WWWROOT%% and several of them that start with %%FILTER_. Theses variables are specific to one or both of the two Moodle plugins. They are not standard SQL code and will not work in code done in other tools outside of those two plugins.