Subversion Repositories wimsdev

Rev

Rev 934 | Rev 5731 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !! produces a DHTML page of the  exercise for printing
  2.  
  3. !if $questiontype !=0 or $applet=1
  4.     <font color="red">
  5.         My guess : this page not very usefull in a printed paperversion<br>
  6.         It's most likely a multiplechoice exercise<br>
  7.         or it makes use of some java applets ?
  8.         <br>
  9.         You can always try your browser "print functionality" on the interactive version, and see what happens.
  10.         <br>
  11.    !href module=home Back
  12.    </a>
  13.    </font>
  14. !else
  15.    <script type="text/javascript" src="$jsdir/wz_dragdrop.js"></script>
  16.    !set DHTML=$empty
  17.    <table summary="">
  18.         <tr>
  19.         !set cnt=0
  20.         !if $total_exos >4
  21.             !set limited=I've limited your request for $total_exos exercises to a modest 4 piece papertest
  22.             !set total_exos=4
  23.         !endif
  24.         !for n=1 to $total_exos
  25.             !set counter=$n
  26.             !set question$n=$empty
  27.             !set exotext=$empty
  28.             !set formula$n=$empty
  29.             !set answer$n=$empty
  30.             !set options=0
  31.             !readproc exos/exo$subject
  32.             <td>
  33.                 <div id="d$n" name="d$n" style="position:relative;font-size:70%">
  34.                     $questionnumber $n)<br>
  35.                     !if $(question$n) != $empty
  36.                         $(question$n)
  37.                         <br>
  38.                     !endif
  39.                 </div>
  40.                 <div id="dd$n" name="dd$n" style="position:relative;font-size:70%">
  41.                     !if $exotext != $empty
  42.                         <br>
  43.                         $exotext
  44.                     !endif
  45.                 </div>
  46.                 !if $(formula$n) != $empty
  47.                     <br>
  48.                     !set formula$n=$(formula$n) \,\,
  49.                     !increase cnt
  50.                     !set ins_attr=name="insert$cnt"
  51.                     !insmath $(formula$n)
  52.                     !! this will be an image, I hope...if not we are in deep DHTML trouble
  53.                 !endif
  54.             </td>
  55.             !set DHTML=!append item "d$n","dd$n","insert$cnt" to $DHTML
  56.             </tr><tr>
  57.         !next n
  58.     </table>
  59.     !if $image=1
  60.         !if $XSIZE=$empty
  61.             !set XSIZE=100
  62.             !set YSIZE=100
  63.         !endif
  64.         !if $XSIZE>400 and $XSIZE<625
  65.         !! als XSIZE echt 650 hebben we een speciale bedoeling met dat plaatje, hoop ik...
  66.             !set XSIZE=220
  67.         !endif
  68.         !set insdraw_size=$XSIZE,$YSIZE
  69.         !for n=1 to $total_exos  
  70.             !increase cnt
  71.             !set ins_attr=name="insert$cnt"
  72.             <div id="ddd$n" name="ddd$n" style="position:relative;width:$XSIZE;height:$YSIZE">
  73.                 !if $plot=1
  74.                     !set insplot_set=$(image_settings$n)
  75.                     !insplot $(image$n)
  76.                 !else
  77.                     !insdraw $(image$n)
  78.                 !endif
  79.             </div>
  80.             !set DHTML=!append item "insert$cnt","ddd$n" to $DHTML
  81.             <p></p>
  82.         !next n
  83.     !endif
  84.     <p style="page-break-after:always">
  85.         <ol>
  86.         !for n=1 to $total_exos
  87.             <li>
  88.             !if $(textanswer$n)!=$empty
  89.                 <div id="dddd$n" name="dddd$n" style="position:relative;font-size:70%">
  90.                 $(textanswer$n)
  91.                 </div>
  92.                 <br>
  93.             !endif
  94.             !if $(texanswer$n)!=$empty
  95.                 !increase cnt
  96.                 !set ins_attr=name="insert2$cnt"
  97.                 !insmath $(texanswer$n)
  98.                 !set DHTML=!append item "insert2$cnt" to $DHTML
  99.             !else
  100.                 $(answer$n)
  101.             !endif
  102.             !set DHTML=!append item "insert2$cnt","dddd$n" to $DHTML
  103.         !next n    
  104.         </ol>
  105.         $limited
  106.     </p>
  107.  
  108. <p style="page-break-after:always"></p>
  109. <table summary="">
  110.     <tr>
  111.     <td>
  112.         <input type="button" style="$mybuttonstyle" value="Reload Page" onClick="window.location.reload()">
  113.     </td>
  114.     <td>
  115.         <input type="button" style="$mybuttonstyle" value="Print" onClick="javascript:window.print();">
  116.     </td>
  117.     </tr>
  118. </table>
  119.     <font size="-1">
  120.         !record 69 of $remarkdir/commonremarks.$taal
  121.         <br>
  122.         !href module=$module&+session=$session&+cmd=intro
  123.         !record 70 of $remarkdir/commonremarks.$taal
  124.         </a>
  125.     </font>
  126. <p style="page-break-after:always"></p>
  127.  
  128. <script type="text/javascript">
  129.     SET_DHTML( CURSOR_MOVE, RESIZABLE , NO_ALT , SCROLL , $DHTML );
  130. </script>
  131.  
  132. !endif
  133.