summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSivaji2012-12-15 11:26:20 (GMT)
committer Sivaji2012-12-15 11:26:20 (GMT)
commitcf689f2ef22c38bdac7d93942043767de4942bd7 (patch)
treea83e57ba0a463a89ed85c8712596216c71c24e3f
parentebe2c30c91069a2a981705f32d777ab72b085229 (diff)
parent668affe26c8bd463ae78deba4bde5bee4f306aa4 (diff)
Merge branch '7.x-4.x' of git.drupal.org:project/quiz into 7.x-4.x
-rw-r--r--question_types/quiz_directions/quiz_directions.classes.inc2
-rw-r--r--quiz.module5
-rw-r--r--quiz.pages.inc3
3 files changed, 6 insertions, 4 deletions
diff --git a/question_types/quiz_directions/quiz_directions.classes.inc b/question_types/quiz_directions/quiz_directions.classes.inc
index 58ee74a..f5b998c 100644
--- a/question_types/quiz_directions/quiz_directions.classes.inc
+++ b/question_types/quiz_directions/quiz_directions.classes.inc
@@ -160,7 +160,7 @@ class QuizDirectionsResponse extends QuizQuestionResponse {
*
* @see QuizQuestionResponse#getReportForm($showpoints, $showfeedback, $allow_scoring)
*/
- public function getReportForm($showpoints = TRUE, $showfeedback = TRUE) {
+ public function getReportForm($showpoints = TRUE, $showfeedback = TRUE, $allow_scoring = FALSE) {
return array(
'#no_report' => TRUE,
);
diff --git a/quiz.module b/quiz.module
index 37d0852..51cc432 100644
--- a/quiz.module
+++ b/quiz.module
@@ -241,9 +241,10 @@ function quiz_access_my_results($quiz) {
*/
function quiz_access_my_result($rid) {
global $user;
- if (!user_access('view own quiz results'))
+ if (!user_access('view own quiz results')) {
return FALSE;
- $time_end = db_result(db_query('SELECT time_end FROM {quiz_node_results} WHERE result_id = %d AND uid = %d', $rid, $user->uid));
+ }
+ $time_end = db_query('SELECT time_end FROM {quiz_node_results} WHERE result_id = :result_id AND uid = :uid', array(':result_id' => $rid, ':uid' => $user->uid))->fetchField();
return $time_end > 0;
}
diff --git a/quiz.pages.inc b/quiz.pages.inc
index 3644749..b47057b 100644
--- a/quiz.pages.inc
+++ b/quiz.pages.inc
@@ -607,7 +607,8 @@ function theme_quiz_user_summary($variables) {
$output .= '<div id="quiz_summary">' . $summary['result'] . '</div>' . "\n";
}
// Get the feedback for all questions.
- $output .= drupal_render(drupal_get_form('quiz_report_form', $questions, FALSE, TRUE));
+ $form = drupal_get_form('quiz_report_form', $questions, FALSE, TRUE);
+ $output .= drupal_render($form);
return $output;
}