Browse Source

revert total

raphael 3 years ago
parent
commit
f6a70bf298
33 changed files with 557 additions and 83 deletions
  1. 1
    1
      Components/ApiLayer/ApiLayer.php
  2. 1
    1
      Components/ButtonLayer.php
  3. 5
    6
      Components/ModalLayer.php
  4. 1
    1
      Controller/BackOffice/JupyterVirtualClassroomController.php
  5. 1
    1
      Controller/LearningSpace/JupyterVirtualClassroomController.php
  6. 1
    1
      DependencyInjection/LogiproPhoenixJupyterExtension.php
  7. 0
    2
      Entity/JupyterVirtualClassroom.php
  8. 1
    17
      Form/JupyterUpdateType.php
  9. 2
    2
      Resources/assets/Images/build-images.js
  10. 0
    0
      Resources/assets/Images/icon-jupiter.svg
  11. 0
    0
      Resources/assets/Images/icon-ls-jupiter.svg
  12. 1
    2
      Resources/assets/Js/test.js
  13. 1
    1
      Resources/assets/Scss/variables.scss
  14. 0
    7
      Resources/config/doctrine/JupyterVirtualClassroom.orm.xml
  15. 1
    1
      Resources/config/services.yaml
  16. 1
    0
      Resources/public/build/bundles/logiprophoenix/Css/test_css.1302f563.js
  17. 1
    0
      Resources/public/build/bundles/logiprophoenix/Css/test_css.14a73f13.css
  18. 1
    0
      Resources/public/build/bundles/logiprophoenix/Css/variables.8248fe0c.js
  19. 0
    0
      Resources/public/build/bundles/logiprophoenix/Css/variables.d41d8cd9.css
  20. 1
    0
      Resources/public/build/bundles/logiprophoenix/Js/test.0cc33ed7.js
  21. 76
    0
      Resources/public/build/bundles/logiprophoenix/images/icon-jupiter.4d5d2b54.svg
  22. 76
    0
      Resources/public/build/bundles/logiprophoenix/images/icon-ls-jupiter.4d5d2b54.svg
  23. 1
    0
      Resources/public/build/bundles/logiprophoenix/manifest.d41d8cd9.js
  24. 11
    0
      Resources/public/build/bundles/logiprophoenix/manifest.json
  25. 1
    0
      Resources/public/build/bundles/logiprophoenix/share.2aded9cd.js
  26. 0
    2
      Resources/public/test.php
  27. 1
    12
      Resources/views/back-office/blocBottom.html.twig
  28. 1
    1
      Resources/views/back-office/formCreate.html.twig
  29. 3
    10
      Resources/views/back-office/formUpdate.html.twig
  30. 1
    6
      Resources/views/learning_space/blocMiddle.html.twig
  31. 6
    7
      Services/PhoenixServices.php
  32. 3
    2
      composer.json
  33. 357
    0
      webpack.config.js

+ 1
- 1
Components/ApiLayer/ApiLayer.php View File

@@ -572,7 +572,7 @@ class ApiLayer
572 572
             if ($learningPath->isTemplate())
573 573
             {
574 574
                 $title = $learningPath->getTitle();
575
-                return sprintf('%s-%s',$this->getIdMask('Lp' . $learningPath->getLearningPathId()),$title);
575
+                return sprintf('%s-%s',$this->getIdMask('LP' . $learningPath->getLearningPathId()),$title);
576 576
             }
577 577
             else
578 578
             {

+ 1
- 1
Components/ButtonLayer.php View File

@@ -45,7 +45,7 @@ class ButtonLayer
45 45
 
46 46
     public function setImage($image)
47 47
     {
48
-        $this->image = "bundles/logiprophoenixlpjupyter/images/" . $image;
48
+        $this->image = "build/bundles/logiprophoenix/images/" . $image;
49 49
 
50 50
         return $this;
51 51
     }

+ 5
- 6
Components/ModalLayer.php View File

@@ -4,14 +4,13 @@ namespace Logipro\Bundle\PhoenixJupyterBundle\Components;
4 4
 class ModalLayer extends FormLayer
5 5
 {
6 6
     private $title;
7
-    private $scripts = array();
7
+    private $script;
8 8
     private $css;
9 9
     private $container;
10 10
 
11 11
     public function __construct($container)
12 12
     {
13 13
         $this->container = $container;
14
-        //$this->scripts[] = 'bundles/logiprophoenixlpjupyter/manifest.js';
15 14
     }
16 15
 
17 16
     /**
@@ -37,9 +36,9 @@ class ModalLayer extends FormLayer
37 36
     /**
38 37
      * Get the value of script
39 38
      */ 
40
-    public function getScripts()
39
+    public function getScript()
41 40
     {
42
-        return $this->scripts;
41
+        return $this->script;
43 42
     }
44 43
 
45 44
     /**
@@ -49,7 +48,7 @@ class ModalLayer extends FormLayer
49 48
      */ 
50 49
     public function setScript($script)
51 50
     {
52
-        $this->scripts[] = 'bundles/logiprophoenixlpjupyter/Js/' . $script;
51
+        $this->script = "build/" . trim($this->container->getParameter('logipro_phoenix.buildpath'),'/') . '/Js/' . $script;
53 52
 
54 53
         return $this;
55 54
     }
@@ -69,7 +68,7 @@ class ModalLayer extends FormLayer
69 68
      */ 
70 69
     public function setCss($css)
71 70
     {
72
-        $this->css = 'bundles/logiprophoenixlpjupyter/Css/' . $css;
71
+        $this->css = "build/" . trim($this->container->getParameter('logipro_phoenix.buildpath'),'/') . '/Css/' . $css;
73 72
         return $this;
74 73
     }
75 74
 }

+ 1
- 1
Controller/BackOffice/JupyterVirtualClassroomController.php View File

@@ -29,7 +29,7 @@ class JupyterVirtualClassroomController extends AppController
29 29
 {
30 30
 	use JupyterVirtualClassroomTrait;
31 31
 
32
-	private $layoutPath = '@LogiproPhoenixJupyter/back-office/';
32
+	private $layoutPath = '@LogiproPhoenix/back-office/';
33 33
 
34 34
 	/**
35 35
 	 * initialise le formulaire de création

+ 1
- 1
Controller/LearningSpace/JupyterVirtualClassroomController.php View File

@@ -31,7 +31,7 @@ class JupyterVirtualClassroomController extends LearningSpaceController
31 31
 {
32 32
 	use JupyterVirtualClassroomTrait;
33 33
 	
34
-	private $layoutPath = '@PhoenixJupyter/learning_space/';
34
+	private $layoutPath = '@LogiproPhoenix/learning_space/';
35 35
 
36 36
 	/**
37 37
 	 * retourne le contenu d'un notebook et gère le demarrage arrêt du serveur

+ 1
- 1
DependencyInjection/LogiproPhoenixJupyterExtension.php View File

@@ -21,12 +21,12 @@ class LogiproPhoenixJupyterExtension extends Extension
21 21
             new FileLocator(__DIR__ . '/../Resources/config')
22 22
         );
23 23
         $loader->load('services.yaml');*/
24
+
24 25
         $configuration = new Configuration();
25 26
         $config = $this->processConfiguration($configuration, $configs);
26 27
 
27 28
         $container->setParameter('logipro_phoenix.buildpath',$config['buildpath']);
28 29
 
29
-
30 30
         /**
31 31
          * @TODO for real bundle, create an user service for use username provider
32 32
          * $definition = $container->getDefinition('logipro_example.user.service');

+ 0
- 2
Entity/JupyterVirtualClassroom.php View File

@@ -30,8 +30,6 @@ class JupyterVirtualClassroom extends SequenceItem
30 30
 	 */
31 31
 	private $isAssesment;
32 32
 
33
-	private $classroomRegistration;
34
-
35 33
     public function getConditionsAuthorized() : Array
36 34
     {
37 35
         return array();

+ 1
- 17
Form/JupyterUpdateType.php View File

@@ -12,7 +12,7 @@ use Logipro\Phoenix\Form\RemoteSelectType\RemoteSelectType;
12 12
 use Logipro\Bundle\PhoenixJupyterBundle\Entity\JupyterVirtualClassroom;
13 13
 use Logipro\Phoenix\Form\SwitchType;
14 14
 
15
-use Symfony\Component\Form\Extension\Core\Type\DateIntervalType;
15
+
16 16
 
17 17
 /**
18 18
  * Formulaire de creation d'une classe jupiter
@@ -43,22 +43,6 @@ class JupyterUpdateType extends SequenceItemUpdateType
43 43
 		$builder->add('isAssesment',SwitchType::class,array(
44 44
 			'required' => false,
45 45
 		));
46
-
47
-		$builder->add('duration', DateIntervalType::class, array(
48
-			'required' => false,
49
-			'widget' => 'integer', // render a text field for each part
50
-			'input' => 'dateinterval',  // if you want the field to return a ISO 8601 string back to you
51
-
52
-			'by_reference' => true,
53
-			'with_years' => false,
54
-			'with_months' => false,
55
-			'with_months' => false,
56
-			'with_months' => false,
57
-			'with_days' => false,
58
-
59
-			'with_hours' => true,
60
-			'with_minutes' => true,
61
-		));
62 46
 	}
63 47
 
64 48
 	public function configureOptions(OptionsResolver $resolver)

+ 2
- 2
Resources/assets/Images/build-images.js View File

@@ -1,2 +1,2 @@
1
-require('./files/icon-jupiter.svg');
2
-require('./files/icon-ls-jupiter.svg');
1
+require('./icon-jupiter.svg');
2
+require('./icon-ls-jupiter.svg');

Resources/assets/Images/files/icon-jupiter.svg → Resources/assets/Images/icon-jupiter.svg View File


Resources/assets/Images/files/icon-ls-jupiter.svg → Resources/assets/Images/icon-ls-jupiter.svg View File


+ 1
- 2
Resources/assets/Js/test.js View File

@@ -1,3 +1,2 @@
1 1
 // toto
2
-    alert('toto');
3
-    console.log('toto');
2
+alert('toto');

+ 1
- 1
Resources/assets/Scss/variables.scss View File

@@ -1,3 +1,3 @@
1 1
 // variables
2
-$sequence-virtual-color: rgb(200, 18, 130) !default;
2
+$sequence-virtual-color: rgb(1, 18, 130) !default;
3 3
 $jupiter-color: rgb(20, 156, 4) !default;

+ 0
- 7
Resources/config/doctrine/JupyterVirtualClassroom.orm.xml View File

@@ -15,13 +15,6 @@
15 15
 		<join-column name="trainer_fk" referenced-column-name="person_id" nullable="true"/>
16 16
 	</many-to-one>
17 17
 
18
-	<one-to-many field="classroomRegistration" target-entity="Logipro\Bundle\PhoenixJupyterBundle\Entity\JupyterClassroomRegistration" mapped-by="jupyterVirtualClassroom" fetch="EXTRA_LAZY">
19
-		<cascade>
20
-			<cascade-remove />
21
-		</cascade>
22
-	</one-to-many>
23
-		
24
-
25 18
 	<field name="isAssesment" column="is_assesment" type="boolean" >
26 19
 		<options>
27 20
             <option name="default">0</option>

+ 1
- 1
Resources/config/services.yaml View File

@@ -7,7 +7,7 @@ services:
7 7
                         # fetching services directly from the container via $container->get() won't work.
8 8
                         # The best practice is to be explicit about your dependencies anyway.
9 9
 
10
-  phoenix.bundle.learningpath.jupyter:
10
+  phoenix.bundle.learningpath.jupiter:
11 11
     class: Logipro\Bundle\PhoenixJupyterBundle\Services\PhoenixServices
12 12
     public: true
13 13
     arguments: ['@service_container']

+ 1
- 0
Resources/public/build/bundles/logiprophoenix/Css/test_css.1302f563.js View File

@@ -0,0 +1 @@
1
+webpackJsonp([2],{"/GIn":function(n,c,o){}},["/GIn"]);

+ 1
- 0
Resources/public/build/bundles/logiprophoenix/Css/test_css.14a73f13.css View File

@@ -0,0 +1 @@
1
+.ali-EditorSequenceCreate .ali-EditorJupiterCreate{color:#149c04;border-color:#149c04}.ali-EditorSequenceCreate .ali-EditorJupiterCreate .ali-EditorSequenceCreateItem-icone{background:#149c04}.ali-SequenceJupiterClassroom.active,.ali-SequenceJupiterClassroom.active+.ali-EditorSequenceContentEdit>.ali-EditorContentRightPanelContent-form{border-color:#011282}.ali-SequenceJupiterClassroom:before{background:linear-gradient(-135deg,#011282 50%,transparent 0)}.ali-SequenceJupiterClassroom .ali-EditorSequenceItemLogo{background:rgba(1,18,130,.2)}.ali-SequenceJupiterClassroom .ali-EditorSequenceItem-order,.ali-SequenceJupiterClassroom .ali-EditorSequenceItem-tag,.ali-SequenceJupiterClassroom .ali-EditorSequenceItemLogo-duration{background:#011282}.ali-SequenceJupiterClassroom .ali-EditorSequenceItem-date,.ali-SequenceJupiterClassroom .ali-EditorSequenceItemLogo-label{color:#011282}

+ 1
- 0
Resources/public/build/bundles/logiprophoenix/Css/variables.8248fe0c.js View File

@@ -0,0 +1 @@
1
+webpackJsonp([1],{"+amA":function(a,n,c){}},["+amA"]);

+ 0
- 0
Resources/public/build/bundles/logiprophoenix/Css/variables.d41d8cd9.css View File


+ 1
- 0
Resources/public/build/bundles/logiprophoenix/Js/test.0cc33ed7.js View File

@@ -0,0 +1 @@
1
+webpackJsonp([3],{"5x5z":function(o,t){alert("toto")}},["5x5z"]);

+ 76
- 0
Resources/public/build/bundles/logiprophoenix/images/icon-jupiter.4d5d2b54.svg View File

@@ -0,0 +1,76 @@
1
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 118.343 132.838">
2
+  <defs>
3
+    <style>
4
+      .cls-1, .cls-3, .cls-4, .cls-5, .cls-6 {
5
+        fill: none;
6
+      }
7
+
8
+      .cls-2 {
9
+        clip-path: url(#clip-path);
10
+      }
11
+
12
+      .cls-3, .cls-5, .cls-6 {
13
+        stroke: #344153;
14
+      }
15
+
16
+      .cls-3, .cls-4, .cls-5, .cls-6 {
17
+        stroke-linecap: round;
18
+        stroke-linejoin: round;
19
+        stroke-width: 3px;
20
+      }
21
+
22
+      .cls-4 {
23
+        stroke: #1abc9c;
24
+      }
25
+
26
+      .cls-5 {
27
+        stroke-dasharray: 0 9.43;
28
+      }
29
+
30
+      .cls-6 {
31
+        stroke-miterlimit: 10;
32
+      }
33
+
34
+      .cls-7 {
35
+        fill: #1abc9c;
36
+      }
37
+    </style>
38
+    <clipPath id="clip-path">
39
+      <path id="Tracé_848" data-name="Tracé 848" class="cls-1" d="M0-132.838H118.343V0H0Z"/>
40
+    </clipPath>
41
+  </defs>
42
+  <g id="icon-training-autonomous" transform="translate(44 145.838)">
43
+    <g id="Groupe_895" data-name="Groupe 895" class="cls-2" transform="translate(-44 -13)">
44
+      <g id="Groupe_885" data-name="Groupe 885" transform="translate(107.104 -47.706)">
45
+        <path id="Tracé_838" data-name="Tracé 838" class="cls-3" d="M0,0H-95.864a8.392,8.392,0,0,1-8.392-8.392V-75.241a8.391,8.391,0,0,1,8.392-8.391H0a8.392,8.392,0,0,1,8.392,8.391V-8.392A8.392,8.392,0,0,1,0,0Z"/>
46
+      </g>
47
+      <g id="Groupe_886" data-name="Groupe 886" transform="translate(30.44 -47.706)">
48
+        <path id="Tracé_839" data-name="Tracé 839" class="cls-3" d="M0,0-5.12,12.943h67.7L57.462,0"/>
49
+      </g>
50
+      <g id="Groupe_887" data-name="Groupe 887" transform="translate(40.229 -62.059)">
51
+        <path id="Tracé_840" data-name="Tracé 840" class="cls-4" d="M0,0H53.816"/>
52
+      </g>
53
+      <g id="Groupe_888" data-name="Groupe 888" transform="translate(40.229 -62.059)">
54
+        <path id="Tracé_841" data-name="Tracé 841" class="cls-4" d="M0,0A4.667,4.667,0,0,1-4.667,4.667,4.667,4.667,0,0,1-9.334,0,4.668,4.668,0,0,1-4.667-4.667,4.668,4.668,0,0,1,0,0Z"/>
55
+      </g>
56
+      <g id="Groupe_889" data-name="Groupe 889" transform="translate(106.535 -25.11)">
57
+        <path id="Tracé_842" data-name="Tracé 842" class="cls-3" d="M0,0,9.8,17.687a3.989,3.989,0,0,1-3.49,5.923H-101.04a3.989,3.989,0,0,1-3.489-5.923L-94.727,0Z"/>
58
+      </g>
59
+      <g id="Groupe_890" data-name="Groupe 890" transform="translate(16.691 -13.305)">
60
+        <path id="Tracé_843" data-name="Tracé 843" class="cls-3" d="M0,0H0"/>
61
+      </g>
62
+      <g id="Groupe_891" data-name="Groupe 891" transform="translate(26.122 -13.305)">
63
+        <path id="Tracé_844" data-name="Tracé 844" class="cls-5" d="M0,0H70.805"/>
64
+      </g>
65
+      <g id="Groupe_892" data-name="Groupe 892" transform="translate(101.651 -13.305)">
66
+        <path id="Tracé_845" data-name="Tracé 845" class="cls-3" d="M0,0H0"/>
67
+      </g>
68
+      <g id="Groupe_893" data-name="Groupe 893" transform="translate(80.601 -96.313)">
69
+        <path id="Tracé_846" data-name="Tracé 846" class="cls-6" d="M0,0A21.429,21.429,0,0,1-21.429,21.429,21.429,21.429,0,0,1-42.858,0,21.429,21.429,0,0,1-21.429-21.429,21.429,21.429,0,0,1,0,0Z"/>
70
+      </g>
71
+      <g id="Groupe_894" data-name="Groupe 894" transform="translate(71.317 -96.313)">
72
+        <path id="Tracé_847" data-name="Tracé 847" class="cls-7" d="M0,0-18.671-11.063V11.063Z"/>
73
+      </g>
74
+    </g>
75
+  </g>
76
+</svg>

+ 76
- 0
Resources/public/build/bundles/logiprophoenix/images/icon-ls-jupiter.4d5d2b54.svg View File

@@ -0,0 +1,76 @@
1
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 118.343 132.838">
2
+  <defs>
3
+    <style>
4
+      .cls-1, .cls-3, .cls-4, .cls-5, .cls-6 {
5
+        fill: none;
6
+      }
7
+
8
+      .cls-2 {
9
+        clip-path: url(#clip-path);
10
+      }
11
+
12
+      .cls-3, .cls-5, .cls-6 {
13
+        stroke: #344153;
14
+      }
15
+
16
+      .cls-3, .cls-4, .cls-5, .cls-6 {
17
+        stroke-linecap: round;
18
+        stroke-linejoin: round;
19
+        stroke-width: 3px;
20
+      }
21
+
22
+      .cls-4 {
23
+        stroke: #1abc9c;
24
+      }
25
+
26
+      .cls-5 {
27
+        stroke-dasharray: 0 9.43;
28
+      }
29
+
30
+      .cls-6 {
31
+        stroke-miterlimit: 10;
32
+      }
33
+
34
+      .cls-7 {
35
+        fill: #1abc9c;
36
+      }
37
+    </style>
38
+    <clipPath id="clip-path">
39
+      <path id="Tracé_848" data-name="Tracé 848" class="cls-1" d="M0-132.838H118.343V0H0Z"/>
40
+    </clipPath>
41
+  </defs>
42
+  <g id="icon-training-autonomous" transform="translate(44 145.838)">
43
+    <g id="Groupe_895" data-name="Groupe 895" class="cls-2" transform="translate(-44 -13)">
44
+      <g id="Groupe_885" data-name="Groupe 885" transform="translate(107.104 -47.706)">
45
+        <path id="Tracé_838" data-name="Tracé 838" class="cls-3" d="M0,0H-95.864a8.392,8.392,0,0,1-8.392-8.392V-75.241a8.391,8.391,0,0,1,8.392-8.391H0a8.392,8.392,0,0,1,8.392,8.391V-8.392A8.392,8.392,0,0,1,0,0Z"/>
46
+      </g>
47
+      <g id="Groupe_886" data-name="Groupe 886" transform="translate(30.44 -47.706)">
48
+        <path id="Tracé_839" data-name="Tracé 839" class="cls-3" d="M0,0-5.12,12.943h67.7L57.462,0"/>
49
+      </g>
50
+      <g id="Groupe_887" data-name="Groupe 887" transform="translate(40.229 -62.059)">
51
+        <path id="Tracé_840" data-name="Tracé 840" class="cls-4" d="M0,0H53.816"/>
52
+      </g>
53
+      <g id="Groupe_888" data-name="Groupe 888" transform="translate(40.229 -62.059)">
54
+        <path id="Tracé_841" data-name="Tracé 841" class="cls-4" d="M0,0A4.667,4.667,0,0,1-4.667,4.667,4.667,4.667,0,0,1-9.334,0,4.668,4.668,0,0,1-4.667-4.667,4.668,4.668,0,0,1,0,0Z"/>
55
+      </g>
56
+      <g id="Groupe_889" data-name="Groupe 889" transform="translate(106.535 -25.11)">
57
+        <path id="Tracé_842" data-name="Tracé 842" class="cls-3" d="M0,0,9.8,17.687a3.989,3.989,0,0,1-3.49,5.923H-101.04a3.989,3.989,0,0,1-3.489-5.923L-94.727,0Z"/>
58
+      </g>
59
+      <g id="Groupe_890" data-name="Groupe 890" transform="translate(16.691 -13.305)">
60
+        <path id="Tracé_843" data-name="Tracé 843" class="cls-3" d="M0,0H0"/>
61
+      </g>
62
+      <g id="Groupe_891" data-name="Groupe 891" transform="translate(26.122 -13.305)">
63
+        <path id="Tracé_844" data-name="Tracé 844" class="cls-5" d="M0,0H70.805"/>
64
+      </g>
65
+      <g id="Groupe_892" data-name="Groupe 892" transform="translate(101.651 -13.305)">
66
+        <path id="Tracé_845" data-name="Tracé 845" class="cls-3" d="M0,0H0"/>
67
+      </g>
68
+      <g id="Groupe_893" data-name="Groupe 893" transform="translate(80.601 -96.313)">
69
+        <path id="Tracé_846" data-name="Tracé 846" class="cls-6" d="M0,0A21.429,21.429,0,0,1-21.429,21.429,21.429,21.429,0,0,1-42.858,0,21.429,21.429,0,0,1-21.429-21.429,21.429,21.429,0,0,1,0,0Z"/>
70
+      </g>
71
+      <g id="Groupe_894" data-name="Groupe 894" transform="translate(71.317 -96.313)">
72
+        <path id="Tracé_847" data-name="Tracé 847" class="cls-7" d="M0,0-18.671-11.063V11.063Z"/>
73
+      </g>
74
+    </g>
75
+  </g>
76
+</svg>

+ 1
- 0
Resources/public/build/bundles/logiprophoenix/manifest.d41d8cd9.js View File

@@ -0,0 +1 @@
1
+!function(r){var n=window.webpackJsonp;window.webpackJsonp=function(o,u,i){for(var c,p,f,l=0,a=[];l<o.length;l++)p=o[l],e[p]&&a.push(e[p][0]),e[p]=0;for(c in u)Object.prototype.hasOwnProperty.call(u,c)&&(r[c]=u[c]);for(n&&n(o,u,i);a.length;)a.shift()();if(i)for(l=0;l<i.length;l++)f=t(t.s=i[l]);return f};var o={},e={4:0};function t(n){if(o[n])return o[n].exports;var e=o[n]={i:n,l:!1,exports:{}};return r[n].call(e.exports,e,e.exports,t),e.l=!0,e.exports}t.m=r,t.c=o,t.d=function(r,n,o){t.o(r,n)||Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(n,"a",n),n},t.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},t.p="/build/bundles/logiprophoenix/",t.oe=function(r){throw console.error(r),r}}([]);

+ 11
- 0
Resources/public/build/bundles/logiprophoenix/manifest.json View File

@@ -0,0 +1,11 @@
1
+{
2
+  "build/bundles/logiprophoenix/share.js": "/build/bundles/logiprophoenix/share.2aded9cd.js",
3
+  "build/bundles/logiprophoenix/Css/variables.js": "/build/bundles/logiprophoenix/Css/variables.8248fe0c.js",
4
+  "build/bundles/logiprophoenix/Css/variables.css": "/build/bundles/logiprophoenix/Css/variables.d41d8cd9.css",
5
+  "build/bundles/logiprophoenix/Css/test_css.js": "/build/bundles/logiprophoenix/Css/test_css.1302f563.js",
6
+  "build/bundles/logiprophoenix/Css/test_css.css": "/build/bundles/logiprophoenix/Css/test_css.14a73f13.css",
7
+  "build/bundles/logiprophoenix/Js/test.js": "/build/bundles/logiprophoenix/Js/test.0cc33ed7.js",
8
+  "build/bundles/logiprophoenix/manifest.js": "/build/bundles/logiprophoenix/manifest.d41d8cd9.js",
9
+  "build/bundles/logiprophoenix/images/icon-jupiter.svg": "/build/bundles/logiprophoenix/images/icon-jupiter.4d5d2b54.svg",
10
+  "build/bundles/logiprophoenix/images/icon-ls-jupiter.svg": "/build/bundles/logiprophoenix/images/icon-ls-jupiter.4d5d2b54.svg"
11
+}

+ 1
- 0
Resources/public/build/bundles/logiprophoenix/share.2aded9cd.js View File

@@ -0,0 +1 @@
1
+webpackJsonp([0],{0:function(n,i,o){n.exports=o("nBgO")},T22Z:function(n,i){n.exports="/build/bundles/logiprophoenix/images/icon-jupiter.4d5d2b54.svg"},XV7W:function(n,i){n.exports="/build/bundles/logiprophoenix/images/icon-ls-jupiter.4d5d2b54.svg"},nBgO:function(n,i,o){o("T22Z"),o("XV7W")}},[0]);

+ 0
- 2
Resources/public/test.php View File

@@ -1,2 +0,0 @@
1
-<?php
2
-?>

+ 1
- 12
Resources/views/back-office/blocBottom.html.twig View File

@@ -9,22 +9,11 @@
9 9
                     Formateur non renseigné
10 10
                 </span>
11 11
             {% else %}
12
-                <a target="_blank" href="{{ path('open_trainer_jupyter_classroom',{'jupyterVirtualClassroomId' : sequenceItem.sequenceItemId }) }}">Editer le notebook</a>
12
+                <a target="_blank" href="{{ path('open_trainer_jupyter_classroom',{'jupyterVirtualClassroomId' : sequenceItem.sequenceItemId }) }}">Ouvrir ma classe</a>
13 13
             {% endif %}
14 14
         {# else }
15 15
             <a href="{{ path('open_trainer_jupyter_classroom',{'jupyterVirtualClassroomId' : sequenceItem.sequenceItemId }) }}">Ouvrir ma classe</a>
16 16
         {% endif #}
17 17
         {#  endif #}
18 18
     </div>
19
-
20
-    {% if sequenceItem.isAssesment %} 
21
-        <div class="ali-EditorSequenceItemSubInfo">
22
-            <div>
23
-                <div class="ali-EditorSequenceItemSubInfo-tag">Evaluation</div>
24
-            </div>
25
-        </div>
26
-    {% endif %}
27
-
28
-
29
-
30 19
 </div>

+ 1
- 1
Resources/views/back-office/formCreate.html.twig View File

@@ -1,4 +1,4 @@
1
-<div >
1
+<div class="ali-EditorContentRightPanelContent-form">
2 2
     <fieldset>
3 3
         <legend class="ali-EditorSequenceItem-legende">{{ 'label_sequence_item_informations'|trans }}</legend>
4 4
         <div class="form-group">

+ 3
- 10
Resources/views/back-office/formUpdate.html.twig View File

@@ -1,3 +1,4 @@
1
+<div class="ali-EditorContentRightPanelContent-form">
1 2
     <fieldset>
2 3
         <legend class="ali-EditorSequenceItem-legende">{{ 'label_sequence_item_informations'|trans }}</legend>
3 4
         <div class="form-group">
@@ -25,14 +26,6 @@
25 26
         </div>
26 27
     </fieldset>
27 28
 
28
-    <fieldset>
29
-        <legend class="ali-EditorSequenceItem-legende">Durée</legend>
30
-         <div class='mb-3'>
31
-            {{ form_row(form.duration) }}
32
-        </div>
33
-    </fieldset>
34
-
35
-   
36
-
37
-    <input type="hidden" name="serviceName" value="phoenix.bundle.learningpath.jupyter">
29
+    <input type="hidden" name="serviceName" value="phoenix.bundle.learningpath.jupiter">
30
+</div>
38 31
 

+ 1
- 6
Resources/views/learning_space/blocMiddle.html.twig View File

@@ -1,6 +1 @@
1
-<a class="ml-2 ali-LSButton ali-LSSequenceItemContent-button" href="{{ path('open_student_jupyter_classroom',{'jupyterVirtualClassroomId': sequenceItem.sequenceItemId }) }}" target="_blank">Démarrer</a>
2
-{% if bundleData['notebookname'] != "" %}
3
-    <div class="ali-LSSequenceItemContentActionsInfos">
4
-        notebook : {{ bundleData['notebookname'] }}
5
-    </div>
6
-{% endif %}
1
+<a class="ali-LSButton ali-LSSequenceItemContent-button" href="{{ path('open_student_jupyter_classroom',{'jupyterVirtualClassroomId': sequenceItem.sequenceItemId }) }}" target="_blank">Démarrer</a>

+ 6
- 7
Services/PhoenixServices.php View File

@@ -88,21 +88,20 @@ class PhoenixServices extends Services
88 88
     {
89 89
         return array(
90 90
             'sequenceItemClass' => 'ali-SequenceJupiterClassroom',
91
-            'label' => 'Jupyter',
91
+            'label' => 'Jupiter',
92 92
             'imageClass' => 'ali-EditorJupiterEdit',
93
-            'image' => "bundles/logiprophoenixlpjupyter/images/icon-jupiter.svg",
93
+            'image' => "build/bundles/logiprophoenix/images/icon-jupiter.svg",
94 94
             'description' => 'toto',
95
-            'bottom_layout' => '@LogiproPhoenixJupyter/back-office/blocBottom.html.twig'
95
+            'bottom_layout' => '@LogiproPhoenix/back-office/blocBottom.html.twig'
96 96
         );
97 97
     }
98 98
 
99 99
     public function getLearningSpaceBlocVariables($item)
100 100
     {
101 101
         return array(
102
-            'middle_layout' => '@LogiproPhoenixJupyter/learning_space/blocMiddle.html.twig',
103
-            'image' => "bundles/logiprophoenixlpjupyter/images/icon-ls-jupiter.svg",
104
-            'type' => 'Jupyter',
105
-            'notebookname' => basename($item->getUrl())
102
+            'middle_layout' => '@LogiproPhoenix/learning_space/blocMiddle.html.twig',
103
+            'image' => "build/bundles/logiprophoenix/images/icon-ls-jupiter.svg",
104
+            'type' => 'Jupyter'
106 105
         );
107 106
     }
108 107
 

+ 3
- 2
composer.json View File

@@ -1,12 +1,12 @@
1 1
 {
2 2
     "name": "logipro/PhoenixJupyterBundle",
3
-    "description": "Bundle Jupyter for Phoenix",
3
+    "description": "Bundle example for Phoenix",
4 4
     "license": "MIT",
5 5
     "type": "symfony-bundle",
6 6
     "authors": [
7 7
         {
8 8
             "name": "Phoenix team",
9
-            "email": "infinity@tree-learning.fr"
9
+            "email": "infinity.tree-learning.fr"
10 10
         }
11 11
     ],
12 12
     "require": {
@@ -20,6 +20,7 @@
20 20
         "symfony/config": "^4.1",
21 21
         "symfony/dependency-injection": "^4.1",
22 22
         "symfony/doctrine-bridge": "^4.1",
23
+        "symfony/expression-language": "^4.1",
23 24
         "symfony/framework-bundle": "^4.1",
24 25
         "symfony/http-foundation": "^4.1",
25 26
         "symfony/http-kernel": "^4.1",

+ 357
- 0
webpack.config.js View File

@@ -0,0 +1,357 @@
1
+const Path = require('path');
2
+const ExtractText = require('extract-text-webpack-plugin');
3
+const Encore = require('@symfony/webpack-encore');
4
+const webpack = require('webpack');
5
+const fs = require('fs');
6
+const path = require('path');
7
+const yaml = require('js-yaml');
8
+const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
9
+
10
+// Charge le fichier .env
11
+require('dotenv').config();
12
+
13
+// mode développement ou production
14
+let isDev = !Encore.isProduction();
15
+
16
+/**
17
+ * URL du répertoire des assets en production.
18
+ * Le chemin est relatif à la racine du site.
19
+ * Exemple :
20
+ * PRODUCTION_PUBLIC_PATH = /build
21
+ * Les assets devront être dans monsite.com/build
22
+ */
23
+const PRODUCTION_PUBLIC_PATH = '/build';
24
+
25
+// dossier public = /public OU dossier /build en mode développement
26
+let publicPath = PRODUCTION_PUBLIC_PATH;
27
+
28
+let args = {};
29
+if (process.env.npm_config_argv)
30
+{
31
+	args = JSON.parse(process.env.npm_config_argv);
32
+}
33
+if (isDev)
34
+{
35
+	if (process.env.WEBPACK_DEV_PUBLIC_PATH)
36
+	{
37
+		publicPath = process.env.WEBPACK_DEV_PUBLIC_PATH;
38
+	}
39
+}
40
+
41
+let sharedEntries = ['./../../assets/shared/build/global/build_global-scss.js', './../../assets/shared/build/global/build_global-images.js', './../../assets/shared/build/global/build_global-js.js'];
42
+
43
+function trim(string,char)
44
+{
45
+	char = char || " ";
46
+	return string.replace('/' + char + '$/').replace('/^' + char + '/');
47
+}
48
+
49
+Encore
50
+// the project directory where all compiled assets will be stored
51
+	.setOutputPath('Resources/public/build/')
52
+
53
+// the public path used by the web server to access the previous directory
54
+	.setPublicPath(publicPath)
55
+
56
+// this is now needed so that your manifest.json keys are still `build/foo.js`
57
+// this fix the correct path on th manifeste.json
58
+	.setManifestKeyPrefix('build')
59
+
60
+	// Ressources exclusives
61
+	.addEntry('shared-global-catalog', './assets/shared/build/global/build_global-catalog-scss.js')
62
+	.addEntry('scorm-api', './assets/exclusive/build/build_scorm-api.js')
63
+	.addEntry('activity-player', './assets/exclusive/build/build_activity-player.js')
64
+	.addEntry('shared-learning-space', './assets/shared/build/global/build_lerning_space-scss.js')
65
+	.addEntry('learning_space_setting', './assets/exclusive/js/init_learning_space_setting.js')
66
+	.addEntry('catalog_setting', './assets/exclusive/js/init_catalog_setting.js')
67
+	.addEntry('shared-catalog', './assets/shared/build/global/build_catalog-scss.js')
68
+	.addEntry('learning_space_setting_mod_scss', 'codemirror/mode/sass/sass.js')
69
+	.addEntry('learning_space_setting_css', 'codemirror/lib/codemirror.css')
70
+	.addEntry('learning_space', './assets/exclusive/js/init_learning_space.js')
71
+	.addEntry('learning_space_session_page', './assets/exclusive/js/init_learning_space_session_page.js')
72
+	.addEntry('learning_space_forum', './assets/exclusive/js/init_learning_space_forum.js')
73
+	.addEntry('offer', './assets/exclusive/js/init_offer.js')
74
+	.addEntry('catalog_offer', './assets/exclusive/js/init_catalog_offer.js')
75
+	.addEntry('login_subscribe', './assets/exclusive/js/catalog/login_subscribe.js')
76
+	.addEntry('init_catalog_payment', './assets/exclusive/js/catalog/init_catalog_payment.js')
77
+	.addEntry('catalog', './assets/exclusive/js/init_catalog.js')
78
+
79
+// -- back office
80
+	// css
81
+	.addEntry('shared-back-office', './assets/shared/build/global/back-office/build_back_office-scss.js')
82
+	.addEntry('shared-global-back-office', './assets/shared/build/global/back-office/build_global-back-office-scss.js')
83
+	// js
84
+	.addEntry('back-office/back_office', './assets/exclusive/js/back-office/init_back_office.js')
85
+	.addEntry('back-office/back_office_forum', './assets/exclusive/js/back-office/init_back_office_forum.js')
86
+	.addEntry('back-office/note', './assets/exclusive/js/back-office/init_note.js')
87
+	.addEntry('back-office/back_office_session_create', './assets/exclusive/js/back-office/session/create/menu_session.js')
88
+	.addEntry('back-office/session/edit', './assets/exclusive/js/back-office/session/create/session_edit.js')
89
+	.addEntry('back-office/session/place', './assets/exclusive/js/back-office/session/create/session_place.js')
90
+	.addEntry('back-office/back_office_offer_create', './assets/exclusive/js/back-office/offer/menu_offer.js')
91
+	.addEntry('back-office/offer/edit', './assets/exclusive/js/back-office/offer/offer_edit.js')
92
+	.addEntry('back-office/back_office_person_create', './assets/exclusive/js/back-office/person/menu_person.js')
93
+	.addEntry('back-office/person/edit', './assets/exclusive/js/back-office/person/person_edit.js')
94
+	.addEntry('back-office/back_office_learning_path_create', './assets/exclusive/js/back-office/learning_path/menu_learning_path.js')
95
+	.addEntry('back-office/learning_path/edit', './assets/exclusive/js/back-office/learning_path/learning_path_edit.js')
96
+	.addEntry('back-office/learning_path/editor', './assets/exclusive/js/back-office/learning_path/learning_path_editor.js')
97
+	.addEntry('back-office/learning_path/editor_sequence_summary', './assets/exclusive/js/back-office/learning_path/learning_path_editor_sequence_summary.js')
98
+	.addEntry('back-office/setting/catalogThematic/create', './assets/exclusive/js/back-office/setting/catalogThematic/create.js')
99
+	.addEntry('back-office/setting/administrativeDocument/create', './assets/exclusive/js/back-office/setting/administrativeDocument/create.js')
100
+	.addEntry('back-office/setting/trainingPlace/form', './assets/exclusive/js/back-office/setting/trainingPlace/form.js')
101
+	.addEntry('back-office/setting/user/create', './assets/exclusive/js/back-office/setting/user/create.js')
102
+	.addEntry('back-office/setting/learningSpace', './assets/exclusive/js/back-office/setting/learningSpace.js')
103
+	.addEntry('back-office/session/importLearningPath', './assets/exclusive/js/back-office/session/create/session_import_learning_path.js')
104
+	.addEntry('back-office/offer/importSession', './assets/exclusive/js/back-office/offer/offer_import_session.js')
105
+	.addEntry('back-office/offer/importLearningPath', './assets/exclusive/js/back-office/offer/offer_import_learning_path.js')
106
+	.addEntry('back-office/activity_page/editor', './assets/exclusive/js/back-office/learning_path/activity_page_editor.js')
107
+
108
+	.addEntry('back-office/back_office_funding_agency_create', './assets/exclusive/js/back-office/funding_agency/menu_funding_agency.js')	
109
+	.addEntry('back-office/funding_agency/edit', './assets/exclusive/js/back-office/funding_agency/funding_agency_edit.js')
110
+	.addEntry('back-office/menu/trainer', './assets/exclusive/js/back-office/person/menu_trainer.js')
111
+	.addEntry('back-office/trainer/edit', './assets/exclusive/js/back-office/person/trainer_edit.js')
112
+
113
+	.addEntry('back-office/back_office_society_create', './assets/exclusive/js/back-office/society/menu_society.js')	
114
+	.addEntry('back-office/society/edit', './assets/exclusive/js/back-office/society/society_edit.js')
115
+	.addEntry('back-office/document/edit', './assets/exclusive/js/back-office/setting/document/edit.js')
116
+	.addEntry('back-office/follow/session/edit', './assets/exclusive/js/back-office/session/follow/edit.js')
117
+
118
+	.addEntry('back-office/diary', './assets/exclusive/js/back-office/init_diary.js');
119
+
120
+	// ajoute les entrés des bundles
121
+	let bundlesPaths = './public/bundles/';
122
+	let files = fs.readdirSync(bundlesPaths);
123
+	files.forEach(function(file)
124
+	{
125
+		if (file.indexOf('logipro') === 0)
126
+		{
127
+			let bundleName = file;
128
+
129
+			// récupère la configuration de ce bundle
130
+			let configName = file.replace('logipro','logipro_');
131
+			let configPaths = './config/packages/';
132
+			let files = fs.readdirSync(configPaths);
133
+
134
+			let content = {};
135
+
136
+			// recherche le fichier de configuration
137
+			files.forEach(function(file)
138
+			{
139
+				if (file.indexOf('logipro_') == 0 && file.replace('_','') == bundleName)
140
+				{
141
+					// récupère le contenu
142
+					let configContent = fs.readFileSync(path.join(__dirname,configPaths + file),{ encoding: 'utf8' });
143
+					content = yaml.safeLoad(configContent);
144
+				}
145
+			});
146
+
147
+			let filePath = path.join(__dirname,bundlesPaths + file);
148
+			let parts = fs.readFileSync(filePath,{ encoding: 'utf8' }).split('\n');
149
+
150
+			let bundlePath = parts[3];
151
+
152
+			let reg = /(vendor.*)public/;
153
+			let extaction = reg.exec(bundlePath);
154
+			let bundleResourcePath = trim(extaction[1],'/');
155
+
156
+			let startPath = "";
157
+			if (content.length > 0)
158
+			{
159
+				startPath = trim(content[configName].buildpath,'/');
160
+			}
161
+			else
162
+			{
163
+				// sinon applique la configuration apr défaut
164
+				startPath = "bundles/" + bundleName;
165
+			}
166
+
167
+			// css
168
+			let cssFiles = fs.readdirSync(bundleResourcePath + "/assets/Scss");
169
+			cssFiles.forEach(function(cssFile)
170
+			{
171
+				if (cssFile.indexOf('variables.css') === -1)
172
+				{
173
+					Encore.addEntry(startPath  + "/Css/" + cssFile.replace(/.scss$/,''),'./' + bundleResourcePath + "/assets/Scss/" + cssFile);
174
+				}
175
+			});
176
+
177
+			// js
178
+			let jsFiles = fs.readdirSync(bundleResourcePath + "/assets/Js");
179
+			jsFiles.forEach(function(jsFile)
180
+			{
181
+				Encore.addEntry(startPath  + "/Js/" + jsFile.replace(/.js$/,''),'./' + bundleResourcePath + "/assets/Js/" + jsFile);
182
+			});
183
+
184
+			// images => ajout dans les shared entries
185
+			let buildImagesFiles = fs.readdirSync(bundleResourcePath + "/assets/Images");
186
+			buildImagesFiles.forEach(function(buildImageFile)
187
+			{
188
+				if (buildImageFile.indexOf('.js') !== -1)
189
+				{
190
+					sharedEntries.push('./' + bundleResourcePath + "/assets/Images/" + buildImageFile);
191
+				}
192
+			});
193
+		}
194
+	});
195
+
196
+	
197
+	// Ressources présentes partout
198
+	Encore.createSharedEntry('shared', sharedEntries)
199
+
200
+// allow legacy applications to use $/jQuery as a global variable
201
+	.autoProvidejQuery()
202
+
203
+// auto provide variables
204
+	.autoProvideVariables(
205
+	{
206
+	}
207
+	)
208
+
209
+// enable debug helpers in dev mode
210
+//	.enableSourceMaps(isDev)
211
+
212
+// empty the outputPath dir before each build
213
+	//
214
+
215
+// show OS notifications when builds finish/fail
216
+	.enableBuildNotifications()
217
+
218
+// create hashed filenames (e.g. app.abc123.css)
219
+	.enableVersioning(!isDev)
220
+
221
+	
222
+	//essai d'utilisation de babel pour safari et ie
223
+	/*.configureBabel(function(babelConfig) {
224
+        // add additional presets
225
+		//babelConfig.presets.push('flow');
226
+
227
+		//babelConfig.presets.push('@babel/preset-react');
228
+       //babelConfig.presets.push('["es2015", { "modules": false }]');
229
+        
230
+
231
+        // no plugins are added by default, but you can add some
232
+        //babelConfig.plugins.push('styled-jsx/babel');
233
+    }, {
234
+        // node_modules is not processed through Babel by default
235
+        // but you can whitelist specific modules to process
236
+        include_node_modules: ['foundation-sites'],
237
+
238
+        // or completely control the exclude rule (note that you
239
+        // can't use both "include_node_modules" and "exclude" at
240
+        // the same time)
241
+        exclude: /bower_components/
242
+	})
243
+	
244
+	.enablePostCssLoader()*/
245
+	
246
+
247
+
248
+// suppression du contenu de build
249
+if (!isDev)
250
+{
251
+	Encore.cleanupOutputBeforeBuild();
252
+}
253
+
254
+// récupération de la config généré par "Encore"
255
+let config = Encore.getWebpackConfig();
256
+
257
+// récupération des changements sur tous les dossier sauf node_modules
258
+
259
+if (args.original[1] == 'dev-server')
260
+{
261
+	config.devServer = {
262
+		watchOptions:
263
+		{
264
+			poll: true,
265
+			ignored: /node_modules/
266
+		}
267
+	};
268
+}
269
+
270
+
271
+/*
272
+// --- optimisation de génération => je ne sais pas a quoi ça sert
273
+
274
+	config.watchOptions = {
275
+		poll: true,
276
+		ignored: /node_modules/
277
+	};
278
+
279
+	// script qui redéfinit les configs de encore => actualisation auto avec affichage de moins d'informations
280
+
281
+	config.devServer = {
282
+		headers: {
283
+			"Access-Control-Allow-Origin": "*",
284
+			"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
285
+			"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
286
+		},
287
+		// ouverture de la page
288
+		open: false,
289
+
290
+		// actualisation auto
291
+		overlay: true,
292
+
293
+		// compression
294
+		//compress: true
295
+	};
296
+// --- 
297
+*/
298
+
299
+
300
+//config.module.rules.push(cssRules);
301
+
302
+/**--------------------
303
+ * chargement css
304
+ --------------------*/
305
+let cssLoaders = {
306
+	fallback: 'style-loader',
307
+	use: [
308
+		{
309
+			loader: 'css-loader',
310
+		},/* {
311
+			loader: 'postcss-loader',
312
+			options: {
313
+				sourceMap: true,
314
+				config: {
315
+					path: 'postcss.config.js'
316
+				}
317
+			}
318
+		},*/ {
319
+			loader: 'sass-loader',
320
+		},
321
+	]
322
+};
323
+
324
+// ajout des sourcemap + mimification
325
+if (!isDev)
326
+{
327
+	cssLoaders.use[0].options = {
328
+		minimize: true,
329
+		sourceMap: true
330
+	};
331
+	cssLoaders.use[1].options = {
332
+		sourceMap: true
333
+	};
334
+}
335
+config.module.rules.push({
336
+	// test css, scss, sass
337
+	test: /\.(s?c|sa)ss$/,
338
+	exclude: /node_modules/,
339
+	use: ['css-hot-loader'].concat(ExtractText.extract(cssLoaders))
340
+});
341
+
342
+/**--------------------
343
+ * uglify
344
+ --------------------*/
345
+if (!isDev)
346
+{
347
+	config.plugins = config.plugins.filter(plugin => !(plugin instanceof webpack.optimize.UglifyJsPlugin));
348
+	config.plugins.push(new UglifyJsPlugin());
349
+}
350
+
351
+// bundle de traduction
352
+config.externals = {
353
+	'bazinga-translator': 'Translator'
354
+};
355
+
356
+//export the final configuration
357
+module.exports = config;

Loading…
Cancel
Save