Skip to content

Commit

Permalink
2.12 (Build: 2018031100)
Browse files Browse the repository at this point in the history
The log table optimisation code incorrectly included the prefix mdl_. This has now been removed.
A further optimisation to the SQL code was implemented by placing brackets around '(auf.userid = $userid OR a.markingworkflow = 0)'
  • Loading branch information
jgramp committed Mar 11, 2018
1 parent 0cac99d commit 5ff8f36
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ The report requires jQuery to be enabled, otherwise sorting and searching will n

---
Change log:

2.12 (Build: 2018031100)
The log table optimisation code incorrectly included the prefix mdl_. This has now been removed.
A further optimisation to the SQL code was implemented by placing brackets around '(auf.userid = $userid OR a.markingworkflow = 0)'

2.11 (Build: 2018013002)
Added usage statistics tab to the report.
Added a usage report permission to allow particular Moodle users access to usage statistics.
Expand Down
8 changes: 4 additions & 4 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ function xmldb_report_myfeedback_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2016031700, 'report', 'myfeedback');
}
//optimise the log table
if ($oldversion < 2017112800) {
if ($oldversion < 2018031100) {
$table = new xmldb_table('logstore_standard_log');
//create index mdl_logsstanlog_usecou_ix on mdl_logstore_standard_log (userid, courseid);
$index = new xmldb_index('mdl_logsstanlog_usecou_ix', XMLDB_INDEX_NOTUNIQUE, array('userid', 'courseid'));
$index = new xmldb_index('logsstanlog_usecou_ix', XMLDB_INDEX_NOTUNIQUE, array('userid', 'courseid'));
if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index);
}

// Myfeedback savepoint reached.
upgrade_plugin_savepoint(true, 2017112800, 'report', 'myfeedback');
upgrade_plugin_savepoint(true, 2018031100, 'report', 'myfeedback');
}
return true; //have to be in else get an unknown error
}
}
2 changes: 1 addition & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -4594,7 +4594,7 @@ public function get_data($archive, $checkdb) {
LEFT JOIN {assign_grades} ag ON a.id = ag.assignment AND ag.userid=$userid ";
if (!$archive || ($archive && $checkdb > 1314)) {//when the new assign_user_flags table came in
$sql .= "LEFT JOIN {assign_user_flags} auf ON a.id = auf.assignment AND auf.workflowstate = 'released'
AND auf.userid = $userid OR a.markingworkflow = 0 ";
AND (auf.userid = $userid OR a.markingworkflow = 0) ";
}
if (!$archive || ($archive && $checkdb > 1112)) {//when the new grading_areas table came in
$sql .= "LEFT JOIN {grading_areas} ga ON con.id = ga.contextid ";
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
* http://bit.ly/IoEAssessmentCareersProject
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$plugin->version = 2018013002;
$plugin->version = 2018031100;
$plugin->component = 'report_myfeedback';
$plugin->requires = 2013111810;
$plugin->release = '2.11 (Build: 2018013002)';
$plugin->release = '2.12 (Build: 2018031100)';
$plugin->maturity = MATURITY_STABLE;

0 comments on commit 5ff8f36

Please sign in to comment.