Skip to content

Commit

Permalink
Merge pull request #23 from KQMATH/release/0.3.1
Browse files Browse the repository at this point in the history
Release/0.3.1
  • Loading branch information
andstor authored Dec 30, 2018
2 parents 9cab58d + 20d512d commit c8240b0
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 31 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A simple question for mathematical expressions using MathQuill.

## What is it?
The plugin is based on the short answer question type, but the students
enter their response in a maths editor. The studen interface is WYSIWYG
enter their response in a maths editor. The student interface is WYSIWYG
(what you see is what you get).

The editor interface is provided by MathQuill, which produces LaTeX
Expand Down
11 changes: 8 additions & 3 deletions backup/moodle2/backup_qtype_shortmath_plugin.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* @package qtype
* @subpackage shortmath
* ShortMath question type backup code.
*
* @package qtype_shortmath
* @author André Storhaug <andr3.storhaug@gmail.com> and Hans Georg Schaathun <hasc@ntnu.no>
* @copyright 2018 NTNU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand All @@ -25,7 +26,11 @@
defined('MOODLE_INTERNAL') || die();

/**
* Provides the information to backup shortmath questions
* Provides the information to backup ShortMath questions
*
* @author André Storhaug <andr3.storhaug@gmail.com> and Hans Georg Schaathun <hasc@ntnu.no>
* @copyright 2018 NTNU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class backup_qtype_shortmath_plugin extends backup_qtype_plugin {

Expand Down
12 changes: 9 additions & 3 deletions backup/moodle2/restore_qtype_shortmath_plugin.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* @package qtype
* @subpackage shortmath
* ShortMath question type restore code.
*
* @package qtype_shortmath
* @author André Storhaug <andr3.storhaug@gmail.com> and Hans Georg Schaathun <hasc@ntnu.no>
* @copyright 2018 NTNU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand All @@ -25,7 +26,11 @@
defined('MOODLE_INTERNAL') || die();

/**
* Provides the necessary information needed to restore one shortmath qtype plugin
* Provides the necessary information needed to restore one ShortMath qtype plugin
*
* @author André Storhaug <andr3.storhaug@gmail.com> and Hans Georg Schaathun <hasc@ntnu.no>
* @copyright 2018 NTNU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class restore_qtype_shortmath_plugin extends restore_qtype_plugin {

Expand All @@ -45,6 +50,7 @@ protected function define_question_plugin_structure() {

/**
* Process the qtype/shortmath element
* @param array/object $data the data from the backup file.
*/
public function process_shortmath($data) {
global $DB;
Expand Down
9 changes: 7 additions & 2 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* @package qtype
* @subpackage shortmath
* ShortMath question type upgrade code.
*
* @package qtype_shortmath
* @author André Storhaug <andr3.storhaug@gmail.com>
* @copyright 2018 NTNU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

/**
* Upgrade code for the ShortMath question type.
* @param int $oldversion the version we are upgrading from.
*/
function xmldb_qtype_shortmath_upgrade($oldversion) {
global $DB;

Expand Down
7 changes: 5 additions & 2 deletions edit_shortmath_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* @package qtype
* @subpackage shortmath
* Defines the editing form for the ShortMath question type.
*
* @package qtype_shortmath
* @author André Storhaug <andr3.storhaug@gmail.com>, Sebastian S. Gundersen <sebastsg@stud.ntnu.no>
* and Hans Georg Schaathun <hasc@ntnu.no>
* @copyright 2018 NTNU
Expand All @@ -28,6 +29,8 @@
require_once($CFG->dirroot . '/question/type/shortanswer/edit_shortanswer_form.php');

/**
* ShortMath question editing form definition.
*
* @author André Storhaug <andr3.storhaug@gmail.com>, Sebastian S. Gundersen <sebastsg@stud.ntnu.no>
* and Hans Georg Schaathun <hasc@ntnu.no>
* @copyright 2018 NTNU
Expand Down
8 changes: 5 additions & 3 deletions lang/en/qtype_shortmath.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* @package qtype
* @subpackage shortmath
* @author André Storhaug <andr3.storhaug@gmail.com>, Sebastian S. Gundersen <sebastsg@stud.ntnu.no> and Hans Georg Schaathun <hasc@ntnu.no>
* Language strings for the ShortMath question type.
*
* @package qtype_shortmath
* @author André Storhaug <andr3.storhaug@gmail.com>, Sebastian S. Gundersen <sebastsg@stud.ntnu.no>
* and Hans Georg Schaathun <hasc@ntnu.no>
* @copyright 2018 NTNU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
Expand Down
7 changes: 5 additions & 2 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* @package qtype
* @subpackage shortmath
* Serve question type files
*
* @package qtype_shortmath
* @author André Storhaug <andr3.storhaug@gmail.com>, Sebastian S. Gundersen <sebastsg@stud.ntnu.no>
* and Hans Georg Schaathun <hasc@ntnu.no>
* @copyright 2018 NTNU
Expand All @@ -26,6 +27,8 @@
defined('MOODLE_INTERNAL') || die();

/**
* Checks file access for short answer questions.
*
* @package qtype_shortmath
* @category files
* @param stdClass $course course object
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moodle-qtype_shortmath",
"version": "0.3.0",
"version": "0.3.1",
"description": "A simple question for mathematical expressions using MathQuill",
"main": "index.js",
"dependencies": {
Expand Down
7 changes: 5 additions & 2 deletions question.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* @package qtype
* @subpackage shortmath
* ShortMath question definition class.
*
* @package qtype_shortmath
* @author André Storhaug <andr3.storhaug@gmail.com>
* @copyright 2018 NTNU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand All @@ -27,6 +28,8 @@
require_once($CFG->dirroot . '/question/type/shortanswer/question.php');

/**
* Represents a ShortMath question.
*
* @author André Storhaug <andr3.storhaug@gmail.com>
* @copyright 2018 NTNU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand Down
9 changes: 5 additions & 4 deletions questiontype.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* @package qtype
* @subpackage shortmath
* Question type class for the ShortMath question type.
*
* @package qtype_shortmath
* @author André Storhaug <andr3.storhaug@gmail.com>,Sebastian S. Gundersen <sebastsg@stud.ntnu.no>
* and Hans Georg Schaathun <hasc@ntnu.no>
* @copyright 2018 NTNU
Expand All @@ -28,15 +29,15 @@
require_once($CFG->dirroot . '/question/type/shortanswer/questiontype.php');

/**
* The ShortMath question type class.
*
* @author André Storhaug <andr3.storhaug@gmail.com>, Sebastian S. Gundersen <sebastsg@stud.ntnu.no>
* and Hans Georg Schaathun <hasc@ntnu.no>
* @copyright 2018 NTNU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_shortmath extends qtype_shortanswer {

public function extra_question_fields() {
return ['qtype_shortmath_options', 'usecase'];
}

}
7 changes: 5 additions & 2 deletions renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* @package qtype
* @subpackage shortmath
* ShortMath question renderer class.
*
* @package qtype_shortmath
* @author André Storhaug <andr3.storhaug@gmail.com>Sebastian S. Gundersen <sebastsg@stud.ntnu.no>
* and Hans Georg Schaathun <hasc@ntnu.no>
* @copyright 2018 NTNU
Expand All @@ -29,6 +30,8 @@
require_once($CFG->dirroot . '/question/type/shortanswer/renderer.php');

/**
* Generates the output for ShortMath questions.
*
* @author André Storhaug <andr3.storhaug@gmail.com>, Sebastian S. Gundersen <sebastsg@stud.ntnu.no>
* and Hans Georg Schaathun <hasc@ntnu.no>
* @copyright 2018 NTNU
Expand Down
11 changes: 6 additions & 5 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* @package qtype
* @subpackage shortmath
* ShortMath question type version information.
*
* @package qtype_shortmath
* @author André Storhaug <andr3.storhaug@gmail.com>, Sebastian S. Gundersen <sebastsg@stud.ntnu.no>
* and Hans Georg Schaathun <hasc@ntnu.no>
* @copyright 2018 NTNU
Expand All @@ -25,8 +26,8 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2018123000;
$plugin->requires = 2018051700; // Moodle version 3.5
$plugin->version = 2018123001;
$plugin->requires = 2018051700; // Moodle version 3.5.
$plugin->component = 'qtype_shortmath';
$plugin->maturity = MATURITY_STABLE;
$plugin->release = '0.3.0';
$plugin->release = '0.3.1';

0 comments on commit c8240b0

Please sign in to comment.