├── README.md
├── highslide
├── graphics
│ ├── close.png
│ ├── closeX.png
│ ├── icon.gif
│ ├── loader.gif
│ ├── resize.gif
│ ├── zoomin.cur
│ ├── zoomout.cur
│ ├── controlbar2.gif
│ ├── controlbar3.gif
│ ├── controlbar4.gif
│ ├── fullexpand.gif
│ ├── geckodimmer.png
│ ├── loader.white.gif
│ ├── scrollarrows.png
│ ├── controlbar-white.gif
│ ├── outlines
│ │ ├── beveled.png
│ │ ├── Outlines.psd
│ │ ├── drop-shadow.png
│ │ ├── glossy-dark.png
│ │ ├── outer-glow.png
│ │ ├── rounded-black.png
│ │ └── rounded-white.png
│ ├── controlbar4-hover.gif
│ ├── controlbar-black-border.gif
│ ├── controlbar-text-buttons.png
│ └── controlbar-white-small.gif
└── highslide-ie6.css
├── images
├── exclamation_sign.png
└── warning-attention-road-sign-exclamation-mark.png
├── externalref
├── jquery-ui-1.12.1
│ ├── images
│ │ ├── ui-icons_444444_256x240.png
│ │ ├── ui-icons_555555_256x240.png
│ │ ├── ui-icons_777620_256x240.png
│ │ ├── ui-icons_777777_256x240.png
│ │ ├── ui-icons_cc0000_256x240.png
│ │ └── ui-icons_ffffff_256x240.png
│ ├── LICENSE.txt
│ ├── package.json
│ ├── jquery-ui.theme.min.css
│ ├── AUTHORS.txt
│ └── jquery-ui.structure.min.css
├── export-csv-master
│ ├── bower.json
│ ├── package.json
│ ├── manifest.json
│ ├── LICENSE
│ ├── README.md
│ └── export-csv.js
├── no-data-to-display.js
└── exporting.js
├── composer.json
├── thirdpartylibs.xml
├── version.php
├── settings.php
├── query_resources_access.php
├── query_messages.php
├── classes
├── event
│ ├── block_analytics_graphs_event_view_graph.php
│ └── block_analytics_graphs_event_send_email.php
└── privacy
│ └── provider.php
├── quiz.php
├── assign.php
├── db
├── install.xml
├── upgrade.php
└── access.php
├── query_grades.php
├── hotpot.php
├── turnitin.php
├── email.php
├── edit_form.php
├── graphresourcestartup.php
├── lang
├── pt_br
│ └── block_analytics_graphs.php
├── zh_cn
│ └── block_analytics_graphs.php
└── en
│ └── block_analytics_graphs.php
├── javascriptfunctions.php
├── block_analytics_graphs.php
├── groupjavascript.php
└── timeaccesseschart.php
/README.md:
--------------------------------------------------------------------------------
1 | AnalyticsGraphs
2 | ===============
3 |
4 | Learning analytics Moodle plugin - graphs to help teachers.
5 |
--------------------------------------------------------------------------------
/highslide/graphics/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/close.png
--------------------------------------------------------------------------------
/highslide/graphics/closeX.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/closeX.png
--------------------------------------------------------------------------------
/highslide/graphics/icon.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/icon.gif
--------------------------------------------------------------------------------
/highslide/graphics/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/loader.gif
--------------------------------------------------------------------------------
/highslide/graphics/resize.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/resize.gif
--------------------------------------------------------------------------------
/highslide/graphics/zoomin.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/zoomin.cur
--------------------------------------------------------------------------------
/images/exclamation_sign.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/images/exclamation_sign.png
--------------------------------------------------------------------------------
/highslide/graphics/zoomout.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/zoomout.cur
--------------------------------------------------------------------------------
/highslide/graphics/controlbar2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/controlbar2.gif
--------------------------------------------------------------------------------
/highslide/graphics/controlbar3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/controlbar3.gif
--------------------------------------------------------------------------------
/highslide/graphics/controlbar4.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/controlbar4.gif
--------------------------------------------------------------------------------
/highslide/graphics/fullexpand.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/fullexpand.gif
--------------------------------------------------------------------------------
/highslide/graphics/geckodimmer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/geckodimmer.png
--------------------------------------------------------------------------------
/highslide/graphics/loader.white.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/loader.white.gif
--------------------------------------------------------------------------------
/highslide/graphics/scrollarrows.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/scrollarrows.png
--------------------------------------------------------------------------------
/highslide/graphics/controlbar-white.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/controlbar-white.gif
--------------------------------------------------------------------------------
/highslide/graphics/outlines/beveled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/outlines/beveled.png
--------------------------------------------------------------------------------
/highslide/graphics/controlbar4-hover.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/controlbar4-hover.gif
--------------------------------------------------------------------------------
/highslide/graphics/outlines/Outlines.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/outlines/Outlines.psd
--------------------------------------------------------------------------------
/highslide/graphics/outlines/drop-shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/outlines/drop-shadow.png
--------------------------------------------------------------------------------
/highslide/graphics/outlines/glossy-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/outlines/glossy-dark.png
--------------------------------------------------------------------------------
/highslide/graphics/outlines/outer-glow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/outlines/outer-glow.png
--------------------------------------------------------------------------------
/highslide/graphics/controlbar-black-border.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/controlbar-black-border.gif
--------------------------------------------------------------------------------
/highslide/graphics/controlbar-text-buttons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/controlbar-text-buttons.png
--------------------------------------------------------------------------------
/highslide/graphics/controlbar-white-small.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/controlbar-white-small.gif
--------------------------------------------------------------------------------
/highslide/graphics/outlines/rounded-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/outlines/rounded-black.png
--------------------------------------------------------------------------------
/highslide/graphics/outlines/rounded-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/highslide/graphics/outlines/rounded-white.png
--------------------------------------------------------------------------------
/images/warning-attention-road-sign-exclamation-mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/images/warning-attention-road-sign-exclamation-mark.png
--------------------------------------------------------------------------------
/externalref/jquery-ui-1.12.1/images/ui-icons_444444_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/externalref/jquery-ui-1.12.1/images/ui-icons_444444_256x240.png
--------------------------------------------------------------------------------
/externalref/jquery-ui-1.12.1/images/ui-icons_555555_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/externalref/jquery-ui-1.12.1/images/ui-icons_555555_256x240.png
--------------------------------------------------------------------------------
/externalref/jquery-ui-1.12.1/images/ui-icons_777620_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/externalref/jquery-ui-1.12.1/images/ui-icons_777620_256x240.png
--------------------------------------------------------------------------------
/externalref/jquery-ui-1.12.1/images/ui-icons_777777_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/externalref/jquery-ui-1.12.1/images/ui-icons_777777_256x240.png
--------------------------------------------------------------------------------
/externalref/jquery-ui-1.12.1/images/ui-icons_cc0000_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/externalref/jquery-ui-1.12.1/images/ui-icons_cc0000_256x240.png
--------------------------------------------------------------------------------
/externalref/jquery-ui-1.12.1/images/ui-icons_ffffff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marceloschmitt/moodle-block_analytics_graphs/HEAD/externalref/jquery-ui-1.12.1/images/ui-icons_ffffff_256x240.png
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "marceloschmitt/moodle-block_analytics_graphs",
3 | "type": "moodle-block",
4 | "require": {
5 | "composer/installers": "~1.0"
6 | },
7 | "extra": {
8 | "installer-name": "analytics_graphs"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/thirdpartylibs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | highslide
5 | Highslide JS
6 | 5.0.0
7 | MIT
8 |
9 |
10 |
11 | externalref
12 | Highcharts JS
13 | 5.0.2
14 | MIT
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/externalref/export-csv-master/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "highcharts-export-csv",
3 | "version": "1.4.5",
4 | "description": "Highcharts plugin to export the chart data to CSV, XLS or HTML table",
5 | "keywords": [
6 | "export",
7 | "csv",
8 | "xls"
9 | ],
10 | "authors": [
11 | { "name": "Torstein Hønsi", "homepage": "https://github.com/highslide-software" }
12 | ],
13 | "repository": {
14 | "type": "git",
15 | "url": "https://github.com/highcharts/export-csv"
16 | },
17 | "main": "export-csv.js",
18 | "license": "MIT",
19 | "ignore": [
20 | "**/.*",
21 | "README.md"
22 | ],
23 | "homepage": "http://www.highcharts.com/plugin-registry/single/7/Export-CSV"
24 | }
25 |
--------------------------------------------------------------------------------
/externalref/export-csv-master/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "highcharts-export-csv",
3 | "version": "1.4.5",
4 | "description": "Highcharts plugin to export the chart data to CSV, XLS or HTML table",
5 | "keywords": [
6 | "export",
7 | "csv",
8 | "xls"
9 | ],
10 | "main": "export-csv.js",
11 | "author": {
12 | "name": "Torstein Hønsi",
13 | "url": "https://github.com/highslide-software"
14 | },
15 | "contributors": [
16 | {
17 | "name": "Torgrim Thorsen",
18 | "url": "https://github.com/SirAlexiner",
19 | "email": "Sir_Alexiner@hotmail.com"
20 | }
21 | ],
22 | "repository": {
23 | "type": "git",
24 | "url": "https://github.com/highcharts/export-csv"
25 | },
26 | "peerDependencies": {
27 | "highcharts": ">=3.0.0"
28 | },
29 | "license": "MIT",
30 | "bugs": {
31 | "url": "https://github.com/highcharts/export-csv/issues"
32 | },
33 | "homepage": "http://www.highcharts.com/plugin-registry/single/7/Export-CSV"
34 | }
35 |
--------------------------------------------------------------------------------
/externalref/export-csv-master/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Export Data",
3 | "version": "1.4.5",
4 | "title": "Export chart data to CSV, XLS, HTML or JS array",
5 | "demo": [
6 | "http://jsfiddle.net/highcharts/cqjvD/",
7 | "http://jsfiddle.net/highcharts/2Jyn5/"
8 | ],
9 | "author": {
10 | "name": "Torstein Hønsi",
11 | "url": "https://github.com/highslide-software"
12 | },
13 | "maintainers": [
14 | {
15 | "name": "Torgrim Thorsen",
16 | "url": "https://github.com/SirAlexiner",
17 | "email": "Sir_Alexiner@hotmail.com"
18 | }
19 | ],
20 | "licenses": [
21 | {
22 | "type": "MIT",
23 | "url": "https://github.com/highslide-software/export-csv/blob/master/LICENSE"
24 | }
25 | ],
26 | "description": "Highcharts plugin to export the chart data to CSV, XLS or HTML table.",
27 | "keywords": [
28 | "export",
29 | "csv",
30 | "xls"
31 | ],
32 | "dependencies": {
33 | "Highcharts": ">=3.0.0"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/version.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 |
18 | defined('MOODLE_INTERNAL') || die();
19 | $plugin->version = 2024112801; // YYYYMMDDHH (year, month, day, 24-hr time).
20 | $plugin->requires = 2015111600; // YYYYMMDDHH (This is the release version for Moodle 3.0).
21 | $plugin->maturity = MATURITY_STABLE;
22 | $plugin->release = '4.2.2';
23 | $plugin->branch = '4.2';
24 | $plugin->component = 'block_analytics_graphs';
25 |
--------------------------------------------------------------------------------
/externalref/export-csv-master/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 highslide-software
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/externalref/no-data-to-display.js:
--------------------------------------------------------------------------------
1 | /*
2 | Highcharts JS v4.1.5 (2015-04-13)
3 | Plugin for displaying a message when there is no data visible in chart.
4 |
5 | (c) 2010-2014 Highsoft AS
6 | Author: Oystein Moseng
7 |
8 | License: www.highcharts.com/license
9 | */
10 | (function(c){function i(){return!!this.points.length}function e(){this.hasData()?this.hideNoData():this.showNoData()}var f=c.seriesTypes,d=c.Chart.prototype,g=c.getOptions(),h=c.extend,j=c.each;h(g.lang,{noData:"No data to display"});g.noData={position:{x:0,y:0,align:"center",verticalAlign:"middle"},attr:{},style:{fontWeight:"bold",fontSize:"12px",color:"#60606a"}};j(["pie","gauge","waterfall","bubble"],function(a){if(f[a])f[a].prototype.hasData=i});c.Series.prototype.hasData=function(){return this.visible&&
11 | this.dataMax!==void 0&&this.dataMin!==void 0};d.showNoData=function(a){var b=this.options,a=a||b.lang.noData,b=b.noData;if(!this.noDataLabel)this.noDataLabel=this.renderer.label(a,0,0,null,null,null,null,null,"no-data").attr(b.attr).css(b.style).add(),this.noDataLabel.align(h(this.noDataLabel.getBBox(),b.position),!1,"plotBox")};d.hideNoData=function(){if(this.noDataLabel)this.noDataLabel=this.noDataLabel.destroy()};d.hasData=function(){for(var a=this.series,b=a.length;b--;)if(a[b].hasData()&&!a[b].options.isInternal)return!0;
12 | return!1};d.callbacks.push(function(a){c.addEvent(a,"load",e);c.addEvent(a,"redraw",e)})})(Highcharts);
--------------------------------------------------------------------------------
/settings.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 | /**
18 | * Settings for the HTML block
19 | *
20 | * @package block_analytics_graphs
21 | * @copyright 2023 Catalyst IT
22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23 | */
24 |
25 | defined('MOODLE_INTERNAL') || die;
26 |
27 | if ($ADMIN->fulltree) {
28 | $settings->add(new admin_setting_configcheckbox(
29 | 'block_analytics_graphs/onlyactive',
30 | get_string('settings:onlyactive', 'block_analytics_graphs'),
31 | get_string('settings:onlyactive_help', 'block_analytics_graphs'),
32 | 0)
33 | );
34 |
35 | $settings->add(new admin_setting_configcheckbox(
36 | 'block_analytics_graphs/overrideonlyactive',
37 | get_string('settings:overrideonlyactive', 'block_analytics_graphs'),
38 | get_string('settings:overrideonlyactive_help', 'block_analytics_graphs'),
39 | 0)
40 | );
41 | }
42 |
--------------------------------------------------------------------------------
/query_resources_access.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 |
18 | require_once('../../config.php');
19 | require_once("lib.php");
20 | require_once($CFG->dirroot.'/lib/moodlelib.php');
21 |
22 | $studentid = required_param('student_id', PARAM_INT);
23 | $courseid = required_param('course_id', PARAM_INT);
24 |
25 | /* Access control */
26 | require_login($courseid);
27 | $context = context_course::instance($courseid);
28 | require_capability('block/analytics_graphs:viewpages', $context);
29 |
30 | $resourceaccess = block_analytics_graphs_get_user_resource_url_page_access($courseid, $studentid);
31 | $assigninfo = block_analytics_graphs_get_user_assign_submission($courseid, $studentid);
32 | $quizinfo = block_analytics_graphs_get_user_quiz_state($courseid, $studentid);
33 | $foruminfo = block_analytics_graphs_get_user_forum_state($courseid, $studentid);
34 |
35 | echo json_encode(array("resources" => $resourceaccess, "assign" => $assigninfo, "quiz" => $quizinfo,
36 | "forum" => $foruminfo));
37 |
--------------------------------------------------------------------------------
/externalref/jquery-ui-1.12.1/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright jQuery Foundation and other contributors, https://jquery.org/
2 |
3 | This software consists of voluntary contributions made by many
4 | individuals. For exact contribution history, see the revision history
5 | available at https://github.com/jquery/jquery-ui
6 |
7 | The following license applies to all parts of this software except as
8 | documented below:
9 |
10 | ====
11 |
12 | Permission is hereby granted, free of charge, to any person obtaining
13 | a copy of this software and associated documentation files (the
14 | "Software"), to deal in the Software without restriction, including
15 | without limitation the rights to use, copy, modify, merge, publish,
16 | distribute, sublicense, and/or sell copies of the Software, and to
17 | permit persons to whom the Software is furnished to do so, subject to
18 | the following conditions:
19 |
20 | The above copyright notice and this permission notice shall be
21 | included in all copies or substantial portions of the Software.
22 |
23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 |
31 | ====
32 |
33 | Copyright and related rights for sample code are waived via CC0. Sample
34 | code is defined as all source code contained within the demos directory.
35 |
36 | CC0: http://creativecommons.org/publicdomain/zero/1.0/
37 |
38 | ====
39 |
40 | All files located in the node_modules and external directories are
41 | externally maintained libraries used by this software which have their
42 | own licenses; we recommend you read them, as their terms may differ from
43 | the terms above.
44 |
--------------------------------------------------------------------------------
/externalref/export-csv-master/README.md:
--------------------------------------------------------------------------------
1 | export-csv
2 | ==========
3 | This plugin allows the user to export the chart data to various formats and views.
4 |
5 | The contents of the plugin is located in the JavaScript file "export-csv.js".
6 | This plugin is published under the MIT license, and the license document is included in the repository.
7 |
8 | ### Demos
9 | * [Categorized chart](http://jsfiddle.net/highcharts/cqjvD/)
10 | * [View data table from menu](http://jsfiddle.net/highcharts/j4w4s0mw/)
11 | * [Highstock with time axis](http://jsfiddle.net/highcharts/2Jyn5/)
12 | * [Unit tests](http://jsfiddle.net/highcharts/pspdp2de/)
13 |
14 | ### Options
15 | * `exporting.csv.columnHeaderFormatter`
16 | Formatter callback for the column headers. Parameters are `item` (the series or axis object), `key` (the point key, for example `y` or `z`), and `keyLength`. By default it returns the series name, followed by the key if there is more than one key. For the axis it returns the axis title or "Category" or "DateTime" by default.
17 |
18 | * `exporting.csv.dateFormat`
19 | Which date format to use for exported dates on a datetime X axis. See [Highcharts.dateFormat](http://api.highcharts.com/highcharts#Highcharts.dateFormat\(\)).
20 |
21 | * `exporting.csv.itemDelimiter`
22 | The item delimiter, defaults to `,`. Use `;` for direct import to Excel.
23 |
24 | * `exporting.csv.lineDelimiter`
25 | The line delimiter, defaults to `\\n`.
26 |
27 | * `series.includeInCSVExport`
28 | Set this to false to prevent an individual series from being exported. To prevent the navigator in a stock chart, set `navigator.series.includeInCSVExport` to false.
29 |
30 | ### Methods
31 | * `Chart.getCSV()`
32 | Returns the current chart data as a CSV string
33 |
34 | * `Chart.getTable()`
35 | Returns the current chart data as a HTML table string, ready to be inserted into the DOM using `innerHTML`.
36 |
37 | * `Chart.getDataRows()`
38 | Returns the current chart data as a two dimensional array.
39 |
40 | * `Chart.viewData()`
41 | Inserts a data table below the chart container.
--------------------------------------------------------------------------------
/query_messages.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 |
18 |
19 | require_once("../../config.php");
20 | global $DB;
21 | require_once($CFG->dirroot.'/lib/moodlelib.php');
22 | $studentids = required_param('student_ids', PARAM_INT);
23 | $courseid = required_param('course_id', PARAM_INT);
24 |
25 | /* Access control */
26 | require_login($courseid);
27 | $context = context_course::instance($courseid);
28 | require_capability('block/analytics_graphs:viewpages', $context);
29 |
30 | $inclause[] = $studentids;
31 | list($insql, $inparams) = $DB->get_in_or_equal($inclause);
32 | $params = array_merge(array($courseid), $inparams);
33 |
34 | $sql = "SELECT msg.id, CONCAT(firstname, ' ', lastname) fromid, subject, message, msg.timecreated
35 | FROM {block_analytics_graphs_msg} AS msg
36 | LEFT JOIN {block_analytics_graphs_dest} AS dest ON dest.messageid = msg.id
37 | LEFT JOIN {user} AS usr ON usr.id = fromid
38 | WHERE courseid = ? AND toid $insql
39 | ORDER BY timecreated";
40 |
41 | $result = $DB->get_records_sql($sql, $params);
42 |
43 | if (count($result) > 0) {
44 | $keys = array_keys($result);
45 | for ($x = 0; $x < count($keys); $x++) {
46 | $result[$keys[$x]]->timecreated = userdate($result[$keys[$x]]->timecreated, get_string('strftimerecentfull'));
47 | }
48 | echo json_encode($result);
49 | } else {
50 | echo json_encode(array());
51 | }
52 |
--------------------------------------------------------------------------------
/externalref/jquery-ui-1.12.1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery-ui",
3 | "title": "jQuery UI",
4 | "description": "A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.",
5 | "version": "1.12.1",
6 | "homepage": "http://jqueryui.com",
7 | "author": {
8 | "name": "jQuery Foundation and other contributors",
9 | "url": "https://github.com/jquery/jquery-ui/blob/1.12.1/AUTHORS.txt"
10 | },
11 | "main": "ui/widget.js",
12 | "maintainers": [
13 | {
14 | "name": "Scott González",
15 | "email": "scott.gonzalez@gmail.com",
16 | "url": "http://scottgonzalez.com"
17 | },
18 | {
19 | "name": "Jörn Zaefferer",
20 | "email": "joern.zaefferer@gmail.com",
21 | "url": "http://bassistance.de"
22 | },
23 | {
24 | "name": "Mike Sherov",
25 | "email": "mike.sherov@gmail.com",
26 | "url": "http://mike.sherov.com"
27 | },
28 | {
29 | "name": "TJ VanToll",
30 | "email": "tj.vantoll@gmail.com",
31 | "url": "http://tjvantoll.com"
32 | },
33 | {
34 | "name": "Felix Nagel",
35 | "email": "info@felixnagel.com",
36 | "url": "http://www.felixnagel.com"
37 | },
38 | {
39 | "name": "Alex Schmitz",
40 | "email": "arschmitz@gmail.com",
41 | "url": "https://github.com/arschmitz"
42 | }
43 | ],
44 | "repository": {
45 | "type": "git",
46 | "url": "git://github.com/jquery/jquery-ui.git"
47 | },
48 | "bugs": "https://bugs.jqueryui.com/",
49 | "license": "MIT",
50 | "scripts": {
51 | "test": "grunt"
52 | },
53 | "dependencies": {},
54 | "devDependencies": {
55 | "commitplease": "2.3.0",
56 | "grunt": "0.4.5",
57 | "grunt-bowercopy": "1.2.4",
58 | "grunt-cli": "0.1.13",
59 | "grunt-compare-size": "0.4.0",
60 | "grunt-contrib-concat": "0.5.1",
61 | "grunt-contrib-csslint": "0.5.0",
62 | "grunt-contrib-jshint": "0.12.0",
63 | "grunt-contrib-qunit": "1.0.1",
64 | "grunt-contrib-requirejs": "0.4.4",
65 | "grunt-contrib-uglify": "0.11.1",
66 | "grunt-git-authors": "3.1.0",
67 | "grunt-html": "6.0.0",
68 | "grunt-jscs": "2.1.0",
69 | "load-grunt-tasks": "3.4.0",
70 | "rimraf": "2.5.1",
71 | "testswarm": "1.1.0"
72 | },
73 | "keywords": []
74 | }
75 |
--------------------------------------------------------------------------------
/classes/event/block_analytics_graphs_event_view_graph.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 | /**
18 | * The EVENTNAME event.
19 | *
20 | * @package analytics_graphs
21 | * @copyright 2014 Marcelo Augusto Rauh Schmitt
22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23 | */
24 |
25 |
26 | namespace block_analytics_graphs\event;
27 | defined('MOODLE_INTERNAL') || die();
28 | /**
29 | * The block_analytics_graphs_event_view_graph event class.
30 | *
31 | * @property-read array $other {
32 | * Extra information about event.
33 | *
34 | * - Whenever a teacher views a graph
35 | * }
36 | *
37 | * @since Moodle MOODLEVERSION
38 | * @copyright 2014 YOUR NAME
39 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
40 | **/
41 | class block_analytics_graphs_event_view_graph extends \core\event\base {
42 | protected function init() {
43 | $this->data['crud'] = 'r';
44 | $this->data['edulevel'] = self::LEVEL_TEACHING;
45 | $this->data['objecttable'] = 'course';
46 | }
47 |
48 | public static function get_name() {
49 | return get_string('event_view_graph', 'block_analytics_graphs');
50 | }
51 |
52 | public function get_description() {
53 | return "User: {$this->userid} - Course: {$this->objectid} - Graph: {$this->other}";
54 | }
55 |
56 | public function get_url() {
57 | return new \moodle_url('/blocks/analytics_graphs/' . $this->other, array('id' => $this->objectid, 'legacy' => '0'));
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/classes/event/block_analytics_graphs_event_send_email.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 | /**
18 | * The EVENTNAME event.
19 | *
20 | * @package analytics_graphs
21 | * @copyright 2014 Marcelo Augusto Rauh Schmitt
22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23 | */
24 |
25 |
26 | namespace block_analytics_graphs\event;
27 | defined('MOODLE_INTERNAL') || die();
28 | /**
29 | * The block_analytics_graphs_event_send_email event class.
30 | *
31 | * @property-read array $other {
32 | * Extra information about event.
33 | *
34 | * - Whenever a teacher views a graph
35 | * }
36 | *
37 | * @since Moodle MOODLEVERSION
38 | * @copyright 2014 YOUR NAME
39 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
40 | **/
41 | class block_analytics_graphs_event_send_email extends \core\event\base {
42 | protected function init() {
43 | $this->data['crud'] = 'c';
44 | $this->data['edulevel'] = self::LEVEL_TEACHING;
45 | $this->data['objecttable'] = 'course';
46 |
47 | }
48 |
49 | public static function get_name() {
50 | return get_string('event_send_email', 'block_analytics_graphs');
51 | }
52 |
53 | public function get_description() {
54 | return "User: {$this->userid} - Course: {$this->objectid} - Graph: {$this->other}";
55 | }
56 |
57 | public function get_url() {
58 | return new \moodle_url('/blocks/analytics_graphs/' . $this->other, array('id' => $this->objectid, 'legacy' => '0'));
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/quiz.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 | require('../../config.php');
18 | require('graph_submission.php');
19 | require('javascriptfunctions.php');
20 | require_once('lib.php');
21 |
22 | $course = required_param('id', PARAM_INT);
23 |
24 | /* Access control */
25 | require_login($course);
26 | $context = context_course::instance($course);
27 | require_capability('block/analytics_graphs:viewpages', $context);
28 | require_capability('block/analytics_graphs:viewquizsubmissions', $context);
29 |
30 | $title = get_string('submissions_quiz', 'block_analytics_graphs');
31 | $submissionsgraph = new graph_submission($course, $title);
32 |
33 |
34 | $students = block_analytics_graphs_get_students($COURSE);
35 | $numberofstudents = count($students);
36 | if ($numberofstudents == 0) {
37 | echo(get_string('no_students', 'block_analytics_graphs'));
38 | exit;
39 | }
40 | $result = block_analytics_graphs_get_quiz_submission($course, $students);
41 | $numberoftasks = count($result);
42 | if ($numberoftasks == 0) {
43 | echo(get_string('no_graph', 'block_analytics_graphs'));
44 | exit;
45 | }
46 |
47 | $submissionsgraphoptions = $submissionsgraph->create_graph($result, $students);
48 |
49 | /* Discover groups/groupings and members */
50 | $groupmembers = block_analytics_graphs_get_course_group_members($COURSE);
51 | $groupingmembers = block_analytics_graphs_get_course_grouping_members($COURSE);
52 | $groupmembers = array_merge($groupmembers, $groupingmembers);
53 | $groupmembersjson = json_encode($groupmembers);
54 |
55 | $studentsjson = json_encode($students);
56 | $resultjson = json_encode($result);
57 | $statisticsjson = $submissionsgraph->get_statistics();
58 |
59 | $codename = "quiz.php";
60 | require('groupjavascript.php');
61 |
--------------------------------------------------------------------------------
/assign.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 |
18 | require('../../config.php');
19 | require('graph_submission.php');
20 | require('javascriptfunctions.php');
21 | require_once('lib.php');
22 |
23 | $course = required_param('id', PARAM_INT);
24 |
25 | /* Access control */
26 | require_login($course);
27 | $context = context_course::instance($course);
28 | require_capability('block/analytics_graphs:viewpages', $context);
29 | require_capability('block/analytics_graphs:viewassignmentsubmissions', $context);
30 |
31 | $title = get_string('submissions_assign', 'block_analytics_graphs');
32 | $submissionsgraph = new graph_submission($course, $title);
33 |
34 |
35 | $students = block_analytics_graphs_get_students($COURSE);
36 | $numberofstudents = count($students);
37 | if ($numberofstudents == 0) {
38 | echo(get_string('no_students', 'block_analytics_graphs'));
39 | exit;
40 | }
41 | $result = block_analytics_graphs_get_assign_submission($course, $students);
42 | $numberoftasks = count($result);
43 | if ($numberoftasks == 0) {
44 | echo(get_string('no_graph', 'block_analytics_graphs'));
45 | exit;
46 | }
47 | $submissionsgraphoptions = $submissionsgraph->create_graph($result, $students);
48 |
49 | /* Discover groups/groupings and members */
50 | $groupmembers = block_analytics_graphs_get_course_group_members($COURSE);
51 | $groupingmembers = block_analytics_graphs_get_course_grouping_members($COURSE);
52 | $groupmembers = array_merge($groupmembers, $groupingmembers);
53 | $groupmembersjson = json_encode($groupmembers);
54 |
55 | $studentsjson = json_encode($students);
56 | $resultjson = json_encode($result);
57 | $statisticsjson = $submissionsgraph->get_statistics();
58 |
59 | $codename = "assign.php";
60 | require('groupjavascript.php');
61 |
--------------------------------------------------------------------------------
/db/install.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/query_grades.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 |
18 |
19 | require_once("../../config.php");
20 | global $DB;
21 | require_once($CFG->dirroot.'/lib/moodlelib.php');
22 | require_once('lib.php');
23 |
24 | $courseid = required_param('course_id', PARAM_INT);
25 | $formdata = required_param_array('form_data', PARAM_INT);
26 | require_login($courseid);
27 | $context = context_course::instance($courseid);
28 | require_capability('block/analytics_graphs:viewpages', $context);
29 |
30 | list($insql, $inparams) = $DB->get_in_or_equal($formdata);
31 |
32 | $sql = "SELECT itemid + (userid*1000000) AS id, itemid, userid, usr.firstname,
33 | usr.lastname, usr.email, rawgrade/(rawgrademax-rawgrademin) AS grade
34 | FROM {grade_grades}
35 | LEFT JOIN {user} usr ON usr.id = userid
36 | WHERE itemid $insql AND rawgrade IS NOT NULL
37 | ORDER BY id";
38 |
39 | $result = $DB->get_records_sql($sql, $inparams);
40 | $students = array_column(block_analytics_graphs_get_students($COURSE), 'id');
41 | $taskgrades = new stdClass();
42 | foreach ($result as $id => $taskattrs) {
43 | if (in_array($taskattrs->userid, $students) && groups_user_groups_visible($COURSE, $taskattrs->userid)) {
44 | $itemid = $taskattrs->itemid;
45 | $record = new stdClass();
46 | $record->userid = $taskattrs->userid;
47 | $record->grade = floatval($taskattrs->grade);
48 | $record->email = $taskattrs->email;
49 | $record->name = $taskattrs->firstname . " " . $taskattrs->lastname;
50 | if (!property_exists($taskgrades, $itemid)) {
51 | $taskgrades->{$itemid} = array();
52 | }
53 | $taskgrades->{$itemid}[] = $record;
54 | }
55 | }
56 |
57 | echo json_encode($taskgrades);
58 |
--------------------------------------------------------------------------------
/hotpot.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 | require('../../config.php');
18 | require('graph_submission.php');
19 | require('javascriptfunctions.php');
20 | require_once('lib.php');
21 |
22 | $course = required_param('id', PARAM_INT);
23 |
24 | /* Access control */
25 | require_login($course);
26 | $context = context_course::instance($course);
27 | require_capability('block/analytics_graphs:viewpages', $context);
28 |
29 | $title = get_string('submissions_hotpot', 'block_analytics_graphs');
30 | $submissionsgraph = new graph_submission($course, $title);
31 |
32 |
33 | $students = block_analytics_graphs_get_students($COURSE);
34 | $numberofstudents = count($students);
35 | if ($numberofstudents == 0) {
36 | echo(get_string('no_students', 'block_analytics_graphs'));
37 | exit;
38 | }
39 | $result = block_analytics_graphs_get_hotpot_submission($course, $students);
40 | $numberoftasks = count($result);
41 | if ($numberoftasks == 0) {
42 | echo(get_string('no_graph', 'block_analytics_graphs'));
43 | exit;
44 | }
45 | $submissionsgraphoptions = $submissionsgraph->create_graph($result, $students);
46 |
47 | /* Discover groups/groupings and members */
48 | $groupmembers = block_analytics_graphs_get_course_group_members($COURSE);
49 | $groupingmembers = block_analytics_graphs_get_course_grouping_members($COURSE);
50 | $groupmembers = array_merge($groupmembers, $groupingmembers);
51 | $numberoftasks = count($result);
52 | if ($numberoftasks == 0) {
53 | error(get_string('no_graph', 'block_analytics_graphs'));
54 | }
55 | $groupmembersjson = json_encode($groupmembers);
56 |
57 | $studentsjson = json_encode($students);
58 | $resultjson = json_encode($result);
59 | $statisticsjson = $submissionsgraph->get_statistics();
60 |
61 | $codename = "hotpot.php";
62 | require('groupjavascript.php');
63 |
--------------------------------------------------------------------------------
/turnitin.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 | require('../../config.php');
18 | require('graph_submission.php');
19 | require('javascriptfunctions.php');
20 | require_once('lib.php');
21 |
22 | $course = required_param('id', PARAM_INT);
23 |
24 | /* Access control */
25 | require_login($course);
26 | $context = context_course::instance($course);
27 | require_capability('block/analytics_graphs:viewpages', $context);
28 |
29 | $title = get_string('submissions_turnitin', 'block_analytics_graphs');
30 | $submissionsgraph = new graph_submission($course, $title);
31 |
32 |
33 | $students = block_analytics_graphs_get_students($COURSE);
34 | $numberofstudents = count($students);
35 | if ($numberofstudents == 0) {
36 | echo(get_string('no_students', 'block_analytics_graphs'));
37 | exit;
38 | }
39 | $result = block_analytics_graphs_get_turnitin_submission($course, $students);
40 | $numberoftasks = count($result);
41 | if ($numberoftasks == 0) {
42 | echo(get_string('no_graph', 'block_analytics_graphs'));
43 | exit;
44 | }
45 | $submissionsgraphoptions = $submissionsgraph->create_graph($result, $students);
46 |
47 | /* Discover groups/groupings and members */
48 | $groupmembers = block_analytics_graphs_get_course_group_members($COURSE);
49 | $groupingmembers = block_analytics_graphs_get_course_grouping_members($COURSE);
50 | $groupmembers = array_merge($groupmembers, $groupingmembers);
51 | $numberoftasks = count($result);
52 | if ($numberoftasks == 0) {
53 | error(get_string('no_graph', 'block_analytics_graphs'));
54 | }
55 | $groupmembersjson = json_encode($groupmembers);
56 |
57 | $studentsjson = json_encode($students);
58 | $resultjson = json_encode($result);
59 | $statisticsjson = $submissionsgraph->get_statistics();
60 |
61 | $codename = "turnitin.php";
62 | require('groupjavascript.php');
63 |
--------------------------------------------------------------------------------
/highslide/highslide-ie6.css:
--------------------------------------------------------------------------------
1 | .closebutton {
2 | /* NOTE! This URL is relative to the HTML page, not the CSS */
3 | filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
4 | src='../highslide/graphics/close.png', sizingMethod='scale');
5 |
6 | background: none;
7 | cursor: hand;
8 | }
9 |
10 | /* Viewport fixed hack */
11 | .highslide-viewport {
12 | position: absolute;
13 | left: expression( ( ( ignoreMe1 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
14 | top: expression( ( ignoreMe2 = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) + 'px' );
15 | width: expression( ( ( ignoreMe3 = document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) ) + 'px' );
16 | height: expression( ( ( ignoreMe4 = document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) ) + 'px' );
17 | }
18 |
19 | /* Thumbstrip PNG fix */
20 | .highslide-scroll-down, .highslide-scroll-up {
21 | position: relative;
22 | overflow: hidden;
23 | }
24 | .highslide-scroll-down div, .highslide-scroll-up div {
25 | /* NOTE! This URL is relative to the HTML page, not the CSS */
26 | filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
27 | src='../highslide/graphics/scrollarrows.png', sizingMethod='scale');
28 | background: none !important;
29 | position: absolute;
30 | cursor: hand;
31 | width: 75px;
32 | height: 75px !important;
33 | }
34 | .highslide-thumbstrip-horizontal .highslide-scroll-down div {
35 | left: -50px;
36 | top: -15px;
37 | }
38 | .highslide-thumbstrip-horizontal .highslide-scroll-up div {
39 | top: -15px;
40 | }
41 | .highslide-thumbstrip-vertical .highslide-scroll-down div {
42 | top: -50px;
43 | }
44 |
45 | /* Thumbstrip marker arrow trasparent background fix */
46 | .highslide-thumbstrip .highslide-marker {
47 | border-color: white; /* match the background */
48 | }
49 | .dark .highslide-thumbstrip-horizontal .highslide-marker {
50 | border-color: #111;
51 | }
52 | .highslide-viewport .highslide-marker {
53 | border-color: #333;
54 | }
55 | .highslide-thumbstrip {
56 | float: left;
57 | }
58 |
59 | /* Positioning fixes for the control bar */
60 | .text-controls .highslide-controls {
61 | width: 480px;
62 | }
63 | .text-controls a span {
64 | width: 4em;
65 | }
66 | .text-controls .highslide-full-expand a span {
67 | width: 0;
68 | }
69 | .text-controls .highslide-close a span {
70 | width: 0;
71 | }
72 |
73 | /* Special */
74 | .in-page .highslide-thumbstrip-horizontal .highslide-marker {
75 | border-bottom: gray;
76 | }
77 |
--------------------------------------------------------------------------------
/email.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 | require_once("../../config.php");
18 | require_once('lib.php');
19 | global $USER;
20 | global $DB;
21 | require_once($CFG->dirroot.'/lib/moodlelib.php');
22 | $course = required_param('id', PARAM_INT);
23 | $ids = required_param('ids', PARAM_TEXT);
24 | $other = required_param('other', PARAM_INT);
25 | $subject = required_param('subject', PARAM_TEXT);
26 | $messagetext = required_param('texto', PARAM_TEXT);
27 | $ccteachers = required_param('ccteachers', PARAM_BOOL);
28 | $messagehtml = $messagetext;
29 |
30 | /* Access control */
31 | require_login($course);
32 | $context = context_course::instance($course);
33 | require_capability('block/analytics_graphs:viewpages', $context);
34 |
35 | $destination = explode(',', $ids);
36 |
37 | $touser = new stdClass();
38 | $fromuser = new stdClass();
39 | $touser->mailformat = 0;
40 | $fromuser->email = $USER->email;
41 | $fromuser->firstname = $USER->firstname;
42 | $fromuser->maildisplay = core_user::MAILDISPLAY_COURSE_MEMBERS_ONLY;
43 | $fromuser->lastname = $USER->lastname;
44 | $fromuser->id = $USER->id;
45 |
46 | $recordmsg = new stdClass();
47 | $recordmsg->fromid = $fromuser->id;
48 | $recordmsg->subject = $subject;
49 | $recordmsg->message = $messagetext;
50 | $recordmsg->courseid = $course;
51 | $recordmsg->timecreated = time();
52 | $messageid = $DB->insert_record('block_analytics_graphs_msg', $recordmsg, true);
53 | $recorddest = new stdClass();
54 | $recorddest->messageid = $messageid;
55 |
56 |
57 | foreach ($destination as $i => $x) {
58 | $touser->id = $destination[$i];
59 | $recorddest->toid = $touser->id;
60 | $touser->email = $DB->get_field('user', 'email', array('id' => $destination[$i]));
61 | email_to_user($touser, $fromuser, $subject, $messagetext, $messagehtml, '', '', true);
62 | $DB->insert_record('block_analytics_graphs_dest', $recorddest, false);
63 | }
64 |
65 | $messagetext = get_string('mailcopyalert', 'block_analytics_graphs') . $messagetext;
66 | $messagehtml = get_string('mailcopyalert', 'block_analytics_graphs') . $messagehtml;
67 |
68 | if ($ccteachers) {
69 | $userstocopyemail = block_analytics_graphs_get_teachers($course);
70 |
71 | foreach ($userstocopyemail as $i) {
72 | $touser->id = $i->id;
73 | $touser->email = $DB->get_field('user', 'email', array('id' => $i->id));
74 | email_to_user($touser, $fromuser, $subject, $messagetext, $messagehtml, '', '', true);
75 | }
76 | }
77 | $mensagem = "ok";
78 | echo json_encode($mensagem);
79 | $event = \block_analytics_graphs\event\block_analytics_graphs_event_send_email::create(array(
80 | 'objectid' => $course,
81 | 'context' => $context,
82 | 'other' => $other,
83 | ));
84 | $event->trigger();
--------------------------------------------------------------------------------
/edit_form.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 | defined('MOODLE_INTERNAL') || die();
18 |
19 | require_once($CFG->dirroot . '/blocks/analytics_graphs/lib.php');
20 |
21 | /**
22 | * Form for editing lock instances.
23 | *
24 | * @package block_analytics_graphs
25 | * @copyright 2024 Catalyst IT
26 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
27 | */
28 | class block_analytics_graphs_edit_form extends block_edit_form {
29 |
30 | /**
31 | * Block config form definition.
32 | *
33 | * @param \MoodleQuickForm $mform Block form.
34 | *
35 | * @return void
36 | */
37 | protected function specific_definition($mform) {
38 | // Adding a new "only active" setting only of allowed for individual blocks.
39 | if (get_config('block_analytics_graphs', 'overrideonlyactive')) {
40 | $mform->addElement('header', 'configheader', get_string('blocksettings', 'block'));
41 | $mform->addElement('advcheckbox', 'config_onlyactive', get_string('settings:onlyactive', 'block_analytics_graphs'));
42 | $mform->addHelpButton('config_onlyactive', 'settings:onlyactive', 'block_analytics_graphs');
43 | $mform->setDefault('config_onlyactive', (bool) get_config('block_analytics_graphs', 'onlyactive'));
44 | }
45 | }
46 |
47 | /**
48 | * Display the configuration form when block is being added to the page
49 | *
50 | * @return bool
51 | */
52 | public static function display_form_when_adding(): bool {
53 | // Makes sense to display block's setting when adding a block only if allowed extra setting.
54 | return (bool) get_config('block_analytics_graphs', 'overrideonlyactive');
55 | }
56 |
57 | /**
58 | * Process the form submission, used if form was submitted via AJAX
59 | */
60 | public function process_dynamic_submission() {
61 | parent::process_dynamic_submission();
62 |
63 | // If allowed to have 'only active' setting per block,
64 | // then we would like to update it based on the curren block data.
65 | if (get_config('block_analytics_graphs', 'overrideonlyactive')) {
66 | $needupdate = false;
67 | $onlyactivecourses = block_analytics_graphs_get_onlyactivecourses();
68 | $courseid = $this->page->course->id;
69 | $data = $this->get_data();
70 |
71 | if(!empty($data->config_onlyactive)) {
72 | if (!in_array($courseid, $onlyactivecourses)) {
73 | $onlyactivecourses[] = $courseid;
74 | $needupdate = true;
75 | }
76 | } else {
77 | if (($key = array_search($courseid, $onlyactivecourses)) !== false) {
78 | unset($onlyactivecourses[$key]);
79 | $needupdate = true;
80 | }
81 | }
82 |
83 | // Conditionally save the settings only if updated.
84 | if ($needupdate) {
85 | set_config('onlyactivecourses', implode(',', $onlyactivecourses), 'block_analytics_graphs');
86 | }
87 | }
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/graphresourcestartup.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 | require('../../config.php');
18 | require_once('lib.php');
19 | $course = required_param('id', PARAM_INT);
20 | global $DB;
21 | /* Access control */
22 | require_login($course);
23 | $context = context_course::instance($course);
24 | require_capability('block/analytics_graphs:viewpages', $context);
25 | require_capability('block/analytics_graphs:viewcontentaccesses', $context);
26 | $courseparams = get_course($course);
27 | $startdate = date("Y-m-d", $courseparams->startdate);
28 |
29 | /* Initializing and filling array with available modules, to display only modules that are
30 | available on the server on the course */
31 | $availablemodules = array();
32 | foreach (block_analytics_graphs_get_course_used_modules($course) as $result) {
33 | array_push($availablemodules, $result->name);
34 | }
35 |
36 | ?>
37 |
38 |
48 |
49 |
55 |
56 |
57 |
60 | ";
62 |
63 | echo "
" . get_string('access_graph', 'block_analytics_graphs') . "
";
64 | echo "
" . get_string('select_items_to_display', 'block_analytics_graphs') . ":
";
65 | ?>
66 |
67 |
93 | ";
96 | echo "
";
98 | echo "
";
99 | ?>
100 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/db/upgrade.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 | defined('MOODLE_INTERNAL') || die();
18 |
19 | function xmldb_block_analytics_graphs_upgrade($oldversion, $block) {
20 | global $CFG, $DB;
21 |
22 | $dbman = $DB->get_manager(); // Loads ddl manager and xmldb classes.
23 |
24 | if ($oldversion < 2015042003) {
25 | // Define table block_analytics_graphs_msg to be created.
26 | $table = new xmldb_table('block_analytics_graphs_msg');
27 |
28 | // Adding fields to table block_analytics_graphs_msg.
29 | $table->add_field('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
30 | $table->add_field('fromid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
31 | $table->add_field('subject', XMLDB_TYPE_TEXT, null, null, null, null, null);
32 | $table->add_field('message', XMLDB_TYPE_TEXT, null, null, null, null, null);
33 | $table->add_field('courseid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '1');
34 | $table->add_field('timecreated', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0');
35 |
36 | // Adding keys to table block_analytics_graphs_msg.
37 | $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
38 | $table->add_key('fromid', XMLDB_KEY_FOREIGN, array('fromid'), 'user', array('id'));
39 | $table->add_key('courseid', XMLDB_KEY_FOREIGN, array('courseid'), 'course', array('id'));
40 |
41 | // Conditionally launch create table for block_analytics_graphs_msg.
42 | if (!$dbman->table_exists($table)) {
43 | $dbman->create_table($table);
44 | }
45 |
46 | // Define table block_analytics_graphs_dest to be created.
47 | $table = new xmldb_table('block_analytics_graphs_dest');
48 |
49 | // Adding fields to table block_analytics_graphs_dest.
50 | $table->add_field('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
51 | $table->add_field('messageid', XMLDB_TYPE_INTEGER, '10', null, null, null, null);
52 | $table->add_field('toid', XMLDB_TYPE_INTEGER, '10', null, null, null, null);
53 |
54 | // Adding keys to table block_analytics_graphs_dest.
55 | $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
56 | $table->add_key('messageid', XMLDB_KEY_FOREIGN, array('messageid'), 'block_analytics_graphs_msg', array('id'));
57 | $table->add_key('toid', XMLDB_KEY_FOREIGN, array('toid'), 'user', array('id'));
58 |
59 | // Conditionally launch create table for block_analytics_graphs_dest.
60 | if (!$dbman->table_exists($table)) {
61 | $dbman->create_table($table);
62 | }
63 |
64 | // Analytics_graphs savepoint reached.
65 | upgrade_block_savepoint(true, 2015042003, 'analytics_graphs');
66 | }
67 |
68 | if ($oldversion < 2015051302) {
69 | $table = new xmldb_table('block_analytics_graphs_msg');
70 |
71 | // Define field courseid to be added to block_analytics_graphs_msg.
72 | $field = new xmldb_field('courseid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '1', 'message');
73 | // Conditionally launch add field courseid.
74 | if (!$dbman->field_exists($table, $field)) {
75 | $dbman->add_field($table, $field);
76 | $key = new xmldb_key('courseid', XMLDB_KEY_FOREIGN, array('courseid'), 'course', array('id'));
77 | $dbman->add_key($table, $key);
78 | }
79 |
80 | // Define field timecreated to be added to block_analytics_graphs_msg.
81 | $field = new xmldb_field('timecreated', XMLDB_TYPE_INTEGER, '10', null, null, null, '0', 'courseid');
82 | // Conditionally launch add field timecreated.
83 | if (!$dbman->field_exists($table, $field)) {
84 | $dbman->add_field($table, $field);
85 | $index = new xmldb_index('timecreated', XMLDB_INDEX_NOTUNIQUE, array('timecreated'));
86 | if (!$dbman->index_exists($table, $index)) {
87 | $dbman->add_index($table, $index);
88 | }
89 | }
90 |
91 | // Analytics_graphs savepoint reached.
92 | upgrade_block_savepoint(true, 2015051302, 'analytics_graphs');
93 | }
94 |
95 | return true;
96 | }
97 |
--------------------------------------------------------------------------------
/db/access.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 | defined('MOODLE_INTERNAL') || die();
18 |
19 | $capabilities = array(
20 | 'block/analytics_graphs:bemonitored' => array(
21 | 'captype' => 'read',
22 | 'contextlevel' => CONTEXT_BLOCK,
23 | 'archetypes' => array(
24 | 'student' => CAP_ALLOW,
25 | )
26 | ),
27 |
28 | 'block/analytics_graphs:viewpages' => array(
29 | 'riskbitmask' => RISK_SPAM,
30 | 'captype' => 'read',
31 | 'contextlevel' => CONTEXT_BLOCK,
32 | 'archetypes' => array(
33 | 'guest' => CAP_PREVENT,
34 | 'student' => CAP_PREVENT,
35 | 'teacher' => CAP_ALLOW,
36 | 'editingteacher' => CAP_ALLOW,
37 | 'manager' => CAP_ALLOW
38 | )
39 | ),
40 | 'block/analytics_graphs:myaddinstance' => array(
41 | 'riskbitmask' => RISK_SPAM | RISK_XSS,
42 | 'captype' => 'write',
43 | 'contextlevel' => CONTEXT_SYSTEM,
44 | 'archetypes' => array(
45 | 'editingteacher' => CAP_ALLOW,
46 | 'manager' => CAP_ALLOW
47 | ),
48 | ),
49 | 'block/analytics_graphs:addinstance' => array(
50 | 'riskbitmask' => RISK_SPAM | RISK_XSS,
51 | 'captype' => 'write',
52 | 'contextlevel' => CONTEXT_BLOCK,
53 | 'archetypes' => array(
54 | 'editingteacher' => CAP_ALLOW,
55 | 'manager' => CAP_ALLOW
56 | )
57 | ),
58 | 'block/analytics_graphs:viewgradeschart' => array(
59 | 'riskbitmask' => RISK_SPAM,
60 | 'captype' => 'read',
61 | 'contextlevel' => CONTEXT_BLOCK,
62 | 'archetypes' => array(
63 | 'guest' => CAP_PREVENT,
64 | 'student' => CAP_PREVENT,
65 | 'teacher' => CAP_ALLOW,
66 | 'editingteacher' => CAP_ALLOW,
67 | 'manager' => CAP_ALLOW
68 | )
69 | ),
70 | 'block/analytics_graphs:viewcontentaccesses' => array(
71 | 'riskbitmask' => RISK_SPAM,
72 | 'captype' => 'read',
73 | 'contextlevel' => CONTEXT_BLOCK,
74 | 'archetypes' => array(
75 | 'guest' => CAP_PREVENT,
76 | 'student' => CAP_PREVENT,
77 | 'teacher' => CAP_ALLOW,
78 | 'editingteacher' => CAP_ALLOW,
79 | 'manager' => CAP_ALLOW
80 | )
81 | ),
82 | 'block/analytics_graphs:viewnumberofactivestudents' => array(
83 | 'riskbitmask' => RISK_SPAM,
84 | 'captype' => 'read',
85 | 'contextlevel' => CONTEXT_BLOCK,
86 | 'archetypes' => array(
87 | 'guest' => CAP_PREVENT,
88 | 'student' => CAP_PREVENT,
89 | 'teacher' => CAP_ALLOW,
90 | 'editingteacher' => CAP_ALLOW,
91 | 'manager' => CAP_ALLOW
92 | )
93 | ),
94 | 'block/analytics_graphs:viewassignmentsubmissions' => array(
95 | 'riskbitmask' => RISK_SPAM,
96 | 'captype' => 'read',
97 | 'contextlevel' => CONTEXT_BLOCK,
98 | 'archetypes' => array(
99 | 'guest' => CAP_PREVENT,
100 | 'student' => CAP_PREVENT,
101 | 'teacher' => CAP_ALLOW,
102 | 'editingteacher' => CAP_ALLOW,
103 | 'manager' => CAP_ALLOW
104 | )
105 | ),
106 | 'block/analytics_graphs:viewquizsubmissions' => array(
107 | 'riskbitmask' => RISK_SPAM,
108 | 'captype' => 'read',
109 | 'contextlevel' => CONTEXT_BLOCK,
110 | 'archetypes' => array(
111 | 'guest' => CAP_PREVENT,
112 | 'student' => CAP_PREVENT,
113 | 'teacher' => CAP_ALLOW,
114 | 'editingteacher' => CAP_ALLOW,
115 | 'manager' => CAP_ALLOW
116 | )
117 | ),
118 | 'block/analytics_graphs:viewhitsdistribution' => array(
119 | 'riskbitmask' => RISK_SPAM,
120 | 'captype' => 'read',
121 | 'contextlevel' => CONTEXT_BLOCK,
122 | 'archetypes' => array(
123 | 'guest' => CAP_PREVENT,
124 | 'student' => CAP_PREVENT,
125 | 'teacher' => CAP_ALLOW,
126 | 'editingteacher' => CAP_ALLOW,
127 | 'manager' => CAP_ALLOW
128 | )
129 | ),
130 | );
131 |
--------------------------------------------------------------------------------
/lang/pt_br/block_analytics_graphs.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 |
18 |
19 |
20 | $string['analytics_graphs:addinstance'] = 'Add a new AG block';
21 | $string['nalytics_graphs:bemonitored'] = 'Usuário é monitorado na disciplina';
22 | $string['analytics_graphs:myaddinstance'] = 'Add a new AG block to the My Moodle page';
23 | $string['analytics_graphs:viewpages'] = 'Visualiza gráficos';
24 |
25 | $string['pluginname'] = 'Analytics Graphs';
26 | $string['analytics_graphs'] = 'Analytics Graphs';
27 |
28 | $string['access'] = 'Acessaram';
29 | $string['access_to_contents'] = 'Materiais acessados';
30 | $string['all_groups'] = 'Todos os grupos';
31 | $string['begin_date'] = 'Data de início';
32 | $string['contents'] = 'Material';
33 | $string['course'] = 'Disciplina';
34 | $string['date_sent'] = "Data de envio";
35 | $string['days_by_week'] = 'Dias acessados na semana';
36 | $string['days_with_access'] = 'Dias acessados';
37 | $string['event_view_graph'] = 'LA - View graph';
38 | $string['event_send_email'] = 'LA - Send email';
39 | $string['grades'] = "Notas";
40 | $string['grades_chart_no_data'] = "Use os botões abaixo para alternar quais tarefas são apresentadas no gráfico";
41 | $string['grades_chart'] = 'Avaliações';
42 | $string['grades_distribution'] = "Distribuição de avaliações";
43 | $string['grades_mail_dialog_title'] = "Estudantes com notas menores ou iguais a";
44 | $string['graphs'] = 'Gráficos';
45 | $string['hits'] = 'Hits no curso';
46 | $string['hits_distribution'] = 'Visualizacoes';
47 | $string['in_time_ratio'] = 'Relação de pontualidade';
48 | $string['in_time_submission'] = 'Envio no prazo';
49 | $string['late_submission'] = 'Envio fora do prazo';
50 | $string['legacy'] = 'Legacy (prior to 2.7)';
51 | $string['mailcopyalert'] = 'Esta é uma cópia de uma mensagem enviada por um professor ou tutor pelo Analytics Graphs! ---- ';
52 | $string['message_text'] = "Texto da Mensagem";
53 | $string['new_message'] = 'Nova mensagem';
54 | $string['no_access'] = 'Não acessaram';
55 | $string['no_graph'] = 'Não há dados para gerar os gráficos';
56 | $string['no_deadline'] = 'Sem limite';
57 | $string['no_messages'] = "Nenhuma mensagem para este aluno";
58 | $string['no_students'] = 'Não há estudantes no curso';
59 | $string['no_submission'] = 'Sem envio';
60 | $string['not_sent_message'] = 'Erro no envio da mensagem!';
61 | $string['number_of_students'] = 'Número de alunos';
62 | $string['number_of_weeks'] = 'Número de semanas';
63 | $string['old_log'] = 'old logs';
64 | $string['old_messages'] = 'Mensagens enviadas';
65 | $string['ratio'] = 'Ratio';
66 | $string['red_tooltip'] = 'Nenhum material foi acessado na última semana';
67 | $string['resources_by_week'] = 'Materiais acessados na semana';
68 | $string['resources_with_access'] = 'Materiais acessados';
69 | $string['send_email'] = 'Enviar mensagem';
70 | $string['sender'] = "Remetente";
71 | $string['sent_message'] = 'Mensagem colocada na fila do Moodle.';
72 | $string['student_information'] = 'Informações';
73 | $string['students'] = 'alunos';
74 | $string['subject'] = 'Assunto';
75 | $string['submissions'] = 'Submissões';
76 | $string['submissions_assign'] = 'Submissões de tarefas';
77 | $string['submissions_hotpot'] = 'Submissoes de Hot Potatoes';
78 | $string['submissions_turnitin'] = 'Submissoes de Turnitin';
79 | $string['submissions_quiz'] = 'Submissões de questionários';
80 | $string['submission_ratio'] = 'Relação de envio';
81 | $string['title_access'] = 'Distribuição de acesso aos materiais (recursos, links e páginas)';
82 | $string['title_students'] = 'Estudantes';
83 | $string['topic'] = 'Topico';
84 | $string['under_development'] = 'Aguarde a próxima versão!';
85 | $string['week_number'] = 'Numero da semana';
86 | $string['yellow_tooltip'] = 'Nenhum material foi acessado até agora';
87 | $string['total_accessed_resources'] = 'Total de materiais acessados';
88 | $string['total_not_accessed_resources'] = 'Total de materiais não acessados';
89 | $string['on_time'] = 'Em tempo';
90 | $string['late'] = 'Atrasado';
91 | $string['no_submission'] = 'Não enviou';
92 | $string['no_submission_on_time'] = 'Aberto para envio';
93 | $string['resources'] = 'Materiais';
94 |
95 | $string['task_list'] = "Lista de avaliações";
96 | $string['task_name'] = "Avaliações";
97 |
98 | $string['total_grades'] = "Quantidade de notas";
99 | $string['lowest_grade'] = "Nota mais baixa";
100 | $string['largest_grade'] = "Nota mais alta";
101 | $string['tooltip_grade_achievement'] = "obtiveram notas menores que ou iguais a";
102 | $string['add_task'] = "Adicionar avaliação ao gráfico";
103 | $string['remove_task'] = "Remover avaliação do gráfico";
104 | $string['no_student_task'] = "Esta avaliação não possui estudantes no grupo selecionado";
105 | $string['add_all'] = "Adicionar todas";
106 | $string['remove_all'] = "Remover todas";
107 |
108 | // Graphresourcestartup.
109 | $string['activities'] = "Atividades";
110 | $string['displayhidden'] = "Mostrar itens escondidos";
111 | $string['options'] = "Opções";
112 | $string['startfrom'] = "Iniciar em";
113 |
114 | // Privacy.
115 | $string['privacy:metadata'] = 'O bloco Analytics Graphs mostra apenas dados já existentes no moodle.';
116 |
117 |
--------------------------------------------------------------------------------
/javascriptfunctions.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 | defined('MOODLE_INTERNAL') || die();
18 | ?>
19 |
20 |
--------------------------------------------------------------------------------
/block_analytics_graphs.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 | defined('MOODLE_INTERNAL') || die();
18 |
19 | require_once($CFG->dirroot . '/blocks/analytics_graphs/lib.php');
20 |
21 | class block_analytics_graphs extends block_base {
22 | public function init() {
23 | $this->title = get_string('analytics_graphs', 'block_analytics_graphs');
24 | }
25 | // The PHP tag and the curly bracket for the class definition
26 | // will only be closed after there is another function added in the next section.
27 | public function get_content() {
28 | global $CFG;
29 | global $DB;
30 |
31 | $course = $this->page->course;
32 | $context = context_course::instance($course->id);
33 | // Capability is course level, not block level, as graphs are for course level.
34 | $canview = has_capability('block/analytics_graphs:viewpages', $context);
35 | if (!$canview) {
36 | return;
37 | }
38 | if ($this->content !== null) {
39 | return $this->content;
40 | }
41 |
42 | $sql = "SELECT cm.module, md.name
43 | FROM {course_modules} cm
44 | LEFT JOIN {modules} md ON cm.module = md.id
45 | WHERE cm.course = ?
46 | GROUP BY cm.module, md.name";
47 | $params = array($course->id);
48 | $availablemodulestotal = $DB->get_records_sql($sql, $params);
49 | $availablemodules = array();
50 | foreach ($availablemodulestotal as $result) {
51 | array_push($availablemodules, $result->name);
52 | }
53 |
54 | $this->content = new stdClass;
55 | $this->content->text = "";
56 | if (has_capability('block/analytics_graphs:viewgradeschart', $context)) {
57 | $this->content->text .= " wwwroot}/blocks/analytics_graphs/grades_chart.php?id={$course->id}
58 | target=_blank>" . get_string('grades_chart', 'block_analytics_graphs') . "";
59 | }
60 | if (has_capability('block/analytics_graphs:viewcontentaccesses', $context)) {
61 | $this->content->text .= " wwwroot}/blocks/analytics_graphs/graphresourcestartup.php?id={$course->id}
62 | target=_blank>" . get_string('access_to_contents', 'block_analytics_graphs') . "";
63 | }
64 | if (has_capability('block/analytics_graphs:viewnumberofactivestudents', $context)) {
65 | $this->content->text .= " wwwroot}/blocks/analytics_graphs/timeaccesseschart.php?id={$course->id}&days=7
66 | target=_blank>" . get_string('timeaccesschart_title', 'block_analytics_graphs') . "";
67 | }
68 | if (has_capability('block/analytics_graphs:viewassignmentsubmissions', $context) && in_array("assign", $availablemodules)) {
69 | $this->content->text .= " wwwroot}/blocks/analytics_graphs/assign.php?id={$course->id}
70 | target=_blank>" . get_string('submissions_assign', 'block_analytics_graphs') . "";
71 | }
72 | if (has_capability('block/analytics_graphs:viewquizsubmissions', $context) && in_array("quiz", $availablemodules)) {
73 | $this->content->text .= " wwwroot}/blocks/analytics_graphs/quiz.php?id={$course->id}
74 | target=_blank>" . get_string('submissions_quiz', 'block_analytics_graphs') . "";
75 | }
76 | if (in_array("hotpot", $availablemodules)) {
77 | $this->content->text .= " wwwroot}/blocks/analytics_graphs/hotpot.php?id={$course->id}
78 | target=_blank>" . get_string('submissions_hotpot', 'block_analytics_graphs') . "";
79 | }
80 | if (in_array("turnitintooltwo", $availablemodules)) {
81 | $this->content->text .= " wwwroot}/blocks/analytics_graphs/turnitin.php?id={$course->id}
82 | target=_blank>" . get_string('submissions_turnitin', 'block_analytics_graphs') . "";
83 | }
84 | if (has_capability('block/analytics_graphs:viewhitsdistribution', $context)) {
85 | $this->content->text .= " wwwroot}/blocks/analytics_graphs/hits.php?id={$course->id}
86 | target=_blank>" . get_string('hits_distribution', 'block_analytics_graphs') . "";
87 | }
88 |
89 | $this->content->footer = '
';
90 | return $this->content;
91 | }
92 |
93 | /**
94 | * Enables global configuration of the block in settings.php.
95 | *
96 | * @return bool True if the global configuration is enabled.
97 | */
98 | public function has_config() {
99 | return true;
100 | }
101 |
102 | /**
103 | * Enabled config per block.
104 | *
105 | * @return true
106 | */
107 | public function instance_allow_config() {
108 | return (bool) get_config('block_analytics_graphs', 'overrideonlyactive');;
109 | }
110 |
111 | /**
112 | * Process deletion of a block instance.
113 | */
114 | public function instance_delete() {
115 | $needupdate = false;
116 | $onlyactivecourses = block_analytics_graphs_get_onlyactivecourses();
117 |
118 | // If related course has "onlyactive" setting enabled, we would like to clean it up on the block deletion.
119 | if (($key = array_search($this->page->course->id, $onlyactivecourses)) !== false) {
120 | unset($onlyactivecourses[$key]);
121 | $needupdate = true;
122 | }
123 |
124 | if ($needupdate) {
125 | set_config('onlyactivecourses', implode(',', $onlyactivecourses), 'block_analytics_graphs');
126 | }
127 | }
128 | } // Here's the closing bracket for the class definition.
129 |
--------------------------------------------------------------------------------
/lang/zh_cn/block_analytics_graphs.php:
--------------------------------------------------------------------------------
1 | .
16 |
17 | /**
18 | * 翻译:汤和果(hgtang93@163.com)
19 | * 插件名称:分析图
20 | * 插件类型:版块
21 | * @package block
22 | * @subpackage analytics_graphs
23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24 | */
25 |
26 | $string['access'] = '已访问';
27 | $string['access_graph'] = '访问情况统计';
28 | $string['access_to_contents'] = '内容访问统计';
29 | $string['add_all'] = '全部添加';
30 | $string['add_task'] = '添加到图表';
31 | $string['all_groups'] = 'All groups';
32 | $string['analytics_graphs'] = '分析图';
33 | $string['analytics_graphs:addinstance'] = '添加一个分析图版块';
34 | $string['analytics_graphs:bemonitored'] = '记录课程中用户的行为';
35 | $string['analytics_graphs:myaddinstance'] = '在个人主页添加一个分析图版块';
36 | $string['analytics_graphs:viewpages'] = '查看图表';
37 | $string['begin_date'] = '开始日期';
38 | $string['btn_deselect_all'] = '取消全选';
39 | $string['btn_select_all'] = '全选';
40 | $string['btn_submit'] = '生成图表';
41 | $string['contents'] = '内容';
42 | $string['course'] = '课程';
43 | $string['date_sent'] = '发送日期';
44 | $string['days_by_week'] = '每周访问天数';
45 | $string['days_with_access'] = '访问天数';
46 | $string['event_send_email'] = '发送邮件';
47 | $string['event_view_graph'] = '查看图表';
48 | $string['forumchart_notposted'] = '未参与的讨论';
49 | $string['forumchart_notread'] = '未读帖子';
50 | $string['forumchart_posted'] = '已参与的讨论';
51 | $string['forumchart_read'] = '已读帖子';
52 | $string['grades'] = '成绩';
53 | $string['grades_chart'] = '成绩评价表';
54 | $string['grades_chart_no_data'] = '使用下方的按钮将评价项目添加到图表中';
55 | $string['grades_distribution'] = '评价分布情况';
56 | $string['grades_mail_dialog_title'] = '成绩小于或等于';
57 | $string['graphs'] = '图表';
58 | $string['hits'] = '访问次数';
59 | $string['hits_distribution'] = '访问次数统计';
60 | $string['hitschart_totalresourcechart'] = '每周资源访问情况统计';
61 | $string['hitschart_totalweekaccesseschart'] = '每周访问天数统计';
62 | $string['in_time_ratio'] = '准点率';
63 | $string['in_time_submission'] = '及时提交';
64 | $string['info_coursetype'] = "课程";
65 | $string['largest_grade'] = '最高分';
66 | $string['late'] = '迟交';
67 | $string['late_submission'] = '逾期提交';
68 | $string['lbl_ccteachers'] = '抄送给本课程其他教师';
69 | $string['legacy'] = '传统模式 (2.7 版本以前)';
70 | $string['lowest_grade'] = '最低分';
71 | $string['mailcopyalert'] = '复制分析图数据! ----';
72 | $string['message_text'] = '消息内容';
73 | $string['new_message'] = '发送消息';
74 | $string['no_access'] = '未访问';
75 | $string['no_deadline'] = '无截止时间';
76 | $string['no_graph'] = '无数据,无法生成图表';
77 | $string['no_messages'] = '无消息';
78 | $string['no_student_task'] = '选定分组中无学生参与此项目';
79 | $string['no_students'] = '此课程中无学生';
80 | $string['no_submission'] = '未提交';
81 | $string['no_submission_on_time'] = '可以提交';
82 | $string['no_types_requested'] = '未选中资源或活动,无法生成图表';
83 | $string['not_sent_message'] = '消息发送失败!';
84 | $string['number_of_students'] = '学生数';
85 | $string['number_of_weeks'] = '周数';
86 | $string['old_log'] = '消息日志';
87 | $string['old_messages'] = '已发送消息';
88 | $string['on_time'] = '准时';
89 | $string['pluginname'] = '分析图';
90 | $string['ratio'] = '比例';
91 | $string['red_tooltip'] = '最近一周未访问过';
92 | $string['remove_all'] = '全部移除';
93 | $string['remove_task'] = '从图表移除';
94 | $string['resources'] = '资源';
95 | $string['resources_by_week'] = '每周资源访问情况';
96 | $string['resources_with_access'] = '资源访问数';
97 | $string['select_items_to_display'] = '选择要统计的项目';
98 | $string['send_email'] = '发送邮件';
99 | $string['sender'] = '发件人';
100 | $string['sent_message'] = '消息已发送至 Moodle 队列';
101 | $string['student_information'] = '详细信息';
102 | $string['students'] = '学生';
103 | $string['subfailed'] = '未通过';
104 | $string['subject'] = '主题';
105 | $string['submission_ratio'] = '提交率';
106 | $string['submissions'] = '提交统计';
107 | $string['submissions_assign'] = '作业提交统计';
108 | $string['submissions_forumchart'] = '讨论区访问统计';
109 | $string['submissions_forumchart_posts'] = '讨论区参与情况';
110 | $string['submissions_forumchart_reads'] = '讨论区帖子阅读情况';
111 | $string['submissions_hotpot'] = 'Hotpot 提交统计';
112 | $string['submissions_quiz'] = '测验提交统计';
113 | $string['submissions_quizchart'] = '测验提交统计';
114 | $string['submissions_turnitin'] = 'Turnitin 提交统计';
115 | $string['subpassed'] = '已通过';
116 | $string['task_list'] = '项目列表';
117 | $string['task_name'] = '评价项目';
118 | $string['timeaccesschart_activities_title'] = "学生活动统计";
119 | $string['timeaccesschart_button_apply'] = "应用";
120 | $string['timeaccesschart_daysforstatistics'] = "图表中统计的日期数:";
121 | $string['timeaccesschart_maxdays'] = "可用日期数最大值为:";
122 | $string['timeaccesschart_tip'] = "活跃学生数";
123 | $string['timeaccesschart_title'] = "活跃学生统计";
124 | $string['title_access'] = '内容访问分布情况(资源、链接与网页)';
125 | $string['title_students'] = '学生';
126 | $string['tooltip_grade_achievement'] = '成绩小于或等于';
127 | $string['topic'] = '主题';
128 | $string['total_accessed_resources'] = '被完全访问的资源';
129 | $string['total_grades'] = '有成绩的个数';
130 | $string['total_not_accessed_resources'] = '未被完全访问的资源';
131 | $string['typename_activequiz'] = '在线测验';
132 | $string['typename_assign'] = '作业';
133 | $string['typename_attendance'] = 'Attendance Register';
134 | $string['typename_bigbluebuttonbn'] = 'BigBlueButtonBN';
135 | $string['typename_book'] = '图书';
136 | $string['typename_booking'] = 'Booking';
137 | $string['typename_certificate'] = '证书';
138 | $string['typename_chat'] = '聊天室';
139 | $string['typename_checklist'] = '待办列表';
140 | $string['typename_choice'] = '投票';
141 | $string['typename_choicegroup'] = '群组投票';
142 | $string['typename_customcert'] = '自定义证书';
143 | $string['typename_data'] = '数据库';
144 | $string['typename_dataform'] = '数据表单';
145 | $string['typename_feedback'] = '反馈';
146 | $string['typename_folder'] = '文件夹';
147 | $string['typename_forum'] = '讨论区';
148 | $string['typename_game'] = '游戏';
149 | $string['typename_glossary'] = '词汇表';
150 | $string['typename_groupselect'] = 'Group Self-Selection';
151 | $string['typename_hotpot'] = 'HotPot';
152 | $string['typename_hvp'] = '交互式内容';
153 | $string['typename_icontent'] = '内容页面';
154 | $string['typename_imscp'] = 'IMS 内容包';
155 | $string['typename_label'] = '标签';
156 | $string['typename_lesson'] = '程序教学';
157 | $string['typename_lightboxgallery'] = 'Lightbox Gallery';
158 | $string['typename_lti'] = '外部工具';
159 | $string['typename_openmeetings'] = 'OpenMeetings';
160 | $string['typename_page'] = '网页';
161 | $string['typename_poster'] = 'Poster';
162 | $string['typename_questionnaire'] = '问卷';
163 | $string['typename_quiz'] = '测验';
164 | $string['typename_quizgame'] = 'Quizventure';
165 | $string['typename_recordingsbn'] = 'RecordingsBN';
166 | $string['typename_resource'] = '文件';
167 | $string['typename_scheduler'] = 'Scheduler';
168 | $string['typename_scorm'] = 'SCORM 课件';
169 | $string['typename_subcourse'] = '子课程';
170 | $string['typename_survey'] = '问卷调查';
171 | $string['typename_turnitintooltwo'] = 'Turnitin 作业';
172 | $string['typename_url'] = '网页地址';
173 | $string['typename_vpl'] = '虚拟编程实验室';
174 | $string['typename_wiki'] = 'Wiki';
175 | $string['typename_workshop'] = '互动评价';
176 | $string['under_development'] = '开发中……敬请期待下个版本!';
177 | $string['week_number'] = '周次';
178 | $string['yellow_tooltip'] = '至今为止未访问过';
179 |
--------------------------------------------------------------------------------
/externalref/exporting.js:
--------------------------------------------------------------------------------
1 | /*
2 | Highcharts JS v5.0.2 (2016-10-26)
3 | Exporting module
4 |
5 | (c) 2010-2016 Torstein Honsi
6 |
7 | License: www.highcharts.com/license
8 | */
9 | (function(m){"object"===typeof module&&module.exports?module.exports=m:m(Highcharts)})(function(m){(function(f){var m=f.defaultOptions,n=f.doc,u=f.Chart,v=f.addEvent,D=f.removeEvent,E=f.fireEvent,r=f.createElement,B=f.discardElement,w=f.css,q=f.merge,C=f.pick,h=f.each,t=f.extend,G=f.splat,H=f.isTouchDevice,F=f.win,I=f.Renderer.prototype.symbols;t(m.lang,{printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",
10 | contextButtonTitle:"Chart context menu"});m.navigation={buttonOptions:{theme:{},symbolSize:14,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,verticalAlign:"top",width:24}};q(!0,m.navigation,{menuStyle:{border:"1px solid #999999",background:"#ffffff",padding:"5px 0"},menuItemStyle:{padding:"0.5em 1em",background:"none",color:"#333333",fontSize:H?"14px":"11px",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#335cad",color:"#ffffff"},buttonOptions:{symbolFill:"#666666",
11 | symbolStroke:"#666666",symbolStrokeWidth:3,theme:{fill:"#ffffff",stroke:"none",padding:5}}});m.exporting={type:"image/png",url:"https://export.highcharts.com/",printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",_titleKey:"contextButtonTitle",menuItems:[{textKey:"printChart",onclick:function(){this.print()}},{separator:!0},{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},
12 | {textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]}}};f.post=function(a,b,e){var c;a=r("form",q({method:"post",action:a,enctype:"multipart/form-data"},e),{display:"none"},n.body);for(c in b)r("input",{type:"hidden",name:c,value:b[c]},null,a);a.submit();B(a)};t(u.prototype,{sanitizeSVG:function(a){a=a.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,
13 | "").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|")(\S+)("|")\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/