Skip to content

Commit c91ae71

Browse files
author
rtschu
committed
fixed styleerrors
1 parent f76d631 commit c91ae71

File tree

6 files changed

+15
-17
lines changed

6 files changed

+15
-17
lines changed

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ script:
8080
after_success:
8181
- bash <(curl -s https://codecov.io/bash)
8282

83-
# TODO re-add static
8483
stages:
8584
- static
8685
- name: develop

classes/lsf_api_mock_testable.php

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ function get_course_by_veranstid ($courseid) {
4545
$fulldata = \behat_block_evasys_sync::get_coursedata_by_courseid($moodleid);
4646
$coursedata = $fulldata->evacourses[$courseid];
4747

48-
4948
$result = new \stdClass();
5049
if (!$coursedata->valid) {
5150
$result->veranstid = null;

tests/behat/behat_block_evasys_sync.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static function &get_coursedata_by_courseid($courseid) {
8282
if (!array_key_exists($courseid, self::$coursedata)) {
8383
$jsondata = get_course($courseid)->summary;
8484
$localcoursedata = json_decode($jsondata);
85-
if(!is_object($localcoursedata)) {
85+
if (!is_object($localcoursedata)) {
8686
$localcoursedata = new \stdClass(); // If there is no data initialize a data object.
8787
}
8888
self::$coursedata[$courseid] = $localcoursedata;
@@ -142,7 +142,7 @@ private function add_lsf_evasys_course($moodlecourse, $valid, $veranstnr = null,
142142
/**
143143
* @Given I load the evasys block
144144
*/
145-
public function I_load_the_evasys_block () {
145+
public function i_load_the_evasys_block () {
146146
self::write_coursedata_to_persistent_storage();
147147
$this->execute('behat_general::i_click_on', ["Show status of surveys", 'button']);
148148
}
@@ -154,7 +154,7 @@ public function there_are_evasyscourses_mapped_to_course_with_shortname($number,
154154
$count = intval($number);
155155
$lsfids = array();
156156
for ($i = 0; $i < $count; $i++) {
157-
$surveystatus = $state == "mixed" ? ($i==0 ? "closed" : "open)") : $state; // If mixed first will be closed, rest open.
157+
$surveystatus = $state == "mixed" ? ($i == 0 ? "closed" : "open)") : $state; // If mixed first will be closed, rest open.
158158
$lsfid = $this->add_lsf_evasys_course($shortname, true, $i, "WS 2017/18", 100,
159159
"DynamicSurvey" . $i, 1, $surveystatus);
160160
array_push($lsfids, $lsfid);
@@ -209,8 +209,8 @@ public function only_invalid_mappings_are_present_for_course ($shortname) {
209209

210210
/**
211211
* @Given the idnumber of course :shortname links to a :state Evasyscourse
212-
*/
213-
public function the_idnumber_of_course_links_to_a_Evasyscourse($shortname, $state) {
212+
*/
213+
public function the_idnumber_of_course_links_to_a_evasyscourse($shortname, $state) {
214214
// If the state is mixed, the course linked by the idnumber should be "open" because we know there is at least
215215
// one "closed" course mapped.
216216
$surveystatus = $state == "mixed" ? "open" : $state;

tests/behat/fulltest.feature

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Feature: Tests all use-cases of the Evasys-block
66
| username | firstname | lastname | email |
77
| teacher1 | Teacher | 1 | teacher1@example.com |
88
| student1 | Student | 1 | student1@example.com |
9-
| tutor1 | Tutor | 1 | tutor1@example.com |
9+
| tutor1 | Tutor | 1 | tutor1@example.com |
1010
And the following "courses" exist:
1111
| fullname | shortname | category |
1212
| Course 1 | C1 | 0 |
@@ -28,7 +28,7 @@ Feature: Tests all use-cases of the Evasys-block
2828
And I turn editing mode off
2929
Then I should see "Change mapping"
3030
And I should not see "Name:"
31-
And I should not see "IdnumberSurvey"
31+
And I should not see "IdnumberSurvey"
3232
And I should not see "DynamicSurvey"
3333

3434
Scenario: If there is no standardtimemode I should not see the option to use it
@@ -161,7 +161,7 @@ And I should not see "IdnumberSurvey"
161161
And only tutors enrolled in course C1
162162
And there is no idnumber mapped to course C1
163163
And only invalid mappings are present for course C1
164-
And the internal state of course C1 is "closed"
164+
And the internal state of course C1 is "notopened"
165165
And I turn editing mode on
166166
And I add the "EvaSys Sync" block
167167
And I turn editing mode off
@@ -673,7 +673,7 @@ And I should not see "IdnumberSurvey"
673673
And only tutors enrolled in course C1
674674
And the idnumber for course C1 is invalid
675675
And no courses are mapped to course C1
676-
And the internal state of course C1 is "closed"
676+
And the internal state of course C1 is "notopened"
677677
And I turn editing mode on
678678
And I add the "EvaSys Sync" block
679679
And I turn editing mode off
@@ -837,7 +837,7 @@ And I should not see "IdnumberSurvey"
837837
And only tutors enrolled in course C1
838838
And the idnumber for course C1 is invalid
839839
And only invalid mappings are present for course C1
840-
And the internal state of course C1 is "closed"
840+
And the internal state of course C1 is "notopened"
841841
And I turn editing mode on
842842
And I add the "EvaSys Sync" block
843843
And I turn editing mode off
@@ -1010,7 +1010,7 @@ And I should not see "IdnumberSurvey"
10101010
And students enrolled in course C1
10111011
And there is no idnumber mapped to course C1
10121012
And only invalid mappings are present for course C1
1013-
And the internal state of course C1 is "notopened"
1013+
And there is no internal record of course C1
10141014
And I turn editing mode on
10151015
And I add the "EvaSys Sync" block
10161016
And I turn editing mode off
@@ -1584,7 +1584,7 @@ And I should not see "IdnumberSurvey"
15841584
And students enrolled in course C1
15851585
And the idnumber for course C1 is invalid
15861586
And no courses are mapped to course C1
1587-
And the internal state of course C1 is "notopened"
1587+
And there is no internal record of course C1
15881588
And I turn editing mode on
15891589
And I add the "EvaSys Sync" block
15901590
And I turn editing mode off
@@ -1729,7 +1729,7 @@ And I should not see "IdnumberSurvey"
17291729
And students enrolled in course C1
17301730
And the idnumber for course C1 is invalid
17311731
And only invalid mappings are present for course C1
1732-
And the internal state of course C1 is "notopened"
1732+
And there is no internal record of course C1
17331733
And I turn editing mode on
17341734
And I add the "EvaSys Sync" block
17351735
And I turn editing mode off

tests/behat/generator/generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def get_checks(mode, standardtime, students_state, idnumber_state, mapped_state,
2727
checks = ""
2828
# If there are no mapped courses the Block not offer the option to "Show surveys"
2929
if (idnumber_state == "none") and (mapped_state == "none"):
30-
return "Then I should see \"Change mapping\"\n And I should not see \"Name:\"\n"
30+
return "Then I should see \"Change mapping\"\n And I should not see \"Name:\"\n "
3131

3232
# In all other cases (even if there are only invalid entries) we need to click the button to start code execution
3333
checks += "And I load the evasys block\n"

tests/behat/generator/steps.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
| username | firstname | lastname | email |\n\
77
| teacher1 | Teacher | 1 | [email protected] |\n\
88
| student1 | Student | 1 | [email protected] |\n\
9-
| tutor1 | Tutor | 1 | [email protected] | \n\
9+
| tutor1 | Tutor | 1 | [email protected] |\n\
1010
And the following "courses" exist:\n\
1111
| fullname | shortname | category |\n\
1212
| Course 1 | C1 | 0 |\n\

0 commit comments

Comments
 (0)