Moodle

Quizzes overview show not results when Feedback is included

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.7
  • Fix Version/s: 1.8.9
  • Component/s: Quiz
  • Labels:
    None
  • Environment:
    Apache 2.2.3 / Php 5.24 / Red Hat Linux Enterprise Server Relesae 5 (Linux 2.6.18-8) / Oracle 10Gr2
  • Database:
    Oracle
  • Difficulty:
    Easy
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

When into a Course Quizzes you request form Results and "Feedback" is included then following message is displayed:

"Nothing to display"

With debug options enabled you can obtains ...:

ORA-00905: falta una palabra clave

SELECT u.id||'#'|| NVL(qa.attempt, 0) AS uniqueid, qa.uniqueid as attemptuniqueid, qa.id AS attempt, u.id AS userid, u.firstname, u.lastname, u.picture, qa.sumgrades, qa.timefinish, qa.timestart, qa.timefinish - qa.timestart AS duration , qf.feedbacktext FROM m_user u JOIN m_role_assignments ra ON ra.userid = u.id LEFT JOIN m_quiz_attempts qa ON u.id = qa.userid AND qa.quiz = 12899 LEFT JOIN m_quiz_feedback AS qf ON qf.quizid = 12899 AND qf.mingrade display()

Debug deeper we found that keyword "AS" exceeds in the last clause "LEFT JOIN m_quiz_feedback AS qf". Editing "mod/quiz/report/overview/report.php" at line 410:

$from .= " LEFT JOIN {$CFG->prefix}quiz_feedback AS qf ON " .

replacing by:

$from .= " LEFT JOIN {$CFG->prefix}quiz_feedback qf ON " .

Now RUN without Error and Fine...

Issue Links

Activity

Hide
Tim Hunt added a comment -

Adolfo, thank you for the analysis and the fix. You are quite right (the rules are even in the coding guidelines: Development:Coding#Database_structures number 11!).

I have applied this fix.

(This was already fixed in another way in later branches.)

Show
Tim Hunt added a comment - Adolfo, thank you for the analysis and the fix. You are quite right (the rules are even in the coding guidelines: Development:Coding#Database_structures number 11!). I have applied this fix. (This was already fixed in another way in later branches.)

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: