15 Commits

Author SHA1 Message Date
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