|
@@ -23,7 +23,7 @@ discard block |
|
|
block discarded – undo |
|
23
|
23
|
|
|
24
|
24
|
use \Exception; |
|
25
|
25
|
|
|
26
|
|
-require_once dirname(dirname(__DIR__)) . "/config/_config.php"; |
|
|
26
|
+require_once dirname(dirname(__DIR__))."/config/_config.php"; |
|
27
|
27
|
|
|
28
|
28
|
/** |
|
29
|
29
|
* This class talks to end users, asking them annoying questions to get to the |
|
@@ -75,7 +75,7 @@ discard block |
|
|
block discarded – undo |
|
75
|
75
|
"TXT" => _("Did the device previously work when roaming, i.e. at other hotspots away from your home institution?"), |
|
76
|
76
|
"FACTOR_YES" => 0.6, // that's good, and somewhat encouraging |
|
77
|
77
|
"FACTOR_NO" => 3, // that is almost a smoking gun |
|
78
|
|
- "VERDICTLECTURE" => sprintf(_("If roaming consistently does not work, then very likely your device configuration is wrong. Typical errors causing this symptom include: using a routing ('outer') username without the @realm.tld suffix - those potentially work at your home organisation, but can not be used when roaming. %s"),$confAssistantText)], |
|
|
78
|
+ "VERDICTLECTURE" => sprintf(_("If roaming consistently does not work, then very likely your device configuration is wrong. Typical errors causing this symptom include: using a routing ('outer') username without the @realm.tld suffix - those potentially work at your home organisation, but can not be used when roaming. %s"), $confAssistantText)], |
|
79
|
79
|
3 => ["AREA" => AbstractTest::INFRA_DEVICE, |
|
80
|
80
|
"TXT" => _("Did you recently change the configuration on your device?"), |
|
81
|
81
|
"FACTOR_YES" => 3, // that is almost a smoking gun |
|
@@ -90,7 +90,7 @@ discard block |
|
|
block discarded – undo |
|
90
|
90
|
"TXT" => _("If you use more than one device: do your other devices still work?"), |
|
91
|
91
|
"FACTOR_YES" => 0.33, // seems that all is okay with the account as such |
|
92
|
92
|
"FACTOR_NO" => 3, // now that is suspicious indeed |
|
93
|
|
- "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"),], |
|
|
93
|
+ "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"), ], |
|
94
|
94
|
6 => ["AREA" => AbstractTest::INFRA_SP_80211, |
|
95
|
95
|
"TXT" => _("Is the place you are currently at heavily crowded, or is a network-intensive workload going on?"), |
|
96
|
96
|
"FACTOR_YES" => 3, |
|
@@ -124,11 +124,11 @@ discard block |
|
|
block discarded – undo |
|
124
|
124
|
$questionDetails = $this->qaArray[$questionNumber]; |
|
125
|
125
|
if ($answer === TRUE) { |
|
126
|
126
|
$this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] * $questionDetails["FACTOR_YES"]; |
|
127
|
|
- $this->loggerInstance->debug(3,"Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_YES"]."\n"); |
|
|
127
|
+ $this->loggerInstance->debug(3, "Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_YES"]."\n"); |
|
128
|
128
|
$factor = $questionDetails["FACTOR_YES"]; |
|
129
|
129
|
} elseif ($answer === FALSE) { |
|
130
|
130
|
$this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] * $questionDetails["FACTOR_NO"]; |
|
131
|
|
- $this->loggerInstance->debug(3,"Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_NO"]."\n"); |
|
|
131
|
+ $this->loggerInstance->debug(3, "Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_NO"]."\n"); |
|
132
|
132
|
$factor = $questionDetails["FACTOR_NO"]; |
|
133
|
133
|
} else { |
|
134
|
134
|
$factor = 1; |
|
@@ -138,8 +138,8 @@ discard block |
|
|
block discarded – undo |
|
138
|
138
|
$this->additionalFindings["QUESTIONSASKED"] = $this->previousQuestions; |
|
139
|
139
|
$_SESSION["SUSPECTS"] = $this->possibleFailureReasons; |
|
140
|
140
|
$_SESSION["EVIDENCE"] = $this->additionalFindings; |
|
141
|
|
- $this->loggerInstance->debug(3,$_SESSION['SUSPECTS']); |
|
142
|
|
- $this->loggerInstance->debug(3,$_SESSION['EVIDENCE']); |
|
|
141
|
+ $this->loggerInstance->debug(3, $_SESSION['SUSPECTS']); |
|
|
142
|
+ $this->loggerInstance->debug(3, $_SESSION['EVIDENCE']); |
|
143
|
143
|
} |
|
144
|
144
|
|
|
145
|
145
|
/** |
|
@@ -158,7 +158,7 @@ discard block |
|
|
block discarded – undo |
|
158
|
158
|
// if both are identical, take any of the questions in the pool of both |
|
159
|
159
|
foreach ($this->qaArray as $questionNumber => $questionDetails) { |
|
160
|
160
|
// if we find a question we didn't ask before AND it is related to our currently high-scoring problem area, ask it |
|
161
|
|
- if (!array_key_exists($questionNumber, $this->previousQuestions) && ( $questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory) ) { |
|
|
161
|
+ if (!array_key_exists($questionNumber, $this->previousQuestions) && ($questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory)) { |
|
162
|
162
|
return json_encode(["NEXTEXISTS" => TRUE, "NUMBER" => $questionNumber, "TEXT" => $questionDetails["TXT"]]); |
|
163
|
163
|
} |
|
164
|
164
|
} |
|
@@ -171,7 +171,7 @@ discard block |
|
|
block discarded – undo |
|
171
|
171
|
* @return string JSON encoded array with all the info we have |
|
172
|
172
|
*/ |
|
173
|
173
|
public function getCurrentGuessState() { |
|
174
|
|
- return json_encode([ "SUSPECTS" => $this->possibleFailureReasons, "EVIDENCE" => $this->additionalFindings ]); |
|
|
174
|
+ return json_encode(["SUSPECTS" => $this->possibleFailureReasons, "EVIDENCE" => $this->additionalFindings]); |
|
175
|
175
|
} |
|
176
|
176
|
|
|
177
|
177
|
/** |