144 Commits

Author SHA1 Message Date
tjhunt
ad65ff47d8 quiz: MDL-17873 small efficiency gains. 2009-02-11 07:52:26 +00:00
tjhunt
971c6fca06 question bank: MDL-17871 Kill most of the duplicated code between mod/quiz/editlib.php and question/editlib.php 2009-01-22 05:38:18 +00:00
tjhunt
5bd22790c4 question bank: MDL-17871 refactor the code that displays particular information about each question into classes.
More work in progress. Print column headers, and improve sorting. These classes are still not used.
2009-01-21 07:21:43 +00:00
tjhunt
f4b879ddea question bank: MDL-17302 refactor question bank display code into a class.
Step 1. Just convert the existing functions quiz_question_showbank and question_showbank and friends into methods of a class and subclass.

More to come.
2009-01-19 05:30:01 +00:00
tjhunt
b4a2e41313 quiz editing: MDL-17284 fix infinite redirect bug. 2009-01-07 07:12:37 +00:00
skodak
d4a1fcaf11 MDL-16613 sesskey cleanup 2009-01-02 10:36:25 +00:00
pilpi
28e6ac1174 quiz editing: MDL-17730 skip links; mistake in previous commit 2008-12-26 00:34:39 +00:00
pilpi
5669badfaf quiz editing: MDL-17730 skip links 2008-12-26 00:29:17 +00:00
pilpi
93cc3ea45e quiz editing: MDL-17417 added logging for random question creating 2008-12-16 22:36:29 +00:00
pilpi
0b31bfe8c3 quiz editing: MDL-17664 Removed unneeded yui js includes 2008-12-16 11:21:22 +00:00
tjhunt
4e6f553d43 quiz editing: MDL-15903 fix the code that updates $quiz->sumgrades,
so we only update the database when something changes, not on every page view.
2008-12-05 05:08:37 +00:00
pilpi
3e6ad1d7a4 quiz editing: MDL-17409 removed ":" from source
removed ":" from source where they occured with new (committed with the rest of Quiz UI redesign project) strings and changed the strings accordingly
2008-12-04 13:28:20 +00:00
pilpi
4897ae1b94 quiz editing: MDL-17294 removed unnecessary comment 2008-11-28 18:58:30 +00:00
pilpi
8c4d6dd2a2 quiz editing: MDL-17294 removed the $showbreaks parameter from quiz_print_question_list 2008-11-28 18:37:24 +00:00
pilpi
c7c7f25a84 quiz editing: MDL-17294 changed quiz_process_randomquestion_formdata to always return (instead of sometimes redirecting) 2008-11-28 17:29:04 +00:00
tjhunt
1372b5d2cf quiz editing: MDL-17298 We should not add JavaScript to the YAHOO namespace Also, use the newer methods for including required JavaScript. 2008-11-25 12:31:59 +00:00
pilpi
8bccba71e6 quiz editing: MDL-17299 Moved function definitions from mod/quiz/edit.php to mod/quiz/editlib.php 2008-11-22 12:36:14 +00:00
pilpi
d9daa35ca9 quiz editing: MDL-17297 Got rid of editcss.js and adjusted stylesheets accordingly 2008-11-22 11:42:06 +00:00
pilpi
1cdbd5e46f quiz editing: MDL-17301 avoid inline CSS in mod/quiz/edit.php 2008-11-22 11:29:20 +00:00
pilpi
218dfb9127 quiz editing: MDL-17291 Question moving functionality to a user-selected page now manipulates an array instead of string
The old implementation was string-based and flawed, so switched to a more readable array-based one.

Also removed strpos2() since it was only used in edit.php locally and due to this change became unused.
2008-11-21 17:08:36 +00:00
pilpi
47a8933f62 quiz editing: MDL-17288 Lang string issues
questionsperpageselected and shufflequestionsselected from lang/en_utf8/quiz.php now use a $a, rather than concatenation.
2008-11-21 13:35:15 +00:00
tjhunt
fa583f5f6e quiz editing: MDL-17285 This is Olli Savolainen's new interface for editing quizzes.
This was started and usability tested as a Finnish Summer of Code project, and then Olli did further work on it in his own time to get it in shape for inclusion in Moodle 2.0. I reviewed all the code. There are a number of minor outstanding issues that will be fixed soon. See the subtasks of MDL-17284 for a list.

The goal of these changes is to:
* help teachers new to Moodle, so when they first see the quiz editing page, they don't go "Huh! What on earth am I supposed to do here?"
* help novice Moodle users understand and learn to use some of the more advanced quiz feature;
* but, without slowing down more experienced quiz users.

Naturally, with ambitous goals like that, we won't have managed to satisy everybody, but I think this change is a big step in the right direction.

There is extensive documentation on this project at http://docs.moodle.org/en/Development:Quiz_UI_redesign.
2008-11-20 06:59:11 +00:00
tjhunt
339ef4c246 random questions: MDL-17160 Adding random questions, maximum option.
When counting how many options to put in the add NN random questions dropdown, we should only count questions of types that are usable by random.
2008-11-07 05:50:02 +00:00
dongsheng
a6344df49a "MDL-14129, fixed hardcoded print_header in quiz module" 2008-09-25 08:21:59 +00:00
tjhunt
e2249afe2b MDL-7010 Convert mod\quiz\config.html to mod/quiz/settingstree.php using the new admin tree system. 2008-08-26 01:05:01 +00:00
skodak
245ac55791 MDL-14679 last forgotten bits of dml conversion 2008-06-09 19:48:24 +00:00
nicolasconnault
9cf4a18b41 MDL-15113 Upgrade to DMLLIB 2.0. Needs further testing and bug-fixing.
MDL-15100 Fixed a bug in gradelib.php
Plus edited tablelib.php for table_sql upgrade to dmllib 2.0
2008-06-09 10:00:35 +00:00
tjhunt
3192d014f3 Eliminate direct references to $_REQUEST and $_POST in the quiz code.
Also, when you edit the quiz, and therefore any preview attempts are deleted automatically, make sure the attempts are deleted properly by calling quiz_delete_attempt on each one, rathern than leaving orphaned junk in the database.
2008-04-23 14:49:22 +00:00
tjhunt
bfecee473a Revert bogus error -> print_error changes that were stopping my patch from merging. 2008-04-23 14:45:45 +00:00
moodler
9aa82ed6d4 MDL-14399 Merged RTL fixes from 1.9 2008-04-17 08:50:56 +00:00
dongsheng
5a2a53316f MDL-14129, remove all the other error() call 2008-04-04 02:54:20 +00:00
tjhunt
758c50b1cd MDL-13794 - Reordering tool does not work if you type the same number into two boxes.
Also, fix some javascript that did not work in IE7.
2008-03-05 10:16:18 +00:00
tjhunt
2a13e454f9 MDL-9459 - Provide information relating to groups in the summary message "Attemts: 123". Now, depending on the situation, you see one of three messages: "Attempts: 123", "Attemtps 123 (45 from your groups)" or "Attemtps 123 (45 from this group)".
I also took the opportunity to improve the layout of this message slightly, and clarify the message that tells you that you cannot add or remove questions from the quiz if there are attemts.

Merged from MOODLE_19_STABLE.
2007-12-12 17:23:55 +00:00
tjhunt
3db14d77ec MDL-12305 - Don't let the quiz reorder tool put a page break at the start of the quiz. Merged from MOODLE_19_STABLE. 2007-11-21 18:09:11 +00:00
tjhunt
cd6ef0a5bb MDL-12305 - Quiz reorder tool broken. Merged from MOODLE_19_STABLE. 2007-11-21 18:00:09 +00:00
tjhunt
7ca4613b85 Eliminate duplicate $Id$ tag. Merged from MOODLE_19_STABLE. 2007-11-07 15:20:57 +00:00
tjhunt
6c58e1985b MDL-6376 - fix minor errors in the previous commit.
More significantly, this patch changes the '1 Students have made 1 attempts' string.

To start with, this code was being produced in five different places, so I made a function to do the work!. Next, as you can see, it is not gramatical. Also, some people find it confusing, as in MDL-6376.

Therefore, it now just says 'Attempts: 1'.

Merged from MOODLE_19_STABLE.
2007-10-30 19:29:45 +00:00
tjhunt
38e179a4ed MDL-11741 - Convert core modules to take advantage of recent improvements to build_navigation.
This check-in removes about 400 lines of code. I hope I have not screwed anything up. I would be grateful if people could review this change, and keep an eye on the navigation bar in modules.

Any navigation bar bugs you find in the near future, feel free to file them in the tracker and assign them to me. Thanks.

If not to many problems are found, I think I would like to backport this to 1.9 stable, but I am not sure that is a good idea. Opinions to the General Developer Forum please. I am about to start a thread there.
2007-10-12 15:55:49 +00:00
tjhunt
f59dba8497 MDL-11398 - Random questions sometimes ended up with names different from the cateogry they were actually picking from. Also, the same random questoin could be used in more than one quiz, in which case editing that question would change two quizzes unexpectedly. The fix is:
* Don't let the user set the name for random questions.
* Instead force the name to be "Random (catname)" (localised) whever the question is created or saved.
* When a category is renamed, rename all the random questions in it.
* Remove the restriction that Jamie seems to have added in 1.9 that was preventing the category of random questions from being edited.
2007-09-26 16:10:38 +00:00
jamiesensei
6943c3b9ca removed stray echo statement 2007-09-04 12:42:03 +00:00
jamiesensei
271e6decda merging MOODLE_19_QUESTIONS with HEAD 2007-08-09 21:51:09 +00:00
mattc-catalyst
01e3838853 MDL-9473: Initialise navlinks array before use
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-07-05 04:55:24 +00:00
mattc-catalyst
3b27b0fe21 MDL-9615: Correct incorrect use of term breadcrumbs
- $crumbs -> $navlinks


Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-07-05 04:40:48 +00:00
jamiesensei
85c375c3f8 added function callbacks for module specific controls to question bank. 2007-05-07 16:57:23 +00:00
jamiesensei
64eeaf4753 removed all session fromurl and returnurl stuff from question bank editing code. Returnurls are now passed as get/post params. 2007-05-07 07:13:14 +00:00
jamiesensei
36e298bc58 removed more session stuff from question list and category form in question bank display code 2007-05-04 10:46:33 +00:00
jamiesensei
9ab3847595 tightening up reg expressions used for submitted data a bit 2007-05-04 08:33:28 +00:00
jamiesensei
b07b4bd246 removed use of session for reordertool and show page breaks. Reordertool and show page breaks params are now passed from page request to page request only for page requests for quiz/edit.php 2007-05-03 10:38:35 +00:00
jamiesensei
b72ff47685 moved question sort order and paging params to be passed from page to page as get params instead of being saved in session var. 2007-05-03 10:10:01 +00:00
mattc-catalyst
70c6c0ad70 MDL-9474: Updated build_navigation() to use global $COURSE
- Removed $course parameter from build_navigation()
- Updated all calls to build_navigation()


Author: Matt Clarkson <mattc@catalyst.net.nz>
Committer: Matt Clarkson <mattc@catalyst.net.nz>
2007-04-23 21:11:10 +00:00