summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2020-06-10 23:38:32 +0200
committerDavid A. Madore <david+git@madore.org>2020-06-10 23:38:32 +0200
commitea65cf2914cf41b90e46a88ce76d1efc61b87865 (patch)
tree837988187f10ea9d0a033f2dd35165e3e1d8a18e
parentd59d4b9d5ddff6da7d2cfd91b0056bdbcaa4479f (diff)
downloadinf105-exam-20200612.tar.gz
inf105-exam-20200612.tar.bz2
inf105-exam-20200612.zip
Prepare for compilation of final test.exam-20200612
-rw-r--r--controle-2020qcm.tex11
-rwxr-xr-xmisc/randomize-test.pl8
2 files changed, 15 insertions, 4 deletions
diff --git a/controle-2020qcm.tex b/controle-2020qcm.tex
index 60c2b43..275e174 100644
--- a/controle-2020qcm.tex
+++ b/controle-2020qcm.tex
@@ -39,7 +39,8 @@
\DeclareMathSymbol{\traitdunion}{\mathord}{operators}{"2D}
%
\newif\ifcorrige
-\corrigetrue
+\corrigefalse
+\def\seedval{test}
%
%
% NOTE: compile dot files with
@@ -85,10 +86,16 @@ qu'une absence de réponse : il est donc préférable de ne pas répondre
\medbreak
-Durée : (à remplir)
+Durée : 1h de 15h30 à 16h30 (sauf 1h20 pour les tiers-temps, de 15h30
+à 16h50)
\vfill
+\noindent
+Sujet généré pour : \texttt{\seedval}
+
+\medskip
+
{\tiny\noindent
\immediate\write18{sh ./vc > vcline.tex}
Git: \input{vcline.tex}
diff --git a/misc/randomize-test.pl b/misc/randomize-test.pl
index e569adb..42ff144 100755
--- a/misc/randomize-test.pl
+++ b/misc/randomize-test.pl
@@ -22,6 +22,9 @@ my @qvars = (); # Array of question variants
# Each entry is an arrayref of indexes in the questions array
+my $commonseed = $opts{N} // "";
+my $seed = $opts{n} // "";
+
### READ INPUT FILE
if ( 1 ) { ## Keep following variables local
@@ -34,6 +37,9 @@ my $listref = \@preamble;
my $varid;
LINELOOP:
while ($_ = <>) {
+ if ( $_ =~ m/^\\def\\seedval\{.*\}$/ ) {
+ $_ = "\\def\\seedval\{$seed\}\n";
+ }
if ( $_ =~ m/\\begin\{qcm\}/ ) {
die "wrong placement" unless $in_preamble;
die "bad format" unless $_ eq "\\begin\{qcm\}\n";
@@ -98,8 +104,6 @@ while ($_ = <>) {
### RANDOMIZE
-my $commonseed = $opts{N} // "";
-my $seed = $opts{n} // "";
my $nbqn = $opts{c} // int((scalar(@qvars)+1)/2);
my @questab = ();