Forums
Hi,
I'm having problems with inserting the Answer Feedback to Long Answer Questions (Tested on Opigno 1.20 and 1.21). Giving the grades for Long Answer Questions works fine but giving the feedback while setting the grade is not working. After you submitting the grade shows as intented but the feedback field is empty (occurs on both admin and student side). I believe it is related to this issue: https://www.drupal.org/node/2380523, but I was unable to make this patch work with Long Answer Question.
Do you have any quick fix for this or plans to upgrade the Quiz to the newer version 7.x-5.x, where this issue should be already fixed?
Hi Major,
Hi Major,
Do you mind doing these changes and letting me know if it worked?
1->
inside profiles/opigno_lms/modules/contrib/quiz/question_types/long_answer/long_answer_question.module
Add the two lines with +++++ function long_answer_score_an_answer($values, $update_total = TRUE) {... $changed = db_update('quiz_long_answer_user_answers') ->fields(array( 'score' => !empty($calculated_score)?$calculated_score:0, 'is_evaluated' => 1,+++++'answer_feedback' => isset($answer_feedback) ? $answer_feedback : '', +++++'answer_feedback_format' => NULL ))...2 -> inside profiles/opigno_lms/modules/contrib/og_quiz/includes/question_types/long_answer/og_long_answer.php
Comment out he #format line public function getReportFormAnswerFeedback($showpoints = TRUE, $showfeedback = TRUE, $allow_scoring = FALSE) { if (quiz_access_to_score() && $allow_scoring) { return array( '#title' => t('Enter feedback'), '#type' => 'textarea', '#default_value' => $this->answer_feedback ? $this->answer_feedback : '', //'#format' => isset($this->answer_feedback_format) ? $this->answer_feedback_format : NULL, '#attributes' => array('class' => array('quiz-report-score')), ); } return FALSE; } Best regardsIn reply to Hi Major, by James Aparicio
It seems that this does the
Patched issue will be part of
Patched issue will be part of next release
https://www.drupal.org/node/2657424