Commit graph

56 commits

Author SHA1 Message Date
Juan Leyva
981f511a14 MDL-59252 mod_workshop: Move assessment evaluation code to API 2017-10-03 19:16:31 +02:00
Juan Leyva
57f44fbac4 MDL-59250 mod_workshop: Move assessment edition code to API function 2017-10-03 17:31:29 +02:00
Juan Leyva
86928d2a7c MDL-59248 mod_workshop: New API check_examples_assessed_before_assessment
For consistency I renamed the old check_examples_assessed function to
check_examples_assessed_before_submission.
I also call the new function in the existing
get_workshop_access_information external function.
2017-10-03 08:51:29 +02:00
Juan Leyva
b1e896cf2a MDL-59247 mod_workshop: New WS mod_workshop_get_assessment 2017-10-02 09:37:15 +02:00
David Mudrák
931bba6054 MDL-54945 workshop: Introduce workshop::check_group_membership() method
This is just a refactored code block present at two different places. We
will need the same logic in the portfolio caller class soit made sense
to implement it as a new method, rather than make another copy&paste.

As a side effect, the logic is now properly unit tested.
2016-10-11 20:23:55 +02:00
David Mudrák
e46aec4c45 MDL-55957 workshop: Fix the embedded files serving
There was a bug with serving the files from the areas instructauthors,
instructreviewers and conclusion. These three areas should not use the
itemid in the plugininfo URLs. But they did use 0 as the itemid which
broke the file previews when browsing via server files repository.

The first part of the patch fixes all relevant calls to
file_rewrite_pluginfile_urls() so that null is now properly used instead
of zero.

The second part of the fix is that we no longer delete the first $args
element in the workshop_pluginfile() function - the itemid is not
supposed to appear there now.

The last part of the patch is that instead of repeating the same code
block copy&pasted for each file area in workshop_pluginfile(), we now
have a single block covering them all.
2016-09-14 12:14:56 +02:00
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
Petr Skoda
d1c7cf5376 MDL-43557 fix relateduserid in \mod_workshop\event\submission_assessed
The assessment is related to the original author of submission.
2014-04-30 11:03:43 +08:00
Mark Nelson
02a5a4b2ff MDL-43557 events: fixed minor issues in existing events 2014-04-29 19:16:11 -07:00
Sam Hemelryk
5cdcfcb988 MDL-44183 mod_workshop: unified @package use 2014-02-21 08:33:40 +13:00
Adrian Greeve
1f0132716e MDL-40921 mod_workshop: New events to replace add_to_log function calls. 2014-02-07 13:21:23 +08:00
Matteo Scaramuccia
996531e7f1 MDL-42167 Update workshop assessment record only when really changed
Under certain conditions there is nothing to actually update here. The
$DB->update_record() would throw an exception here.
2013-10-10 10:07:53 +02:00
Rossiani Wijaya
764d7ba9b4 MDL-41622 workshop mod: fix page heading levels.
Also, changing couple of the sub header to use notification, which is more appropriate.
2013-09-17 12:44:25 +08:00
Damyon Wiese
74df2951d1 Revert "MDL-39876 Change get_record('course') calls to get_course"
This reverts commit ab7632b74c.
2013-08-21 13:42:30 +08:00
sam marshall
ab7632b74c MDL-39876 Change get_record('course') calls to get_course 2013-08-15 11:31:20 +01:00
David Mudrák
77d746a2f5 MDL-37602 Clean up and improve the overall feedback rendering
In order to use the overall feedback in assessments of example
submissions and in the assessment form preview, significant improvements
in the rendering machinery were done.

Workshop class provides two new methods overall_feedback_content_options()
and overall_feedback_attachment_options() as they are needed at various
scripts and libraries.

Overall feedback is displayed as a part of the workshop_assessment_form
only if the form is in editable mode (not frozen). If the form is
displayed in read-only (frozen) mode, the caller is expected to render
the overall feedback and list of attachments (the editor and filemanager
elements do not support frozen mode). To do so, the renderable
workshop_assessment now loads overall feedback data and provides two new
methods get_overall_feedback_content() and
get_overall_feedback_attachments() to be used by the renderer.

Renderable workshop_submission, workshop_assessment and related classes
now accept the workshop instance as the first parameter in their
constructors. This way, these renderable classes have access to the
workshop API.

In the future, the rendering of submission files should be improved in
the same way as is done in this patch (i.e. moving the logic and data
preparation out of the renderer into the renderable classes).
2013-03-26 21:25:46 +01:00
David Mudrák
c6a793d5a2 MDL-37602 Put the overall feedback fields to the bottom of the assessment form
The assessment form can be displayed as editable or read-only (frozen).
Neither the editor element nor the filemanager element support
displaying frozen content themselves so we need to pre-format and inject
static texts.

The list of attachments should be ideally generated by the renderer and
probably improved a bit - just quick and dirty solution must be enough
for now though (2.5 coding freeze is just behind the corner...).

AMOS BEGIN
 CPY [submissionattachment,mod_workshop],[feedbackauthorattachment,mod_workshop]
AMOS END
2013-03-26 21:25:00 +01:00
David Mudrák
1df3bc143c MDL-37806 Display 'Save and show next' button when assessing workshop submissions
The button is displayed only when there is a pending (that is not
assessed yet) submission to assess.

AMOS BEGIN
 CPY [savenext,mod_assign],[saveandshownext,mod_workshop]
AMOS END
2013-01-31 18:21:51 +01:00
David Mudrak
3f5e99153c MDL-27508 workshop checks separate groups membership when displaying an assessment 2012-04-27 14:41:58 +02:00
David Mudrak
38504a4490 MDL-27550 workshop: assessments are now displayed via proper rendering subsystem
AMOS BEGIN
 MOV [assessmentbyknown,mod_workshop],[assessmentbyfullname,mod_workshop]
AMOS END
2011-08-02 23:33:32 +02:00
David Mudrak
9ddff589df MDL-26147 workshop - added capability to ignore time restrictions 2011-06-10 19:01:27 +02:00
Sam Hemelryk
367a75fae4 themes lib MDL-24895 Multiple fixes to better handle overflow.
Major tasks undertaken in this patch:
* New format_text argument, overflowdiv.
* New page layout Report.
* Review of all format_text calls.
* Added support for the report layout to all themes.
* Changed forum post display from tables to divs.
2010-11-05 02:53:47 +00:00
David Mudrak
5450f7b6c5 MDL-24765 workshop logging features reviewed 2010-10-20 13:13:45 +00:00
David Mudrak
81b2288716 MDL-22507 workshop rendering fixed for submissions and example submissions 2010-10-20 13:12:31 +00:00
David Mudrak
65601f04a3 MDL-21249 workshop and its subplugins: fixing phpdocs @package and @subpackage 2010-09-30 14:44:33 +00:00
Petr Skoda
5924db724d fixed a few spelling problems and standardised stdClass 2010-09-18 14:18:39 +00:00
David Mudrak
60719642bd NOMDL workshop: added error messages explanation, php notice fixed and additional access control 2010-07-20 14:17:41 +00:00
David Mudrak
e0142f7e8a MDL-23408 workshop: show instructions at the submission/assessment page, too 2010-07-20 14:17:14 +00:00
David Mudrak
c6b784f09d Workshop: assessment weight can be set 2010-06-11 23:02:35 +00:00
David Mudrak
cff28ef080 Workshop: fixed checking of examples assessment before own assessment 2010-06-11 23:02:04 +00:00
David Mudrak
ac239eba05 NOBUG workshop: allows instant assessment for the teachers
If a user is allowed to allocate a submission to herself for assessment,
there is now a button that she can press to immediately allocate and
assess the submission.
This patch also contains various cleanups spotted during the work.
2010-06-08 23:10:43 +00:00
David Mudrak
7a789aa8cc workshop coding style - use stdclass instead of stdClass 2010-01-04 18:30:57 +00:00
David Mudrak
090a7907da workshop fixing incorrect use of logical operators 2010-01-04 18:28:56 +00:00
David Mudrak
becec954e6 MDL-20652 workshop: more work on example submissions 2010-01-04 18:27:41 +00:00
David Mudrak
6adbcb8015 workshop in reply to MDL-20204 - new output API 2010-01-04 18:26:56 +00:00
David Mudrak
4f16959f58 MDL-20058 workshop grades can be overridden in grading evaluation phase only 2010-01-04 18:23:32 +00:00
David Mudrak
d84d06ceff MDL-19930 workshop: comments grading strategy 2010-01-04 18:21:42 +00:00
David Mudrak
e554671dc4 Assessments overrides and feedbacks
This requires the patch of MDL-20623 to be applied
2010-01-04 18:20:24 +00:00
David Mudrak
77f43e7d1a Frozen grid rubric layout fix 2010-01-04 18:20:10 +00:00
David Mudrak
407b1e9177 VIP Assessment review 2010-01-04 18:19:58 +00:00
David Mudrak
00aca3c14c A lot of work here and there
DB columns userid renamed to authorid or reviewerid to make the value
clear. Improved manual allocation UI. Raw grades are stored as numeric
values from 0.00000 to 100.00000 (instead of the current 0 to 1) to be
more precise. Started to work on the Grading report (it est the overall
report of all grades form submission and grades for assessments).
2010-01-04 18:08:13 +00:00
David Mudrak
ddb59c778f Displays all assigned submissions to be reviewed and saves the calculated grade 2010-01-04 18:02:16 +00:00
David Mudrak
b761e6d9c6 Mostly working on the view.php UI plus some changes 2010-01-04 18:00:54 +00:00
David Mudrak
39861053c4 MDL-20183 Uses some of the new Navigation API 2010-01-04 18:00:12 +00:00
David Mudrak
bc40ea0a9e Better explanation of the returned value 2010-01-04 17:56:23 +00:00
David Mudrak
65ba104c5d Reverting Petr's suggestion - using stdClass instead of object again
I do not agree with using object() class for no real reason.
2010-01-04 17:55:02 +00:00
David Mudrak
4443519f57 Petr's review: use object instead of stdClass 2010-01-04 17:52:59 +00:00
David Mudrak
2fe703edfc Accumulative grading: calculation of grade given by peer reviewer 2010-01-04 17:52:35 +00:00
David Mudrak
05e69e56a4 Prepared a framework for calculating the grade for submission as suggested by the reviewer 2010-01-04 17:51:34 +00:00
David Mudrak
0715308cd1 Accumulative assessment saves (and loads already saved) evaluation 2010-01-04 17:51:10 +00:00