Merge branch 'MDL-81634-main' of https://github.com/andrewnicols/moodle
This commit is contained in:
@@ -61,7 +61,7 @@ abstract class condition {
|
||||
*
|
||||
* @param view|null $qbank
|
||||
*/
|
||||
public function __construct(view $qbank = null) {
|
||||
public function __construct(?view $qbank = null) {
|
||||
if (is_null($qbank)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ class plugin_features_base {
|
||||
* @param view|null $qbank
|
||||
* @return condition[]
|
||||
*/
|
||||
public function get_question_filters(view $qbank = null): array {
|
||||
public function get_question_filters(?view $qbank = null): array {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ class provider implements
|
||||
* @param int|null $contextid An optional context id, in case the $sql query is not already filtered by that.
|
||||
*/
|
||||
public static function get_users_in_context_from_sql(userlist $userlist, string $prefix, string $insql, $params,
|
||||
int $contextid = null) {
|
||||
?int $contextid = null) {
|
||||
|
||||
$sql = "SELECT {$prefix}_qas.userid
|
||||
FROM {question_attempt_steps} {$prefix}_qas
|
||||
|
||||
@@ -146,7 +146,7 @@ class calculated_question_summary extends calculated {
|
||||
* @param float|null $value2
|
||||
* @return float|null
|
||||
*/
|
||||
protected function max(float $value1 = null, float $value2 = null) {
|
||||
protected function max(?float $value1 = null, ?float $value2 = null) {
|
||||
$temp1 = $value1 ?: 0;
|
||||
$temp2 = $value2 ?: 0;
|
||||
|
||||
@@ -170,7 +170,7 @@ class calculated_question_summary extends calculated {
|
||||
* @param float|null $value2
|
||||
* @return mixed|null
|
||||
*/
|
||||
protected function min(float $value1 = null, float $value2 = null) {
|
||||
protected function min(?float $value1 = null, ?float $value2 = null) {
|
||||
$temp1 = $value1 ?: 0;
|
||||
$temp2 = $value2 ?: 0;
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class analysis_for_question {
|
||||
* This is the return value from {@link \question_type::get_possible_responses()}
|
||||
* see that method for fuller documentation.
|
||||
*/
|
||||
public function __construct(array $possiblereponses = null) {
|
||||
public function __construct(?array $possiblereponses = null) {
|
||||
if ($possiblereponses !== null) {
|
||||
$this->possibleresponses = $possiblereponses;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ class analysis_for_subpart {
|
||||
*
|
||||
* @param \question_possible_response[] $responseclasses as returned from {@link \question_type::get_possible_responses()}.
|
||||
*/
|
||||
public function __construct(array $responseclasses = null) {
|
||||
public function __construct(?array $responseclasses = null) {
|
||||
if (is_array($responseclasses)) {
|
||||
foreach ($responseclasses as $responseclassid => $responseclass) {
|
||||
$this->responseclasses[$responseclassid] = new analysis_for_class($responseclass, $responseclassid);
|
||||
|
||||
Reference in New Issue
Block a user