$this->content->items[] = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/'.$CFG->dbtype.'/frame.php">'.get_string('managedatabase').'</a>';
$this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/db.gif" height="16" width="16" alt="" />';
}
+
+ if ($CFG->enrol == 'authorize') {
+ require_once $CFG->dirroot.'/enrol/authorize/const.php';
+ $paymenturl = '<a href="'.$CFG->wwwroot.'/enrol/authorize/index.php">'.get_string('payments').'</a>';
+ if ($cnt = count_records('enrol_authorize', 'status', AN_STATUS_AUTH)) {
+ $paymenturl .= '<a href="'.$CFG->wwwroot.'/enrol/authorize/index.php?status='.AN_STATUS_AUTH.'">(<b>'.$cnt.'</b> '.get_string('pending').')</a>';
+ }
+ $this->content->items[] = $paymenturl;
+ $this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/payment.gif" height="16" width="16" alt="" />';
+ }
+
$this->content->footer = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/">'.get_string('admin').'...</a>';
}
}
$course = get_record('course', 'id', $this->instance->pageid);
-
-
if (isteacher($this->instance->pageid)) {
$isteacheredit = isteacheredit($this->instance->pageid);
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/files.gif" height="16" width="16" alt="" />';
}
+ if ($CFG->enrol == 'authorize') {
+ require_once $CFG->dirroot.'/enrol/authorize/const.php';
+ $paymenturl = '<a href="'.$CFG->wwwroot.'/enrol/authorize/index.php?course='.$course->id.'">'.get_string('payments').'</a>';
+ if ($cnt = count_records('enrol_authorize', 'status', AN_STATUS_AUTH, 'courseid', $course->id)) {
+ $paymenturl .= '<a href="'.$CFG->wwwroot.'/enrol/authorize/index.php?status='.AN_STATUS_AUTH.'&course='.$course->id.'">(<b>'.$cnt.'</b> '.get_string('pending').')</a>';
+ }
+ $this->content->items[] = $paymenturl;
+ $this->content->icons[] = '<img src="'.$CFG->pixpath.'/i/payment.gif" height="16" width="16" alt="" />';
+ }
+
$this->content->items[]='<a href="'.$CFG->wwwroot.'/doc/view.php?id='.$this->instance->pageid.'&file=teacher.html">'.get_string('help').'</a>';
$this->content->icons[]='<img src="'.$CFG->modpixpath.'/resource/icon.gif" height="16" width="16" alt="" />';