Moodle Create A New Account link - how to make it as a button

Moodle Create A New Account link - how to make it as a button

av Frankie Kam -
Antall svar: 2
Bilde av Plugin developers


Is the a reason why the Create new account is a link rather than a button? To combat spam?
I would like to convert the link into a button. I had a look at the code, and this is the html_writer code that creates the link.

blocks/login_logout/block_login_logout.php

            if (!empty($signup)) {
$this->content->footer .= html_writer::start_tag('div');
$this->content->footer .= html_writer::link(new moodle_url($signup), get_string('startsignup'));
$this->content->footer .= html_writer::end_tag('div');
            }

In trying to mimic the Create New Account button in /login/index_form.html tried...

<?php 
           ...
            if (!empty($signup)) {
              $this->content->footer .= html_writer::start_tag('div');
?>
       <div class="signupform">
                <form action="../signup.php" method="get" id="signup">
               <div><input type="submit" value="<?php print_string("startsignup") ?>" /></div>
              </form>
            </div>
<?php

                 $this->content->footer .= html_writer::end_tag('div');
            }
...
?>

but it doesn't work.

Any one can point me in the right direction? StackOverflow?

Cheers
Frankie Kam

Gjennomsnittlig vurdering: -
Som svar til Frankie Kam

Re: Moodle Create A New Account link - how to make it as a button

av Rick Jerz -
Bilde av Particularly helpful Moodlers Bilde av Testers

I wonder if this is a theme issue on your Moodle.

I use Boost, and here is how mine looks (it has a button.)

Vedlegg Create New Account.png