Commit 61673d3e authored by Lückemeyer's avatar Lückemeyer
Browse files

namespaced and imported utils, clarified moodle version comment

1 merge request!1Coding style and recommendations
Showing with 29 additions and 6 deletions
+29 -6
No preview for this file type
......@@ -21,6 +21,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright Gero Lueckemeyer and student project teams
*/
namespace assignsubmission_dta\util
/**
* backend webservice contact utility class
......
......@@ -14,6 +14,15 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* persistence layer utility class
*
* @package assignsubmission_dta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright Gero Lueckemeyer and student project teams
*/
namespace assignsubmission_dta\util
/**
* persistence layer utility class
*
......
......@@ -14,6 +14,15 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* utility class for DTA submission plugin result display
*
* @package assignsubmission_dta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright Gero Lueckemeyer and student project teams
*/
namespace assignsubmission_dta\util
/**
* utility class for DTA submission plugin result display
*
......
......@@ -18,9 +18,13 @@ defined('MOODLE_INTERNAL') || die();
// Import various entity and application logic files.
require_once($CFG->dirroot . '/mod/assign/submission/dta/models/DtaResult.php');
require_once($CFG->dirroot . '/mod/assign/submission/dta/utils/database.php');
require_once($CFG->dirroot . '/mod/assign/submission/dta/utils/backend.php');
require_once($CFG->dirroot . '/mod/assign/submission/dta/utils/view.php');
require_once($CFG->dirroot . '/mod/assign/submission/dta/classes/database.php');
require_once($CFG->dirroot . '/mod/assign/submission/dta/classes/backend.php');
require_once($CFG->dirroot . '/mod/assign/submission/dta/classes/view.php');
use assignsubmission_dta\util\DtaBackendUtils;
use assignsubmission_dta\util\DbUtils;
use assignsubmission_dta\util\view_submission_utils;
/**
* library class for DTA submission plugin extending assign submission plugin base class
......@@ -174,7 +178,7 @@ class assign_submission_dta extends assign_submission_plugin {
* @param int $userid current user
* @return bool form elements added
*/
public function get_form_elements_for_user($submissionorgrade, MoodleQuickForm $mform, stdClass $data, $userid): bool {
public function get_form_elements_for_user($submissionorgrade, MoodleQuickForm $mform, stdClass $data, int $userid): bool {
// Prepare submission filearea.
$data = file_prepare_standard_filemanager(
$data,
......@@ -228,7 +232,7 @@ class assign_submission_dta extends assign_submission_plugin {
* @param string $areaid filearea id to count
* @return int
*/
private function count_files($submissionid, $areaid) {
private function count_files(int $submissionid, string $areaid) {
$fs = get_file_storage();
$files = $fs->get_area_files($this->assignment->get_context()->id,
self::COMPONENT_NAME,
......
......@@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 3000000;
$plugin->requires = 2020061525; // Moodle 3.9 LTS
$plugin->requires = 2020061525; // Moodle 3.9 LTS. Will likely run with unsupported older versions of the 3.x branch.
$plugin->component = 'assignsubmission_dta';
$plugin->maturity = MATURITY_STABLE;
$plugin->release = "3.0.0";
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment