Skip to content

Commit

Permalink
completion of phpdoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusgreen committed Mar 10, 2024
1 parent 6f95da1 commit d2ac06d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
2 changes: 1 addition & 1 deletion edit_aitext_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* @package qtype_aitext
* @subpackage aitext
* @author 2023 Marcus Green
* @copyright 2023 Marcus Green
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
26 changes: 12 additions & 14 deletions renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* aitext question renderer class. Based on core Moodle qtype_essay
* which has its origins at the UK Open University
* Based on core Moodle qtype_essay originating at the UK Open University
*
* @package qtype_aitext
* @subpackage aitext
* @author 2023 Marcus Green
* @copyright 2024 Marcus Green
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand All @@ -30,7 +29,7 @@
/**
* Generates the output for aitext questions.
*
* @author 2023 Marcus Green
* @copyright 2023 Marcus Green
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_aitext_renderer extends qtype_renderer {
Expand Down Expand Up @@ -247,10 +246,10 @@ public function files_input(question_attempt $qa, $numallowed,


/**
* A base class to abstract out the differences between different type of
* response format.
* Abstract out the differences between different type of response format.
*
* @copyright 2011 The Open University
*
* @copyright 2024
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class qtype_aitext_format_renderer_base extends plugin_renderer_base {
Expand Down Expand Up @@ -301,8 +300,7 @@ abstract protected function class_name();
}

/**
* An aitext format renderer for aitexts where the student should use the HTML
* editor without the file picker.
* Where the student use the HTML editor
*
* @author Marcus Green 2024 building on work by the UK OU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand Down Expand Up @@ -480,8 +478,9 @@ protected function filepicker_html($inputname, $draftitemid) {


/**
* An aitext format renderer for aitexts where the student should use the HTML
* editor with the file picker.
* Use the HTML editor with the file picker.
*
* @todo remove along with calls to it as file submission is not supported
*
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand Down Expand Up @@ -609,10 +608,9 @@ protected function filepicker_html($inputname, $draftitemid) {


/**
* An aitext format renderer for aitexts where the student should use a plain
* input box, but with a normal, proportional font.
* For aitexts with a plain text input box but with a proportional font
*
* @copyright 2011 The Open University
* @copyright 2024 Marcus Green
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_aitext_format_plain_renderer extends qtype_aitext_format_renderer_base {
Expand Down
5 changes: 5 additions & 0 deletions tests/question_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class question_test extends \advanced_testcase {


/**
* Tests the call to the quesitonbase summary code
*
* @covers ::get_question_summary()
* @return void
* @throws coding_exception
Expand Down Expand Up @@ -74,6 +76,7 @@ public function test_summarise_response(): void {


/**
* Test aitext is_same_response, used when scrolling beween questions
*
* @covers ::is_same_response()
*
Expand Down Expand Up @@ -127,6 +130,8 @@ public function test_is_same_response() {


/**
* Test aitext is_same_response, used when scrolling beween questions
*
* @covers ::is_same_response_with_template()
*/
public function test_is_same_response_with_template() {
Expand Down
4 changes: 4 additions & 0 deletions tests/question_type_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ public function test_can_analyse_responses() {
}

/**
* An estimate of the score a student would get by guessing randomly.
* Which unlike a multi choice or similar would be zero or very close to.
* Used by statistics calculation rather than the actual qtype.
*
* @covers ::get_radom_guess_score()
*
* @return void
Expand Down

0 comments on commit d2ac06d

Please sign in to comment.