When a project is integrated between 3 modules I think the only option is to post into 3 issue queus?
http://drupal.org/node/1156662#comment-4465044 is this subject in the Quiz Queue

I need to get QUIZ integrated with Gradebook / OG Gradebook. In order to do that I need to get a clear guide laid out..
Things are not working.

OG Gradebook 6.x-2.x-dev (2011-Mar-27)
Gradebook 6.x-2.x-dev (2011-Apr-18)
Quiz 6.x-4.1
1) Set Quiz content type as standard group post in Organic groups that only author may edit
2) Go to greadebook API /admin/gradebook/gradebookapi, Select "Quiz" type for Student Response Types.
3) Create Assignment with selected assignment content type. Select Quiz and accepted response type.
4) Create Quiz

---- Question1! You are the teacher... normally the student creates the content for a response, but since you are creating the content... you are creating the quiz... do you select response to field for responding to assignment created in step #2? Or do you leave it blank?

----Question2 You are the teacher? What do you put for response status?

Comments

nevets’s picture

Title: HIGH PRIORITY: PLEASE PROVIDE STEP BY STEP INTEGRATION GUIDE TO INTEGRATE QUIZ WITH GRADEBOOK. FINALS TIME. » High Priority: Please Provide Step By Step Integration Guide To Integrate Quiz With Gradebook. Finals Time.
Priority: Critical » Normal

Fixed title so it is not all caps and changed priority (support requests should not be critical).

AntiNSA’s picture

Additionally, if the quiz is set as a response type you are always presented with
"An illegal choice has been detected. Please contact the site administrator."

and required to fill out the following two feilds.

Assign Action:

and.

This is a response to.

No matter what I select , Assign Action is always highlighted in red whien trying to save a selectionas if it was an illegal choice or no selection was made.

AntiNSA’s picture

Category: support » bug
Priority: Normal » Critical

perhaps we should change the category thaen to a bug and not support request.

also,

===If you use Quiz content type as as assignment type, and not as response type, then what do youy select for accepted response type? Leave it blank?

AntiNSA’s picture

Title: High Priority: Please Provide Step By Step Integration Guide To Integrate Quiz With Gradebook. Finals Time. » Quiz integration: Manually scored short/long answers not updating recorded scores in Gradebook. only auto scores recorded.

OK

Step 1)
Set quiz as assignment tyoe

Step 2)
Problem----

Everything works well EXCEPT::::::

When quiz is graded , only the automaticly scored questions appear in the gradebook. Manual scored questions, such as long and short answers do not update the recorded grade in the gradebook.

Hy are manually scored questions not updating grade in Gradebook?

tutumlum’s picture

Component: Documentation » Code
Status: Active » Needs review

Adding following code to gradebook.quiz.inc works for me

<?php

function gradebook_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'quiz_report_form') {
    $form['submit']['#submit'][] = 'gradebook_score_quiz_submit';
  }
}

function gradebook_score_quiz_submit ($form, &$form_state) {
  //from quiz_report_form_submit function
  foreach ($form_state['values'] as $key => $q_values) {
    // Questions has numeric keys in the report form
    if (!is_numeric($key)) continue;
    // Questions store the name of the validation function with the key 'submit'
    if (!isset($q_values['submit'])) continue;
    // The submit function must exist
    if (!function_exists($q_values['submit'])) continue;

    // Load the quiz
    if (!isset($quiz)) {
      //we need student's user ID
      $sql = 'SELECT nid, vid, uid, score FROM {quiz_node_results} WHERE result_id = %d';
      $result = db_fetch_object(db_query($sql, $q_values['rid']));
      $quiz = node_load($result->nid, $result->vid);
      $user = user_load($result->uid);
      $sql = 'SELECT max_score FROM {quiz_node_properties} WHERE vid = %d';
      $score['possible_score'] = db_result(db_query($sql, $quiz->vid));
      //numeric score form percentage result
      $score['numeric_score'] = $result->score * $score['possible_score'] / 100;
    }
  }

  // When Quiz is results updated, update gradebook grade.
  // Check to see if this is an allowed assignment type.
  $assignment_types = gradebookapi_get_assignment_types();
  if (isset($assignment_types['quiz'])) {
    // Discover the gradebooks associated with this node.
    $terms = gradebookapi_assignment_terms($quiz);
    $gids = array();
    foreach ($terms as $term) {
      $gradebook = gradebookapi_get_tid_gradebook($term->tid);
      $gids[] = $gradebook->tid;
    }
    if (!empty($gids)) {
      foreach (array_unique($gids) as $gid) {
        $gradebook = gradebookapi_get_tid_gradebook($gid);
        
        if (gradebookapi_is_student($gradebook, $user)) {
          // Earned score is based on gradebook assignment possible.
          $grade = gradebookapi_get_grade($user->uid, $quiz->nid);
          $grade->earned = $score['numeric_score'];
          $grade->earned *= ($score['possible_score'] != 0) ? ($quiz->possible / $score['possible_score']) : 1;
          $grade->due_date = $quiz->due_date;
          $grade->publish_date = $quiz->publish_date;
          gradebookapi_set_grade($grade);
        }
      }
    }
  }
}

?>