Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
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
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-qtype_stack
Commits
a38eb147
Commit
a38eb147
authored
3 years ago
by
Chris Sangwin
Browse files
Options
Downloads
Patches
Plain Diff
WIP replace occurance of stack_potentialresponse_tree_state.
parent
a242ddc8
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
renderer.php
+4
-3
4 additions, 3 deletions
renderer.php
stack/prt.evaluatable.class.php
+1
-1
1 addition, 1 deletion
stack/prt.evaluatable.class.php
with
5 additions
and
4 deletions
renderer.php
+
4
−
3
View file @
a38eb147
...
...
@@ -410,11 +410,12 @@ class qtype_stack_renderer extends qtype_renderer {
* Generate the standard PRT feedback for a particular score.
* @param question_attempt $qa the question attempt to display.
* @param question_definition $question the question being displayed.
* @param
stack_potentialresponse_tree_stat
e $result the results to display.
* @param
prt_evaluatabl
e $result the results to display.
* @param feedbackstyle styles the type of feedback.
* @return string nicely standard feedback, for display.
*/
protected
function
standard_prt_feedback
(
$qa
,
$question
,
$result
,
$feedbackstyle
)
{
protected
function
standard_prt_feedback
(
question_attempt
$qa
,
question_definition
$question
,
prt_evaluatable
$result
,
$feedbackstyle
)
{
if
(
!
$result
->
is_evaluated
())
{
return
''
;
}
...
...
@@ -473,7 +474,7 @@ class qtype_stack_renderer extends qtype_renderer {
return
''
;
}
$result
=
new
stack_potentialresponse_tree_state
(
1
,
true
,
$fraction
);
$result
=
new
prt_evaluatable
(
''
,
$fraction
,
new
castext2_static_replacer
([])
);
// This is overall, so we fix the PRT feedbackstyle style = 1 to get the default type of feedback.
return
$this
->
standard_prt_feedback
(
$qa
,
$qa
->
get_question
(),
$result
,
1
);
}
...
...
This diff is collapsed.
Click to expand it.
stack/prt.evaluatable.class.php
+
1
−
1
View file @
a38eb147
...
...
@@ -59,7 +59,7 @@ class prt_evaluatable implements cas_raw_value_extractor {
private
$weight
=
1
;
// Because we do not want to transfer large static strings to CAS we use a store that contains those values
// and replace them into the result once e
b
erything is complete.
// and replace them into the result once e
v
erything is complete.
private
$statics
=
null
;
public
function
__construct
(
string
$signature
,
$weight
=
1
,
castext2_static_replacer
$statics
)
{
...
...
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