Skip to main content
Homepage
Explore
Search or go to…
/
Sign in
Explore
Primary navigation
Project
M
moodle-qtype_stack
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
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-qtype_stack
Commits
1d70ca80
Commit
1d70ca80
authored
Jun 22, 2012
by
Tim Hunt
Browse files
Options
Downloads
Patches
Plain Diff
Prevent blank penalties being changed to 0.
parent
b4ab1d5c
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/en/Developer/Development_track.md
+1
-1
1 addition, 1 deletion
doc/en/Developer/Development_track.md
edit_stack_form.php
+1
-0
1 addition, 0 deletions
edit_stack_form.php
questiontype.php
+7
-0
7 additions, 0 deletions
questiontype.php
with
9 additions
and
1 deletion
doc/en/Developer/Development_track.md
+
1
−
1
View file @
1d70ca80
...
...
@@ -59,7 +59,7 @@ At this point STACK will be "ready" for use with students, although not all feat
1.
**DONE**
Only deploy new versions.
5.
Editing form
1.
Button to remove a node from a PRT.
6.
Fix bug: penalties and other fields being changed from NULL to 0 when being stored in the database.
6.
**DONE**
Fix bug: penalties and other fields being changed from NULL to 0 when being stored in the database.
7.
Add back Matrix input type. (currently only need to deal with naming of fields, and add tests)
8.
Finish off the system for running Maxima on another server (https://github.com/maths/moodle-qtype_stack/pull/8)
...
...
...
...
This diff is collapsed.
Click to expand it.
edit_stack_form.php
+
1
−
0
View file @
1d70ca80
...
...
@@ -223,6 +223,7 @@ class qtype_stack_edit_form extends question_edit_form {
$mform
->
insertElementBefore
(
$pen
,
'generalfeedback'
);
$mform
->
addHelpButton
(
'penalty'
,
'penalty'
,
'qtype_stack'
);
$mform
->
setDefault
(
'penalty'
,
0.1000000
);
$mform
->
addRule
(
'penalty'
,
null
,
'required'
,
null
,
'client'
);
$sf
=
$mform
->
createElement
(
'editor'
,
'specificfeedback'
,
get_string
(
'specificfeedback'
,
'question'
),
array
(
'rows'
=>
10
),
$this
->
editoroptions
);
...
...
...
...
This diff is collapsed.
Click to expand it.
questiontype.php
+
7
−
0
View file @
1d70ca80
...
...
@@ -178,6 +178,13 @@ class qtype_stack extends question_type {
$context
,
'qtype_stack'
,
'prtnodefalsefeedback'
,
$node
->
id
);
$node
->
falsefeedbackformat
=
$fromform
->
{
$prtname
.
'falsefeedback'
}[
$nodename
][
'format'
];
if
(
''
===
$node
->
truepenalty
)
{
$node
->
truepenalty
=
null
;
}
if
(
''
===
$node
->
falsepenalty
)
{
$node
->
falsepenalty
=
null
;
}
$DB
->
update_record
(
'qtype_stack_prt_nodes'
,
$node
);
}
...
...
...
...
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
sign in
to comment