$img_src = $course_list_item->getCourseIconUrl(); $mdl_user = $course_list_item->getInstructor(); $summary = $course_list_item->getSummary(); $enrol_count = $course_list_item->getActiveUserCount(); $shortsummary = GcrInstitutionTable::formatStringSize($summary, 250, 21); if ($mdl_user) { $teacher_text = GcrEschoolTable::getInstructorProfileHtml($mdl_user); } else { $teacher_text = 'None'; } $fullname = GcrInstitutionTable::formatStringSize($mdl_course->fullname, 60, 30); $cost = $course_list->getCost(); $cost_text = ''; //if ($cost) { //$cost_text = 'Price: ' . GcrPurchaseTable::gc_format_money($cost); $cost_text = GcrPurchaseTable::gc_format_money($cost); //} $enrollment_status = false; $current_user = $CFG->current_app->getCurrentUser(); if ($current_user->getRoleManager()->hasPrivilege('Student')) { $mdl_roles = $course_list->getRoleAssignments($current_user); $enrollment_status = $mdl_roles && count($mdl_roles > 0); } ?> <tr> <td width="20%"><?php print $fullname; ?> </td> <td width="15%"><span style="color:green;"><?php print $cost_text;
public function emailInfoToGC($params = array()) { $app = $this->getPurchaseTypeApp(); $user_institution = $this->getPurchaserInstitution(); $mhr_user = $this->getPurchaserUser(); $mhr_user_obj = $mhr_user->getObject(); $params['eschool'] = $app; $params['user_eschool'] = $user_institution; $params['time'] = "Time " . date("D: m/d/Y H:i"); $params['user_info'] = "{$mhr_user_obj->username}: {$mhr_user_obj->firstname} {$mhr_user_obj->lastname} ({$mhr_user_obj->email}) @ {$user_institution->getFullName()} ({$user_institution->getShortName()})"; $params['eschool_info'] = "{$app->getFullName()} ({$app->getShortName()})"; $params['sales_info'] = "Total: " . GcrPurchaseTable::gc_format_money($this->amount); $params['purchase_id'] = $this->id; $to = gcr::gcPurchaseNotification; $subject = "Purchase ID# " . $this->id; $from = "*****@*****.**"; //set the headers $replyto = "*****@*****.**"; $email = new GcrEmailer('purchase_info', $to, $subject, $params, $from, $replyto); $email->sendHtmlEmail(); }
<tr> <td>Pending Withdrawal: </td> <td class="total"><?php print GcrPurchaseTable::gc_format_money($withdrawal->getAmount()); ?> </td> </tr> <?php } } else { ?> <tr> <td>Total of Purchases: </td> <td class="total"><?php print GcrPurchaseTable::gc_format_money($total_gross); ?> </td> </tr> <?php } ?> </table> </div> <div style="clear:both"> <?php print $record_count . ' Transaction'; print $record_count > 1 || $record_count == 0 ? 's' : ''; if ($gc_admin) { ?> <span style="float:right"><button class="adminOptionsButton smallButton" user_id="<?php
Please enter the total amount withdrawn, the check number or paypal transaction ID, and address information if applicable. </p> <p> <?php print $user->getFullNameString(); ?> has an account balance of <?php print GcrPurchaseTable::gc_format_money($account_balance); ?> , with a maximum withdrawal amount of <?php print GcrPurchaseTable::gc_format_money($max_withdrawal); ?> . This reflects a required minimum balance of <?php print GcrPurchaseTable::gc_format_money($min_balance); ?> . </p> <p><b>Submitting this form WILL NOT trigger an automatic payment via PayPal.</b></p> <p> If the funds still need to be transferred, either do: <ol> <li>Make a standard withdrawal request for the user and then approve it.</li> <li>Use PayPal's Virtual Terminal to send payment, and then save the transaction details here.</li> <li>Send a check by mail and save the payment details here.</li> </ol> </p> </div> </td> </tr> <tr>
</small> </div> <div id="accountTotals"> <br /> <table> <tr> <td>Total Number of Courses: </td> <td class="total"><?php print $eclassroom_table->getTotal('total_courses'); ?> </td> </tr> <tr> <td>Total Sales: </td> <td class="total"><?php print GcrPurchaseTable::gc_format_money($eclassroom_table->getTotal('total_sales')); ?> </td> </tr> </table> </div> <br /><br /> <div style="clear:both"> <small> <?php $record_count = $eclassroom_table->getTotal('record_count'); print $record_count . ' eClassroom'; print $record_count != 1 ? 's' : ''; if ($CFG->current_app->hasPrivilege('GCUser')) { ?> <span style="float:right">
print $payment_date_class; ?> ><?php print $payment_date; ?> </span></td> <td><?php print $payoff->getPayoffTypeString(); ?> </td> <td><?php print GcrPurchaseTable::gc_format_money($account_balance); ?> </td> <td><?php print GcrPurchaseTable::gc_format_money($amount); ?> </td> <?php if ($payoff->isPending()) { ?> <td> <form action="<?php print GcrEschoolTable::getHome()->getUrl() . '/homeadmin/approvePayoff?id=' . $payoff->getId(); ?> " method="POST"> <button type="submit" class="approvePayoffButton form_button button">Approve</button> </form> </td> <?php } else {
$id = 'gcr_course_' . $eschool->getShortName() . '_' . $mdl_course->id; $img_src = $course_list_item->getCourseIconUrl(); $mdl_user = $course_list_item->getInstructor(); $summary = $course_list_item->getSummary(); $enrol_count = $course_list_item->getActiveUserCount(); $shortsummary = GcrInstitutionTable::formatStringSize($summary, 250, 21); if ($mdl_user) { $teacher_text = GcrEschoolTable::getInstructorProfileHtml($mdl_user); } else { $teacher_text = 'None'; } $fullname = GcrInstitutionTable::formatStringSize($mdl_course->fullname, 60, 30); $cost = $course_list->getCost(); $cost_text = ''; if ($cost) { $cost_text = 'Price: ' . GcrPurchaseTable::gc_format_money($cost); } ?> <div class="gc_course_list_item col2"> <?php if (isset($request_params["mode_id"]) && $request_params["mode_id"] != "" && $meta_data) { print '<span class="coursebox" end_index="' . $meta_data . '"></span>'; } ?> <div id="<?php print $id; ?> " class="gc_course_list_item_container"> <div class="gc_course_list_item_header"> <div class="gc_course_list_item_title gc_course_list_item_container_element "> <a title="<?php
/purchase/classroomPurchase"> <table class="gc_small_form"> <th>Learning Institution</th><th>Pricing Options</th> <?php $options = array(); $selected = true; foreach ($eschools as $eschool) { $row1 = true; print '<tr><td><b>' . $eschool->getFullName() . '</b></td><td>'; $options['Month'] = $eschool->getConfigVar('gc_classroom_cost_month'); $options['Year'] = $eschool->getConfigVar('gc_classroom_cost_year'); foreach ($options as $key => $value) { if (!$row1) { print '<br />'; } print '<input type="radio" name="eschool_id" '; if ($selected) { print 'checked="checked" '; $selected = false; } print 'value="' . $eschool->getShortName() . '#' . $key . '">'; print GcrPurchaseTable::gc_format_money($value) . '/' . $key . '</input>'; $row1 = false; } print '</td></tr>'; } ?> </table> <br /><br /><input type="submit" class="button" value="Continue" /> </form> </div>
<td> <a href="<?php print "https://" . $data_item['eschool']->getShortName() . "." . gcr::domainName; ?> " target="_blank"> <?php print $name_text; ?> </a> </td> <td><?php print $owner_html; ?> </td> <td style="width:70px;"><?php print GcrPurchaseTable::gc_format_money($data_item['balance']); ?> </td> <td style="width:70px;"><?php print $data_item['created']; ?> </td> <td><?php print $data_item['status']; ?> </td> <td style="width:70px;"><span<?php print $date_class; ?> ><?php print $data_item['date'];
protected function getSalesCell($eclassroom) { $mhr_user = $eclassroom->getUser(); $content = '<a href="' . $this->institution->getUrl() . '/account/view?user='******'" target="_blank">' . GcrPurchaseTable::gc_format_money($this->current_item_amounts['sales']) . '</a>'; return new GcrTableCell(array(), $content); }
protected function getBalanceCell($ts, $item) { $content = GcrPurchaseTable::gc_format_money($item->getOwnerBalance()); return new GcrTableCell(array(), $content); }
</td> </tr> <tr> <td>Available Balance: </td> <td class="total"><?php print GcrPurchaseTable::gc_format_money($account_balance); ?> </td> </tr> <?php if ($withdrawal) { ?> <tr> <td>Pending Withdrawal: </td> <td class="total"><?php print GcrPurchaseTable::gc_format_money($withdrawal->getAmount()); ?> </td> </tr> <?php } ?> </table> </div> <div style="clear:both"> <?php print $account_table->getTotal('record_count'); ?> Transactions <?php if ($gc_admin) {