Skip to content

Commit

Permalink
#1368 [Export] fix: minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Théo David committed Jul 12, 2023
1 parent 0c81bc2 commit f9bd65f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion class/sheet.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ public function fetchQuestionsLinked($sourceid = null, $sourcetype = '', $target
$sql .= ' FROM '.MAIN_DB_PREFIX.'element_element';
$sql .= " WHERE ";
$sql .= "(fk_source = ".((int) $sourceid)." AND sourcetype = '".$this->db->escape($sourcetype)."')";
$sql .= " AND targettype = 'dolismq_question'";
$sql .= " AND targettype = 'digiquali_question'";

$sql .= ' ORDER BY '.$orderby;

Expand Down
2 changes: 1 addition & 1 deletion langs/fr_FR/digiquali.lang
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ NoLinkedObjectSelected = Veuillez sélectionner un type d'objet à contr
ExportSheetData = Export des données du modèle de contrôle
ExportSheetDataDescription = Export des données du modèle de contrôle et des questions associées
ExportWellDone = L'export a été réalisé avec succès
ToImportDataGoToImportPage = Pour importer des données, veuillez vous rendre sur la page :<br /><a href="https://www.service-public.fr/particuliers/vosdroits/F78" target="_blank">https://www.service-public.fr/particuliers/vosdroits/F78</a>
ToImportDataGoToImportPage = Pour importer des données, veuillez vous rendre sur la page d'import : <a href="%s"> %s </a>



Expand Down
1 change: 0 additions & 1 deletion view/digiqualitools.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
$sheetSingle->fetchQuestionsLinked($sheetSingle->id, 'digiquali_sheet', null, '', 'OR', 1, 'sourcetype', 0);
$questionsLinked = $sheetSingle->linkedObjectsIds['digiquali_question'];
if (is_array($questionsLinked) && !empty($questionsLinked)) {
ksort($questionsLinked);
foreach ($questionsLinked as $questionId) {
$digiqualiExportArray['element_element'][$sheetSingle->id][] = $questionId;
}
Expand Down
13 changes: 6 additions & 7 deletions view/sheet/sheet_export.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@

// Initialize technical objects
// Technical objets
$object = new Sheet($db);
$question = new Question($db);
$answer = new Answer($db);
$object = new Sheet($db);
$question = new Question($db);
$answer = new Answer($db);

// View objects
$form = new Form($db);

$upload_dir = $conf->digiquali->multidir_output[isset($conf->entity) ? $conf->entity : 1];

$hookmanager->initHooks(array('sheetcard', 'globalcard')); // Note that conf->hooks_modules contains array
$hookmanager->initHooks(array('sheetexport')); // Note that conf->hooks_modules contains array

// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
Expand Down Expand Up @@ -112,7 +112,6 @@
$questionsLinked = $object->linkedObjects['digiquali_question'];

if (is_array($questionsLinked) && !empty($questionsLinked)) {
ksort($questionsLinked);
foreach ($questionsLinked as $questionSingle) {
$digiqualiExportArray['element_element'][$object->id][] = $questionSingle->id;
$questionExportArray['rowid'] = $questionSingle->id;
Expand Down Expand Up @@ -211,10 +210,10 @@
print '</tr>';

print '</tr>';
print '</form>';
print '</table>';
print '</form>';

print $langs->trans('ToImportDataGoToImportPage');
print $langs->trans('ToImportDataGoToImportPage', '../digiqualitools.php', $langs->trans('ClickHere'));

// End of page
llxFooter();
Expand Down

0 comments on commit f9bd65f

Please sign in to comment.