From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/28291 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: making multiple choice questions exams Date: Sun, 28 May 2006 19:25:35 +0200 Message-ID: <4479DD0F.7000308@wxs.nl> References: <4478454A.10500@wxs.nl> <44787CD9.7000203@wxs.nl> <4478a60009b936529920c0d2d9017271@tugamail.com> <44798EA3.3060109@wxs.nl> <062614ba9568930970f3393c42df7337@tugamail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1148837147 12927 80.91.229.2 (28 May 2006 17:25:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 28 May 2006 17:25:47 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sun May 28 19:25:45 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1FkP1K-0005VO-Vg for gctc-ntg-context-518@m.gmane.org; Sun, 28 May 2006 19:25:43 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B8B3B12844; Sun, 28 May 2006 19:25:42 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 11926-01; Sun, 28 May 2006 19:25:37 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3642F12837; Sun, 28 May 2006 19:25:37 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 937E812837 for ; Sun, 28 May 2006 19:25:35 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10837-01-2 for ; Sun, 28 May 2006 19:25:34 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with SMTP id B2A1C12836 for ; Sun, 28 May 2006 19:25:34 +0200 (CEST) Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 19045 for ; Sun, 28 May 2006 21:25:34 +0400 User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) Original-To: mailing list for ConTeXt users In-Reply-To: <062614ba9568930970f3393c42df7337@tugamail.com> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:28291 Archived-At: batela wrote: > Thanks very much. In fact, in Context is very easy doing hard tasks. > But, it is great if I can do things like: > > n_exam_versions=3; > for (nversion=1 to n_exam_versions) > { > Final Math Exam > Your name: > ID: > Yor exam version is: #nversion; > > \startitemize[a,random,packed] > \startitem first \stopitem > \startitem second \doifmode[answers]{correctchoice}\stopitem > \startitem third \stopitem > \startitem fourth \stopitem > \stopitemize > > \startitemize[a,random,packed] > \startitem first \stopitem > \startitem second \stopitem > \startitem third \stopitem > \startitem fourth \doifmode[answers]{correctchoice}\stopitem > \stopitemize > > \startitemize[a,random,packed] > \startitem first \doifmode[answers]{correctchoice} \stopitem > \startitem second \stopitem > \startitem third \stopitem > \startitem fourth \stopitem > \stopitemize > > nversion++; > } > > In this way I have all exam versions in a simple document. > > This should get you started ... please wikify this: \setupitemgroup[itemize][1][a,random,packed] \startsetups examn:make \setuppagenumber[number=1] \title{Final Math Examn} \blank[2*big] \starttabulate \NC Your name \EQ \NC \NR \NC ID \EQ \NC \NR \NC Version \EQ \recurselevel \NC \NR \stoptabulate \blank[2*big] \getbuffer[examn] \stopsetups \startsetups examn:ok \doifmode {answers} { \inleft{\symbol[star]} } \ignorespaces \stopsetups \starttext \startbuffer[examn] \startitemize \startitem first \stopitem \startitem \setups[examn:ok] second \stopitem \startitem third \stopitem \startitem fourth \stopitem \stopitemize \startitemize \startitem first \stopitem \startitem second \stopitem \startitem \setups[examn:ok] third \stopitem \startitem fourth \stopitem \stopitemize \startitemize \startitem first \stopitem \startitem second \stopitem \startitem \setups[examn:ok] third \stopitem \startitem fourth \stopitem \stopitemize \stopbuffer \setuprandomize[1234] % set a seed \enablemode[answers] \dorecurse{10} {\setups[examn:make]} \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------