Completed
Pull Request — 1.11.x (#1589)
by José
46:32
created
main/survey/survey.lib.php 1 patch
Doc Comments   +19 added lines, -16 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * Deletes all survey invitations of a user
48 48
      * @param int $user_id
49 49
      *
50
-     * @return boolean
50
+     * @return false|null
51 51
      * @assert ('') === false
52 52
      */
53 53
     public static function delete_all_survey_invitations_by_user($user_id)
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      * Retrieves all the survey information
105 105
      *
106 106
      * @param integer $survey_id the id of the survey
107
-     * @param boolean $shared this parameter determines if
107
+     * @param integer $shared this parameter determines if
108 108
      * we have to get the information of a survey from the central (shared) database or from the
109 109
      * 		  course database
110 110
      * @param string course code optional
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
      * This function deletes a survey (and also all the question in that survey
572 572
      *
573 573
      * @param int $survey_id id of the survey that has to be deleted
574
-     * @return true
574
+     * @return boolean
575 575
      *
576 576
      * @author Patrick Cool <[email protected]>, Ghent University
577 577
      * @version January 2007
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
      *
757 757
      * @param int $survey_id id of the survey that has to be duplicated
758 758
      * @param int $courseId id of the course which survey has to be duplicated
759
-     * @return true
759
+     * @return boolean
760 760
      *
761 761
      * @author Eric Marguin <[email protected]>, Elixir Interactive
762 762
      * @version October 2007
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
     /**
797 797
      * This function recalculates the number of people who have taken the survey (=filled at least one question)
798 798
      *
799
-     * @param int $survey_id the id of the survey somebody
799
+     * @param int $survey_data the id of the survey somebody
800 800
      * @return true
801 801
      *
802 802
      * @author Patrick Cool <[email protected]>, Ghent University
@@ -1367,7 +1367,7 @@  discard block
 block discarded – undo
1367 1367
      * This function deletes a shared survey question from the main database and all its options
1368 1368
      *
1369 1369
      * @param int $question_id the id of the question
1370
-     * @param int $shared
1370
+     * @param integer $survey_id
1371 1371
      *
1372 1372
      * @todo delete all the options of this question
1373 1373
      *
@@ -1494,8 +1494,8 @@  discard block
 block discarded – undo
1494 1494
      * This function deletes all the options of the questions of a given survey
1495 1495
      * This function is normally only called when a survey is deleted
1496 1496
      *
1497
-     * @param $survey_id the id of the survey that has to be deleted
1498
-     * @return true
1497
+     * @param integer $survey_id the id of the survey that has to be deleted
1498
+     * @return boolean
1499 1499
      *
1500 1500
      * @author Patrick Cool <[email protected]>, Ghent University
1501 1501
      * @version January 2007
@@ -1562,8 +1562,8 @@  discard block
 block discarded – undo
1562 1562
      * This function deletes all the answers anyone has given on this survey
1563 1563
      * This function is normally only called when a survey is deleted
1564 1564
      *
1565
-     * @param $survey_id the id of the survey that has to be deleted
1566
-     * @return true
1565
+     * @param integer $survey_id the id of the survey that has to be deleted
1566
+     * @return boolean
1567 1567
      *
1568 1568
      * @todo write the function
1569 1569
      *
@@ -1838,7 +1838,7 @@  discard block
 block discarded – undo
1838 1838
     /**
1839 1839
      * This function checks the parameters that are used in this page
1840 1840
      *
1841
-     * @return 	string 	The header, an error and the footer if any parameter fails, else it returns true
1841
+     * @return 	null|boolean 	The header, an error and the footer if any parameter fails, else it returns true
1842 1842
      * @author Patrick Cool <[email protected]>, Ghent University
1843 1843
      * @version February 2007
1844 1844
      */
@@ -2392,6 +2392,7 @@  discard block
 block discarded – undo
2392 2392
      * Display score data about a survey question
2393 2393
      * @param	array	Question info
2394 2394
      * @param	integer	The offset of results shown
2395
+     * @param integer $offset
2395 2396
      * @return	void 	(direct output)
2396 2397
      */
2397 2398
     public static function display_question_report_score($survey_data, $question, $offset)
@@ -3032,7 +3033,7 @@  discard block
 block discarded – undo
3032 3033
      * Quite similar to display_complete_report(), returns an HTML string
3033 3034
      * that can be used in a csv file
3034 3035
      * @todo consider merging this function with display_complete_report
3035
-     * @return	string	The contents of a csv file
3036
+     * @return	false|null	The contents of a csv file
3036 3037
      * @author Patrick Cool <[email protected]>, Ghent University
3037 3038
      * @version February 2007
3038 3039
      */
@@ -3254,7 +3255,7 @@  discard block
 block discarded – undo
3254 3255
      * @param	array	User's answers
3255 3256
      * @param 	mixed	User ID or user details as string - Used as a string in the result string
3256 3257
      * @param	boolean	Whether to display user fields or not
3257
-     * @return	string	One line of the csv file
3258
+     * @return	string[]	One line of the csv file
3258 3259
      */
3259 3260
     public static function export_complete_report_row_xls(
3260 3261
         $survey_data,
@@ -3560,6 +3561,7 @@  discard block
 block discarded – undo
3560 3561
      *
3561 3562
      * @param	integer	Survey ID
3562 3563
      * @param	integer	Question ID
3564
+     * @param integer $survey_id
3563 3565
      * @return 	Array	Array containing all answers of all users, grouped by user
3564 3566
      *
3565 3567
      * @author Patrick Cool <[email protected]>, Ghent University
@@ -3854,7 +3856,7 @@  discard block
 block discarded – undo
3854 3856
 
3855 3857
     /**
3856 3858
      * @param $params
3857
-     * @return bool|int
3859
+     * @return false|string
3858 3860
      */
3859 3861
     public static function save_invitation($params)
3860 3862
     {
@@ -3908,6 +3910,7 @@  discard block
 block discarded – undo
3908 3910
      *
3909 3911
      * @param int invitedUser - the userId (course user) or emailaddress of additional user
3910 3912
      * $param string $invitation_code - the unique invitation code for the URL
3913
+     * @param string|null $invitation_text
3911 3914
      * @return	void
3912 3915
      */
3913 3916
     public static function send_invitation_mail($invitedUser, $invitation_code, $invitation_title, $invitation_text)
@@ -4802,7 +4805,7 @@  discard block
 block discarded – undo
4802 4805
      * @author Isaac Flores Paz <[email protected]>
4803 4806
      * @param int $user_id - User ID
4804 4807
      * @param string $survey_code
4805
-     * @param int $user_id_answer - User in survey answer table (user id or anonymus)
4808
+     * @param int $user_answer - User in survey answer table (user id or anonymus)
4806 4809
      *
4807 4810
      * @return boolean
4808 4811
      */
@@ -4975,7 +4978,7 @@  discard block
 block discarded – undo
4975 4978
     /**
4976 4979
      * Check if the current survey has answers
4977 4980
      *
4978
-     * @param $surveyId
4981
+     * @param integer $surveyId
4979 4982
      * @return boolean return true if the survey has answers, false otherwise
4980 4983
      */
4981 4984
     public static function checkIfSurveyHasAnswers($surveyId)
Please login to merge, or discard this patch.
main/survey/survey_question.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         if ($surveyData['survey_type'] == 1) {
65 65
             $table_survey_question_group = Database::get_course_table(TABLE_SURVEY_QUESTION_GROUP);
66 66
             $sql = 'SELECT id,name FROM '.$table_survey_question_group.'
67
-                    WHERE survey_id = '.(int)$_GET['survey_id'].'
67
+                    WHERE survey_id = '.(int) $_GET['survey_id'].'
68 68
                     ORDER BY name';
69 69
             $rs = Database::query($sql);
70 70
             $glist = null;
@@ -75,15 +75,15 @@  discard block
 block discarded – undo
75 75
             $grouplist = $grouplist1 = $grouplist2 = $glist;
76 76
 
77 77
             if (!empty($formData['assigned'])) {
78
-                $grouplist = str_replace('<option value="'.$formData['assigned'].'"','<option value="'.$formData['assigned'].'" selected',$glist);
78
+                $grouplist = str_replace('<option value="'.$formData['assigned'].'"', '<option value="'.$formData['assigned'].'" selected', $glist);
79 79
             }
80 80
 
81 81
             if (!empty($formData['assigned1'])) {
82
-                $grouplist1 = str_replace('<option value="'.$formData['assigned1'].'"','<option value="'.$formData['assigned1'].'" selected',$glist);
82
+                $grouplist1 = str_replace('<option value="'.$formData['assigned1'].'"', '<option value="'.$formData['assigned1'].'" selected', $glist);
83 83
             }
84 84
 
85 85
             if (!empty($formData['assigned2'])) {
86
-                $grouplist2 = str_replace('<option value="'.$formData['assigned2'].'"','<option value="'.$formData['assigned2'].'" selected',$glist);
86
+                $grouplist2 = str_replace('<option value="'.$formData['assigned2'].'"', '<option value="'.$formData['assigned2'].'" selected', $glist);
87 87
             }
88 88
 
89 89
             $this->html .= '	<tr><td colspan="">
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
             $this->html .= '
97 97
 			<b>'.get_lang('Secondary').'</b><br />
98
-			'.'<input type="radio" name="choose" value="2" '.(($formData['choose']==2)?'checked':'').
98
+			'.'<input type="radio" name="choose" value="2" '.(($formData['choose'] == 2) ? 'checked' : '').
99 99
                 '><select name="assigned1">'.$grouplist1.'</select> '.
100 100
                 '<select name="assigned2">'.$grouplist2.'</select>'
101 101
                 .'</fieldset><br />';
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                     <div class="form-group">
132 132
                         <label class="col-sm-2 control-label"></label>
133 133
                         <div class="col-sm-8">
134
-                            <div class="alert alert-info">' . get_lang('YouCantNotEditThisQuestionBecauseAlreadyExistAnswers') . '</div>
134
+                            <div class="alert alert-info">' . get_lang('YouCantNotEditThisQuestionBecauseAlreadyExistAnswers').'</div>
135 135
                         </div>
136 136
                         <div class="col-sm-2"></div>
137 137
                     </div>
Please login to merge, or discard this patch.