62 Commits

Author SHA1 Message Date
fmarier
69b339390a mod/quiz: Add a link back to the course page after a quiz is completed 2007-11-09 01:17:48 +00:00
tjhunt
f63a4ff2cc Eliminate duplicate $Id$ tag. Merged from MOODLE_19_STABLE. 2007-11-07 15:26:37 +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
a4faed6925 MDL-10030 - the logic controlling whether students were allowed to see the review screen was wrong. 2007-09-21 16:01:40 +00:00
moodler
49e7a95a4c Removing the space will make this string work better in RTL languages MDL-10768 2007-08-09 08:48:11 +00:00
tjhunt
99a1bf3d9c MDL-10374 - Quiz layout improvements, selectively merged from OU-moodle. 2007-07-06 16:37:06 +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
tjhunt
2d05b47209 MDL-6368 and MDL-6369 - allow question type plugins to easily provide some bits of Javascript and CSS - I forgot about the review page. 2007-04-24 17:32:21 +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
mattc-catalyst
9ac0c1b328 Breadcrumbs: mod/quiz changes
- Modified to use build_navigation() for breadcrumb generation.
- Removed print_header method is now provided by base class.


Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-04-16 21:23:17 +00:00
tjhunt
121609d80a MDL-8299 - Wrong capability on review.php. Merged from MOODLE_18_STABLE. 2007-03-20 22:45:19 +00:00
vyshane
0927589412 Xhtml fixes for MDL-7861. 2007-01-09 09:07:16 +00:00
tjhunt
77ed3ba5fd MDL-8002 - Don't show overall feedback for incomplete quiz attempts.
Also, cleanup of mod/quiz/index.php
2006-12-22 12:52:13 +00:00
toyomoyo
4f83ae95ca adding capabilities 2006-08-31 08:51:09 +00:00
tjhunt
cd06115fa7 Convert mod/quiz/view.php to roles, and further tidy up the code flow in there. This touches other files because I had to change a function in locallib that had an $isteacher parameter.
I have not converted the rest of the quiz, and I don't intend to. I am hoping Moodle.com will do it.

I hope this does not introduce any bugs, but view.php is so complicate (at least it is less complicated than it was) and the quiz has so many options, that it is hard to be sure. This needs lots of testing before 1.7 is released.
2006-08-25 16:03:54 +00:00
tjhunt
a18fa6d5ba Get the contexts without referring to undefined variables. 2006-08-23 15:32:06 +00:00
tjhunt
212b7b8cd9 MDL-5270 - give students a feeback comment for their performance in the entire quiz.
Also, along the way I noticed and fixed MDL-6290 student grades not rescaled when quiz maximum grade changed.
2006-08-22 17:31:26 +00:00
toyomoyo
5cf38a57cd some quiz capabilities 2006-08-22 09:04:23 +00:00
tjhunt
3b48ba9dc1 Bug #6157 - lang strings using concatenation, not $a. Merged from MOODLE_16_STABLE. 2006-07-24 14:40:48 +00:00
mjollnir_
15db443c87 mod/quiz/review only display grade summary if student allowed to see scores
Change to review.php so that the student will only see the grade summary
if they are allowed to view their scores - as determined by quiz options
set by the teacher.
Credit: Peter Bulmer peterbulmer@catalyst.net.nz
2006-04-18 22:50:04 +00:00
mjollnir_
9f7f01db04 mod/quiz/review quiz options loaded once per pageload, not once per qn.
Moved loading of quiz review options from loop iterating over each qn to be
displayed, to the top of the pageload.  Should give efficency gains
on quizes with long pages, as well as making the options available
earlier in the process.
Credit: Peter Bulmer peterbulmer@catalyst.net.nz
2006-04-18 22:47:56 +00:00
gustav_delius
7a0b035bf9 Make student name into a link on the review page 2006-04-09 21:58:58 +00:00
gustav_delius
b6e907a245 Manual grading 2006-04-07 16:00:29 +00:00
gustav_delius
0a5b58af89 Many bugfixes accummulated during CVS outage, more to come. 2006-04-05 05:53:18 +00:00
gustav_delius
fe9b5cfd0b Fixed the links to the question review script. 2006-03-22 21:30:00 +00:00
gustav_delius
4f48fb42af Towards removing reference to quiz module from the question code
Renaming tables:
quiz_questions -> question
quiz_states -> question_states

Renaming functions:
quiz_delete_question -> delete_question
quiz_get_question_options -> get_question_options
quiz_get_states -> get_question_states
quiz_restore_state -> restore_question_state
quiz_save_question_session -> save_question_session
quiz_state_is_graded -> question_state_is_graded
quiz_extract_responses -> question_extract_responses
quiz_regrade_question_in_attempt -> regrade_question_in_attempt
quiz_process_responses -> question_process_responses
quiz_isgradingevent -> question_isgradingevent($event)
quiz_search_for_duplicate_responses -> question_search_for_duplicate_responses
quiz_apply_penalty_and_timelimit -> question_apply_penalty_and_timelimit
quiz_print_question_icon -> print_question_icon
quiz_get_image -> get_question_image
quiz_make_name_prefix -> question_make_name_prefix
quiz_get_id_from_name_prefix -> question_get_id_from_name_prefix
quiz_new_attempt_uniqueid -> question_new_attempt_uniqueid
quiz_get_renderoptions -> question_get_renderoptions
quiz_print_quiz_question -> print_question
quiz_get_question_responses -> get_question_responses
quiz_get_question_actual_response -> get_question_actual_response
quiz_get_question_fraction_grade -> get_question_fraction_grade
quiz_get_default_category -> get_default_question_category


Renaming constants:
QUIZ_EVENT.... -> QUESTION_EVENT....
QUIZ_MAX_NUMBER_ANSWERS -> QUESTION_NUMANS
2006-02-28 09:26:00 +00:00
michaelpenne
e51b142a78 Removed changes made earlier for ungraded essay questions. Will try to find an alternate method. 2006-02-16 00:30:50 +00:00
gustav_delius
03d1753c1c Renamed table quiz_newest_states to question_sessions 2006-02-15 08:38:41 +00:00
gustav_delius
85b9b86f51 Round also the raw score. 2006-02-14 23:08:06 +00:00
michaelpenne
b9376ebef0 The following changes were made to help reduce confusion for students when essay questions are being used in a quiz.
- When a essay question has been submitted or being reviewed and has not been graded by the instructor, then the Marks are not shown and displays a message to the student instead of saying Incorrect. (changes to questiontypes/questiontype.php in functions print_question and print_question_grading_details).

    - For students, in view.php, a notice is printed to inform him/her that s/he has ungraded essay question(s).
    - For teachers, in view.php, a notice is printed to inform him/her that s/he has X number of ungraded essays for X number of studnets

    - In review.php, next to the grade output, informs the viewer if X number of ungraded essays in this attempt.

    - In questiontypes/essay/questiontype.php created a utility function to generate the numbers used in the above changes.

    - In lang/en/quiz.php added new lang entries.

So, hopefully the student will now understand that their grade does not include the ungraded essay questions.  Modification of lang entries might be needed to further drive this point.
2006-02-13 20:27:34 +00:00
gustav_delius
8779eab55d Avoid error messages in case $quiz->sumgrades is zero, closing bug 4454. Merged from STABLE 2006-02-12 21:08:43 +00:00
gustav_delius
e484e8f915 Fix so that secure window closes itself even when no review is allowed, see bug 3891 2005-08-26 19:24:17 +00:00
gustav_delius
9bc2d82a46 Merging from STABLE 2005-07-07 18:34:12 +00:00
gustav_delius
bb52d44c6a Due date and start date are now optional, as requested in bug 867 and bug 3635 2005-07-07 17:16:56 +00:00
gustav_delius
d115d8c736 I have introduced the new field $attempt->uniqueid, see http://mantis.york.ac.uk/moodle/mod/forum/discuss.php?d=852#3380 2005-07-02 18:14:51 +00:00
gustav_delius
ad7e7ba882 Two name changes:
1) in all module-indpendent code the variable $quiz has been renamed to $cmoptions (it holds the options set by the course module which does not necessarily have to be a quiz, it could be a lesson for example).
2) quiz_restore_question_sessions() has the simpler name quiz_get_states
Also got rid of the quizfile.php in favour of file.php
2005-07-02 16:07:05 +00:00
gustav_delius
7bbe08a267 Merged from stable 2005-06-04 09:58:35 +00:00
moodler
5a82dafa75 Merging fixes from MOODLE_15_STABLE 2005-06-01 08:15:21 +00:00
mindforge
d7df8b06ae Fix for bug 3311 in review.php 2005-05-23 10:48:05 +00:00
gustav_delius
bacd044d45 fixed bug 3146 about secure popup window for review screen. 2005-05-08 11:24:03 +00:00
gustav_delius
1105b32da0 Use round() instead of format_float() to limit decimal points to a MAXIMUM of $quiz->decimalpoints. format_float() always displays EXACTLY that number of digits after the decimal point which is not really desirable. 2005-05-07 13:48:25 +00:00
gustav_delius
ee1fb969c8 Merging in from the MOODLE_15_QUIZREFACTOR branch.
The quiz module now can handle adaptive questions and can render remote questions via RQP web services.
2005-05-06 06:24:04 +00:00
stronk7
b681000402 Now quiz->name supports filterall. 2005-04-03 00:19:11 +00:00
gustav_delius
ec81373f50 In order to ensure that when a teacher hides a resource or an activity that students really can't get at it, even if they know the direct links to its pages, I have given an optional third argument $cm to the functions require_login() and require_course_login(). Pages showing information about a particular course module now pass the course module object in this third argument. The login functions will then test if either the course module is visible or the user is a teacher. If neither is the case then the user is redirected to the course homepage after being shown a message "Sorry, this activity is currently hidden".
(While I was at it I also turned the autologinguests off for most module pages, except on the index.php pages and the view.php pages for those modules that allow guests)
2005-02-16 10:40:48 +00:00
gustav_delius
76cacec819 split quiz lib.php into a locallib.php for functions that are only used from within the quiz module and a much smaller lib.php for functions that are used from elsewhere in Moodle. 2005-01-08 20:06:00 +00:00
gustav_delius
34283aa87d The teacher now can choose whether to see the advanced quiz
options or not. This is handled as in the resource module. The
"Show advanced options" button is only shown if the admin has
chosen to declare some of the options as advanced.

There are now 4 review options as suggested by Martin in
http://moodle.org/mod/forum/discuss.php?d=16709

Provides separate buttons "Update this quiz" and "Edit questions",
see http://moodle.org/mod/forum/discuss.php?d=16708. To make this
possible edit.php can now be called with a quiz id and it saves
its data itself rather than relying on mod.php.

mod.html now has a "Save changes" and a "Save changes and edit questions" button.

"Attempt quiz now" button gets a different language string for
re-attempts. This is currently set to "Re-attempt quiz".

After viewing the feedback for an attempt the "Continue" button
leads back to the course homepage, as requested in bugs 1224 and
1976. If there is no feedback the user is brought straight to quiz/view.php.
2005-01-02 07:15:19 +00:00
moodler
ad1a74e0ed Protect review page as well 2004-12-16 11:51:37 +00:00
gustav_delius
839f2456bb XHTML compliance
- fixed (hopefully) all <img> tags
- global replace on <br> to <br />
- &amp; in URLs
- got the forum module XHTML compliant
Julian Sedding
2004-09-16 17:13:57 +00:00
gustav_delius
d1290cec39 fixed capitalization and quoting of attribute values 2004-09-12 17:34:35 +00:00