summaryrefslogtreecommitdiff
path: root/textbook_companion.module
diff options
context:
space:
mode:
Diffstat (limited to 'textbook_companion.module')
-rwxr-xr-xtextbook_companion.module17
1 files changed, 14 insertions, 3 deletions
diff --git a/textbook_companion.module b/textbook_companion.module
index 83b7928..b03f46a 100755
--- a/textbook_companion.module
+++ b/textbook_companion.module
@@ -1406,6 +1406,16 @@ function book_proposal_form($form, &$form_state)
'#default_value' => '1',
'#required' => FALSE
);
+ $form['book_download_link'] = array(
+ '#type' => 'textarea',
+ '#title' => t('Input download link for the proposed textbook'),
+ '#required' => TRUE,
+ '#size' => 500,
+ '#maxlength' => 500,
+ '#attributes' => array(
+ 'placeholder' => 'Please add a link to download the proposed textbook from an online source. In case of a hard copy, kindly create a pdf of the entire textbook along with the cover and back page using a mobile application like CamScanner or some other method of choice. Then upload the pdf on google drive and enter the download link here.'
+ )
+ );
$form['reference'] = array(
'#type' => 'textarea',
'#title' => t('Reference'),
@@ -1670,9 +1680,9 @@ function book_proposal_form_submit($form, &$form_state, $directory_name = NULL)
$form_state['values']['reason'] = $my_reason;
} //isset($_POST['reason'])
$query = "INSERT INTO {textbook_companion_proposal}
- (uid, approver_uid, name_title, full_name, mobile, how_project, course, branch, university,city,pincode,state,country, faculty, reviewer,reference, completion_date, creation_date, approval_date, proposal_status, r_version, operating_system, teacher_email,reason,samplefilepath,proposal_type,proposed_completion_date) VALUES (:uid, :approver_uid, :name_title, :full_name, :mobile, :how_project, :course, :branch, :university, :city,:pincode,:state,:country, :faculty, :reviewer,:reference, :completion_date,
+ (uid, approver_uid, name_title, full_name, mobile, how_project, course, branch, university,city,pincode,state,country, faculty, reviewer,reference, completion_date, creation_date, approval_date, proposal_status, r_version, operating_system, teacher_email,reason,samplefilepath,proposal_type,proposed_completion_date, book_download_link) VALUES (:uid, :approver_uid, :name_title, :full_name, :mobile, :how_project, :course, :branch, :university, :city,:pincode,:state,:country, :faculty, :reviewer,:reference, :completion_date,
:creation_date, :approval_date, :proposal_status, :r_version, :operating_system,
-:teacher_email,:reason,:samplefilepath,:proposal_type, :proposed_completion_date)";
+:teacher_email,:reason,:samplefilepath,:proposal_type, :proposed_completion_date, :book_download_link)";
$args = array(
":uid" => $user->uid,
":approver_uid" => 0,
@@ -1700,7 +1710,8 @@ function book_proposal_form_submit($form, &$form_state, $directory_name = NULL)
":reason" => $form_state['values']['reason'],
":samplefilepath" => "",
":proposal_type" => 0,
- ":proposed_completion_date" => $completion_date_timestamp
+ ":proposed_completion_date" => $completion_date_timestamp,
+ ":book_download_link" => $form_state['values']['book_download_link']
);
$result = db_query($query, $args, array(
'return' => Database::RETURN_INSERT_ID