]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6472 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 6 Dec 2023 16:12:02 +0000 (17:12 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 6 Dec 2023 16:12:02 +0000 (17:12 +0100)
app/Fluidbook/Packager/Download.php
app/Services/ScormCloud.php
bin/startup.sh
resources/tools/dockerwebcontainer/template/images/php-fpm/Dockerfile

index afd341c269dd925e263f50b795252d3e3f4438e7..f35047edfe46bc13642ee558489bdbc32ebf628f 100644 (file)
@@ -99,7 +99,7 @@ class Download extends DownloadBase
             $showTextIfNotEmail = false;
             $actions = [];
             if ($this->action === 'download' || $this->action === 'scormcloud') {
-                $actions = ['Télécharger' => $url];
+                $actions = [__('Télécharger') => $url];
                 $res[] = $url;
 
                 if ($this->action === 'scormcloud') {
@@ -108,9 +108,10 @@ class Download extends DownloadBase
                         $actions[__('Tester sur SCORM Cloud')] = $scormURL;
                         $res[] = $url;
                     } catch (\Exception $e) {
-
+                        Log::error($e);
+                        $text .= "\n\n" . __('Une erreur s\'est produite lors de l\'envoi sur SCORM Cloud (App ID :appid) : :error', ['error' => $e->getMessage(), 'appid' => env('SCORM_CLOUD_APP_ID')]);
+                        $showTextIfNotEmail = true;
                     }
-                    $text = __('Une erreur s\'est produite lors de l\'envoi sur SCORM Cloud (App ID :appid) : :error', ['error' => $e->getMessage(), 'appid' => env('SCORM_CLOUD_APP_ID')]);
                 }
             } else if ($this->action === 'install') {
                 $s = $this->entry->install_online;
index 71ee084dc1e52a6e2c2d2afd3b5a84d40583576b..e240c376e07813aadd205df64c09ac70364bcad4 100644 (file)
@@ -64,7 +64,11 @@ class ScormCloud
         }
         while ($jobResult->getStatus() == V2\Model\ImportJobResultSchema::STATUS_RUNNING) {
             sleep(1);
-            $jobResult = $courseAPI->getImportJobStatus($jobId->getResult());
+            try {
+                $jobResult = $courseAPI->getImportJobStatus($jobId->getResult());
+            } catch (\Exception $e) {
+                break;
+            }
         }
 
         if ($jobResult->getStatus() == V2\Model\ImportJobResultSchema::STATUS_ERROR) {
index 4aa50f28fb1ef40f8c78e3d3695f514bdd961c0a..c2f062f0790211ec2411cf0b8d309d3a00b28b84 100644 (file)
@@ -66,6 +66,7 @@ if mountpoint -q "/application/protected/fluidbookpublication/docs"; then
     :
 else
     sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 -o cache=no -o sshfs_sync -o uid=1002 -o gid=33 -o allow_other root@godzilla.cubedesigners.com:/data/fluidbook/docs /application/protected/fluidbookpublication/docs
+    #sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 -o cache=no -o sshfs_sync -o uid=1002 -o gid=33 -o allow_other root@dracula.cubedesigners.com:/data/fluidbook/docs /application/protected/fluidbookpublication/docs
 fi
 
 # Launch PHP
index 498565a7474a10df4489bc07779d0cc5bc77794f..a02c3060ce80d01f41e4660791f983194416f52e 100644 (file)
@@ -25,7 +25,6 @@ RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesourc
 RUN apt update
 
 RUN apt -y --no-install-recommends install \
-        unzip \
         git \
         php$phpversion-apcu \
         php$phpversion-cli \
@@ -53,7 +52,7 @@ RUN apt -y --no-install-recommends install \
         php$phpversion-fpm \
         less nano wget nodejs
 
-RUN apt -y --no-install-recommends install nodejs sudo openssh-server rsyslog cron mariadb-client
+RUN apt -y --no-install-recommends install nodejs sudo openssh-server rsyslog cron mariadb-client zip unzip imagemagick
 
 RUN apt -y --no-install-recommends install locales
 RUN sed -i '/$locale.UTF-8/s/^# //g' /etc/locale.gen && \