Static Pages

General plugins (Local) ::: local_staticpage
Maintained by Logo "Moodle an Hochschulen e.V."Moodle an Hochschulen e.V., Alexander Bias
Moodle plugin which displays static information pages which exist outside any course, imprint or faq pages for example, complete with Moodle navigation and theme
Latest release:
4532 sites
3k downloads
215 fans
Current versions available: 22

We have seen Moodle installations where there was a need for displaying static information like an imprint, a faq or a contact page and this information couldn't be added everything to the frontpage. As Moodle doesn't have a "page" concept, admins started to create courses, place their information within these courses, open guest access to the course and link to this course from HTML blocks or the custom menu.

We thought that this course overhead doesn't make sense, so we created this plugin. It is designed to deliver static HTML documents, enriched with Moodle layout and navigation as a standard Moodle page which exist outside any course. Static pages will be available on catchy URLs like http://www.yourmoodle.com/static/faq.html and can be linked from Moodle HTML blocks, from your Moodle theme footer and so on.

Using this plugin, you can create information pages within moodle, but without misusing a whole course just for showing a textbox. It is not meant as a fully featured content management solution, especially as you have to work with raw HTML, but it is quite handy for experienced admins for creating some few static pages within Moodle.

Please see README file for details about the usage and features of this plugin.

No support in the comments section on this page

Please note that we don't provide any support for this plugin in the comments section on this page.

We appreciate your commendation and reviews for this plugin in the comments. For bug reports and support requests, please read the extensive information in the plugin's README file first and create, if needed, a ticket in the bug tracker which is linked below.

Thanks for your cooperation.

Screenshots

Screenshot #0

Contributors

Logo "Moodle an Hochschulen e.V."
Moodle an Hochschulen e.V. (Lead maintainer): Maintainer
Alexander Bias: Maintainer
Ulm University: Initial Maintainer
Kathrin Osswald: Former Developer
Please login to view contributors details and/or to contact them

Comments RSS

نظرات

  • Darrel Tenter
    پنجشنبه، 21 نوامبر 2013، 2:05 AM


    I have some solutions that I hope other users of this plugin will find useful.

    Regarding the apache rewrite issue. I discovered that I needed to remove the leading slash before static/ in the RewriteRule. So I now have this:

    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^static/(.*)\.html$ /local/staticpage/view.php?page=$1&%{QUERY_STRING} [L]

    You can also use:RewriteRule ^(.*)static/(.*)\.html$ $1/local/staticpage/view.php?page=$2 [L]
    Now the clean urls work.

    Also, I wanted to add images to my static pages. I put images in /moodledata/staticpage/images. When I put the relative path or the absolute path to the image in the static page html, the image can't be found. I think because this is in moodledata. So I moved my staticpage folder to the Moode http root and reconfigured the plugin to use that location. However when the page is rendered for the clean url the path to the image is getting caught by the RewriteRule. So I created a neighboring folder /staticpage_images and put my graphics there. Then in my static page html my img code is:

    logo
    If your handy with html I think you can get pretty dynamic with adding static content to Moodle.

    Darrel
  • Elizabeth Beth
    سه‌شنبه، 10 دسامبر 2013، 7:10 AM
    Hello all,
    I don't have a single clue where to post a new question, I'll drop it here I guess.
    We have installed the newest versions of Xaamp and Moodle on a Windows XP pro machine to set up everything locally before we upload to a server. We get as far as setting up the admin stuff, then go to supposed localhost login page to Moodle, but it does not load, just get the page not found error message. The control panel for Xaamp is open with appropriate services running. Even if we try to manually open a Moodle PHP page from the Moodle folder in the Xaamp/htdocs/Moodle directory , nothing happens. Localhosts file is not blocking anything. No firewall is running. Same results in 3 browsers
    Anybody have any ideas on this?
    We are lost
  • Alexander Bias
    سه‌شنبه، 10 دسامبر 2013، 3:24 PM
    Elisabeth,

    after reading your problem explanation I am pretty sure that your "page not found" error has nothing to do with our local_staticpage plugin. Your problem seems to be much earlier in the installation process of Moodle.

    Please ask your question in "Installation help" forum on https://moodle.org/mod/forum/view.php?id=28.
  • toby saunders
    جمعه، 10 ژانویه 2014، 7:00 PM
    Hi Alexander
    Thanks for you work on this useful plugin. Can I make one suggestion that you include the following in the view.php file after setting the global $page:
    //hack to hide static pages from guests
    if ($CFG->forcelogin) {
    require_login();
    }
    This will mean that if the site has "force users to login" set then the static pages will be behind the login, rather than accessible to anyone.
    Thanks
    Toby
  • Alexander Bias
    دوشنبه، 3 فوریه 2014، 10:19 PM
    Dear toby,

    thanks for your suggestion, it's included in the 2.6 version of the plugin which was just published.

    Alex
  • carlo opizzi
    دوشنبه، 5 مه 2014، 5:52 AM
    I installed the latest version of the plugin on the latest version of Moodle, but I can not display static pages inserted into the destination folder.
    the plugin issue this message:

    "The Document Should Be available at the Following URL, but actually in the browser will not be Able to download and view it (Perhaps there is something wrong with your webserver configuration - see the README file for details):"

    also with the option "Force Apache mod_rewrite"

    thanks
    Carlo
  • Alexander Bias
    سه‌شنبه، 6 مه 2014، 1:59 PM
    Carlo,

    well, there have been discussions here in the comments section about similar problems before. I admit that this plugin may not work always out of the box, but we have always got it running sooner or later.

    Please tell me more about your installation. Does the webserver process have the rights to read the static page files? Which URL is marked with the error message you have cited - the www.yourmoodle.com/local/static_pages/view.php?... URL or the www.yourmoodle.com/static/.... URL? Did you put any rewrite rules into your webserver configuration?

    Alex
  • carlo opizzi
    چهارشنبه، 7 مه 2014، 4:36 AM
    Hello Alexander, thanks for the reply,

    My moodle is located in a subdirectory: www.mysite.com/moodle
    and the folder "moodledata" is out of moodle: www.mysite.com/moodledata

    I do not know how to check if the webserver has permission to read the static pages.

    All URL are both marked as an error!

    thanks
    Charles.
  • carlo opizzi
    چهارشنبه، 7 مه 2014، 6:18 AM
    I have some wrong information

    the link: www .mysite.com / mooodle / static ... call the 404 page not found page of the main site
    (which is in wordpress)

    while the link www .mysite.com/ moodle/local/staticpage /view.php?page=index
    gives an internal server error
  • Alexander Bias
    چهارشنبه، 7 مه 2014، 2:05 PM
    Dear Charles,

    if both URLs are marked with an error message and if www.mysite.com/moodle/local/staticpage /view.php?page=index gives you an internal server error, there is something fundamentally going wrong.

    - You need to check if your webserver is able to read the static page files in your moodledata directory. I don't know your webserver (Apache, nginx, IIS...), so I can't give you a bulletproof hint how to check this. Please talk to your webserver administrator.
    - You need to check your webserver logs. If there is an internal server error, there might be a error message in the logs which will give us a hint what's the problem.

    Alex
  • carlo opizzi
    سه‌شنبه، 13 مه 2014، 6:28 AM
    Hello, thanks for the reply, my webserver is Apache and I checked the error logs:

    AH01215: suexec policy violation: see suexec log for more details, referer http://www.mysite.com/moodle/admin/settings.php
    and
    End of script output before headers: view.php, referer http://www.mysite.com/moodle/admin/settings.php

    thanks
    Carlo
  • Alexander Bias
    سه‌شنبه، 13 مه 2014، 1:53 PM
    Dear Carlo,

    I am not familiar with the suEXEC Apache extension. But a little Google research about your error message told me that your webserver might have insufficient rights to access the plugin files on /local/staticpage or the staticpage files in your moodledata root: http://www.pranavpc.com/2010/12/solution-for-suexec-policy-violation-error-that-occurs-in-some-webhosts/.

    Please have a deeper look at this and talk to your webserver admin if necessary as this problem is beyond the scope of my plugin.

    Alex
  • carlo opizzi
    سه‌شنبه، 13 مه 2014، 6:34 PM
    Hello Alex
    the problem was in the permissions, I did reset the permissions from my webserver administrator and now the plugin works perfectly.

    thanks for your support and for your patience لبخند

    Carlo.
  • Alexander Bias
    سه‌شنبه، 13 مه 2014، 6:36 PM
    Carlo,

    that's great, glad I could help.

    Alex
  • Usman Asar
    جمعه، 16 مه 2014، 12:34 PM
    Alex,
    Plug-in works for 2.7 as well, Please update records for compatibility with 2.7 so people wont hesitate downloading.
Please login to post comments