Moodle
  1. Moodle
  2. MDL-28163

add custom frontpage script support

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.2
    • Fix Version/s: 2.1.1
    • Component/s: General
    • Labels:
      None
    • Testing Instructions:
      Hide

      1/ make sure standard frontpage works as before
      2/ create a file that prints something
      3/ set $CFG->customfrontpageinclude to your script path and verify it if printed on the frontpage

      Show
      1/ make sure standard frontpage works as before 2/ create a file that prints something 3/ set $CFG->customfrontpageinclude to your script path and verify it if printed on the frontpage
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w26_MDL-28163_m22_customfront
    • Rank:
      17864

      Description

      Moodle.org uses this hack to show different frontpage, I might be better to include in in standard distro too.

      Solution is to add $CFG->customfrontpageinclude = "/local/moodle/local/cusotmsite/frontpage.php";

        Activity

        Hide
        Eloy Lafuente (stronk7) added a comment -

        LOL, it's my imagination or something became mixed here? branches suggested seems 100% unrelated.

        Also, plz, when fixing that, specify the branches this should land to. Else, initial assumption is 2.1 & master (but seems to have 2.0.x in the fixfor versions), so need clarification.

        TIA!

        Show
        Eloy Lafuente (stronk7) added a comment - LOL, it's my imagination or something became mixed here? branches suggested seems 100% unrelated. Also, plz, when fixing that, specify the branches this should land to. Else, initial assumption is 2.1 & master (but seems to have 2.0.x in the fixfor versions), so need clarification. TIA!
        Hide
        Petr Škoda added a comment -

        done, sorry, I did not get used to the new branch names yet

        Show
        Petr Škoda added a comment - done, sorry, I did not get used to the new branch names yet
        Hide
        Eloy Lafuente (stronk7) added a comment -

        SUPERLOL, this continues pointing to "w26_MDL-27375_m22_enrolcase" !!

        Show
        Eloy Lafuente (stronk7) added a comment - SUPERLOL, this continues pointing to "w26_ MDL-27375 _m22_enrolcase" !!
        Hide
        Eloy Lafuente (stronk7) added a comment -

        (I'm reopening this to keep the lists of pending issues clean)

        Show
        Eloy Lafuente (stronk7) added a comment - (I'm reopening this to keep the lists of pending issues clean)
        Hide
        Petr Škoda added a comment -

        oops, I thought you can read others minds, thanks!

        Show
        Petr Škoda added a comment - oops, I thought you can read others minds, thanks!
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated, thanks! (21 and master)

        Notes: This is supposed to be a hidden hack so the setting ($CFG->customfrontpageinclude):

        • Has no admin setting
        • Is not documented in config-dist
        • Has not file_exists() check

        Some day if this evolves into something better, will be reworked ideally.

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated, thanks! (21 and master) Notes: This is supposed to be a hidden hack so the setting ($CFG->customfrontpageinclude): Has no admin setting Is not documented in config-dist Has not file_exists() check Some day if this evolves into something better, will be reworked ideally.
        Hide
        David Mudrak added a comment -

        I am going to test this

        Show
        David Mudrak added a comment - I am going to test this
        Hide
        David Mudrak added a comment -

        Works great! When combined with hiding all other elements on the front page, one can achieve really cool customizations on a front page. Thanks Petr.

        Show
        David Mudrak added a comment - Works great! When combined with hiding all other elements on the front page, one can achieve really cool customizations on a front page. Thanks Petr.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Moodle's git/cvs repositories have been updated with this piece of art! Thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Moodle's git/cvs repositories have been updated with this piece of art! Thanks!
        Hide
        Derek Chirnside added a comment -

        @David, how does this exactly work?
        Does anyone use this anywhere (besides Moodle.org) ??

        @Elroy, you say:
        Notes: This is supposed to be a hidden hack so the setting ($CFG->customfrontpageinclude):

        Has no admin setting
        Is not documented in config-dist
        Has not file_exists() check

        Some day if this evolves into something better, will be reworked ideally.

        How about writing a quick note in the docs. http://docs.moodle.org/22/en/Front_page_FAQ#How_can_I_change_the_look_of_the_front_page.3F I can't do any more because I don't know enoough.

        -Derek

        Show
        Derek Chirnside added a comment - @David, how does this exactly work? Does anyone use this anywhere (besides Moodle.org) ?? @Elroy, you say: Notes: This is supposed to be a hidden hack so the setting ($CFG->customfrontpageinclude): Has no admin setting Is not documented in config-dist Has not file_exists() check Some day if this evolves into something better, will be reworked ideally. How about writing a quick note in the docs. http://docs.moodle.org/22/en/Front_page_FAQ#How_can_I_change_the_look_of_the_front_page.3F I can't do any more because I don't know enoough. -Derek
        Hide
        Petr Škoda added a comment -

        Hello, ideally this should be replaced by either blocks in central column or new plugin type for frontpage widgets (such as the current course/category/combo list).

        Show
        Petr Škoda added a comment - Hello, ideally this should be replaced by either blocks in central column or new plugin type for frontpage widgets (such as the current course/category/combo list).

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: