Skip to content

Commit

Permalink
MDL-57791 analytics: Compatibility with oracle
Browse files Browse the repository at this point in the history
Also moved predictions test to analytics/tests/prediction_test.php
  • Loading branch information
dmonllao committed Jul 24, 2017
1 parent 382a089 commit 466f683
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion analytics/classes/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public static function get_all_models($enabled = false, $trained = false, $predi

$params = array();

$sql = "SELECT DISTINCT am.* FROM {analytics_models} am";
$fields = 'am.id, am.enabled, am.trained, am.target, ' . $DB->sql_compare_text('am.indicators') .
', am.timesplitting, am.version, am.timecreated, am.timemodified, am.usermodified';
$sql = "SELECT DISTINCT $fields FROM {analytics_models} am";
if ($predictioncontext) {
$sql .= " JOIN {analytics_predictions} ap ON ap.modelid = am.id AND ap.contextid = :contextid";
$params['contextid'] = $predictioncontext->id;
Expand Down
File renamed without changes.

0 comments on commit 466f683

Please sign in to comment.