Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

pendingordersemailteacher string added

  • Loading branch information...
commit 0726456942079af86df154260f8982e859ca86ab 1 parent 1bf6b1c
authored June 15, 2006

Showing 1 changed file with 7 additions and 8 deletions. Show diff stats Hide diff stats

  1. 15  enrol/authorize/enrol.php
15  enrol/authorize/enrol.php
@@ -669,27 +669,26 @@ function cron()
669 669
                     email_to_user($adminuser, $adminuser, $subject, $message);
670 670
                     if (!empty($CFG->an_teachermanagepay) and !empty($CFG->an_emailexpiredteacher)) {
671 671
                         $sorttype = empty($CFG->an_sorttype) ? 'ttl' : $CFG->an_sorttype;
672  
-                        $sql = "SELECT E.courseid, COUNT(E.courseid) AS cnt, SUM(E.amount) as ttl " .
  672
+                        $sql = "SELECT E.courseid, E.currency, COUNT(E.courseid) AS cnt, SUM(E.amount) as ttl " .
673 673
                                "FROM {$CFG->prefix}enrol_authorize E " .
674 674
                                "WHERE $select GROUP BY E.courseid ORDER BY $sorttype DESC";
675  
-                        $message = ''; $subject = '';
676  
-                        $lastcourse = 0; $lastcount = 0;
  675
+                        $message = ''; $subject = ''; $lastcourse = 0;
677 676
                         $courseidandcounts = get_records_sql($sql);
678 677
                         foreach($courseidandcounts as $courseidandcount) {
679 678
                             if ($lastcourse != $courseidandcount->courseid) {
680 679
                                 $lastcourse = $courseidandcount->courseid;
681  
-                                $lastcount = $courseidandcount->cnt;
682 680
                                 $a = new stdClass;
683  
-                                $a->pending = $lastcount;
  681
+                                $a->pending = $courseidandcount->cnt;
684 682
                                 $a->days = $CFG->an_emailexpired;
685 683
                                 $subject = get_string('pendingorderssubject', 'enrol_authorize', $a);
686 684
                                 $a = new stdClass;
687  
-                                $a->pending = $lastcount;
  685
+                                $a->pending = $courseidandcount->cnt;
  686
+                                $a->currency = $courseidandcount->currency;
  687
+                                $a->sumcost = $courseidandcount->ttl;
688 688
                                 $a->days = $CFG->an_emailexpired;
689  
-                                $a->enrolurl = "$CFG->wwwroot/$CFG->admin/users.php";
690 689
                                 $a->url = $CFG->wwwroot.'/enrol/authorize/index.php?course='.
691 690
                                           $lastcourse.'&status='.AN_STATUS_AUTH;
692  
-                                $message = get_string('pendingordersemail', 'enrol_authorize', $a);
  691
+                                $message = get_string('pendingordersemailteacher', 'enrol_authorize', $a);
693 692
                             }
694 693
                             if ($teachers = get_course_teachers($lastcourse)) {
695 694
                                 foreach ($teachers as $teacher) {

0 notes on commit 0726456

Please sign in to comment.
Something went wrong with that request. Please try again.