Changeset 2404


Ignore:
Timestamp:
Oct 18, 2011, 12:52:10 PM (9 years ago)
Author:
goya
Message:

debug load QE

Location:
cpc/trunk/project
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/batch/questions/compute_latest.sh

    r1575 r2404  
    2828        fileout=$(echo $file | sed 's/html/json/' | sed 's/\.htm/\.xml/')
    2929#       perl cut_quest.pl $file > $fileout
    30         python parse.py $file > $fileout
     30        python parse.py $file > $fileout || echo "ERREUR parsing $file"
    3131done;
    3232
  • cpc/trunk/project/lib/task/loadQuestionsTask.class.php

    r2006 r2404  
    4747              continue;
    4848            }
    49             if (!$json->ministere_interroge || !$json->ministere_attribue || !$json->rubrique || !$json->tete_analyse || !$json->analyse) {
     49            if (!$json->ministere_interroge || !$json->ministere_attribue || !$json->rubrique || !($json->tete_analyse && !$json->analyse)) {
    5050              echo "ERROR json facu : $line\n";
    5151              continue;
     
    6464              $quest->date = $json->date_question;
    6565              $quest->ministere = $json->ministere_interroge." / ".$json->ministere_attribue;
    66               $quest->themes = $json->rubrique." / ".$json->tete_analyse." / ".$json->analyse;
     66              $quest->themes = $json->rubrique;
     67              if ($json->tete_analyse) $quest->themes .= " / ".$json->tete_analyse;
     68              if ($json->analyse) $quest->themes .= " / ".$json->analyse;
    6769              $quest->question = $json->question;
    6870              $quest->content_md5 = md5($json->legislature.$json->question);
Note: See TracChangeset for help on using the changeset viewer.