Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-37449 Incorrect doubled 'u.email' field in the SQL query (Oracle …

…error: ORA-00918)
  • Loading branch information...
commit 9b6485865ce9ab58e1e5c5c29e77274907f374e1 1 parent 09de5eb
@scara scara authored
View
3  mod/scorm/report/basic/report.php
@@ -34,6 +34,7 @@ class scorm_basic_report extends scorm_default_report {
*/
function display($scorm, $cm, $course, $download) {
global $CFG, $DB, $OUTPUT, $PAGE;
+
$contextmodule= context_module::instance($cm->id);
$action = optional_param('action', '', PARAM_ALPHA);
$attemptids = optional_param_array('attemptid', array(), PARAM_RAW);
@@ -271,7 +272,7 @@ function display($scorm, $cm, $course, $download) {
$select = 'SELECT DISTINCT '.$DB->sql_concat('u.id', '\'#\'', 'COALESCE(st.attempt, 0)').' AS uniqueid, ';
$select .= 'st.scormid AS scormid, st.attempt AS attempt, ' .
'u.id AS userid, u.idnumber, u.firstname, u.lastname, u.picture, u.imagealt, u.email' .
- get_extra_user_fields_sql($coursecontext, 'u', '', array('idnumber')) . ' ';
+ get_extra_user_fields_sql($coursecontext, 'u', '', array('email', 'idnumber')) . ' ';
// This part is the same for all cases - join users and scorm_scoes_track tables
$from = 'FROM {user} u ';
View
3  mod/scorm/report/interactions/report.php
@@ -35,6 +35,7 @@ class scorm_interactions_report extends scorm_default_report {
*/
function display($scorm, $cm, $course, $download) {
global $CFG, $DB, $OUTPUT, $PAGE;
+
$contextmodule = context_module::instance($cm->id);
$action = optional_param('action', '', PARAM_ALPHA);
$attemptids = optional_param_array('attemptid', array(), PARAM_RAW);
@@ -159,7 +160,7 @@ function display($scorm, $cm, $course, $download) {
$select = 'SELECT DISTINCT '.$DB->sql_concat('u.id', '\'#\'', 'COALESCE(st.attempt, 0)').' AS uniqueid, ';
$select .= 'st.scormid AS scormid, st.attempt AS attempt, ' .
'u.id AS userid, u.idnumber, u.firstname, u.lastname, u.picture, u.imagealt, u.email'.
- get_extra_user_fields_sql($coursecontext, 'u', '', array('idnumber')) . ' ';
+ get_extra_user_fields_sql($coursecontext, 'u', '', array('email', 'idnumber')) . ' ';
// This part is the same for all cases - join users and scorm_scoes_track tables
$from = 'FROM {user} u ';
Please sign in to comment.
Something went wrong with that request. Please try again.