Example #1
0
<?php

/**
 * Exceute a process in the Progress.php file
 * and return the result to handle in JS.
 */
header("Cache-control: private");
require_once __DIR__ . '/../../../app/lib/Bootstrap.php';
use IMS\app\classes\models;
if (isset($_POST['script'])) {
    switch ($_POST['script']) {
        // Fetch Database Submission Progress
        case 'updateSubmissionProgress':
            $curationOps = new models\CurationOperations();
            echo json_encode($curationOps->fetchCurationSubmissionProgress($_POST));
            break;
    }
}
Example #2
0
/**
 * Exceute a process in the ScriptProcesses.php file
 * and return the result to handle in JS.
 */
session_start();
header("Cache-control: private");
ini_set("memory_limit", "3096M");
require_once __DIR__ . '/../../../app/lib/Bootstrap.php';
use IMS\app\classes\models;
$required = false;
if ($_POST['required'] == "1") {
    $required = true;
}
$validate = new models\CurationValidation($_POST['name']);
$curationOps = new models\CurationOperations();
if (isset($_POST['curationCode'])) {
    $curationCode = $_POST['curationCode'];
    $results = array();
    if ($_POST['type'] == "participant") {
        $results = $validate->validateIdentifiers($_POST['participants'], $_POST['role'], $_POST['participant_type'], $_POST['organism'], $_POST['id_type'], $_POST['id'], $curationCode, $required);
        if (isset($_POST['allele']) && sizeof($_POST['allele']) > 0) {
            $results = $validate->validateAlleles($_POST['allele'], $results['COUNTS']['TOTAL'], $results, $_POST['id'], $curationCode);
        }
    } else {
        if ($_POST['type'] == "attribute") {
            $results = $validate->validateAttribute($_POST, $_POST['id'], $curationCode, $required);
        }
    }
    if (sizeof($results['ERRORS']) > 0) {
        $results['ERRORS'] = $curationOps->processErrors($results['ERRORS']);
Example #3
0
            // Generate a curation block and return the HTML to display
        // Generate a curation block and return the HTML to display
        case 'loadCurationBlock':
            $curationBlocks = new models\CurationBlocks();
            echo $curationBlocks->fetchCurationBlock($_POST);
            break;
            // Load a curation checklist based on the type of interaction
            // requested for curation
        // Load a curation checklist based on the type of interaction
        // requested for curation
        case 'loadCurationChecklist':
            $curationBlocks = new models\CurationBlocks();
            $curationBlocks->setCounts(1, 1);
            echo $curationBlocks->fetchCurationChecklist($_POST['type']);
            break;
            // Submit a Validated Dataset for Validation across entire set
            // and for submission into the database if successful
        // Submit a Validated Dataset for Validation across entire set
        // and for submission into the database if successful
        case 'submitCuratedDataset':
            $curationSubmit = new models\CurationSubmission();
            echo $curationSubmit->processCurationSubmission($_POST);
            break;
            // Fetch a formatted notification
        // Fetch a formatted notification
        case 'loadWorkflowNotification':
            $curationOps = new models\CurationOperations();
            echo $curationOps->fetchCurationNotification($_POST);
            break;
    }
}