Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
moodle-mod_vpl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caseine
moodle-mod_vpl
Commits
9994b49c
Commit
9994b49c
authored
4 years ago
by
Astor Bizard
Browse files
Options
Downloads
Patches
Plain Diff
Now supports basedon mechanism with VPLs on which user doesnt have rights.
parent
82932b2c
No related branches found
No related tags found
1 merge request
!1
Dev: Submissions list rework, webservices and bugfixes
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
forms/executionoptions.php
+7
-1
7 additions, 1 deletion
forms/executionoptions.php
lang/en/vpl.php
+3
-0
3 additions, 0 deletions
lang/en/vpl.php
with
10 additions
and
1 deletion
forms/executionoptions.php
+
7
−
1
View file @
9994b49c
...
@@ -109,6 +109,12 @@ class mod_vpl_executionoptions_form extends moodleform {
...
@@ -109,6 +109,12 @@ class mod_vpl_executionoptions_form extends moodleform {
}
}
asort
(
$basedonlist
);
asort
(
$basedonlist
);
$basedonlist
[
0
]
=
get_string
(
'select'
);
$basedonlist
[
0
]
=
get_string
(
'select'
);
if
(
!
in_array
(
$instance
->
basedon
,
array_keys
(
$basedonlist
)))
{
$basedonvpl
=
new
mod_vpl
(
null
,
$instance
->
basedon
);
$basedonlist
[
$instance
->
basedon
]
=
$basedonvpl
->
get_printable_name
();
$warning
=
'<i class="icon fa fa-warning text-warning fa-fw" title="'
.
get_string
(
'basedonwarning'
,
VPL
)
.
'"></i>'
;
$strbasedon
.
=
'<span class="float-sm-right">'
.
$warning
.
'</span>'
;
}
$mform
->
addElement
(
'select'
,
'basedon'
,
$strbasedon
,
$basedonlist
);
$mform
->
addElement
(
'select'
,
'basedon'
,
$strbasedon
,
$basedonlist
);
$mform
->
setDefault
(
'basedon'
,
$instance
->
basedon
);
$mform
->
setDefault
(
'basedon'
,
$instance
->
basedon
);
...
@@ -167,7 +173,7 @@ if ($fromform = $mform->get_data()) {
...
@@ -167,7 +173,7 @@ if ($fromform = $mform->get_data()) {
$instance
->
evaluateonsubmission
=
$fromform
->
evaluate
&&
$fromform
->
evaluateonsubmission
;
$instance
->
evaluateonsubmission
=
$fromform
->
evaluate
&&
$fromform
->
evaluateonsubmission
;
$instance
->
automaticgrading
=
$fromform
->
evaluate
&&
$fromform
->
automaticgrading
;
$instance
->
automaticgrading
=
$fromform
->
evaluate
&&
$fromform
->
automaticgrading
;
if
(
$vpl
->
update
()
)
{
if
(
$vpl
->
update
()
)
{
vpl_
notice
(
get_string
(
'optionssaved'
,
VPL
)
);
vpl_
redirect
(
vpl_mod_href
(
'view.php'
,
'id'
,
$id
),
get_string
(
'optionssaved'
,
VPL
)
,
'success'
);
}
else
{
}
else
{
vpl_notice
(
get_string
(
'optionsnotsaved'
,
VPL
),
'error'
);
vpl_notice
(
get_string
(
'optionsnotsaved'
,
VPL
),
'error'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
lang/en/vpl.php
+
3
−
0
View file @
9994b49c
...
@@ -34,6 +34,9 @@ $string ['automaticgrading'] = 'Automatic grade';
...
@@ -34,6 +34,9 @@ $string ['automaticgrading'] = 'Automatic grade';
$string
[
'averageperiods'
]
=
'Average periods {$a}'
;
$string
[
'averageperiods'
]
=
'Average periods {$a}'
;
$string
[
'averagetime'
]
=
'Average time {$a}'
;
$string
[
'averagetime'
]
=
'Average time {$a}'
;
$string
[
'basedon'
]
=
'Based on'
;
$string
[
'basedon'
]
=
'Based on'
;
$string
[
'basedonwarning'
]
=
'It seems you do not have the rights on the VPL this VPL is based on.
The based on mechanism will still work.
However, please note that if you change it, you will not be able to change it back to its current state.'
;
$string
[
'basic'
]
=
'Basic'
;
$string
[
'basic'
]
=
'Basic'
;
$string
[
'binaryfile'
]
=
'Binary File'
;
$string
[
'binaryfile'
]
=
'Binary File'
;
$string
[
'browserupdate'
]
=
'Please update your browser to the last version<br />or use another that supports Websocket.'
;
$string
[
'browserupdate'
]
=
'Please update your browser to the last version<br />or use another that supports Websocket.'
;
...
...
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