From 3a37aa1462073ad7cc7bd436f9860a333579f306 Mon Sep 17 00:00:00 2001
From: Sashi20
Date: Thu, 24 Nov 2022 17:07:17 +0530
Subject: Add SoC design marathon completed circuits page
---
edit_submission.inc | 44 ++++++++++++++++++++++
hackathon_submission.module | 92 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 136 insertions(+)
diff --git a/edit_submission.inc b/edit_submission.inc
index 14c58ea..4025430 100644
--- a/edit_submission.inc
+++ b/edit_submission.inc
@@ -1332,4 +1332,48 @@ function view_soc_marathon_final_submission_form($form, $form_state){
);
}
return $form;
+}
+
+function download_soc_marathon_final_submission_form($form, $form_state){
+ global $user;
+ $submission_id = arg(3);
+
+ $query = db_select('mixed_signal_soc_marathon_final_submission');
+ $query->fields('mixed_signal_soc_marathon_final_submission');
+ $query->condition('literature_survey_id', $submission_id);
+ //$query->range(0, 1);
+ $submission_q = $query->execute();
+ $final_submission_data = $submission_q->fetchObject();
+ $query = db_select('mixed_signal_soc_marathon_literature_survey');
+ $query->fields('mixed_signal_soc_marathon_literature_survey');
+ $query->condition('id', $final_submission_data->literature_survey_id);
+ //$query->range(0, 1);
+ $submission_q = $query->execute();
+ $literature_submission_data = $submission_q->fetchObject();
+ $form = array();
+ $form['participant_name'] = array(
+ '#title' => t('Participant Name'),
+ '#type' => 'item',
+ '#markup' => $literature_submission_data->participant_name
+ );
+ $form['institute'] = array(
+ '#type' => 'item',
+ '#title' => t('Name of the college/institute'),
+ '#markup' => $literature_submission_data->institute
+ );
+ $form['circuit_name'] = array(
+ '#title' => t('Circuit Name'),
+ '#type' => 'item',
+ '#markup' => $literature_submission_data->circuit_name
+ );
+ $form['github_repo_link'] = array(
+ '#type' => 'item',
+ '#title' => t('Link to the GitHub repository'),
+ '#markup' => $final_submission_data->github_repo_link
+ );
+ $form['reference_files']['final_report'] = array(
+ '#type' => 'item',
+ '#markup' => l('Download Final Report and Project Files', 'mixed-signal-soc-design-marathon/download/final-submission/' . $literature_submission_data->id)
+ );
+ return $form;
}
\ No newline at end of file
diff --git a/hackathon_submission.module b/hackathon_submission.module
index 6efa6bd..6f98fa6 100644
--- a/hackathon_submission.module
+++ b/hackathon_submission.module
@@ -386,6 +386,26 @@ function hackathon_submission_menu()
'file' => 'download.inc'
);
/******************** Mixed Signal SoC Hackathon *********************************/
+ $items["mixed-signal-soc-design-marathon/completed-circuits"] = array(
+ "title" => "Mixed Signal SoC Design Marathon Completed Circuits",
+ "page callback" => "soc_marathon_download_completed_circuit",
+ "access arguments" => array(
+ "download completed circuit"
+ ),
+ "type" => MENU_CALLBACK
+ );
+ $items["mixed-signal-soc-design-marathon/download/circuits"] = array(
+ "title" => "Download Mixed Signal SoC Design Marathon Completed Circuit",
+ "page callback" => 'drupal_get_form',
+ 'page arguments' => array(
+ 'download_soc_marathon_final_submission_form'
+ ),
+ 'access arguments' => array(
+ "download completed circuit"
+ ),
+ 'type' => MENU_CALLBACK,
+ 'file' => 'edit_submission.inc'
+ );
$items["mixed-signal-soc-design-marathon/add/literature-report"] = array(
"title" => "Mixed Signal SoC Design Marathon Submission",
"page callback" => 'add_soc_literature_report_submission',
@@ -2038,4 +2058,76 @@ function soc_marathon_submission_display_my_submissions()
'rows' => $my_proposal_rows
));
return $output;
+}
+
+function soc_marathon_download_completed_circuit()
+{
+ $output = "";
+ $query = db_select('mixed_signal_soc_marathon_final_submission');
+ $query->fields('mixed_signal_soc_marathon_final_submission');
+ $query->condition('approval_status', 3);
+ $query->orderBy('id', 'DESC');
+ //$query->condition('is_completed', 1);
+ $result = $query->execute();
+
+ if ($result->rowCount() == 0)
+ {
+ $output .= "FOSSEE, IIT Bombay, along with VLSI System Design Corp. Pvt. Ltd and Redwood EDA conducted a 3-weeks
+high intensity eSim Mixed Signal Circuit Design and Simulation Marathon. Close
+to 1700+ students from all over India participated in this Marathon and close
+to 60+ students completed this marathon with brilliant circuit design ideas.
+The following participants have successfully completed designing the circuits.
+More details about this event can be found here: https://hackathon.fossee.in/esim.
";;
+
+ } //$result->rowCount() == 0
+ else
+ {
+ $output .= "FOSSEE, IIT Bombay, along with VLSI System Design Corp. Pvt. Ltd and Redwood EDA conducted a 3-weeks
+ high intensity eSim Mixed Signal Circuit Design and Simulation Marathon. Close
+to 1700+ students from all over India participated in this Marathon and close
+to 60+ students completed this marathon with brilliant circuit design ideas.
+The following participants have successfully completed designing the circuits.
+More details about this event can be found here: https://hackathon.fossee.in/esim.
";;
+ $preference_rows = array();
+ $i = $result->rowCount();
+
+ while ($my_submissions_data = $result->fetchObject())
+ {
+ $query = db_select('mixed_signal_soc_marathon_literature_survey');
+ $query->fields('mixed_signal_soc_marathon_literature_survey');
+ $query->condition('id',$my_submissions_data->literature_survey_id);
+ $query->orderBy('id', 'DESC');
+ $final_submissions_q = $query->execute();
+ $final_submission_data = $final_submissions_q->fetchObject();
+ //$action = l('View', 'mixed-signal-design-marathon/view/final-submission/' . $final_submission_data->id);
+ $my_submission_rows[$my_submissions_data->id] =
+ array(
+ $i,
+ l($final_submission_data->circuit_name, 'mixed-signal-soc-design-marathon/download/circuits/' . $final_submission_data->id),
+ $final_submission_data->participant_name,
+ $final_submission_data->institute
+ //$action
+ );
+ $i--;
+ } //$pending_data = $pending_q->fetchObject()
+ /* check if there are any pending submissions */
+ if (!$my_submission_rows)
+ {
+ drupal_set_message(t('There are no active submissions'), 'status');
+ return '';
+ } //!$pending_rows
+ $my_submission_header = array(
+ 'S.No',
+ 'Circuit Name',
+ 'Participant Name',
+ 'University'
+ //'Final Submission'
+ );
+ //$output = theme_table($pending_header, $pending_rows);
+ $output .= theme('table', array(
+ 'header' => $my_submission_header,
+ 'rows' => $my_submission_rows
+ ));
+ return $output;
+}
}
\ No newline at end of file
--
cgit
From 7b4dd3a997c505cc38132c21060bf2b6930cd2d6 Mon Sep 17 00:00:00 2001
From: Sashi20
Date: Fri, 25 Nov 2022 11:53:46 +0530
Subject: Update link to hackathon website
---
hackathon_submission.module | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/hackathon_submission.module b/hackathon_submission.module
index 6f98fa6..9ac7c70 100644
--- a/hackathon_submission.module
+++ b/hackathon_submission.module
@@ -1811,7 +1811,7 @@ high intensity eSim Mixed Signal Circuit Design and Simulation Marathon. Close
to 1700+ students from all over India participated in this Marathon and close
to 60+ students completed this marathon with brilliant circuit design ideas.
The following participants have successfully completed designing the circuits.
-More details about this event can be found here: https://hackathon.fossee.in/esim.
";;
+More details about this event can be found here: https://hackathon.fossee.in/esim/feb22/.
";
} //$result->rowCount() == 0
else
@@ -1821,7 +1821,7 @@ More details about this event can be found here: https://hackathon.fossee.in/esim.
";;
+More details about this event can be found here: https://hackathon.fossee.in/esim/feb22/.
";
$preference_rows = array();
$i = $result->rowCount();
@@ -2072,22 +2072,14 @@ function soc_marathon_download_completed_circuit()
if ($result->rowCount() == 0)
{
- $output .= "FOSSEE, IIT Bombay, along with VLSI System Design Corp. Pvt. Ltd and Redwood EDA conducted a 3-weeks
-high intensity eSim Mixed Signal Circuit Design and Simulation Marathon. Close
-to 1700+ students from all over India participated in this Marathon and close
-to 60+ students completed this marathon with brilliant circuit design ideas.
-The following participants have successfully completed designing the circuits.
-More details about this event can be found here: https://hackathon.fossee.in/esim.
";;
+ $output .= "FOSSEE, IIT Bombay, along with VLSI System Design Corp. Pvt. Ltd conducted a 3-weeks high intensity Mixed Signal SoC design Marathon using eSim & SKY130. Close to 3000 students from all over India participated in this Marathon and close to 100+ students completed this marathon with brilliant circuit design ideas. The following participants have successfully completed designing the circuits.
+More details about this event can be found here: https://hackathon.fossee.in/esim.
";
} //$result->rowCount() == 0
else
{
- $output .= "FOSSEE, IIT Bombay, along with VLSI System Design Corp. Pvt. Ltd and Redwood EDA conducted a 3-weeks
- high intensity eSim Mixed Signal Circuit Design and Simulation Marathon. Close
-to 1700+ students from all over India participated in this Marathon and close
-to 60+ students completed this marathon with brilliant circuit design ideas.
-The following participants have successfully completed designing the circuits.
-More details about this event can be found here: https://hackathon.fossee.in/esim.
";;
+ $output .= "FOSSEE, IIT Bombay, along with VLSI System Design Corp. Pvt. Ltd conducted a 3-weeks high intensity Mixed Signal SoC design Marathon using eSim & SKY130. Close to 3000 students from all over India participated in this Marathon and close to 100+ students completed this marathon with brilliant circuit design ideas. The following participants have successfully completed designing the circuits.
+More details about this event can be found here: https://hackathon.fossee.in/esim.
";
$preference_rows = array();
$i = $result->rowCount();
--
cgit