Skip to content
Browse files

Merge branch 'm24_MDL-37449_Reports_ORA-00918_column_ambiguously_defi…

…ned' of https://github.com/scara/moodle into MOODLE_24_STABLE
  • Loading branch information...
2 parents e23d098 + 9b64858 commit bf0c578f16fc369e2879b1eaf9db4d80629403a2 @danpoltawski danpoltawski committed Feb 19, 2013
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
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 ';

0 comments on commit bf0c578

Please sign in to comment.
Something went wrong with that request. Please try again.