]> git.mjollnir.org Git - moodle.git/commitdiff
No longer print the comment boxes for each question in review because it was too...
authorgustav_delius <gustav_delius>
Mon, 10 Apr 2006 19:58:34 +0000 (19:58 +0000)
committergustav_delius <gustav_delius>
Mon, 10 Apr 2006 19:58:34 +0000 (19:58 +0000)
question/type/question.html
question/type/questiontype.php

index 9934db0ffba06c0ad2f9e16fbab00784dced6eb9..8993752d5037687adae90e092bd26c06d27e6565 100644 (file)
@@ -3,21 +3,6 @@
  * print_question() method.
  */
 ?>
-
-<script language="javascript" type="text/javascript">
-    if (typeof showhidecomment == "undefined") {
-        function showhidecomment (id) {
-            divobj = document.getElementById(id);
-            if (divobj.style.display == 'none') {
-                divobj.style.display = 'block';
-            } else {
-                divobj.style.display = 'none';
-            }
-        }
-    }
-</script>
-
-<a name="<?php echo $question->id; ?>" id="<?php echo $question->id; ?>"></a>
 <div id="q<?php echo $question->id; ?>" class="que <?php echo $question->qtype; ?> clearfix">
   <div class="info">
     <span class="no"><?php echo $number; ?></span>
         echo $comment;
       ?>
     </div>
-  <?php } ?>
-  <div class="commentlink">
-      <?php 
-        if (!empty($commentlink)) {
+  <?php }
             echo $commentlink;
-      ?>
-      <div id="comment-wrapper-<?php echo $question->id; ?>">
-          <?php question_print_comment_box($question, $state, $attempt, $CFG->wwwroot.'/mod/quiz/review.php?attempt='.$attempt->id.'#'.$question->id) ?>
-      </div>
-      <?php } ?>
-  </div>      
-  <?php
   if ($history) { ?>
        <div class="history">
          <?php
@@ -64,7 +39,3 @@
        </div>
   <?php } ?>
 </div>
-
-<script language="javascript" type="text/javascript">
-    showhidecomment('comment-wrapper-<?php echo $question->id; ?>');
-</script>
\ No newline at end of file
index 5f54fe01787f134dbdb7059af4928e37a41c08df..a50ff8a99451ef098db24fbfa1c5fd0013aabf50 100644 (file)
@@ -478,8 +478,8 @@ class default_questiontype {
         $commentlink = '';
         if (isset($options->questioncommentlink)) {
             $strcomment = get_string('commentorgrade', 'quiz');
-            $attempt = get_record('quiz_attempts', 'uniqueid', $state->attempt);  // would just have $attempt->uniqueid = $state->attempt but review.php needs $attempt->id
-            $commentlink = "<a href=\"javascript: showhidecomment('comment-wrapper-$question->id');\">$strcomment</a>";
+            $commentlink = '<div class="commentlink">'.link_to_popup_window ($options->questioncommentlink.'?attempt='.$state->attempt.'&amp;question='.$question->id,
+                             'commentquestion', $strcomment, 450, 650, $strcomment, 'none', true).'</div>';
         }
 
         $history = $this->history($question, $state, $number, $cmoptions, $options);