Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle_mod-hvp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle_mod-hvp
Commits
30b5b651
Commit
30b5b651
authored
6 years ago
by
Frode Petterson
Browse files
Options
Downloads
Patches
Plain Diff
Fix compatibility with Moodle 3.1 LTS
parent
1645ec88
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mod_form.php
+23
-0
23 additions, 0 deletions
mod_form.php
with
23 additions
and
0 deletions
mod_form.php
+
23
−
0
View file @
30b5b651
...
...
@@ -361,4 +361,27 @@ class mod_hvp_mod_form extends moodleform_mod {
$data
->
name
=
$data
->
metadata
->
title
;
// Sort of a hack, but there is no JavaScript that sets the value when there is no editor...
}
}
/**
* This should not be overridden, but we have to in order to support Moodle <3.2
* (Do not override this method, override data_postprocessing() instead.)
*
* Moodle 3.1 LTS is supported until May 2019, after that this can be dropped.
* (could cause issues for new features if they add more to this in Core)
*
* @return object submitted data; NULL if not valid or not submitted or cancelled
*/
public
function
get_data
()
{
$data
=
parent
::
get_data
();
if
(
$data
)
{
// Convert the grade pass value - we may be using a language which uses commas,
// rather than decimal points, in numbers. These need to be converted so that
// they can be added to the DB.
if
(
isset
(
$data
->
gradepass
))
{
$data
->
gradepass
=
unformat_float
(
$data
->
gradepass
);
}
$this
->
data_postprocessing
(
$data
);
}
return
$data
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment