Find out about groupings. They let you make an activity available to some students, but not others.
Tim Hunt
Posts made by Tim Hunt
If you look at the code (http://cvs.moodle.org/contrib/plugins/question/format/questionmark/format.php?view=markup) you will see that it is really not rocket science to make a new importer. You just have to do some simple text processing to get from the XML format to the data structure that Moodle wants. It is just a matter of having enough examples of the format you want to import in order to cover all the options.
Also, I discovered recently that the way Moodle question importers work makes it really easy to write automated tests for them. For example, have a look at http://github.com/timhunt/Moodle-Question-Engine-2/blob/new_qe/question/format/xml/simpletest/testxmlformat.php, which are some tests I made for the Moodle XML format - and I found that a really helpful way to develop some changes to the format.
If you have a lot of example questions, and a PHP developer for a few days, it would be pretty easy to make the QuestionMark importer much better.
Also, I discovered recently that the way Moodle question importers work makes it really easy to write automated tests for them. For example, have a look at http://github.com/timhunt/Moodle-Question-Engine-2/blob/new_qe/question/format/xml/simpletest/testxmlformat.php, which are some tests I made for the Moodle XML format - and I found that a really helpful way to develop some changes to the format.
If you have a lot of example questions, and a PHP developer for a few days, it would be pretty easy to make the QuestionMark importer much better.
That's odd. It normally updates automatically. I just reopened MDLSITE-473 to ask for it to be updated again.
Also, a good IDE like Netbeans or Eclipse has this functionality built in. If you are doing a lot of development, get a good code editor, and learn all its features that help with navigating code.
Also, a good IDE like Netbeans or Eclipse has this functionality built in. If you are doing a lot of development, get a good code editor, and learn all its features that help with navigating code.
The third-party certificate module outputs PDF.
Also, there is now a book about Moodle development from Packt, that is worth reading to get up to speed. Also the course on creating a block on http://dev.moodle.org/ is a good introduction and free. (And it teaches a lot of the Moodle standard libraries, not just blocks.)
Also, there is now a book about Moodle development from Packt, that is worth reading to get up to speed. Also the course on creating a block on http://dev.moodle.org/ is a good introduction and free. (And it teaches a lot of the Moodle standard libraries, not just blocks.)
Moodle stores dates as numbers, and that weird data is what you get for the number zero. So, actually that makes it less weird, since it is easier to imagine the date getting lost and replaced by 0 than by some arbitrary date in the past.
However, there is still a bug there.
However, there is still a bug there.
Moodle in English -> General help -> SHELL SCRIPT? -> Re: SHELL SCRIPT?
by Tim Hunt -
I can't comment on the first thing they object to.
However, the second one is definitely a false positive from whatever script the are using to scan the sites they host.
the /etc/passwd appears in the text of an error message. http://cvs.moodle.org/moodle/lib/uploadlib.php?view=markup&pathrev=MOODLE_19_STABLE Although it would be quite easy to re-word that error message.
If they just cancelled your site without prior warning, because of some crappy script they ran, then perhaps you should consider moving to a different web host?
However, the second one is definitely a false positive from whatever script the are using to scan the sites they host.
the /etc/passwd appears in the text of an error message. http://cvs.moodle.org/moodle/lib/uploadlib.php?view=markup&pathrev=MOODLE_19_STABLE Although it would be quite easy to re-word that error message.
If they just cancelled your site without prior warning, because of some crappy script they ran, then perhaps you should consider moving to a different web host?
Log entries are not that important. Unless you care about having a 100% accurate record of everything anyone every did to your Moodle site, you can probably forget about it.
It is also worth doing this: How_to_check_your_database_for_corruption
Which version of Moodle are you using?
Connecting to multiple databases will probably be easier in Moodle 2.0.
Anyway, there should not be a problem in Moodle 1.9, as long as you avoid a variable-name clash with Moodle's global $db variable.
Connecting to multiple databases will probably be easier in Moodle 2.0.
Anyway, there should not be a problem in Moodle 1.9, as long as you avoid a variable-name clash with Moodle's global $db variable.
Turn on Debugging and you should get an error message that tells you what the problem is.
If you can't understand the error, copy and paste it here.
If you can't understand the error, copy and paste it here.
We ran into this at the OU. I can only half-remember what happened, but my recollection is:
In Moodle 1.9, missing grades in calculations are treated as 0.
That was not working for is, so I changed it so that if any of the input grades to the calculation are missing, then the result of the calculation is also a missing grade.
However, since that change went live, it breaks a different situation that we rely on, so I have an outstanding task on my todo list to make a further change, but I can't remember what that further change is.
I would be interested to hear what other people think the correct behaviour is in this case. In other words:
What should be the result of a calculation where some of the input grades are missing?
In Moodle 1.9, missing grades in calculations are treated as 0.
That was not working for is, so I changed it so that if any of the input grades to the calculation are missing, then the result of the calculation is also a missing grade.
However, since that change went live, it breaks a different situation that we rely on, so I have an outstanding task on my todo list to make a further change, but I can't remember what that further change is.
I would be interested to hear what other people think the correct behaviour is in this case. In other words:
What should be the result of a calculation where some of the input grades are missing?
Well, that is where I always got the source code (I normally use CVS to check it out.)
What do you think is missing?
What do you think is missing?
Look at the menu bar at the top of the pages. Particularly the links in the Development and Downloads menus.
Yes. that sounds like a plausible solution.
The thing about dirroot is that now we have code that correctly computes $CFG->dirroot from the path to the script, so you don't have to set it manually.
The thing about dirroot is that now we have code that correctly computes $CFG->dirroot from the path to the script, so you don't have to set it manually.
Probably better not to alter the assignment table. Instead, create your own table that links to the assignment table via a foreign key.
If it is a private development, for profit, how can it incorporate Moodle? Have you read the GPL.
Another user abusing a user's login is a problem, but I am not convinced that restricting to one login at a time (assuming you can define that. See Davo's point about browser crashes) is not a solution.
Switching to a different, stronger, authentication plugin probably is.
Another user abusing a user's login is a problem, but I am not convinced that restricting to one login at a time (assuming you can define that. See Davo's point about browser crashes) is not a solution.
Switching to a different, stronger, authentication plugin probably is.
No, it won't be in standard Moodle. Hopefully the third-party question type will up updated for Moodle 2.0.
And then again for my new question engine, and hopefully everything can end up in Moodle 2.1.
And then again for my new question engine, and hopefully everything can end up in Moodle 2.1.
It looks like you have found some serious bugs in Moodle 2.0. Can you come up with a step-by-step summary of what you did to make them happen? I can't reproduce them here.
To answer your actual question, you can't just take the Moodle 2.0 code and drop it into Moodle 1.9.x. That won't work. However, the amount of work required to convert the code is probably quite small. There was a recent thread about converting Moodle 1.9 question types to Moodle 2.0 that summarises what work is necessary, and it would just be a matter of doing that work in reverse.
To answer your actual question, you can't just take the Moodle 2.0 code and drop it into Moodle 1.9.x. That won't work. However, the amount of work required to convert the code is probably quite small. There was a recent thread about converting Moodle 1.9 question types to Moodle 2.0 that summarises what work is necessary, and it would just be a matter of doing that work in reverse.
Moodle in English -> General help -> Student Marks -> Re: Student Marks
by Tim Hunt -
Moodle in English -> General help -> Student Marks -> Re: Student Marks
by Tim Hunt -
Teresa, what you should have said was: "I suggest you search the tracer to see if this is already reported, and if not, add it".
This was already reported as MDL-20586 and is fixed in Moodle 1.9.
This was already reported as MDL-20586 and is fixed in Moodle 1.9.
Very nice.
Have you thought about making the source code available? Actually, you include a GPL license, but I cannot see any way to get the source code. ... Ah found it! the link is on http://studenti.scuole.bo.it/clozeformoodle/reference_guide/12_sources.html
It would be nice to have a better way for external question editing tools like this to integrate with Moodle. If I ever get time, I mean to look at the new web services infrastructure in Moodle 2.0, to work out if we can build an easy way for external tools to edit questions in the Moodle question bank.
Have you thought about making the source code available? Actually, you include a GPL license, but I cannot see any way to get the source code. ... Ah found it! the link is on http://studenti.scuole.bo.it/clozeformoodle/reference_guide/12_sources.html
It would be nice to have a better way for external question editing tools like this to integrate with Moodle. If I ever get time, I mean to look at the new web services infrastructure in Moodle 2.0, to work out if we can build an easy way for external tools to edit questions in the Moodle question bank.
No. There is no way to define a new role. I have come across situations where it would be useful, but it is not possible yet.
There were some role changes in Moodle 2.0 that would make this sort of thing easier in future (the change from 'legacy roles' to 'role archetypes' but that is only part of a solution, not a complete solution, I think.)
There were some role changes in Moodle 2.0 that would make this sort of thing easier in future (the change from 'legacy roles' to 'role archetypes' but that is only part of a solution, not a complete solution, I think.)
That's right. There are branches in CONTRIB CVS, so you should put the current version of the code on the MOODLE_19_STABLE branch there, and use HEAD to develop the Moodle 2.0 version.
If you need help with getting CVS to do that, then ask. Perhaps best to ask in the General Developer forum.
If you need help with getting CVS to do that, then ask. Perhaps best to ask in the General Developer forum.
Well, all Moodle 1.9 will need a certain amount of work for 2.0. There have been several API changes. The relevant documentation is linked from Moodle_2.0_release_notes#For_developers:_API_changes - although this documentation is still work-in-progress.
This is incorrect.
Moodle strips stuff out of HTML for security reasons even without the tidy filter.
The amount of stripping done depends on where the text was entered. If it was somewhere that most people could have entered it (e.g. a forum post) then it is stripped a lot. If it is somewhere that only a trusted person like a teacher could have put it (e.g. a web page resource) then less stripping is done.
Moodle strips stuff out of HTML for security reasons even without the tidy filter.
The amount of stripping done depends on where the text was entered. If it was somewhere that most people could have entered it (e.g. a forum post) then it is stripped a lot. If it is somewhere that only a trusted person like a teacher could have put it (e.g. a web page resource) then less stripping is done.
So, just to be clear, you are using the file_storage class to find the file, and get a stored_file object. Is that right?
And, your problem is that the get_content_file_location method is not public. The public methods are just things like get_content_file_handle, readfile, get_content, copy_content_to ...
If you understand how the file storage works, you will understand why this is absolutely necessary. If you change the contents of a file, you corrupt it, and it is then useless. We can't allow that to happen.
And since the files are stored in an area where Moodle can read and write things, if we give someone the filename, then there would be no way to stop them opening the file with write access and messing it up.
That is why the get_content_file_handle returns you the file handle you get by opening the file in read-only mode. If FPDI really only needs read-only access to the file, it should be able to accept such a file handle instead of a filename.
Well, if you look at the FPDI code, you fill find the pretty much the first thing it does with the filename you give it is to do fopen($this->filename, 'rb'); which is exactly what get_content_file_handle does.
Unfortunately, you also find that along the way it has done a number of function calls that use the filename.
and two of those classes store a copy of the filename, so changing this may not be easy.
Ah! pdf_parser only stores the filename so it can generate more helpful error messages, so it would be OK to pass in a fake but descriptive file-name, and a file handle.
And $FPDI::setSourceFile only stores the filename to use in the array-keys of a cache array, so again, a fake filename (as long as it was relatively unique) would be fine there too.
So, attached is a patch to FPDI that lets it take the fine-handle returned by get_content_file_handle in addition to a filename. I have not tested it, but it is a pretty simple change.
Ah, and there is another work-around on http://www.setasign.de/support/tips-and-tricks/using-a-pdf-from-a-php-variable-instead-of-a-file/ using the PHP stream library.
And, your problem is that the get_content_file_location method is not public. The public methods are just things like get_content_file_handle, readfile, get_content, copy_content_to ...
If you understand how the file storage works, you will understand why this is absolutely necessary. If you change the contents of a file, you corrupt it, and it is then useless. We can't allow that to happen.
And since the files are stored in an area where Moodle can read and write things, if we give someone the filename, then there would be no way to stop them opening the file with write access and messing it up.
That is why the get_content_file_handle returns you the file handle you get by opening the file in read-only mode. If FPDI really only needs read-only access to the file, it should be able to accept such a file handle instead of a filename.
Well, if you look at the FPDI code, you fill find the pretty much the first thing it does with the filename you give it is to do fopen($this->filename, 'rb'); which is exactly what get_content_file_handle does.
Unfortunately, you also find that along the way it has done a number of function calls that use the filename.
FPDI::setSourceFile($filename)
-> fpdi_pdf_parser::__construct($filename, $this)
-> pdf_parser::__construct($filename)
and two of those classes store a copy of the filename, so changing this may not be easy.
Ah! pdf_parser only stores the filename so it can generate more helpful error messages, so it would be OK to pass in a fake but descriptive file-name, and a file handle.
And $FPDI::setSourceFile only stores the filename to use in the array-keys of a cache array, so again, a fake filename (as long as it was relatively unique) would be fine there too.
So, attached is a patch to FPDI that lets it take the fine-handle returned by get_content_file_handle in addition to a filename. I have not tested it, but it is a pretty simple change.
Ah, and there is another work-around on http://www.setasign.de/support/tips-and-tricks/using-a-pdf-from-a-php-variable-instead-of-a-file/ using the PHP stream library.
You are right, most of the developers are very busy. I am sure they will get there in the end.
I can't think of anything that would cause this. Even if the teacher deletes the attempts, they will still be recorded in the Moodle logs.
Another place you may be able to look is in the web server logs. That is probably only feasibly if the student can tell you roughly when she thought she did those quiz attempts, and it depends how your web server is set up whether there is enough information in the logs to attribute things to a particular user.
What I often find when I have to research this sort of thing at the OU is that the student got confused, and, for example, did the wrong test. Perhaps they did the practice test, not the real one, or something like that.
So it might be worth doing the query
SELECT * FROM mdl_quiz_attempts WHERE userid = XXX
Where XXX is the userid of this student. That will list all the attempts that student made in any course.
One final thing. If that 'student' somehow had teacher permissions on the quiz, then their 'attempts' would actually have been previews, not real attempts, and preview attempts are deleted automatically.
Another place you may be able to look is in the web server logs. That is probably only feasibly if the student can tell you roughly when she thought she did those quiz attempts, and it depends how your web server is set up whether there is enough information in the logs to attribute things to a particular user.
What I often find when I have to research this sort of thing at the OU is that the student got confused, and, for example, did the wrong test. Perhaps they did the practice test, not the real one, or something like that.
So it might be worth doing the query
SELECT * FROM mdl_quiz_attempts WHERE userid = XXX
Where XXX is the userid of this student. That will list all the attempts that student made in any course.
One final thing. If that 'student' somehow had teacher permissions on the quiz, then their 'attempts' would actually have been previews, not real attempts, and preview attempts are deleted automatically.
What you you mean *ideally*?
Moodle 2.0 does get the user's browser to cache all the JavaScript and CSS in a nice way - and also minimises the number of different HTTP requests for each page load. That is achieved by concatenating all the CSS, so yes, on any given page, there is a lot of unused CSS, but do you have any measurements of whether it actually has any discernible impact for users?
Moodle 2.0 does get the user's browser to cache all the JavaScript and CSS in a nice way - and also minimises the number of different HTTP requests for each page load. That is achieved by concatenating all the CSS, so yes, on any given page, there is a lot of unused CSS, but do you have any measurements of whether it actually has any discernible impact for users?
Surely that is not the selector from the CSS. It is Firebug's full summary of the particular element you clicked on.
I think the point is that Turn editing on/off is always an option in the settings block. So use that.
Yes. Only about 1000 bug fixes and new features.
If you go through all the release notes on Moodle_version_history you should be able to get a summary of the changes.
If you go through all the release notes on Moodle_version_history you should be able to get a summary of the changes.
Moodle in English -> General developer forum -> CVS Error -> Re: CVS Error
by Tim Hunt -
I suppose it might be a firewall, or it might be a server at the other end.
You could try a different CVS server that is probably reliable (pick a project at random on sourceforge?) and see if that works. That might eliminate some things.
You could try a different CVS server that is probably reliable (pick a project at random on sourceforge?) and see if that works. That might eliminate some things.
Well, db/mysql.php files are an anachronism. You should be using an install.php file these days. See Development:Installing_and_upgrading_plugin_database_tables.
There are any number of other plugin types, see Development:Developer_documentation#Make_a_new_plugin. Most of those can have DB tables. Sensible choices for what you are doing would be to use the local customisations hooks, or make a Block. (You can make a block that is impossible to add to any page, that is a reasonable way to contain the code.)
There are any number of other plugin types, see Development:Developer_documentation#Make_a_new_plugin. Most of those can have DB tables. Sensible choices for what you are doing would be to use the local customisations hooks, or make a Block. (You can make a block that is impossible to add to any page, that is a reasonable way to contain the code.)
That sounds like a but to me. Please report it at http://tracker.moodle.org/.
You should definitely be worried
what you are doing is not really recommended or supported.
On the other hand, the code is written so that once the questions have been added to the quiz, even if weird stuff happens in the question bank, we try to stop things breaking. So probably it will work.
The main problem is the one you have identified: student's won't be able to see embedded media files.
On the other hand, the code is written so that once the questions have been added to the quiz, even if weird stuff happens in the question bank, we try to stop things breaking. So probably it will work.
The main problem is the one you have identified: student's won't be able to see embedded media files.
2. is not possible. The only option is to initially set the answers to not visible after the close date. Then at on 21st June 12:00hrs manually change the review options so students can see the responses.
I know that sucks, and actually I am a bit surprised that the OU has never got me to implement this delayed release of scores. We do that, and we have talked about automating it. I think the reason we have held of is that there is always the small possibility that something has gone wrong. So for these high-stakes tests where we want to delay release of the results, we also want to keep a human in the loop the glance an eye over the results before releasing them.
I know that sucks, and actually I am a bit surprised that the OU has never got me to implement this delayed release of scores. We do that, and we have talked about automating it. I think the reason we have held of is that there is always the small possibility that something has gone wrong. So for these high-stakes tests where we want to delay release of the results, we also want to keep a human in the loop the glance an eye over the results before releasing them.
Moodle in English -> Book -> Books & 2.0 -> Re: Books & 2.0
by Tim Hunt -
The book module is maintained by Petr Skoda, who is one of the key Moodle HQ developers, so he is spending all his time getting the main release of Moodle 2.0 finished.
So, I am sure that the book module will be updated to Moodle 2.0 eventually, but it probably won't happen until after the main Moodle 2.0 release is finished.
So, I am sure that the book module will be updated to Moodle 2.0 eventually, but it probably won't happen until after the main Moodle 2.0 release is finished.
Well, putting PHP code in a description text won't work. It will be ignored or stripped out.
The approved way of doing this would be to make a new question type that copies, or subclasses, the description type. The print_question_formulation_and_controls method gets passed a whole lot of data which includes the attempt number.
The other way of doing it would be to write a filter to process the question text as it is output.
The approved way of doing this would be to make a new question type that copies, or subclasses, the description type. The print_question_formulation_and_controls method gets passed a whole lot of data which includes the attempt number.
The other way of doing it would be to write a filter to process the question text as it is output.
What are you actually trying to do? If we knew the feature you were trying to implement, we could give better advice.
Also, it depends where in the code you are. Obviously, in mod/quiz/attempt.php that information is readily available. Where is the code where you want to get the attempt id, and what are the sequence of function calls that get us there?
Also, it depends where in the code you are. Obviously, in mod/quiz/attempt.php that information is readily available. Where is the code where you want to get the attempt id, and what are the sequence of function calls that get us there?
My initially vague answer was because I was hoping to avoid having to answer this 
To start with, you need to check Admin -> users -> permissions -> define roles, and see how that capability is set for each role, to see which roles have that capability.
To start with, you need to check Admin -> users -> permissions -> define roles, and see how that capability is set for each role, to see which roles have that capability.
It looks like a problem with the role definitions.
You must have set the 'Receive email notification when someone completes a quiz' capability on a role that everyone gets at site level. Anyway, check out the settings for that capability.
You must have set the 'Receive email notification when someone completes a quiz' capability on a role that everyone gets at site level. Anyway, check out the settings for that capability.
License is the official statement on this, and it says if in doubt, ask the moodle.com helpdesk. So, like Howard, I recommend you do that.
Aptana Looks like Eclipse optimised for Ruby/Rails development.
Therefore, it seems more sensible to use plain Eclipse with the PHP plugin, etc.
Therefore, it seems more sensible to use plain Eclipse with the PHP plugin, etc.
install.xml is used the very first time a particular Moodle sees your block, to install it. upgrade.php is used every time after that to upgrade the old installed version to the new version.
Note that blocks are a special case in that they do not use a version.php file. Instead they use the version returned by the init() method.
To know whether Moodle has seen your block before, look to see whether there is a row in the mdl_blocks table.
Note that blocks are a special case in that they do not use a version.php file. Instead they use the version returned by the init() method.
To know whether Moodle has seen your block before, look to see whether there is a row in the mdl_blocks table.
For new installs, it uses install.xml, not upgrade.php. Hopefully Development:Installing_and_upgrading_plugin_database_tables makes everything clear.
I am not sure about using the word position. To me, a positing is a precise place, like "Third block down on the right". Region is a bit more vague "Somewhere on the right".
So to me it makes sense that blocks have a position within a certain region.
However, it is more important how users think about this, than how I think about it.
So to me it makes sense that blocks have a position within a certain region.
However, it is more important how users think about this, than how I think about it.
Hopefully the time you spent getting your head round the file API was not totally wasted.
The file upload question type is going to take a lot of work to convert. I have not worked out how file areas during the quiz attempt should work. It's going to be messy.
The file upload question type is going to take a lot of work to convert. I have not worked out how file areas during the quiz attempt should work. It's going to be messy.
I really hope they will be updated for Moodle 2.0. I am sure they will be eventually.
Unfortunately I cannot promise to spend any time on it myself. I have a whole bunch of Moodle 2.0 bugs that are part of the standard distribution that I must fix, and that is on top of my day job, which is completely taken up with the question engine rewrite.
I will try to help anyone who undertakes this conversion.
Note that the changes between Moodle 1.9 and 2.0 for questions types is quite small. There three main things to do:
1. Changes because of the new database API. See Development:DB_layer_2.0_migration_docs
2. Changes because of the new file API. Development:File_API. Note that this has not been done for the standard question types yet Development:File_storage_conversion_Quiz_and_Questions.
3. A very few changes because of the new quiz reports. (For example the new get_random_guess_score method that question types must implement.
If you look at some typical diffs, like http://cvs.moodle.org/moodle/question/type/multichoice/questiontype.php?r1=1.29.2.9&r2=1.50, you will get an impression what needs to be done. (But note the important point that diffs like this do not currently show what needs to be done for 2.)
Hmm. Perhaps I should update Development:Moodle_2.0_question_type_API_changes some time.
Unfortunately I cannot promise to spend any time on it myself. I have a whole bunch of Moodle 2.0 bugs that are part of the standard distribution that I must fix, and that is on top of my day job, which is completely taken up with the question engine rewrite.
I will try to help anyone who undertakes this conversion.
Note that the changes between Moodle 1.9 and 2.0 for questions types is quite small. There three main things to do:
1. Changes because of the new database API. See Development:DB_layer_2.0_migration_docs
2. Changes because of the new file API. Development:File_API. Note that this has not been done for the standard question types yet Development:File_storage_conversion_Quiz_and_Questions.
3. A very few changes because of the new quiz reports. (For example the new get_random_guess_score method that question types must implement.
If you look at some typical diffs, like http://cvs.moodle.org/moodle/question/type/multichoice/questiontype.php?r1=1.29.2.9&r2=1.50, you will get an impression what needs to be done. (But note the important point that diffs like this do not currently show what needs to be done for 2.)
Hmm. Perhaps I should update Development:Moodle_2.0_question_type_API_changes some time.
Contacting a Moodle Partner sounds like a good idea.
It is probably not a huge amount of work to do what you want. Perhaps only a few days work (but I am always hopelessly optimistic with my estimating). Of course, it depends on exactly what your requirements are.
It should be possible to implement this as a quiz-report plugin, which would then be nicely self-contained and easy to install into any Moodle.
It is probably not a huge amount of work to do what you want. Perhaps only a few days work (but I am always hopelessly optimistic with my estimating). Of course, it depends on exactly what your requirements are.
It should be possible to implement this as a quiz-report plugin, which would then be nicely self-contained and easy to install into any Moodle.
If students are getting an email, the email sending fundamentally works on your server, so SMTP setting won't be the problem.
It must be a problem with you you have set up the roles to indicate that they should get emails. How have you set up the permissions?
It must be a problem with you you have set up the roles to indicate that they should get emails. How have you set up the permissions?
Wow! I thought it would not be too hard to do, but I was not expecting someone to do it that quickly.
What you are asking for is not something that has to wait for a major release like 2.0 or 2.1. It is just a new question type that anyone could create at any time and plug into whatever version of Moodle.
And since it could share most of the code from the standard MC question type, it would not even require a lot of code.
And since it could share most of the code from the standard MC question type, it would not even require a lot of code.
It isn't.
There have been lots of changes in how the quiz works in Moodle 2.0 (hopefully for the better) but very few changes in how the individual questions work.
There have been lots of changes in how the quiz works in Moodle 2.0 (hopefully for the better) but very few changes in how the individual questions work.
Moodle is always designed to upgrade from one version to the next. You should not lose anything during the upgrade. If you do it is a serious bug, and you should report it. (Well always test the upgrade on another server first, report and fix any bugs, and only upgrade your real server when you are confident it will work.)
If you are not upgrading until 2011, you can be quite confident that everyone else will have found all the upgrade bugs before you get there
Of course, some things will work differently after the upgrade, and you need to prepare your teachers for that. But that is a separate issue.
If you are not upgrading until 2011, you can be quite confident that everyone else will have found all the upgrade bugs before you get there
Of course, some things will work differently after the upgrade, and you need to prepare your teachers for that. But that is a separate issue.
We need help working out all the bugs. Please persist trying to get your upgrade from 1.98, and report bugs with the problems you find.
That is because MDL-16094 / Development:File_storage_conversion_Quiz_and_Questions has not been done yet.
Wait for Moodle 2.0, then it will be much closer to what you want.
You still won't be able to have a time-limit per question.
You still won't be able to have a time-limit per question.
Moodle in English -> Quiz -> Quiz Review Options -> Re: Quiz Review Options
by Tim Hunt -
The approach the OU uses to prevent trivial copying is Effective_quiz_practices#Robust_testing_with_random_variants.
Moodle in English -> Themes -> Standard Theme -> Re: Standard Theme
by Tim Hunt -
Why don't you just download a fresh copy of Moodle 1.9.x, and get the standard theme out of there.
Or, browse it online at http://cvs.moodle.org/moodle/theme/standard/styles_color.css?view=markup&pathrev=MOODLE_19_STABLE
Or, browse it online at http://cvs.moodle.org/moodle/theme/standard/styles_color.css?view=markup&pathrev=MOODLE_19_STABLE
That 'small hack' only seems to be available as a download of a complete set of quiz code files. There is no way to easily see what changes it makes compared to the standard quiz files, so it is very hard to comment on what it would take to make it work.
You could try getting the changes that were made to implement this features in Moodle 1.9 (You can get them from the Version Control tab of MDL-648) and try applying the same changes to your Moodle 1.8 site. That should work, and is less likely to cause problems when you upgrade.
You could try getting the changes that were made to implement this features in Moodle 1.9 (You can get them from the Version Control tab of MDL-648) and try applying the same changes to your Moodle 1.8 site. That should work, and is less likely to cause problems when you upgrade.
Do you have a good reason for still using Moodle 1.8? Upgrading to 1.9.x is a good idea for many reasons.
Which "submission notification as the instructions" are you referring to? I can't think of what you mean by this, so a URL would be helpful.
Looking at that code, I really would not want to use it. It really needs to be rewritten to use Moodle's email_to_user function.
Which "submission notification as the instructions" are you referring to? I can't think of what you mean by this, so a URL would be helpful.
Looking at that code, I really would not want to use it. It really needs to be rewritten to use Moodle's email_to_user function.
Have a look at admin_apply_default_settings in lib/adminlib.php.
That relies on admin_setting::get_defaultsetting() which is defined in the base class.
And that uses the admin_root::$custom_defaults array which is loaded from the file local/defaults.php in the admin_root constructor.
And the structure of that file is explained in http://cvs.moodle.org/moodle/local/readme.txt?view=markup starting at about line 170. Look for the heading "Customised site defaults".
That relies on admin_setting::get_defaultsetting() which is defined in the base class.
And that uses the admin_root::$custom_defaults array which is loaded from the file local/defaults.php in the admin_root constructor.
And the structure of that file is explained in http://cvs.moodle.org/moodle/local/readme.txt?view=markup starting at about line 170. Look for the heading "Customised site defaults".
I think from a development side, distributions are pretty easy.
Moodle is already sufficiently modular, probably all you need to add are
1. Code for setting defaults for all (or some) admin settings on install. Actually, this may already be in Moodle 2.0.
2. A new packaging system on the downloads server, to automatically assemble the download for a distribution based on the list of required modules, etc.
The harder problems are social:
A. find people to maintain the different distros, and reach a consensus about what they should contain.
and
B. each different distro needs testing, which massively increases the testing required.
Moodle is already sufficiently modular, probably all you need to add are
1. Code for setting defaults for all (or some) admin settings on install. Actually, this may already be in Moodle 2.0.
2. A new packaging system on the downloads server, to automatically assemble the download for a distribution based on the list of required modules, etc.
The harder problems are social:
A. find people to maintain the different distros, and reach a consensus about what they should contain.
and
B. each different distro needs testing, which massively increases the testing required.
OK. I was feeling kind and did the searching.
Searching for "setup_get_remote_url" lead to the language string 'unsupportedwebserver'
Searching for that lead to the function setup_get_remote_url() at around line 580 of lib/setuplib.php.
So, to support Zeus we need to add a bit to the if statement there. However, to work out the right code, we need access to a Zeus server, which, as I just pointed out, is commercial software, so I don't think you will persuade any of the core developers to do it for you. You will have to work it out on your own. Or persuade the wonderful paid support people at Zeus to do it.
Searching for "setup_get_remote_url" lead to the language string 'unsupportedwebserver'
Searching for that lead to the function setup_get_remote_url() at around line 580 of lib/setuplib.php.
So, to support Zeus we need to add a bit to the if statement there. However, to work out the right code, we need access to a Zeus server, which, as I just pointed out, is commercial software, so I don't think you will persuade any of the core developers to do it for you. You will have to work it out on your own. Or persuade the wonderful paid support people at Zeus to do it.
I still don't know what we mean by Zeus. Where is the home-page of the project that develops that software? What exactly is it? Are there known compatibility problems getting PHP apps to work on it?
OK, so it seems to be http://www.zeus.com/, which is commercial software, which means that the website if full of marketing drivel, but light on technical information. Looking in their knowledgebase, there are no search results for Moodle, and the search results for PHP seem irrelevant.
You are really on your own with this. For an easy life Howard's suggestion to switch to another host has a lot to recommend it.
However, specifically on the Moodle 2.0 install thing. It must somewhere be doing a test on the type of web server you are trying to install on, and rejecting any that are not of a given list. You just need to find that code (try searching for the error message, and pack-tracking from there). Then just disable that test so you can try the install anyway. But you will be on your own.
OK, so it seems to be http://www.zeus.com/, which is commercial software, which means that the website if full of marketing drivel, but light on technical information. Looking in their knowledgebase, there are no search results for Moodle, and the search results for PHP seem irrelevant.
You are really on your own with this. For an easy life Howard's suggestion to switch to another host has a lot to recommend it.
However, specifically on the Moodle 2.0 install thing. It must somewhere be doing a test on the type of web server you are trying to install on, and rejecting any that are not of a given list. You just need to find that code (try searching for the error message, and pack-tracking from there). Then just disable that test so you can try the install anyway. But you will be on your own.
I have not actually tried this. I am only guessing based on Development:Themes_2.0_How_to_use_images_within_your_theme and what I have read in the code.
I think for a simple theme, it is supposed to look like
theme/mytheme/ + pix/ | + gradent.png + pix_mod/mod/quiz/ + icon.png
Now, suppose in a child theme, we want to override gradent.png. I think you just do
theme/childtheme/ + pix/ + gradent.png
Can anyone confirm this?
(P.S. I was amused to be accused of 'speaking too fast' in written English. It is just that I am lazy, but I will try to do better in future. Sorry.)
Just use pix (I think)
That will look in your child theme's pix folder, before looking in the parent theme pix folder.
At least I think it will, from looking at the code. Try it and let us know if it works.
That will look in your child theme's pix folder, before looking in the parent theme pix folder.
At least I think it will, from looking at the code. Try it and let us know if it works.
It is well defined, but the only place it is written down is in the source code:
Look at the image_exists function in http://cvs.moodle.org/moodle/lib/outputlib.php?view=markup
The order currently seems to be gif, png, jpg, jpeg. I don't know why. I would prefer png first and gif last, but it does not really matter.
Look at the image_exists function in http://cvs.moodle.org/moodle/lib/outputlib.php?view=markup
The order currently seems to be gif, png, jpg, jpeg. I don't know why. I would prefer png first and gif last, but it does not really matter.
Remember that for Moodle to spot the new image, you need to turn on theme designer mode. (You can then turn it off again.)
Moodle does not support this.
I suppose what you could do is just get the students to attempts the quiz while logged in as one of the people in the group, and then later manually copy the same grade to all the other students in the gradebook.
Hmm. That is not really ideal though, because then later only the student whose login was used to review the quiz would be able to review what was done. However, this is the best I can think of.
Itamar, Are you really questioning the benefit of group activities?
I suppose what you could do is just get the students to attempts the quiz while logged in as one of the people in the group, and then later manually copy the same grade to all the other students in the gradebook.
Hmm. That is not really ideal though, because then later only the student whose login was used to review the quiz would be able to review what was done. However, this is the best I can think of.
Itamar, Are you really questioning the benefit of group activities?
The Question Engine is a major change, so it can only go into a a major release. That is, it might go into Moodle 2.1 (that is the plan) but it could not go into 2.0.1.
At the OU we do this using the XML export from the gradebook. That is designed to be easily machine-readable.
We have hacked together some glue code in Moodle to automate nightly exports.
That is a push approach to doing it. I think it is also possible to do a pull approach, there the remote system can grab the XML files it wants.
We have hacked together some glue code in Moodle to automate nightly exports.
That is a push approach to doing it. I think it is also possible to do a pull approach, there the remote system can grab the XML files it wants.
The online documentation for administrators starts at http://docs.moodle.org/en/Administrator_documentation.
But, if you want to get up to speed quickly, I recommend Moodle Administration by Alex Büchner http://moodle.org/mod/data/view.php?d=55&rid=1942. That will take you through everything in a logical order.
But, if you want to get up to speed quickly, I recommend Moodle Administration by Alex Büchner http://moodle.org/mod/data/view.php?d=55&rid=1942. That will take you through everything in a logical order.
Probably best to post this sort of thing in the Testing and QA forum: http://moodle.org/mod/forum/view.php?id=56
There is a setting on the quiz form for whether students should be able to see feedback, and I think these comments count as a form of feedback.
Students can see the comments next to each question when their review their quiz attempts.
Students can see the comments next to each question when their review their quiz attempts.
Well, if you are no good at code yourself, you need to find a friend who is, and buy them a copy of Moodle 1.9 Extension Development. The example in the section on how to create a new course format is something similar to what you are asking, only involving the forum module, not a quiz.
I understood what you were suggesting, but I still don't see the point of spending a lot of effort adding the code to track which questions the student has looked at. The key thing is, have they put in an answer.
OK, I changed it.
It is not possible to distinguish visited and not-visited, and I don't see the point.
It is not possible to distinguish visited and not-visited, and I don't see the point.
Actually, in my question engine rewrite, I am using 'Not answered' instead of 'Started'. Which would people prefer in Moodle 2.0?
Please could you stick a bug in the tracker about the truefalse questiontype not working. Thanks.
Please could you stick a bug in the tracker about the truefalse questiontype not working. Thanks.
As far as I can see, that worked with the first three questions. Q1 and 3 you did not answer, and the state stayed as 'Started'. Q2 you answered, and that is what the summary said. Q4 (truefalse) you did not answer, but the state changed to answered anyway. Did I get that correctly?
Is that happening with all question types? It should only change the state of the question if the student typed something, but it may be buggy, and whether it is buggy will depend on the question type.
Not possible in Moodle
(unless you create a whole new question type for it.)
(unless you create a whole new question type for it.)
This should definitely be part of the Community hub concept. I have not had a chance to look at the new Hub stuff, which is part of Moodle 2.0, and included in Preview Release 3. The basic idea is that you can easily upload and download Moodle backups, and in Moodle 2.0, backups are more modular than in Moodle 1.x. For instance, as well as having a backup of a whole course, you can have a backup of a single activity, so a community hub can let teachers share those.
We just need to ensure that a bit of question bank is something that can be backed up, and then that the community hub can cope with uploading and downloading backups like that.
I have not yet looked at the community hub code, nor the backup and restore code. I just assume it will be possible for someone to implement in due course. (And I will be very surprised if I get time to work on it, but it is a cool idea, so I would not be surprised if other people are interested in doing it.)
Also, someone posted here a few months ago about a MediaWiki foundation based Google Summer of code project to make a publicly shared question bank based on GIFT format.
We just need to ensure that a bit of question bank is something that can be backed up, and then that the community hub can cope with uploading and downloading backups like that.
I have not yet looked at the community hub code, nor the backup and restore code. I just assume it will be possible for someone to implement in due course. (And I will be very surprised if I get time to work on it, but it is a cool idea, so I would not be surprised if other people are interested in doing it.)
Also, someone posted here a few months ago about a MediaWiki foundation based Google Summer of code project to make a publicly shared question bank based on GIFT format.
Well, I think the people you really need to thank are Petr Skoda and Penny Leach, who made it work.
SCORM is just a way to package up content. You might as well ask "What is Moodle without PowerPoint files, or PDF files." That is a bit simplistic, but I hope it makes the point.
Keeping the thread of being overly simplistic, you could say that that if it were a school, then Moodle would be the classrooms, and the SIS would be the administration offices.
Keeping the thread of being overly simplistic, you could say that that if it were a school, then Moodle would be the classrooms, and the SIS would be the administration offices.
I suggest you post in the Accessibility forum: http://moodle.org/mod/forum/view.php?id=5752
I use Eclipse + PDT.
I don't use any sort of PHP debugger.
However, I have been hacking on the Moodle code for over 4 years now, so I know my way around it quite well. I tend to just read the code with the help of CTRL + click, and when I get stuck I use echo statements to find out what is happening.
I don't use any sort of PHP debugger.
However, I have been hacking on the Moodle code for over 4 years now, so I know my way around it quite well. I tend to just read the code with the help of CTRL + click, and when I get stuck I use echo statements to find out what is happening.
pix_url can be used with any sort of plugin, you just have to use the right name for the plugin you are referring to.
For your example, that would be 'format_topcoll', instead of 'theme'.
If you really want to understand how this works, you need to follow through the code which goes like this:
For your example, that would be 'format_topcoll', instead of 'theme'.
If you really want to understand how this works, you need to follow through the code which goes like this:
- pix_url outputs a link pointing to theme/image.php
- that scrip calls resolve_image_location in lib/outputlib.php to actually find the image file you are asking for.
- that calls get_plugin_directory from lib/moodlelib.php to get the acutual path to use for the plugin ($component).
- and that uses the list of plugin types defined in get_plugin_types (also in moodlelib).
Try this.
1. Download as .htm.
2. Rename the .htm file to .doc.
3. Double-click on it
I don't know why word supports this, but it does, and that is effectively how ForumNG's export to Word feature works.
1. Download as .htm.
2. Rename the .htm file to .doc.
3. Double-click on it
I don't know why word supports this, but it does, and that is effectively how ForumNG's export to Word feature works.
Moodle in English -> Quiz -> Possible Bug -> Re: Possible Bug
by Tim Hunt -
If you want a really secure solution, then yes, the simple answer is never to let the user input HTML.
Unfortunately, for Moodle developers, communication and teaching is enhanced by being able to use richly styled content. So, we can't get around processing HTML. Therefore, we have a lot of code for cleaning up the HTML that in input, and it is that code that it stripping stuff that follows a < sign that does not look like a safe HTML tag. Note that this problem only occurs when you are not using the HTML editor.
Unfortunately, for Moodle developers, communication and teaching is enhanced by being able to use richly styled content. So, we can't get around processing HTML. Therefore, we have a lot of code for cleaning up the HTML that in input, and it is that code that it stripping stuff that follows a < sign that does not look like a safe HTML tag. Note that this problem only occurs when you are not using the HTML editor.
Moodle in English -> Quiz -> No Quiz Categories -> Re: No Quiz Categories
by Tim Hunt -
I know, it is not always possible to upgrade, but if it is, that should be the first thing to try, and until we have tried or eliminated that option I don't see why I should spend more time typing out a longer reply. (Exercise for the reader. Work out what time it was in my time zone when I responded to your post with an attempt to help, however brief.)
If you can't upgrade, other things to try are turning on Debugging to get a full error message, and search the issue tracker or CVS history to see if there are any similar bug reports, or changes that might be related to this.
If you can't upgrade, other things to try are turning on Debugging to get a full error message, and search the issue tracker or CVS history to see if there are any similar bug reports, or changes that might be related to this.
That is indeed a bug. Please put it in the tracker. Thanks.
I don't think anyone has yet given the link to Pedagogy, and that page is well worth a read, as it gives Martin D's viewpoint on how he would like to see Moodle used. The "Social Constructionism as a Referent" section I particularly like.
If you read that, then you will see why I say it completely misses the point to ask "would it be more prudent for me to learn Moodle on my own ...?"
Perhaps the best people to enlist to help you learn Moodle are your students.
Your students are coming to you because you are good at art, and they want to learn art. They don't particularly care about educational technology, but still, if you stand up at the start of the first session (or whatever the online equivalent of that is) and say "I want to teach you the best way possible, and these days that means using a website like Moodle. However, I am new to these tools, so during this course we will try various things, and you can help me by giving feedback in the course forum about what bits of the course worked well, and want didn't. Or if you want me to try something different, or have any suggestions in the course, please post about it. This is your course." Really, it is just the "A learning environment needs to be flexible and adaptable, so that it can quickly respond to the needs of the participants within it." bit of Moodle.
But, the other reason to do that, is surely it is leading by example with exactly the attitude you want your students to have: "I am quite new to art, but I am ready try various things, and I want you to help by giving me feedback about what worked well and what didn't, and what I should try to do differently."
Of course, it would be silly if your students spent most of the time in the course forum talking about how Moodle is used, although that would help you. The classic online activity in any creative subject is to get each student to do something, and then post it online and get the other students to comment on it. Of course it is absolutely vital to set the right atmosphere and expectations so that students make constructive and supportive comments of each others' work, and there are good articles online about facilitating online discussions - although I am afraid I don't have a convenient link to hand right now.
Anyway, that is my suggestion. Use the fact that you want to learn about online teaching tools while your students learn about art to be a model of how to learn through reflective practice.
If you read that, then you will see why I say it completely misses the point to ask "would it be more prudent for me to learn Moodle on my own ...?"
Perhaps the best people to enlist to help you learn Moodle are your students.
Your students are coming to you because you are good at art, and they want to learn art. They don't particularly care about educational technology, but still, if you stand up at the start of the first session (or whatever the online equivalent of that is) and say "I want to teach you the best way possible, and these days that means using a website like Moodle. However, I am new to these tools, so during this course we will try various things, and you can help me by giving feedback in the course forum about what bits of the course worked well, and want didn't. Or if you want me to try something different, or have any suggestions in the course, please post about it. This is your course." Really, it is just the "A learning environment needs to be flexible and adaptable, so that it can quickly respond to the needs of the participants within it." bit of Moodle.
But, the other reason to do that, is surely it is leading by example with exactly the attitude you want your students to have: "I am quite new to art, but I am ready try various things, and I want you to help by giving me feedback about what worked well and what didn't, and what I should try to do differently."
Of course, it would be silly if your students spent most of the time in the course forum talking about how Moodle is used, although that would help you. The classic online activity in any creative subject is to get each student to do something, and then post it online and get the other students to comment on it. Of course it is absolutely vital to set the right atmosphere and expectations so that students make constructive and supportive comments of each others' work, and there are good articles online about facilitating online discussions - although I am afraid I don't have a convenient link to hand right now.
Anyway, that is my suggestion. Use the fact that you want to learn about online teaching tools while your students learn about art to be a model of how to learn through reflective practice.
Moodle is using the PHP function posix_times http://uk2.php.net/manual/en/function.posix-times.php. Sadly the documentation for that is not very helpful.
http://en.wikipedia.org/wiki/CPU_time, and some of the pages it links to, may help to explain.
I don't know why you are seeing such wide variation in values.
http://en.wikipedia.org/wiki/CPU_time, and some of the pages it links to, may help to explain.
I don't know why you are seeing such wide variation in values.