svg transnum

This commit is contained in:
root 2019-06-09 10:45:24 +02:00
parent e5a41926da
commit 11f4958e5f
7 changed files with 45 additions and 32 deletions
src/ninegate-1.0
src/Cadoles
CoreBundle/Command
CronBundle/Command
PortalBundle
todo.txt

@ -47,8 +47,6 @@ class PurgeRegistrationCommand extends Command
$now=new \DateTime('now');
$this->writeln('');
$this->writeln('== PURGE OBSOLETE REGISTRATION ======================');
$datas = $this->em
->createQueryBuilder()

@ -8,8 +8,8 @@ INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
(-100, 'DRAAF', '130007107');
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}m0Uhk7yyXr8ha3c/7sugfU5RJVTQ1nYp
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}NkKjK3fXfmGDKmwfTtA11qPwVFmE3SsW
', 'admin@transnum.cadol.es', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');
@ -72,6 +72,6 @@ INSERT IGNORE INTO `config` (`order`, `visible`, `changeable`, `required`, `type
('060', 1, 1, 1, 'font', 'fontfacetitle', 'Anton-Regular', '', 'Police des titres de votre site'),
('061', 1, 1, 1, 'font', 'fontfacebody', 'Helvetica', '', 'Police des titres de votre site'),
('200', 1, 0, 1, 'boolean', 'PROXYactivate', '1', '', 'Définit un Proxy'),
('201', 1, 0, 1, 'string', 'PROXYserver', '192.168.57.160', 'PROXYactivate','Adresse du Proxy'),
('202', 1, 0, 1, 'string', 'PROXYport', '8080', 'PROXYactivate','Port du Proxy');
('200', 1, 0, 1, 'boolean', 'PROXYactivate', '0', '', 'Définit un Proxy'),
('201', 1, 0, 1, 'string', 'PROXYserver', '', 'PROXYactivate','Adresse du Proxy'),
('202', 1, 0, 1, 'string', 'PROXYport', '', 'PROXYactivate','Port du Proxy');

@ -40,6 +40,12 @@ class CronCommand extends ContainerAwareCommand
return false;
}
if($this->filesystem->exists($this->rootlog."cron.lock")) {
return false;
}
$this->filesystem->appendToFile($this->rootlog.'cron.lock', "lock");
$crons = $entityManager->getRepository('CadolesCronBundle:Cron')->toexec();
$i=0;
@ -114,6 +120,13 @@ class CronCommand extends ContainerAwareCommand
$entityManager->persist($cron);
$entityManager->flush();
}
$this->writelnred("==");
$this->writelnred("FIN CRON");
$this->writelnred("==");
$this->writelnred("");
$this->filesystem->remove($this->rootlog."cron.lock");
}
private function writelnred($string) {

@ -354,7 +354,8 @@ class GetLimesurveyCommand extends Command
$this->em = $this->container->get('doctrine')->getEntityManager();
$this->output = $output;
$this->filesystem = new Filesystem();
$this->rootfile = $this->container->get('kernel')->getRootDir()."/../uploads/limesurvey";
$this->limefile = $this->container->get('kernel')->getRootDir()."/../uploads/limesurvey";
$this->rootlog = $this->container->get('kernel')->getRootDir()."/../var/logs/";
$alias = $this->container->getParameter('alias');
$activate_widlimesurvey = $this->container->getParameter('activate_widlimesurvey');
@ -392,7 +393,7 @@ class GetLimesurveyCommand extends Command
$fs = new Filesystem();
// On supprime les potentiels yml.new restant
$fs->remove($this->rootfile.'-new');
$fs->remove($this->limefile.'-new');
// list de l'ensemble des sondages invité
$surveys= $myJSONRPCClient->list_surveys($sessionKey);
@ -412,7 +413,7 @@ class GetLimesurveyCommand extends Command
$surveypropconf = $myJSONRPCClient->get_survey_properties($sessionKey,$survey["sid"],["datecreated"]);
$surveyproplang = $myJSONRPCClient->get_language_properties($sessionKey,$survey["sid"],["surveyls_welcometext"]);
$surveydescription = $surveyproplang["surveyls_welcometext"];
$surveydescription=str_replace("\r","",str_replace("\n","",$surveydescription));
$surveydescription = json_encode(str_replace("\r","",str_replace("\n","",$surveydescription)));
$token=$user["token"];
$url=$widlimesurvey_url."/".$survey_id;
@ -420,13 +421,13 @@ class GetLimesurveyCommand extends Command
$url.="?token=".$token;
$string ='"'.$survey["sid"].'": {';
$string.='"title": "'.$survey["surveyls_title"].'",';
$string.='"title": '.json_encode($survey["surveyls_title"]).',';
$string.='"url": "'.$url.'",';
$string.='"date": "'.$surveypropconf["datecreated"].'",';
$string.='"description": "'.$surveydescription.'"';
$string.='"description": '.$surveydescription;
$string.='},';
$this->filesystem->appendToFile($this->rootfile.'-new/'.$entity->getId().'/invitation.json', $string."\n");
$this->filesystem->appendToFile($this->limefile.'-new/'.$entity->getId().'/invitation.json', $string."\n");
}
}
}
@ -446,18 +447,18 @@ class GetLimesurveyCommand extends Command
$surveypropconf = $myJSONRPCClient->get_survey_properties($sessionKey,$survey["sid"],["datecreated"]);
$surveyproplang = $myJSONRPCClient->get_language_properties($sessionKey,$survey["sid"],["surveyls_welcometext"]);
$surveydescription = $surveyproplang["surveyls_welcometext"];
$surveydescription=str_replace("\r","",str_replace("\n","",$surveydescription));
$surveydescription = json_encode(str_replace("\r","",str_replace("\n","",$surveydescription)));
$url=$widlimesurvey_url."/admin/survey/sa/view/surveyid/".$survey["sid"];
$string ='"'.$survey["sid"].'": {';
$string.='"title": "'.$survey["surveyls_title"].'",';
$string.='"title": '.json_encode($survey["surveyls_title"]).',';
$string.='"url": "'.$url.'",';
$string.='"date": "'.$surveypropconf["datecreated"].'",';
$string.='"description": "'.$surveydescription.'"';
$string.='"description": '.$surveydescription;
$string.='},';
$this->filesystem->appendToFile($this->rootfile.'-new/'.$user->getId().'/survey.json', $string."\n");
$this->filesystem->appendToFile($this->limefile.'-new/'.$user->getId().'/survey.json', $string."\n");
}
}
}
@ -465,15 +466,15 @@ class GetLimesurveyCommand extends Command
}
// On supprime les encours pour le remplacer le new
$fs->remove($this->rootfile);
$fs->rename($this->rootfile.'-new',$this->rootfile);
$fs->remove($this->limefile);
$fs->rename($this->limefile.'-new',$this->limefile);
// release the session key
$myJSONRPCClient->release_session_key( $sessionKey );
// essai
/*
$essai=file_get_contents($this->rootfile.'/-100/survey.json');
$essai=file_get_contents($this->limefile.'/-100/survey.json');
$json = substr($essai, 0, -2); // sup dernier ,
$decodedArray = json_decode("{".$json."}", true);
dump($decodedArray);

@ -1533,9 +1533,11 @@ class PagewidgetController extends Controller
$file=file_get_contents($directory."/survey.json");
$json = substr($file, 0, -2); // sup dernier ,
$surveys = json_decode("{".$json."}", true);
if(is_array($surveys)) {
foreach($surveys as $id => $survey) {
array_push($items,["id"=>$id,"title"=>$survey["title"],"subtitle"=>"Sondage","url"=>$survey["url"],"itemcategory"=>$category,"color"=>"328637","icon"=>"icon_limesurvey.png"]);
}
}
break;
}

@ -31,10 +31,6 @@
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
<i class="fa fa-file fa-fw" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% endif %}
{% if canadd %}
<i class="fa fa-plus fa-fw" onClick="addBookmark({{ entity.id }},true)" style="{{ stylewidgetmenu }}"></i>
{% endif %}
</div>
{% endif %}

@ -21,4 +21,7 @@
> Séparateur milier sur datatable
> Cron faire un système de lock
> Limesurvey s'assurer des quotes doubles quotes dans le titre