Skip to content

Commit

Permalink
Merge pull request #82 from UofS-Pulse-Binfo/Issue-#80---AJAX-Http-re…
Browse files Browse the repository at this point in the history
…quest-error

Fixes HTTP request failed error
  • Loading branch information
reynoldtan authored May 28, 2021
2 parents 1e4aaa3 + 39e1ccb commit 588d0e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/rawpheno.function.measurements.inc
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function rawpheno_function_trait_types() {
* that precedes the unit of a measurement type.
*/
function rawpheno_function_trait_reps() {
return array('1st', '2nd', '3rd', 'R1', 'R3', 'R5', 'R7');
return array('1st', '2nd', '3rd', '4th', 'R1', 'R3', 'R5', 'R7');
}


Expand Down
10 changes: 5 additions & 5 deletions include/rawpheno.tripaldownload.inc
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ function rawpheno_trpdownload_generate_file($variables, $job_id = NULL) {

$filepath = $dir['tripal_download'] . $filename;

drush_print("Generating CSV File: " . $filepath);
// drush_print("Generating CSV File: " . $filepath);
$FILE = fopen($filepath, 'w') or die ('Uable to create file to write to');
fputcsv($FILE, $header);

Expand All @@ -376,14 +376,14 @@ function rawpheno_trpdownload_generate_file($variables, $job_id = NULL) {
// Note: We will save the data to the file as we go.
$cur_line = 0;
$past_percent = 0;
drush_print('0% complete...');
// drush_print('0% complete...');

foreach ($rows as $row) {
// To file... to screen...
$percent = round(($cur_line / $total_lines) * 100);
if ((($percent % 5) === 0) && ($past_percent != $percent)) {

drush_print($percent . '% complete...');
// drush_print($percent . '% complete...');

db_query('UPDATE {tripal_jobs} SET progress=:percent WHERE job_id=:id',
array(':percent' => $percent, ':id' => $job_id));
Expand Down Expand Up @@ -420,9 +420,9 @@ function rawpheno_trpdownload_generate_file($variables, $job_id = NULL) {
fclose($FILE);

if ($percent != 100) {
drush_print('100% complete...');
// drush_print('100% complete...');
}

drush_print('Download complete');
// drush_print('Download complete');
}
}
2 changes: 1 addition & 1 deletion include/rawpheno.upload.form.inc
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ function rawpheno_upload_form_stage_save($form, &$form_state) {
// containing the number of rows save in percent. See file: rawpheno.module.
$form['tripal_job_id'] = array(
'#type' => 'hidden',
'#value' => base_path() . '/phenotypes/raw/upload/job_summary/' . $job->job_id,
'#value' => $GLOBALS['base_url'] . '/phenotypes/raw/upload/job_summary/' . $job->job_id,
'#attributes' => array('id' => 'tripal-job-id'),
);

Expand Down

0 comments on commit 588d0e0

Please sign in to comment.