$renderer =& $mform->defaultRenderer();
$mform->addElement('header', '', ' ' . get_string('paymentrequired'), '');
- $mform->addElement('static', '', '<div align="right">' . other_method($paymentmethod) . ' </div>', '');
+ if ($othermethodstr = other_method($paymentmethod)) {
+ $mform->addElement('static', '', '<div align="right">' . $othermethodstr . ' </div>', '');
+ }
$mform->addElement('hidden', 'id', $course->id);
$mform->setType('id', PARAM_INT);