Permalink
Browse files

Merge branch 'm23_MDL-37449_Reports_ORA-00918_column_ambiguously_defi…

…ned' of https://github.com/scara/moodle into MOODLE_23_STABLE
  • Loading branch information...
danpoltawski committed Feb 19, 2013
2 parents cb7da8e + 2ceaefb commit e9328f579e644bf728585129bcd087648921f261
Showing with 4 additions and 2 deletions.
  1. +2 −1 mod/scorm/report/basic/report.php
  2. +2 −1 mod/scorm/report/interactions/report.php
@@ -33,6 +33,7 @@ class scorm_basic_report extends scorm_default_report {
*/
function display($scorm, $cm, $course, $download) {
global $CFG, $DB, $OUTPUT, $PAGE;
+
$contextmodule= get_context_instance(CONTEXT_MODULE, $cm->id);
$action = optional_param('action', '', PARAM_ALPHA);
$attemptids = optional_param_array('attemptid', array(), PARAM_RAW);
@@ -274,7 +275,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 ';
@@ -35,6 +35,7 @@ class scorm_interactions_report extends scorm_default_report {
*/
function display($scorm, $cm, $course, $download) {
global $CFG, $DB, $OUTPUT, $PAGE;
+
$contextmodule = get_context_instance(CONTEXT_MODULE, $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 ';

0 comments on commit e9328f5

Please sign in to comment.