Browse Source

@fixed + compilation

raphael 3 years ago
parent
commit
f7f8a315bd

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

@@ -74,8 +74,8 @@ class JupyterVirtualClassroomController extends LearningSpaceController
74 74
 		$personToken = $this->getToken($person);
75 75
 
76 76
 		// recherche l'url pour l'apprenant de l'inscription
77
-		$jupyterClassroomRegistration = $jupyterClassroomRegistrationRepository->findOneBy(array('jupyterVirtualClassroom' => $sequenceItem,'person' => $person));
78
-		if (!$jupyterClassroomRegistration || $jupyterClassroomRegistration->getUrl() == null)
77
+		$jupyterClassroomRegistration = $jupyterClassroomRegistrationRepository->getLastClassroomRegistration($sequenceItem,$person);
78
+		if (!$jupyterClassroomRegistration)
79 79
 		{
80 80
 			// créé une nouvelle ClassroomRegistration pour cet apprenant
81 81
 			$jupyterClassroomRegistration = new JupyterClassroomRegistration();
@@ -228,7 +228,7 @@ class JupyterVirtualClassroomController extends LearningSpaceController
228 228
 		$jupyterClassroomRegistrationRepository = $this->getRepository(JupyterClassroomRegistration::class);
229 229
 
230 230
 		// recherche l'url pour l'apprenant de l'inscription
231
-		$jupyterClassroomRegistration = $jupyterClassroomRegistrationRepository->findOneBy(array('jupyterVirtualClassroom' => $sequenceItem,'person' => $person));
231
+		$jupyterClassroomRegistration = $jupyterClassroomRegistrationRepository->getLastClassroomRegistration($sequenceItem,$person);
232 232
 		if ($jupyterClassroomRegistration)
233 233
 		{
234 234
 			// création de la soumission

+ 16
- 0
Repository/JupyterClassroomRegistrationRepository.php View File

@@ -12,4 +12,20 @@ class JupyterClassroomRegistrationRepository extends ServiceEntityRepository
12 12
 	{
13 13
 		parent::__construct($registry, JupyterClassroomRegistration::class);
14 14
     }
15
+
16
+    public function getLastClassroomRegistration($sequenceItem,$person)
17
+    {
18
+        $qb = $this->createQueryBuilder('classroom');
19
+
20
+        $qb->andWhere('classroom.person = :person');
21
+        $qb->andWhere('classroom.jupyterVirtualClassroom = :jupyterVirtualClassroom');
22
+        $qb->andWhere('classroom.url is not null');
23
+        
24
+		$qb->setParameter('person', $person);
25
+		$qb->setParameter('jupyterVirtualClassroom', $sequenceItem);
26
+
27
+        $query = $qb->getQuery();
28
+
29
+        return $query->getOneOrNullResult();
30
+    }
15 31
 }

+ 0
- 4
Resources/config/doctrine/JupyterClassroomRegistration.orm.xml View File

@@ -30,9 +30,5 @@
30 30
 		</cascade>
31 31
 	</one-to-many>
32 32
 
33
-	<unique-constraints>
34
-        <unique-constraint columns="person_fk,jupyter_virtual_classroom_fk" name="unique_learner_jupyter_virtual_classroom" />
35
-    </unique-constraints>
36
-
37 33
 	</entity>
38 34
 </doctrine-mapping>

Resources/public/bundles/logiprophoenixjupyter/Css/test_css.51e98ddf.js → Resources/public/bundles/logiprophoenixjupyter/Css/test_css.0a783350.js View File


Resources/public/bundles/logiprophoenixjupyter/Css/variables.bb4dbb8f.js → Resources/public/bundles/logiprophoenixjupyter/Css/variables.614b8120.js View File


Resources/public/bundles/logiprophoenixjupyter/images/icon-jupyter.62bc5b09.svg → Resources/public/bundles/logiprophoenixjupyter/images/icon-jupyter.4d5d2b54.svg View File


Resources/public/bundles/logiprophoenixjupyter/images/icon-ls-jupyter.62bc5b09.svg → Resources/public/bundles/logiprophoenixjupyter/images/icon-ls-jupyter.4d5d2b54.svg View File


+ 5
- 5
Resources/public/bundles/logiprophoenixjupyter/manifest.json View File

@@ -1,12 +1,12 @@
1 1
 {
2
-  "bundles/logiprophoenixjupyter/share.js": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/share.ba6b0c91.js",
2
+  "bundles/logiprophoenixjupyter/share.js": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/share.c72f58db.js",
3 3
   "bundles/logiprophoenixjupyter/Js/learning-space.js": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/Js/learning-space.269d6b28.js",
4
-  "bundles/logiprophoenixjupyter/Css/variables.js": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/Css/variables.bb4dbb8f.js",
4
+  "bundles/logiprophoenixjupyter/Css/variables.js": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/Css/variables.614b8120.js",
5 5
   "bundles/logiprophoenixjupyter/Css/variables.css": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/Css/variables.d41d8cd9.css",
6
-  "bundles/logiprophoenixjupyter/Css/test_css.js": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/Css/test_css.51e98ddf.js",
6
+  "bundles/logiprophoenixjupyter/Css/test_css.js": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/Css/test_css.0a783350.js",
7 7
   "bundles/logiprophoenixjupyter/Css/test_css.css": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/Css/test_css.acc19470.css",
8 8
   "bundles/logiprophoenixjupyter/Js/back-office.js": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/Js/back-office.2d32229f.js",
9 9
   "bundles/logiprophoenixjupyter/manifest.js": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/manifest.d41d8cd9.js",
10
-  "bundles/logiprophoenixjupyter/images/icon-jupyter.svg": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/images/icon-jupyter.62bc5b09.svg",
11
-  "bundles/logiprophoenixjupyter/images/icon-ls-jupyter.svg": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/images/icon-ls-jupyter.62bc5b09.svg"
10
+  "bundles/logiprophoenixjupyter/images/icon-jupyter.svg": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/images/icon-jupyter.4d5d2b54.svg",
11
+  "bundles/logiprophoenixjupyter/images/icon-ls-jupyter.svg": "/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/images/icon-ls-jupyter.4d5d2b54.svg"
12 12
 }

Resources/public/bundles/logiprophoenixjupyter/share.ba6b0c91.js → Resources/public/bundles/logiprophoenixjupyter/share.c72f58db.js View File

@@ -1 +1 @@
1
-webpackJsonp([0],{"/KNC":function(o,e){o.exports="/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/images/icon-jupyter.62bc5b09.svg"},0:function(o,e,n){o.exports=n("JNT0")},JNT0:function(o,e,n){n("/KNC"),n("qoeG")},qoeG:function(o,e){o.exports="/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/images/icon-ls-jupyter.62bc5b09.svg"}},[0]);
1
+webpackJsonp([0],{"/KNC":function(o,e){o.exports="/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/images/icon-jupyter.4d5d2b54.svg"},0:function(o,e,n){o.exports=n("JNT0")},JNT0:function(o,e,n){n("/KNC"),n("qoeG")},qoeG:function(o,e){o.exports="/bundles/logiprophoenixjupyter/bundles/logiprophoenixjupyter/images/icon-ls-jupyter.4d5d2b54.svg"}},[0]);

Loading…
Cancel
Save