Skip to content

Commit

Permalink
fix: scoring state is now optional
Browse files Browse the repository at this point in the history
Also remove subquestion classification for now, as it isn't used yet and has changed substantially.
  • Loading branch information
MHajoha committed Oct 21, 2024
1 parent be18692 commit 7608d9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 71 deletions.
11 changes: 4 additions & 7 deletions classes/api/attempt_scored.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,24 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class attempt_scored extends attempt {
/** @var string */
public string $scoringstate;
/** @var string|null */
public ?string $scoringstate;

/** @var string */
public string $scoringcode;

/** @var float|null */
public ?float $score = null;

/** @var classified_response[]|null */
public ?array $classification = null;

/**
* Initializes a new instance.
*
* @param int $variant
* @param attempt_ui $ui
* @param string $scoringstate
* @param string $scoringcode
* @param string|null $scoringstate
*/
public function __construct(int $variant, attempt_ui $ui, string $scoringstate, string $scoringcode) {
public function __construct(int $variant, attempt_ui $ui, string $scoringcode, ?string $scoringstate = null) {
parent::__construct($variant, $ui);

$this->scoringstate = $scoringstate;
Expand Down
64 changes: 0 additions & 64 deletions classes/api/classified_response.php

This file was deleted.

0 comments on commit 7608d9b

Please sign in to comment.