21 Commits

Author SHA1 Message Date
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Marina Glancy
d22e9e32e4 MDL-30998: updated docblocks for advanced grading 2013-01-14 15:14:54 +11:00
Aparup Banerjee
9455f48280 Merge branch 'MDL-34549-master' of git://github.com/ankitagarwal/moodle 2012-08-28 11:45:11 +08:00
Marina Glancy
42b1867410 MDL-34310 display grading method description inside render_preview
This way we can use the function gradingform_controller::render_preview() to display a preview for students in different modules
without worrying on gradingform-specific options on whether to display description for students or not
2012-08-24 11:51:20 +08:00
Ankit Agarwal
d197ea4300 MDL-34549 libraries: Replace get_context_instance_by_id() by context::instance_by_id() 2012-08-24 11:30:10 +08:00
Andrew Davis
a153c9f2fe MDL-30999 grade: updated Grade API phpdocs 2012-02-14 14:04:19 +07:00
David Mudrak
dd736a87ee Replaced deprecated get_system_context() with the new context_system::instance() 2011-11-02 23:35:05 +01:00
David Mudrak
967d346f72 MDL-29794 It is now possible to re-use a form without sharing it as a template
The patch also improves displaying tags-like status information next to
the grading form titles.
2011-11-02 21:57:24 +01:00
Marina Glancy
3599b113a6 MDL-29482, MDL-29794, MDL-30037: supporting form status in rubriceditor and forms sharing; fixed bug with grade calculation 2011-11-02 10:45:32 +08:00
Marina Glancy
2ae7faf128 MDL-29482: added validation to rubric editor and the 'work in progress' status 2011-11-02 09:12:58 +08:00
David Mudrak
49a537b356 MDL-29482 The rubric editor is now able to save the status of the form definition 2011-11-01 18:04:31 +01:00
David Mudrak
4d064218fb MDL-29794 Rename templates.php back to pick.php
We will need the general management page implemented in a separate
script. This one will be used for picking an existing form only.
2011-11-01 16:30:17 +01:00
David Mudrak
3f3ee7114e MDL-29794 Do not offer re-sharing of unmodified forms
The patch introduces a new field 'timecopied' that holds the timestamp
of when the given form was cloned last time. Using this field, we can
decide whether the form can be actually re-shared or not.

Note that the logic just hides the icon. It is meant as a usability
feature, not any real protection from sharing.
2011-11-01 16:10:12 +01:00
David Mudrak
7622ae95dc MDL-29108 Improved support for form definition status
Every grading form can be basically in either DRAFT state (currently
being edited) or READY state (available for usage). For shared
templates, the status is not relevant at the moment and they are
automatically in the READY state.
2011-11-01 12:32:06 +01:00
David Mudrak
20836db999 MDL-29794 Initial support for re-using a shared grading form
The patch introduces a new script templates.php that allows to search
for a previously shared form (template) and re-use it.

The patch also modifies the preview rendering of grading forms. Now
plugins are responsible for rendering the form itselft, without any
headers, descriptions etc (we need to embed the form preview into
various places so the caller looks after the frame).
2011-11-01 03:16:54 +01:00
David Mudrak
9c9cee4e33 Simplified manage.php initialization
For now, we support activity modules only anyway.
2011-10-24 21:02:05 +02:00
David Mudrak
671ec8f50e Form definitions can be removed now 2011-10-19 13:25:47 +02:00
David Mudrak
fde3380443 Saving a form as a public template
There is a new API method get_definition_copy() that is expected to
return the definition structure as if the form was written from scratch
via the editor. Such a prepared structure is passed to
a controller's update_definition() method in the new target area.

The same mechanism will be used for copying definitions from a shared
area to a normal gradable area.
2011-10-19 01:17:43 +02:00
David Mudrak
71bd9d2066 Trivial rename of the active method selector param 2011-10-18 16:39:54 +02:00
David Mudrak
98a73bb7ac Improved management page's integration into the settings block (again) 2011-10-18 16:25:30 +02:00
David Mudrak
6832a10264 Initial support for the grading management screen
The user is sent to the new grade/grading/manage.php screen when an
advanced grading method is set in the activity mod form or via the
settings block.

The screen is supposed to (1) let the user change the currently active
grading method, (2) open the editor for the selected method, (3) create
new form from a template (4) display a preview of the form.
2011-10-18 01:05:07 +02:00