Loading AMC-prepare.pl +27 −11 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ my $engine_topdf = ''; my $prefix = ''; my $filter = ''; my $filtered_source = ''; my $codedigit = ''; my $debug = ''; my $latex_stdout = ''; Loading Loading @@ -112,6 +113,7 @@ GetOptions( "n-copies=s" => \$number_of_copies, "filter=s" => \$filter, "filtered-source=s" => \$filtered_source, "codedigit=s" => \$codedigit, "epoch=s" => \$epoch, ); Loading Loading @@ -1006,21 +1008,35 @@ if ( $to_do{b} ) { my $delta = 0; # Opens a connection with the database my $data = AMC::Data->new($data_dir); my $scoring = $data->module('scoring'); my $capture = $data->module('capture'); # Launches the LaTeX engine my @opts = (qw/ScoringExterne 1 NoHyperRef 1/); if ( !$codedigit ) { # if not explicitly given, uses the same codedigit convention # as recorded from the 'extract layout' phase my $layout = $data->module('layout'); $codedigit = $layout->variable_transaction('build:codedigit'); $codedigit = 'dot' if ( !$codedigit ); # old AMC versions } if ($codedigit) { push @opts, "codeDigitExterne", $codedigit; } execute( command_opts => [qw/ScoringExterne 1 NoHyperRef 1/], command_opts => [@opts], once => 1 ); open( AMCLOG, "$jobname.amc" ) or die "Unable to open $jobname.amc : $!"; # Opens a connection with the database my $data = AMC::Data->new($data_dir); my $scoring = $data->module('scoring'); my $capture = $data->module('capture'); my $qs = {}; my $qs0 = {}; # memory for student 0 (when using AMCformS) my $current_q = {}; Loading Loading @@ -1152,11 +1168,11 @@ if ( $to_do{b} ) { } else { # associated to a question $current_q->{strategy} = ( $current_q->{strategy} $current_q->{strategy} = ( $current_q->{strategy} ? $current_q->{strategy} . ',' : '' ) . $1; : '' ) . $1; } } else { Loading doc/sty/automultiplechoice.dtx.in +11 −1 Original line number Diff line number Diff line Loading @@ -3334,6 +3334,12 @@ Three digits and two letters:\insertgroup{mixed}. \newcount\AMC@chiffres \newdimen\AMCcodeHspace\AMCcodeHspace=.5em \newdimen\AMCcodeVspace\AMCcodeVspace=.5em \newcommand\AMCcodeID@squarebrackets[2]{#1[#2]} \newcommand\AMCcodeID@dot[2]{#1.#2} \newcommand\AMCcodeID@@[1]{% \expandafter\def\expandafter\AMCcodeID\expandafter{\csname AMCcodeID@#1\endcsname}% } \AMCcodeID@@{squarebrackets} \ExplSyntaxOn \clist_new:N \amc_code_descr_clist Loading Loading @@ -3383,7 +3389,7 @@ Three digits and two letters:\insertgroup{mixed}. { \keys_set:nn { amccode } { #3 } \amc_code_init:N #2 \clist_map_inline:Nn #2 { % iterates over 'digits' \begin{question}{#1[ \int_use:N \amc_code_digit_n_int ]} \begin{question}{\AMCcodeID{#1}{ \int_use:N \amc_code_digit_n_int }} \amc_code_digit_init: \seq_set_split:Nnn \amc_code_digits_seq {} { ##1 } \bool_if:NTF \amc_code_vertical_bool { Loading Loading @@ -4699,6 +4705,7 @@ Three digits and two letters:\insertgroup{mixed}. \newif\ifAMCneeds@storebox\AMCneeds@storeboxfalse \DeclareOptionX{storebox}{\AMCneeds@storeboxtrue} \DeclareOptionX{pdfform}{\AMC@pdfformtrue} \DeclareOptionX{codedigit}{\AMCcodeID@@{#1}} \ProcessOptionsX \ifAMCneeds@storebox Loading Loading @@ -4838,6 +4845,9 @@ pdflatex '\nonstopmode\def\SujetExterne{1}\def\NoWatermarkExterne{1}\input{mcq.t \ifx\NoWatermarkExterne\undefined\else \AMC@watermarkfalse \fi \ifx\codeDigitExterne\undefined\else \AMCcodeID@@{\codeDigitExterne} \fi % \end{macrocode} % \end{macro}\end{macro}\end{macro}\end{macro}\end{macro} % Loading Loading
AMC-prepare.pl +27 −11 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ my $engine_topdf = ''; my $prefix = ''; my $filter = ''; my $filtered_source = ''; my $codedigit = ''; my $debug = ''; my $latex_stdout = ''; Loading Loading @@ -112,6 +113,7 @@ GetOptions( "n-copies=s" => \$number_of_copies, "filter=s" => \$filter, "filtered-source=s" => \$filtered_source, "codedigit=s" => \$codedigit, "epoch=s" => \$epoch, ); Loading Loading @@ -1006,21 +1008,35 @@ if ( $to_do{b} ) { my $delta = 0; # Opens a connection with the database my $data = AMC::Data->new($data_dir); my $scoring = $data->module('scoring'); my $capture = $data->module('capture'); # Launches the LaTeX engine my @opts = (qw/ScoringExterne 1 NoHyperRef 1/); if ( !$codedigit ) { # if not explicitly given, uses the same codedigit convention # as recorded from the 'extract layout' phase my $layout = $data->module('layout'); $codedigit = $layout->variable_transaction('build:codedigit'); $codedigit = 'dot' if ( !$codedigit ); # old AMC versions } if ($codedigit) { push @opts, "codeDigitExterne", $codedigit; } execute( command_opts => [qw/ScoringExterne 1 NoHyperRef 1/], command_opts => [@opts], once => 1 ); open( AMCLOG, "$jobname.amc" ) or die "Unable to open $jobname.amc : $!"; # Opens a connection with the database my $data = AMC::Data->new($data_dir); my $scoring = $data->module('scoring'); my $capture = $data->module('capture'); my $qs = {}; my $qs0 = {}; # memory for student 0 (when using AMCformS) my $current_q = {}; Loading Loading @@ -1152,11 +1168,11 @@ if ( $to_do{b} ) { } else { # associated to a question $current_q->{strategy} = ( $current_q->{strategy} $current_q->{strategy} = ( $current_q->{strategy} ? $current_q->{strategy} . ',' : '' ) . $1; : '' ) . $1; } } else { Loading
doc/sty/automultiplechoice.dtx.in +11 −1 Original line number Diff line number Diff line Loading @@ -3334,6 +3334,12 @@ Three digits and two letters:\insertgroup{mixed}. \newcount\AMC@chiffres \newdimen\AMCcodeHspace\AMCcodeHspace=.5em \newdimen\AMCcodeVspace\AMCcodeVspace=.5em \newcommand\AMCcodeID@squarebrackets[2]{#1[#2]} \newcommand\AMCcodeID@dot[2]{#1.#2} \newcommand\AMCcodeID@@[1]{% \expandafter\def\expandafter\AMCcodeID\expandafter{\csname AMCcodeID@#1\endcsname}% } \AMCcodeID@@{squarebrackets} \ExplSyntaxOn \clist_new:N \amc_code_descr_clist Loading Loading @@ -3383,7 +3389,7 @@ Three digits and two letters:\insertgroup{mixed}. { \keys_set:nn { amccode } { #3 } \amc_code_init:N #2 \clist_map_inline:Nn #2 { % iterates over 'digits' \begin{question}{#1[ \int_use:N \amc_code_digit_n_int ]} \begin{question}{\AMCcodeID{#1}{ \int_use:N \amc_code_digit_n_int }} \amc_code_digit_init: \seq_set_split:Nnn \amc_code_digits_seq {} { ##1 } \bool_if:NTF \amc_code_vertical_bool { Loading Loading @@ -4699,6 +4705,7 @@ Three digits and two letters:\insertgroup{mixed}. \newif\ifAMCneeds@storebox\AMCneeds@storeboxfalse \DeclareOptionX{storebox}{\AMCneeds@storeboxtrue} \DeclareOptionX{pdfform}{\AMC@pdfformtrue} \DeclareOptionX{codedigit}{\AMCcodeID@@{#1}} \ProcessOptionsX \ifAMCneeds@storebox Loading Loading @@ -4838,6 +4845,9 @@ pdflatex '\nonstopmode\def\SujetExterne{1}\def\NoWatermarkExterne{1}\input{mcq.t \ifx\NoWatermarkExterne\undefined\else \AMC@watermarkfalse \fi \ifx\codeDigitExterne\undefined\else \AMCcodeID@@{\codeDigitExterne} \fi % \end{macrocode} % \end{macro}\end{macro}\end{macro}\end{macro}\end{macro} % Loading