Solve #22243
This commit is contained in:
parent
cb9bf00da4
commit
e9ea5fc3a5
@ -134,10 +134,10 @@ sub genIds ($;$)
|
|||||||
for my $group (@{ $self->{groups} })
|
for my $group (@{ $self->{groups} })
|
||||||
{
|
{
|
||||||
my $cur_gid;
|
my $cur_gid;
|
||||||
if (! $group->{id} || grep { /^\Q$group->{id}\E$/ } @ids)
|
if (! $group->{id} || grep { $_ == $group->{id} } @ids)
|
||||||
{
|
{
|
||||||
do {
|
do {
|
||||||
$cur_gid = "def".$def_i."g".$grp_i;
|
$cur_gid = "def_".$def_i."g".$grp_i;
|
||||||
$grp_i += 1;
|
$grp_i += 1;
|
||||||
} while (grep {$_ eq $cur_gid} @ids);
|
} while (grep {$_ eq $cur_gid} @ids);
|
||||||
$group->{id} = $cur_gid;
|
$group->{id} = $cur_gid;
|
||||||
@ -151,7 +151,7 @@ sub genIds ($;$)
|
|||||||
for my $question (@{ $group->{questions_list} })
|
for my $question (@{ $group->{questions_list} })
|
||||||
{
|
{
|
||||||
my $cur_qid;
|
my $cur_qid;
|
||||||
if (! $question->{id} || grep { /^\Q$question->{id}\E$/ } @ids)
|
if (! $question->{id} || grep { $_ == $question->{id} } @ids)
|
||||||
{
|
{
|
||||||
do {
|
do {
|
||||||
$cur_qid = $cur_gid."q".$qst_i;
|
$cur_qid = $cur_gid."q".$qst_i;
|
||||||
@ -167,7 +167,7 @@ sub genIds ($;$)
|
|||||||
my $ans_i = 0;
|
my $ans_i = 0;
|
||||||
for my $answer (@{ $question->{answers} })
|
for my $answer (@{ $question->{answers} })
|
||||||
{
|
{
|
||||||
if (! $answer->{id} || grep { /^\Q$answer->{id}\E$/ } @ids)
|
if (! $answer->{id} || grep { $_ == $answer->{id} } @ids)
|
||||||
{
|
{
|
||||||
my $cur_aid;
|
my $cur_aid;
|
||||||
do {
|
do {
|
||||||
|
@ -168,7 +168,7 @@ sub tag_defense
|
|||||||
|
|
||||||
# Generate questions and answer id
|
# Generate questions and answer id
|
||||||
my $defense = Defense->new(\$content);
|
my $defense = Defense->new(\$content);
|
||||||
$defense->genIds();
|
$defense->genIds($defense_id);
|
||||||
|
|
||||||
# Send data to intradata
|
# Send data to intradata
|
||||||
log INFO, "Attente d'un processus de publication...";
|
log INFO, "Attente d'un processus de publication...";
|
||||||
|
Reference in New Issue
Block a user