summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakshay2024-12-13 12:17:48 +0530
committerGitHub2024-12-13 12:17:48 +0530
commit421e398c18d68e09bdbce8ff059ce2c8cf044daa (patch)
treef7bd8003dcffdb3a4d2187b4bc74c225ee4fcadf
parent73e62e61c9c37c0865cbfd0b5a51a9753774e51f (diff)
downloadr_lab_migration-421e398c18d68e09bdbce8ff059ce2c8cf044daa.tar.gz
r_lab_migration-421e398c18d68e09bdbce8ff059ce2c8cf044daa.tar.bz2
r_lab_migration-421e398c18d68e09bdbce8ff059ce2c8cf044daa.zip
table order by year in desc orderHEADmaster
-rwxr-xr-xlab_details.inc29
1 files changed, 22 insertions, 7 deletions
diff --git a/lab_details.inc b/lab_details.inc
index beca4ef..1b335cf 100755
--- a/lab_details.inc
+++ b/lab_details.inc
@@ -49,22 +49,37 @@ function lab_migration_labs_progress_all()
$query->fields('lab_migration_proposal');
$query->condition('approval_status', 1);
$query->condition('solution_status', 2);
+ $query->orderBy('approval_date','DESC');
$result = $query->execute();
if ($result->rowCount() == 0)
{
- $page_content .= "We are in the process of updating the lab migration data. ";
+ $page_content .= "We are in the process of updating the lab migration data.";
}
else
{
- //$result = db_query($query);
- $page_content .= "<ol reversed>";
+ $preference_rows = array();
+ $i = $result->rowCount();
while ($row = $result->fetchObject())
{
- $page_content .= "<li>";
- $page_content .= $row->university . " ({$row->lab_title})";
- $page_content .= "</li>";
+ $approval_date = date("Y", $row->approval_date);
+ $preference_rows[] = array(
+ $i,
+ $row->university,
+ $row->lab_title,
+ $approval_date
+ );
+ $i--;
}
- $page_content .= "</ol>";
+ $preference_header = array(
+ 'No',
+ 'Institute',
+ 'Lab',
+ 'Year'
+ );
+ $page_content .= theme('table', array(
+ 'header' => $preference_header,
+ 'rows' => $preference_rows
+ ));
}
return $page_content;
}