forked from catalyst/moodle-local_assessfreq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request catalyst#151 from marxjohnson/student-search-query
Rewrite student_search_table query
- Loading branch information
Showing
98 changed files
with
2,158 additions
and
2,219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
* @copyright 2020 Matt Porritt <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
define(['core/chart_output_chartjs'], function(Output) { | ||
define(['core/chart_output_chartjs'], function (Output) { | ||
|
||
/** | ||
* Module level variables. | ||
|
@@ -36,7 +36,7 @@ define(['core/chart_output_chartjs'], function(Output) { | |
* @param {module:core/chart_axis} axis The axis. | ||
* @return {Object} The axis config. | ||
*/ | ||
Output.prototype._makeConfig = function() { | ||
Output.prototype._makeConfig = function () { | ||
var config = { | ||
type: this._getChartType(), | ||
data: { | ||
|
@@ -56,34 +56,34 @@ define(['core/chart_output_chartjs'], function(Output) { | |
} | ||
|
||
// Override legend options with those provided at run time. | ||
if (rtLegendoptions) { | ||
if (rtLegendoptions) { | ||
config.options.legend = rtLegendoptions; | ||
} | ||
|
||
this._chart.getXAxes().forEach(function(axis, i) { | ||
this._chart.getXAxes().forEach(function (axis, i) { | ||
var axisLabels = axis.getLabels(); | ||
|
||
config.options.scales = config.options.scales || {}; | ||
config.options.scales.xAxes = config.options.scales.xAxes || []; | ||
config.options.scales.xAxes[i] = this._makeAxisConfig(axis, 'x', i); | ||
|
||
if (axisLabels !== null) { | ||
config.options.scales.xAxes[i].ticks.callback = function(value, index) { | ||
config.options.scales.xAxes[i].ticks.callback = function (value, index) { | ||
return axisLabels[index] || ''; | ||
}; | ||
} | ||
config.options.scales.xAxes[i].stacked = this._isStacked(); | ||
}.bind(this)); | ||
|
||
this._chart.getYAxes().forEach(function(axis, i) { | ||
this._chart.getYAxes().forEach(function (axis, i) { | ||
var axisLabels = axis.getLabels(); | ||
|
||
config.options.scales = config.options.scales || {}; | ||
config.options.scales.yAxes = config.options.scales.yAxes || []; | ||
config.options.scales.yAxes[i] = this._makeAxisConfig(axis, 'y', i); | ||
|
||
if (axisLabels !== null) { | ||
config.options.scales.yAxes[i].ticks.callback = function(value) { | ||
config.options.scales.yAxes[i].ticks.callback = function (value) { | ||
return axisLabels[parseInt(value, 10)] || ''; | ||
}; | ||
} | ||
|
@@ -104,7 +104,7 @@ define(['core/chart_output_chartjs'], function(Output) { | |
/** | ||
* Get the aspect ratio setting and initialise the chart. | ||
*/ | ||
ChartOutput.init = function(chartImage, ChartInst, aspect, legend) { | ||
ChartOutput.init = function (chartImage, ChartInst, aspect, legend) { | ||
aspectRatio = aspect; | ||
rtLegendoptions = legend; | ||
new Output(chartImage, ChartInst); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.