summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tuda-ci/tex/tudaexercise.cls
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tuda-ci/tex/tudaexercise.cls')
-rw-r--r--macros/latex/contrib/tuda-ci/tex/tudaexercise.cls30
1 files changed, 21 insertions, 9 deletions
diff --git a/macros/latex/contrib/tuda-ci/tex/tudaexercise.cls b/macros/latex/contrib/tuda-ci/tex/tudaexercise.cls
index abb73000dc..582df6d633 100644
--- a/macros/latex/contrib/tuda-ci/tex/tudaexercise.cls
+++ b/macros/latex/contrib/tuda-ci/tex/tudaexercise.cls
@@ -1,9 +1,9 @@
-%% This is file `tudaexercise.cls' version 3.29 (2022/12/11),
+%% This is file `tudaexercise.cls' version 3.30 (2023/04/24),
%% it is part of
%% TUDa-CI -- Corporate Design for TU Darmstadt
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2018--2022 by Marei Peischl <marei@peitex.de>
+%% Copyright (C) 2018--2023 by Marei Peischl <marei@peitex.de>
%%
%% ============================================================================
%% This work may be distributed and/or modified under the
@@ -26,8 +26,8 @@
%%
%% ============================================================================
%%
-\def\fileversion{3.29}
-\def\filedate{2022/12/11}
+\def\fileversion{3.30}
+\def\filedate{2023/04/24}
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\ProvidesExplClass{tudaexercise}
@@ -859,6 +859,10 @@
}{
\@subtask{\l_ptxcd_ex_title_tl}
}
+ \cs_if_exist_use:NF \prop_gput:Nxx
+ {\exp_args:NNx \prop_gput:Nnx}
+ \g__ptxcd_points_collector_prop
+ {\thetask\thesubtask} {\fp_to_decimal:N \l_ptxcd_ex_subtask_points_fp }
\bool_if:NT \g__ptxcd_runin_subtask_bool \strut
\tl_gset_eq:NN \g_tmpa_tl \@currentlabel
\endgroup
@@ -981,16 +985,24 @@
}
}
- \newcommand{\getPoints}[1]{
- \exp_args:NNf \prop_get:NnNTF \g__ptxcd_loaded_points_prop {#1} \l_tmpa_tl
- {\l_tmpa_tl}
- {\nfss@text{\reset@font\bfseries??}}
+ \cs_new:Nn \__ptxcd_getPoints:n {
+ \prop_if_in:NnTF \g__ptxcd_loaded_points_prop {#1}
+ {\prop_item:Nn \g__ptxcd_loaded_points_prop {#1}}
+ {\nfss@text{\reset@font\bfseries??}}
}
+ \cs_generate_variant:Nn \__ptxcd_getPoints:n {x}
+
+ \newcommand{\getPoints}[1]{\__ptxcd_getPoints:x {#1}}
\newcommand{\refPoints}[1]{
\edef\x{#1}
\cs_if_exist:cTF {r@\x} {
- \getPoints{\tl_head:v {r@\x}}
+ \str_if_in:cnTF {r@\x} {subtask} {
+ \tl_set_eq:Nc \l_tmpa_tl {r@\x}
+ \getPoints{\tl_item:Nn \l_tmpa_tl {2}\tl_item:Nn \l_tmpa_tl {1}}
+ } {
+ \getPoints{\tl_head:v {r@\x}}
+ }
}{
\nfss@text{\reset@font\bfseries??}
}