Re: Creating a file from a /local/plugin.php
by Andrew Normore. Here's the code I'm running, it doesn't find the file. $context = context_system::instance();$fs = get_file_storage();$itemid = rand(1,1500);// Prepare file record object$fileinfo...
View ArticleRe: Creating a file from a /local/plugin.php
by Davo Smith. Draft file is for retrieving files that are temporarially stored in the draft area whilst a file is being edited. This allows, for example, uploaded images to immediately appear in the...
View ArticleRe: Creating a file from a /local/plugin.php
by Davo Smith. What does you local_webinars_pluginfile function (in local/webinars/lib.php) contain?What happens when you add some debugging output to that function?
View ArticleRe: Creating a file from a /local/plugin.php
by Andrew Normore. Thanks for the explination on draftfile.phpHere's the complete code: $context = context_system::instance(); var_dump ($context); $fs = get_file_storage(); $itemid =...
View ArticleRe: Creating a file from a /local/plugin.php
by Andrew Normore. This is the result of a var_dump($url); object(moodle_url)[4308]protected 'scheme' =>string'http'(length=4)protected 'host' =>string'rts.dev'(length=7)protected 'port'...
View ArticleRe: Creating a file from a /local/plugin.php
by Andrew Normore. I have the file reading from the database, but it won't display: object(stored_file)[4303]private 'fs' =>object(file_storage)[4306]private 'filedir'...
View ArticleRe: $DB->get_record IGNORE_MULTIPLE not recommended?
by Andrew Normore. I hear ya, and I've run in to this problem before. I didn't have any luck with those flags. Here's what I would do: $result = $DB->get_record_sql("SELECT * FROM...
View ArticleRe: $DB->get_record IGNORE_MULTIPLE not recommended?
by Hubert Chathi. That's basically what IGNORE_MULTIPLE does.By the way, don't use $CFG->prefix. Just wrap your table name in braces. ('SELECT * FROM {tablename} ...'). And don't user...
View ArticleRe: Creating a file from a /local/plugin.php
by Davo Smith. Try: function local_webinars_pluginfile(... And the contextlevel will be CONTEXT_SYSTEM
View Article(more) advice on creating activities with an arbitrary number of submissions
by Brad Smith. BACKGROUND:(the impatient can skip this)I started a previous thread about an unusual kind of activity I need to create. The short version is that each instance of the activity describes...
View ArticleRe: Can I remove the green self enrolment icon?
by Matt Sprague. That removes the self enrolment option completely. Any idea how to just remove/hide the icon and not remove the ability?
View ArticleRe: Can I remove the green self enrolment icon?
by Mary Cooch. Well I would imagine this icon is theme dependent - one way would be to replace it in whichever theme you are using with a transparent png of the same size. If you click on the icon to...
View ArticleRe: Removing paragraph tags from Tiny MCE Editor?
by Mark B. Hi there,Yeah it bugs the heck out of me when it inserts loads of paragraph spaces all of the time for no reason. Even when i edit a form it seems to check for the <p></p> tags...
View ArticleRe: Databases: execute_sql() not working in 2.0
by Jerin das. Hi Marin Sok, How did you solve that problrm? .Becuase i have the same problemThanksJerin
View ArticleHTML in Moodle Forms error messages - downgrading?
by Oleg Sychev. In older versions of Moodle it was possible to include hyperlinks and other HTML elements in the error messages, which was quite useful sometimes (I used at least two such links to...
View ArticleProblem with SimpleHTML Block
by Black Dream. Hello, I just created the "simplehtml" block from the documenation and i tried to put it in my front page. I don't know how to do this. I pressed the "Block editing on" , i added the...
View ArticleRe: Problem with SimpleHTML Block
by Mary Evans. Which version of Moodle are you using?When you say you added the plugin with editing on, I am assuming you mean via the ADD BLOCK on your frontpage? If not then this is how you get the...
View ArticleRe: Can I remove the green self enrolment icon?
by Mary Evans. You can isolate the image and disable it using CSS but first you need to know the css path for that image.For the fronpage it is this...#page-site-index .enrolmenticons {visibility:...
View ArticleRe: HTML in Moodle Forms error messages - downgrading?
by Mary Evans. Hi,Which version of Moodle are you using now?On the face of it it sounds like a coding error if it is printing it as text rather than a link. Some parts of Moodle do strip HTML tags,...
View ArticleRe: HTML in Moodle Forms error messages - downgrading?
by Oleg Sychev. I inserted links as "A" HTML tags (like "<A href="http://pcre.org/pcre.txt"> .... </A>"). Now it is printing tag text instead of link, which means it is processed by...
View Article