Completed
Pull Request — 1.10.x (#1244)
by
unknown
68:19 queued 18:39
created
main/plagiarism/compilatio/compilatio.class.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 	 * @param $pour
227 227
 	 * @param $imagesPath
228 228
 	 * @param $text  Array includes the extract from the text
229
-	 * @return unknown_type
229
+	 * @return string|null
230 230
 	 */
231 231
 	function getProgressionAnalyseDocv31($status, $pour = 0, $imagesPath = '', $text = '')
232 232
 	{
@@ -281,11 +281,11 @@  discard block
 block discarded – undo
281 281
 	 * Method for display the PomprseuilmankBar (% de plagiat)
282 282
 	 *
283 283
 	 * @param $percentagePumping
284
-	 * @param $weakThreshold
285
-	 * @param $highThreshold
284
+	 * @param integer $weakThreshold
285
+	 * @param integer $highThreshold
286 286
 	 * @param $imagesPath
287 287
 	 * @param $text : array  includes the extract from the text
288
-	 * @return unknown_type
288
+	 * @return string
289 289
 	 */
290 290
 	function getPomprankBarv31($pourcentagePompage, $weakThreshold, $highThreshold, $chemin_images='',$texte='') {
291 291
 
Please login to merge, or discard this patch.
Braces   +13 added lines, -20 removed lines patch added patch discarded remove patch
@@ -41,18 +41,16 @@  discard block
 block discarded – undo
41 41
 								'exceptions' => true);
42 42
 						}
43 43
 						$this->soapcli = new SoapClient($urlsoap,$param);
44
-					}else{
44
+					} else{
45 45
 						$this->soapcli = 'WS urlsoap not available' ;
46 46
 					}
47
-				}else{
47
+				} else{
48 48
 					$this->soapcli ='API key not available';
49 49
 				}
50
-			}
51
-			catch (SoapFault $fault)
50
+			} catch (SoapFault $fault)
52 51
 			{
53 52
 				$this->soapcli = "Error constructor compilatio " . $fault->faultcode ." " .$fault->faultstring ;
54
-			}
55
-			catch (Exception $e) {
53
+			} catch (Exception $e) {
56 54
 				$this->soapcli = "Error constructor compilatio with urlsoap" . $urlsoap;
57 55
 			}
58 56
 		}
@@ -72,8 +70,9 @@  discard block
 block discarded – undo
72 70
 		{
73 71
 			try
74 72
 			{
75
-				if (!is_object($this->soapcli))
76
-					return("Error in constructor compilatio() " . $this->soapcli);
73
+				if (!is_object($this->soapcli)) {
74
+									return("Error in constructor compilatio() " . $this->soapcli);
75
+				}
77 76
 				$idDocument = $this->soapcli->__call('addDocumentBase64',
78 77
 					array(
79 78
 						$this->key,
@@ -85,8 +84,7 @@  discard block
 block discarded – undo
85 84
 					)
86 85
 				);
87 86
 				return $idDocument;
88
-			}
89
-			catch (SoapFault $fault)
87
+			} catch (SoapFault $fault)
90 88
 			{
91 89
                 return("Erreur sendDoc()" . $fault->faultcode ." " .$fault->faultstring);
92 90
 			}
@@ -108,8 +106,7 @@  discard block
 block discarded – undo
108 106
 				$param = array($this->key, $compiHash);
109 107
 				$idDocument = $this->soapcli->__call('getDocument', $param);
110 108
 				return $idDocument;
111
-			}
112
-			catch (SoapFault $fault)
109
+			} catch (SoapFault $fault)
113 110
 			{
114 111
                 return("Erreur getDoc()" . $fault->faultcode . " " .$fault->faultstring);
115 112
 			}
@@ -130,8 +127,7 @@  discard block
 block discarded – undo
130 127
 				$param = array($this->key,$compiHash);
131 128
 				$idDocument = $this->soapcli->__call('getDocumentReportUrl', $param);
132 129
 				return $idDocument;
133
-			}
134
-			catch (SoapFault $fault)
130
+			} catch (SoapFault $fault)
135 131
 			{
136 132
                 return("Erreur  getReportUrl()" . $fault->faultcode ." " .$fault->faultstring);
137 133
 			}
@@ -151,8 +147,7 @@  discard block
 block discarded – undo
151 147
 				}
152 148
 				$param = array($this->key,$compiHash);
153 149
 				$this->soapcli->__call('deleteDocument', $param);
154
-			}
155
-			catch (SoapFault $fault)
150
+			} catch (SoapFault $fault)
156 151
 			{
157 152
                 return("Erreur  deldoc()" . $fault->faultcode . " " .$fault->faultstring);
158 153
 			}
@@ -172,8 +167,7 @@  discard block
 block discarded – undo
172 167
 				}
173 168
 				$param = array($this->key,$compiHash);
174 169
                 $this->soapcli->__call('startDocumentAnalyse', $param);
175
-			}
176
-			catch (SoapFault $fault)
170
+			} catch (SoapFault $fault)
177 171
 			{
178 172
                 return("Erreur  startAnalyse()" . $fault->faultcode ." " .$fault->faultstring);
179 173
 			}
@@ -193,8 +187,7 @@  discard block
 block discarded – undo
193 187
 				$param=array($this->key);
194 188
                 $resultat=$this->soapcli->__call('getAccountQuotas', $param);
195 189
 				return $resultat;
196
-			}
197
-			catch (SoapFault $fault)
190
+			} catch (SoapFault $fault)
198 191
 			{
199 192
                 return("Erreur  getQuotas()" . $fault->faultcode ." " .$fault->faultstring);
200 193
 			}
Please login to merge, or discard this patch.
main/plagiarism/compilatio/upload.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -278,6 +278,9 @@  discard block
 block discarded – undo
278 278
 }
279 279
 
280 280
 
281
+/**
282
+ * @param string $txt
283
+ */
281 284
 function getFilename($txt) {
282 285
     $res = $txt;
283 286
     preg_match("|.*/([^/]+)|", $txt, $urlList);
@@ -287,6 +290,9 @@  discard block
 block discarded – undo
287 290
     return $res;
288 291
 }
289 292
 
293
+/**
294
+ * @param string $txt
295
+ */
290 296
 function getWorkFolder($txt) {
291 297
     $res = "";
292 298
     preg_match("|(.*/)[^/]+|", $txt, $urlList);
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -140,10 +140,10 @@  discard block
 block discarded – undo
140 140
     if ($typeMessage == 1) {
141 141
         $message = $errorCodeNotValid;
142 142
         Display::display_error_message($message);
143
-    }elseif($typeMessage == 2){
143
+    } elseif($typeMessage == 2){
144 144
         $message = $errorLoadError;
145 145
         Display::display_error_message($message);
146
-    }else{
146
+    } else{
147 147
         $message = $msgWait;
148 148
         Display::display_confirmation_message($message);
149 149
     }
@@ -233,10 +233,10 @@  discard block
 block discarded – undo
233 233
     if ($typeMessage == 1) {
234 234
         $message = $errorCodeNotValid;
235 235
         Display::display_error_message($message);
236
-    }elseif($typeMessage == 2){
236
+    } elseif($typeMessage == 2){
237 237
         $message = $errorLoadError;
238 238
         Display::display_error_message($message);
239
-    }else{
239
+    } else{
240 240
         $message = $msgWait;
241 241
         Display::display_confirmation_message($message);
242 242
 	}
Please login to merge, or discard this patch.
main/work/work.lib.php 1 patch
Doc Comments   +21 added lines, -17 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
  * Create a group of select from a date
159 159
  * @param FormValidator $form
160 160
  * @param string $prefix
161
- * @return array
161
+ * @return HTML_QuickForm_element[]
162 162
  */
163 163
 function create_group_date_select($form, $prefix = '')
164 164
 {
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
  * @author Bert Vanderkimpen
753 753
  * @author Yannick Warnier <[email protected]> Adaptation for work tool
754 754
  * @param   string $base_work_dir Base work dir (.../work)
755
- * @param   string $desiredDirName complete path of the desired name
755
+ * @param   string $desired_dir_name complete path of the desired name
756 756
  *
757 757
  * @return  string actual directory name if it succeeds, boolean false otherwise
758 758
  */
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
 /**
775 775
  * Delete a work-tool directory
776 776
  * @param   int  $id work directory id to delete
777
- * @return  integer -1 on error
777
+ * @return  boolean|null -1 on error
778 778
  */
779 779
 function deleteDirWork($id)
780 780
 {
@@ -917,7 +917,7 @@  discard block
 block discarded – undo
917 917
  * Update the url of a dir in the student_publication table
918 918
  * @param  array $work_data work original data
919 919
  * @param  string $newPath Example: "folder1"
920
- * @return bool
920
+ * @return boolean|null
921 921
  */
922 922
 function updateDirName($work_data, $newPath)
923 923
 {
@@ -974,6 +974,7 @@  discard block
 block discarded – undo
974 974
 /**
975 975
  * Transform an all directory structure (only directories) in an array
976 976
  * @param   string path of the directory
977
+ * @param string $directory
977 978
  * @return  array the directory structure into an array
978 979
  * @author  Julio Montoya Dokeos
979 980
  * @version April 2008
@@ -1043,7 +1044,7 @@  discard block
 block discarded – undo
1043 1044
  * @param   string the path of the directory
1044 1045
  * @param   boolean true if we want the total quantity of files
1045 1046
  * include in others child directories, false only  files in the directory
1046
- * @return  array the first element is an integer with the number of files
1047
+ * @return  integer[] the first element is an integer with the number of files
1047 1048
  * in the folder, the second element is the number of directories
1048 1049
  * @author  Julio Montoya
1049 1050
  * @version April 2008
@@ -2387,7 +2388,7 @@  discard block
 block discarded – undo
2387 2388
 }
2388 2389
 
2389 2390
 /**
2390
- * @param $name
2391
+ * @param string $name
2391 2392
  * @param $values
2392 2393
  * @param string $checked
2393 2394
  * @return string
@@ -2913,7 +2914,7 @@  discard block
 block discarded – undo
2913 2914
  * @param int $userId
2914 2915
  * @param int $workId
2915 2916
  * @param int $courseId
2916
- * @return bool
2917
+ * @return boolean|null
2917 2918
  */
2918 2919
 function allowOnlySubscribedUser($userId, $workId, $courseId)
2919 2920
 {
@@ -3031,7 +3032,7 @@  discard block
 block discarded – undo
3031 3032
 /**
3032 3033
  * Get total score from a work list
3033 3034
  * @param $workList
3034
- * @return int|null
3035
+ * @return integer
3035 3036
  */
3036 3037
 function getTotalWorkScore($workList)
3037 3038
 {
@@ -3047,7 +3048,7 @@  discard block
 block discarded – undo
3047 3048
  * Get comment count from a work list (docs sent by students)
3048 3049
  * @param array $workList
3049 3050
  * @param array $courseInfo
3050
- * @return int|null
3051
+ * @return integer
3051 3052
  */
3052 3053
 function getTotalWorkComment($workList, $courseInfo = array())
3053 3054
 {
@@ -3190,6 +3191,7 @@  discard block
 block discarded – undo
3190 3191
  * @param int $parentId
3191 3192
  * @param array $courseInfo
3192 3193
  * @param int $sessionId
3194
+ * @param integer $userId
3193 3195
  * @return int
3194 3196
  */
3195 3197
 function getLastWorkStudentFromParentByUser(
@@ -3826,12 +3828,11 @@  discard block
 block discarded – undo
3826 3828
 
3827 3829
 /**
3828 3830
  * Creates a new task (directory) in the assignment tool
3829
- * @param array $params
3830 3831
  * @param int $user_id
3831 3832
  * @param array $courseInfo
3832 3833
  * @param int $group_id
3833 3834
  * @param int $session_id
3834
- * @return bool|int
3835
+ * @return string|false
3835 3836
  * @note $params can have the following elements, but should at least have the 2 first ones: (
3836 3837
  *       'new_dir' => 'some-name',
3837 3838
  *       'description' => 'some-desc',
@@ -4327,7 +4328,7 @@  discard block
 block discarded – undo
4327 4328
 }
4328 4329
 
4329 4330
 /**
4330
- * @return array
4331
+ * @return string[]
4331 4332
  */
4332 4333
 function getUploadDocumentType()
4333 4334
 {
@@ -4699,7 +4700,7 @@  discard block
 block discarded – undo
4699 4700
  * @param int Session ID
4700 4701
  * @param $correction
4701 4702
  *
4702
- * @return array|bool
4703
+ * @return boolean
4703 4704
  */
4704 4705
 function getFileContents($id, $course_info, $sessionId = 0, $correction = false)
4705 4706
 {
@@ -4817,7 +4818,7 @@  discard block
 block discarded – undo
4817 4818
  * @param int $userId
4818 4819
  * @param array $courseInfo
4819 4820
  * @param string $format
4820
- * @return bool
4821
+ * @return false|null
4821 4822
  */
4822 4823
 function exportAllWork($userId, $courseInfo, $format = 'pdf')
4823 4824
 {
@@ -4865,7 +4866,7 @@  discard block
 block discarded – undo
4865 4866
  * @param array $courseInfo
4866 4867
  * @param int $sessionId
4867 4868
  * @param string $format
4868
- * @return bool
4869
+ * @return false|null
4869 4870
  */
4870 4871
 function exportAllStudentWorkFromPublication(
4871 4872
     $workId,
@@ -5003,7 +5004,7 @@  discard block
 block discarded – undo
5003 5004
  * Downloads all user files per user
5004 5005
  * @param int $userId
5005 5006
  * @param array $courseInfo
5006
- * @return bool
5007
+ * @return false|null
5007 5008
  */
5008 5009
 function downloadAllFilesPerUser($userId, $courseInfo)
5009 5010
 {
@@ -5117,7 +5118,7 @@  discard block
 block discarded – undo
5117 5118
 /**
5118 5119
  * @param array $courseInfo
5119 5120
  * @param int $workId
5120
- * @return bool
5121
+ * @return boolean|null
5121 5122
  */
5122 5123
 function protectWork($courseInfo, $workId)
5123 5124
 {
@@ -5192,6 +5193,9 @@  discard block
 block discarded – undo
5192 5193
 /*
5193 5194
  * function for delete a document of the compilatio table if plagiarismTool is Compilatio
5194 5195
  */
5196
+/**
5197
+ * @param integer $itemId
5198
+ */
5195 5199
 function plagiarismDeleteDoc($courseId, $itemId)
5196 5200
 {
5197 5201
     if (plagiarismActive()) {
Please login to merge, or discard this patch.
main/plagiarism/compilatio/compilatio_ajax.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,8 +89,7 @@
 block discarded – undo
89 89
                     $compilatioImgFolder,
90 90
                     $text
91 91
                 );
92
-            }
93
-            elseif ($status == "ANALYSE_IN_QUEUE") {
92
+            } elseif ($status == "ANALYSE_IN_QUEUE") {
94 93
                 $actionCompilatio.="<img src='"
95 94
                     . $compilatioImgFolder
96 95
                     . "/ajax-loader2.gif' style='margin-right:10px;' />"
Please login to merge, or discard this patch.