Skip to content

Commit

Permalink
v1.4.07
Browse files Browse the repository at this point in the history
  • Loading branch information
SKuipers committed Nov 4, 2022
1 parent 4d66c3f commit fe294c8
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Mastery Transcript/CHANGEDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,7 @@
//v1.4.06
$sql[$count][0] = '1.4.06';
$sql[$count][1] = "";

//v1.4.07
$sql[$count][0] = '1.4.07';
$sql[$count][1] = "";
4 changes: 4 additions & 0 deletions Mastery Transcript/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
CHANGELOG
=========
v1.4.07
-------
Added mentor name to the Record Journey page for current records

v1.4.06
-------
Removed Left and Expected mentors from credit and opportunity details
Expand Down
8 changes: 8 additions & 0 deletions Mastery Transcript/journey_record.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@

$table->addColumn('status', __m('Status'));

$canViewStaff = isActionAccessible($guid, $connection2, '/modules/Staff/staff_view_details.php');
$table->addColumn('mentor', __m('Mentor'))
->format(function ($values) use ($canViewStaff) {
return $canViewStaff
? Format::nameLinked($values['gibbonPersonID'], $values['title'], $values['preferredName'], $values['surname'], 'Staff')
: Format::name($values['title'], $values['preferredName'], $values['surname'], 'Staff');
});

// ACTIONS
$table->addActionColumn()
->addParam('masteryTranscriptJourneyID')
Expand Down
2 changes: 1 addition & 1 deletion Mastery Transcript/manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$entryURL = 'index.php';
$type = 'Additional';
$category = 'Assess';
$version = '1.4.06';
$version = '1.4.07';
$author = 'Ross Parker';
$url = 'https://gibbonedu.org';

Expand Down
6 changes: 4 additions & 2 deletions Mastery Transcript/src/Domain/JourneyGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,20 @@ public function selectJourneyByStudent(QueryCriteria $criteria, $gibbonPersonID)
{
$query = $this
->newQuery()
->cols(['masteryTranscriptJourney.*', '\'Credit\' AS type', 'level', 'masteryTranscriptCredit.name AS name', 'logo'])
->cols(['masteryTranscriptJourney.*', '\'Credit\' AS type', 'level', 'masteryTranscriptCredit.name AS name', 'logo', 'mentor.gibbonPersonID', 'mentor.title', 'mentor.surname', 'mentor.preferredName'])
->from($this->getTableName())
->innerJoin('gibbonPerson', 'masteryTranscriptJourney.gibbonPersonIDStudent=gibbonPerson.gibbonPersonID')
->innerJoin('masteryTranscriptCredit','masteryTranscriptJourney.masteryTranscriptCreditID=masteryTranscriptCredit.masteryTranscriptCreditID AND type=\'Credit\'')
->leftJoin('gibbonPerson as mentor', 'masteryTranscriptJourney.gibbonPersonIDSchoolMentor=mentor.gibbonPersonID')
->where('masteryTranscriptJourney.gibbonPersonIDStudent = :gibbonPersonID')
->bindValue('gibbonPersonID', $gibbonPersonID);

$this->unionAllWithCriteria($query, $criteria)
->cols(['masteryTranscriptJourney.*', '\'Opportunity\' AS type', 'null AS level', 'masteryTranscriptOpportunity.name AS name', 'logo'])
->cols(['masteryTranscriptJourney.*', '\'Opportunity\' AS type', 'null AS level', 'masteryTranscriptOpportunity.name AS name', 'logo', 'mentor.gibbonPersonID', 'mentor.title', 'mentor.surname', 'mentor.preferredName'])
->from($this->getTableName())
->innerJoin('gibbonPerson', 'masteryTranscriptJourney.gibbonPersonIDStudent=gibbonPerson.gibbonPersonID')
->innerJoin('masteryTranscriptOpportunity','masteryTranscriptJourney.masteryTranscriptOpportunityID=masteryTranscriptOpportunity.masteryTranscriptOpportunityID AND type=\'Opportunity\'')
->leftJoin('gibbonPerson as mentor', 'masteryTranscriptJourney.gibbonPersonIDSchoolMentor=mentor.gibbonPersonID')
->where('masteryTranscriptJourney.gibbonPersonIDStudent = :gibbonPersonID')
->bindValue('gibbonPersonID', $gibbonPersonID);

Expand Down
2 changes: 1 addition & 1 deletion Mastery Transcript/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
/**
* Sets version information.
*/
$moduleVersion = '1.4.06';
$moduleVersion = '1.4.07';
$coreVersion = '23.0.00';

0 comments on commit fe294c8

Please sign in to comment.