Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't show choose method string if course cost is 0.

  • Loading branch information...
commit f59c789b28f9c4ef92ada8b72137470da0a1bf82 1 parent f6c29f4
ethem authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 enrol/authorize/enrol.php
7 enrol/authorize/enrol.php
View
@@ -86,17 +86,18 @@ function print_entry($course) {
$teacher = get_teacher($course->id);
$strcourses = get_string('courses');
$strloginto = get_string('loginto', '', $course->shortname);
+ $zerocost = $this->zero_cost($course);
print_header($strloginto, $course->fullname, "<a href=\"$CFG->wwwroot/course/\">$strcourses</a> -> $strloginto");
print_course($course, '80%');
- if ($course->password) {
+ if ($course->password && !$zerocost) {
print_heading(get_string('choosemethod', 'enrol_authorize'), 'center');
}
print_simple_box_start('center');
- if ($this->zero_cost($course)){
- echo '<div align="center"><p>'.get_string('nocostyet', 'enrol_authorize').'</p>';
+ if ($zerocost){
+ echo '<div align="center"><p>'.get_string('nocostyet', 'enrol_authorize').'</p></div>';
} else if (isguest()) {
$curcost = $this->get_course_cost($course);
echo '<div align="center"><p>'.get_string('paymentrequired').'</p>';
Please sign in to comment.
Something went wrong with that request. Please try again.