Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[conflict_resolver] Add description field #8845

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions SQL/New_patches/2023-07-19_add_index_parameter_type.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Index on parameter_type table to speed up the "Description" field on conflict_resolver.
CREATE INDEX idx_conflictResolverDesc ON parameter_type(SourceFrom(255),SourceField(255));
4 changes: 4 additions & 0 deletions modules/conflict_resolver/jsx/resolved_filterabledatatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ class ResolvedFilterableDataTable extends Component {
name: 'Question',
type: 'text',
}},
{label: 'Description', show: true, filter: {
name: 'Description',
type: 'text',
}},
{label: 'Value 1', show: true, filter: {
name: 'Value1',
type: 'text',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ class UnresolvedFilterableDataTable extends Component {
name: 'Question',
type: 'text',
}},
{label: 'Description', show: true, filter: {
name: 'Description',
type: 'text',
}},
{label: 'Value 1', show: false},
{label: 'Value 2', show: false},
{label: 'Correct Answer', show: true},
Expand Down
2 changes: 2 additions & 0 deletions modules/conflict_resolver/php/models/resolveddto.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class ResolvedDTO implements DataInstance, SiteHaver
protected $visitlabel;
protected $instrument;
protected $question;
protected $description;
protected $value1;
protected $value2;
protected $correctanswer;
Expand All @@ -67,6 +68,7 @@ class ResolvedDTO implements DataInstance, SiteHaver
'Visit Label' => $this->visitlabel,
'Instrument' => $this->instrument,
'Question' => $this->question,
'Description' => $this->description,
'Value 1' => $this->value1,
'Value 2' => $this->value2,
'Correct Answer' => $this->correctanswer,
Expand Down
2 changes: 2 additions & 0 deletions modules/conflict_resolver/php/models/unresolveddto.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class UnresolvedDTO implements DataInstance, SiteHaver
protected $visitlabel;
protected $instrument;
protected $question;
protected $description;
protected $value1;
protected $value2;

Expand All @@ -62,6 +63,7 @@ class UnresolvedDTO implements DataInstance, SiteHaver
'Visit Label' => $this->visitlabel,
'Instrument' => $this->instrument,
'Question' => $this->question,
'Description' => $this->description,
'Value 1' => $this->value1,
'Value 2' => $this->value2,
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class ResolvedProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisioner
session.Visit_label as visitlabel,
Project.Name as project,
conflicts_resolved.FieldName as question,
parameter_type.Description as description,
conflicts_resolved.OldValue1 as value1,
conflicts_resolved.OldValue2 as value2,
CASE
Expand All @@ -55,6 +56,9 @@ class ResolvedProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisioner
Project.ProjectID as projectid
FROM
conflicts_resolved
LEFT JOIN parameter_type
charlottesce marked this conversation as resolved.
Show resolved Hide resolved
ON (parameter_type.SourceField = conflicts_resolved.FieldName
AND parameter_type.SourceFrom = conflicts_resolved.TableName)
LEFT JOIN flag ON (conflicts_resolved.CommentId1=flag.CommentID)
LEFT JOIN session ON (flag.SessionID=session.ID)
LEFT JOIN candidate ON (candidate.CandID=session.CandID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,17 @@ class UnresolvedProvisioner extends \LORIS\Data\Provisioners\DBObjectProvisioner
session.Visit_label as visitlabel,
Project.Name as project,
conflicts_unresolved.FieldName as question,
parameter_type.Description as description,
conflicts_unresolved.Value1 as value1,
conflicts_unresolved.Value2 as value2,
psc.name as site,
session.CenterID as centerid,
Project.ProjectID as projectid
FROM
conflicts_unresolved
LEFT JOIN parameter_type
ON (parameter_type.SourceField = conflicts_unresolved.FieldName
AND parameter_type.SourceFrom = conflicts_unresolved.TableName)
LEFT JOIN flag ON (conflicts_unresolved.CommentId1=flag.CommentID)
LEFT JOIN session ON (flag.SessionID=session.ID)
LEFT JOIN candidate ON (candidate.CandID=session.CandID)
Expand Down