Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions Mastery Transcript/CHANGEDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,8 @@
++$count;
$sql[$count][0] = '1.7.00';
$sql[$count][1] = "";

//v1.7.01
++$count;
$sql[$count][0] = '1.7.01';
$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.7.01
-------
Added file cleanup feature after a record is deleted

v1.7.00
-------
Added comprehensive file upload tracking system to monitor and manage all file uploads across the system
Expand Down
3 changes: 3 additions & 0 deletions Mastery Transcript/credits_manage_deleteProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

use Gibbon\Contracts\Filesystem\FileHandler;
use Gibbon\Module\MasteryTranscript\Domain\CreditGateway;
use Gibbon\Module\MasteryTranscript\Domain\CreditMentorGateway;

Expand Down Expand Up @@ -51,6 +52,8 @@

$deleted = $creditGateway->delete($masteryTranscriptCreditID);

$fileDeleted = $container->get(FileHandler::class)->deleteFile('masteryTranscriptCredit', $masteryTranscriptCreditID, 'logo');

$creditMentorGateway = $container->get(CreditMentorGateway::class);
$creditMentorGateway->deleteMentorsByCredit($masteryTranscriptCreditID);

Expand Down
3 changes: 3 additions & 0 deletions Mastery Transcript/domains_manage_deleteProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

use Gibbon\Contracts\Filesystem\FileHandler;
use Gibbon\Module\MasteryTranscript\Domain\DomainGateway;

require_once '../../gibbon.php';
Expand Down Expand Up @@ -48,6 +49,8 @@

$deleted = $domainGateway->delete($masteryTranscriptDomainID);

$fileDeleted = $container->get(FileHandler::class)->deleteFile('masteryTranscriptDomain', $masteryTranscriptDomainID, 'logo');

$URL .= !$deleted
? '&return=error2'
: '&return=success0';
Expand Down
11 changes: 11 additions & 0 deletions Mastery Transcript/journey_manage_deleteProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

use Gibbon\Contracts\Filesystem\FileHandler;
use Gibbon\Domain\System\DiscussionGateway;
use Gibbon\Module\MasteryTranscript\Domain\JourneyGateway;

require_once '../../gibbon.php';
Expand Down Expand Up @@ -59,6 +61,15 @@
exit();
}

$discussionGateway = $container->get(DiscussionGateway::class);
$discussions = $discussionGateway->selectBy(['foreignTable' => 'masteryTranscriptJourney', 'foreignTableID' => $masteryTranscriptJourneyID], ['gibbonDiscussionID'])->fetchAll();

foreach ($discussions as $discussion) {
$fileDeleted = $container->get(FileHandler::class)->deleteFile('gibbonDiscussion', $discussion['gibbonDiscussionID'], 'attachmentLocation');
}

$discussionGateway->deleteWhere(['foreignTable' => 'masteryTranscriptJourney', 'foreignTableID' => $masteryTranscriptJourneyID]);

$deleted = $journeyGateway->delete($masteryTranscriptJourneyID);

$URL .= !$deleted
Expand Down
10 changes: 10 additions & 0 deletions Mastery Transcript/journey_record_deleteProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

use Gibbon\Contracts\Filesystem\FileHandler;
use Gibbon\Domain\System\DiscussionGateway;
use Gibbon\Module\MasteryTranscript\Domain\JourneyGateway;

require_once '../../gibbon.php';
Expand Down Expand Up @@ -53,6 +55,14 @@
exit;
}

$discussionGateway = $container->get(DiscussionGateway::class);
$discussions = $discussionGateway->selectBy(['foreignTable' => 'masteryTranscriptJourney', 'foreignTableID' => $masteryTranscriptJourneyID], ['gibbonDiscussionID'])->fetchAll();

foreach ($discussions as $discussion) {
$fileDeleted = $container->get(FileHandler::class)->deleteFile('gibbonDiscussion', $discussion['gibbonDiscussionID'], 'attachmentLocation');
}
$discussionGateway->deleteWhere(['foreignTable' => 'masteryTranscriptJourney', 'foreignTableID' => $masteryTranscriptJourneyID]);

$deleted = $journeyGateway->delete($masteryTranscriptJourneyID);

$URL .= !$deleted
Expand Down
2 changes: 1 addition & 1 deletion Mastery Transcript/manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
$entryURL = 'index.php';
$type = 'Additional';
$category = 'Assess';
$version = '1.7.00';
$version = '1.7.01';
$author = "Gibbon Foundation";
$url = "https://gibbonedu.org";

Expand Down
3 changes: 3 additions & 0 deletions Mastery Transcript/opportunities_manage_deleteProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

use Gibbon\Contracts\Filesystem\FileHandler;
use Gibbon\Module\MasteryTranscript\Domain\OpportunityGateway;
use Gibbon\Module\MasteryTranscript\Domain\OpportunityMentorGateway;
use Gibbon\Module\MasteryTranscript\Domain\OpportunityCreditGateway;
Expand Down Expand Up @@ -51,6 +52,8 @@

$deleted = $opportunityGateway->delete($masteryTranscriptOpportunityID);

$fileDeleted = $container->get(FileHandler::class)->deleteFile('masteryTranscriptOpportunity', $masteryTranscriptOpportunityID, 'logo');

$opportunityMentorGateway = $container->get(OpportunityMentorGateway::class);
$opportunityMentorGateway->deleteMentorsByOpportunity($masteryTranscriptOpportunityID);

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