Moodle plugin developer tutorial - create a moodle form #4

Поделиться
HTML-код
  • Опубликовано: 20 авг 2020
  • Here we create a new form. This is a class that extends the core moodleform class. We then instantiate it in a new 'edit' page.
    Moodle docs:
    docs.moodle.org/dev/Form_API
    You can get the code here: github.com/kristian-94/moodle...
    Get the full course on Udemy: www.udemy.com/course/moodle-d...
    or skillshare: skl.sh/3deuyuv
    To set up a local moodle environment, see: • Moodle setup tutorial ...
    For custom development work, one on one training, or Moodle hosting, get in touch with us over at ringertech.org/contact

Комментарии • 21

  • @muhammadnaveedkhan6739
    @muhammadnaveedkhan6739 2 года назад

    Thank you boss. Awesome work

  • @exequielvibar2371
    @exequielvibar2371 3 года назад +3

    Thank you so much for this tutorial, I will watch all of your tutorial about form api ^_^

  • @OProjects
    @OProjects 3 года назад

    Thank you for this tutorial, may I ask what IDE you are using, and how do your search from the codebase, what key strokes you pressed here at 9:18?

    • @moodletips
      @moodletips  3 года назад +3

      Check out my set up videos, specifically this one: ruclips.net/video/dArD8qeqTRk/видео.html
      I use PHPstorm, and there I did ctrl + shift + f
      phpstorm does a nice job of indexing the codebase and doing fast searches. good luck!

    • @OProjects
      @OProjects 3 года назад +1

      @@moodletips Thank you very much

  • @danthemango
    @danthemango 4 месяца назад

    I don't know why, but 'class edit extends moodleform' didn't work, it said `Exception - Class "local_message\form\moodleform" not found`. but `class edit extends \moodleform` seemed to be fine

    • @moodletips
      @moodletips  4 месяца назад

      Looks like you just had to import it at the top, so you don't need the full path

  • @mostafaibrahim2066
    @mostafaibrahim2066 3 года назад

    If I use plugin for moodle
    And I want to make script to use it automatically
    When I change domain or environment moodle
    Without reinstalling all plugin again??????

    • @swish1234567890
      @swish1234567890 3 года назад

      What do you mean use it automatically? Most plugins by default are not enabled but can be enabled in the config. If you want to set up a new env with the same config, you could try doing a full database backup and restore, or running sql directly on the mdl_config table to change the settings to enable and set up the plugin without going through the ui

  • @camilomezu5008
    @camilomezu5008 3 года назад

    How can i add css to the mustache file? moodle documentation it's not concrete

    • @swish1234567890
      @swish1234567890 3 года назад +1

      You don't add css directly to a mustache file. You could add it in the theme, or in the plugin in a styles.css file in the root of the plugin. In the theme tutorial we put css in the theme

  • @reeforelaxo
    @reeforelaxo 5 месяцев назад

    hi, I love watching your tutorials. But I have some concern and maybe you can help me with this?
    when i ran the upgrade.php, i don't think it proceeded it showed
    [System] this test must pass - PHP setting max_input_vars must be atleast 5000.
    I tried adjusting the max_input_vars and still getting that response when I ran the upgrade.
    Thank you!

    • @moodletips
      @moodletips  5 месяцев назад +1

      Thanks for watching :) Yes that is a new requirement for the new Moodle versions. If you want to run that you'll need to change this php setting. You'll need to make sure you've changed it for the web server/apache php.ini file and restart the server. If you look at phpinfo() you should see your new config there, that's what moodle will look at

    • @reeforelaxo
      @reeforelaxo 5 месяцев назад

      thank you! @@moodletips

  • @dannynessett2210
    @dannynessett2210 Год назад

    For some reason, my previous post no longer shows up, so I am reposting. First, thank you for the tutorial. It was great. However, the link attached to "You can get the code here" is invalid. Is it possible for you to replace it with a valid URL? Thanks.

    • @moodletips
      @moodletips  11 месяцев назад

      Thanks for catching that, have fixed the link now

  • @user-rp6qd2zg1v
    @user-rp6qd2zg1v Год назад

    I know I am two years late but if you respond, can I have the add blocks feature within the manage page

    • @moodletips
      @moodletips  Год назад

      Are you talking about adding blocks to these custom pages that we build? For that look up creating a new block region in your plugin templates

    • @user-rp6qd2zg1v
      @user-rp6qd2zg1v Год назад

      @@moodletips yes. Okay, will do. Thanks for the speedy response. You are still awesome!

    • @user-rp6qd2zg1v
      @user-rp6qd2zg1v Год назад

      @@moodletips the reason why I asked also because following your tutorial the pages don't have an "add a block" option

  • @alittavarghese18
    @alittavarghese18 Год назад

    require_once(__DIR__ . '/../../local/message/classes/form/edit.php'); I given like this but I would like to know $CFG