Commit Graph

47 Commits

Author SHA1 Message Date
David Mudrák f9a8d98047 MDL-56486 workshop: Use the new filetypes element in the mod_form
The element copes well with the legacy syntax - just extensions, no
dots. So the upgrade step is not actually necessary here. The element
has in-built validation so there is no need to validate it explicitly
here again.
2017-07-06 09:49:04 +02:00
David Mudrák ebf0598e21 MDL-55360 workshop: Allow creating workshops with empty grades to pass
As a regression of MDL-55360, it was not possible to create new
workshops if the field "Submission grade to pass" or "Assessment grade
to pass" was left empty. The validation failed with "You must enter a
number here".

The fields submissiongradepass and gradinggradepass are always present
as we explicitly define them in the mod form. So the isset() condition
in the validation was useless and it did not allow to submit the form
with these fields empty.

Additionally, the unformat_float() returns null only if it receives
empty value on the input. Which can't happen in our case so I am
removing this condition to improve the readability of the code.
2016-07-28 09:54:43 +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
Jake Dallimore f747f5a0d5 MDL-51806 mod_workshop: Add locale support for grade values. 2016-05-30 10:25:26 +08:00
David Mudrák 996f7e8228 MDL-50794 workshop: Improve the file type restricting implementation
This is basically a clean up and what I think improved version of the
original Mahmoud's patch.

The actual checking for allowed file extensions has been re-implemented
and is now covered by unit tests. The list of allowed extensions is now
also assed to the filemanager element's accepted_types option to prevent
picking other files (we still need the in-place validation though). The
form validation is simplified a bit. The custom validation of file size
introduced in the previous patch has been removed as not related to this
issue (also I believe it should not be done at this level).
2016-02-25 18:03:18 +01:00
M Kassaei 1a282212c1 MDL-50794 workshop: Allow restricting submitted file types
It was reported at the Open University that there have been some
problems with the formats of files submitted by students. Not all
students completed their outlines as a Word .doc (despite this being the
format of the template provided). Some formats (e.g. .pages) couldn’t be
translated by some of the reviewing students. Therefore, they were
unable to provide a review and the submitting students not receiving any
comments.

This patch allows the teacher to define list of allowed file types that
can be attached to submitted work and/or overall feedback in the
workshop.
2016-02-25 18:03:18 +01:00
Marc Català 90faa6ae9c MDL-50652 workshop: Workshop module allows duplicated ID number 2015-06-25 14:28:10 +02:00
Damyon Wiese 75ece778c5 Merge branch 'MDL-49101' of https://github.com/andrewhancox/moodle
Conflicts:
	lib/db/upgrade.php
	version.php
2015-04-07 17:27:17 +08:00
Andrew Hancox 6398ff5387 MDL-49101 core: Add a global admin setting config->requiremodintro
Removed requiremodintro setting from all core activity plugins and replace
with a single global setting.
Deprecated moodleform_mod::add_intro_editor and replaced with
moodleform_mod::standard_intro_elements
2015-04-07 10:11:53 +01:00
Marina Glancy c977b35059 MDL-13831 grades: allow to set gradepass in mod_form 2015-03-23 11:11:37 +08:00
Gregory Faller 8164fad49d MDL-13831 course: add gradepass field to mod_form 2015-03-23 10:56:56 +08:00
sam marshall 45ab2d9ab6 MDL-44725 Availability: Replace groupmembersonly - workshop (12)
The availability restrictions that apply to user lists (group, grouping)
now apply in workshop:

* In user lists.
* When randomly allocating users (also now works as expected if you use
  group mode and a grouping with the activity).
2014-09-02 13:03:31 +01:00
Sam Hemelryk 5cdcfcb988 MDL-44183 mod_workshop: unified @package use 2014-02-21 08:33:40 +13:00
Damyon Wiese 367b977d4d MDL-39077 max_files does not include current option when it is non-standard
Non-standard means php.ini was set to something not in the default list (like 7MB),
then the config was saved to that specific value, and now the value in php.ini has been changed
again so 7MB does not appear in the list.
2013-05-01 12:40:57 +01:00
David Mudrák 9e31e23d60 MDL-38603 Reorganise Workshop settings form
Example submissions settings moved into a dedicated section.
Self-assessment setting moved to the assessment section. There is no
need for the dedicated Workshop features section any more. All Workshop
feedback settings moved into a dedicated section.

Reorganised grading settings - the grading strategy put into the top
place as it is the essential setting. All other three settings are
related to calculating actual grades.

No advanced setting fields in the Workshop form. Mixing collapsible
sections with advanced fields (that are not even marked as "advanced"
any more) does not work well.

AMOS BEGIN
 CPY [feedback,mod_assign],[feedbacksettings,mod_workshop]
AMOS END
2013-04-18 23:31:35 +02:00
David Mudrák d34ea7dc33 MDL-38603 Deprecate usepeerassessment setting in Workshop
There was a plan to make use of it initially when Workshop was rewritten
for Moodle 2.0. The idea was that the Workshop could be switched into a
simplified mode where teachers only make assessments (with all the
grading strategies available). But things evolved since then and now we
have Advanced grading methods available in the new Assignment module
that solves the use case well. So, having this option available is not
only confusing but - looking at the code - pretty useless.

For now, I am just hiding the setting from the settings form and the
code always considers it as if it was enabled. In the future, the field
can disappear from the database, too.
2013-04-18 23:10:10 +02:00
David Mudrák 1c6b484dab MDL-37602 Overall feedback can be configured in the workshop settings form
Three new fields are added into the into the Assessment settings section
of the form. The default value for the overallfeedbackmaxbytes is the
same as the maximum size for submission attachments (which seems to be a
reasonable value). If there is a demand and a strong use case, these
values can became per-site configurable (I can see no big benefit of
doing so right now).

AMOS BEGIN
 CPY [maxbytes,mod_workshop],[overallfeedbackmaxbytes,mod_workshop]
AMOS END
2013-03-25 13:23:02 +01:00
Damyon Wiese 6b219310cf MDL-37122 core get_max_upload_sizes: Include "Course/Site/Activity limit (X)" in list of options
This change removes the "0 bytes" option from the get_max_upload_sizes list
and replaces it with "Course limit (X)" or "Site limit (X)" (whichever is smaller).
This means we can remove all custom handling in the modules that were removing and
adding these options. It only affects pages that pass valid options for sitelimit and
courselimit - so admin pages will work correctly.

It also orders the list so the course/site limit options will be first
(as it will be the largest).

AMOS START
 REM [courseuploadlimit, core] has been parameterized to get [uploadlimitwithsize, core]
AMOS END
2013-02-07 10:50:52 +08:00
David Mudrák 5a49f825bd MDL-35421 Make the new conclusion field editable via mod_form 2012-11-01 17:36:40 +01:00
Kanika Goyal 67fbfe8b54 MDL-34593: Plagiarism API - add extra plgin param to get_form_elements_module 2012-08-13 20:31:45 +05:30
Kanika Goyal 67ba9007b7 MDL-32227: Plagiarism API - add support for plagiarism api to workshop module 2012-07-24 01:52:54 +05:30
David Mudrak 2fc04a4b9b MDL-26099 fixing the strict standards warning
The signature of mod_workshop_mod_form::validation() is now compatible
with that of moodleform_mod::validation() even though the parent's
declaration sucks. No one can choose their parents.
2012-04-13 14:04:43 +02:00
David Mudrak 3ff0805726 MDL-26099 new workshop DB field phaseswitchassessment
Note that most line changes in the patch are caused by the recent
changes in the XMLDB TEXT fields handling (no size specified now) and by
the change in the indentation.
2012-04-13 04:49:46 +02:00
David Mudrak df558765a4 MDL-26099 validate the phases open dates and deadlines 2012-04-13 04:49:46 +02:00
Aparup Banerjee 728ebac7f2 MDL-28135 general Updating all hardcoded "docs.moodle.org/en/Development:" type doc links to "docs.moodle.org/dev/" 2011-07-05 14:27:31 +08:00
David Mudrak a74cadfa77 MDL-27065 workshop grades categories can be defined in mod_form
Because the Workshop module creates two grade items in the gradebook, we
can't use standard modedit features to set the corresponding category in
the gradebook (it supports single grade item only).

The patch also cleans the mod_form.php so that it does not use the
global $COURSE (just because I do not like this global variable).

And for the record - QuickForms must die.
2011-06-10 16:48:09 +02: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
Petr Skoda b8ea3041eb MDL-23184 activity names are now either PARAM_TEXT or PARAM_CLEANHTML, this should be more accurate 2010-09-02 18:29:39 +00:00
David Mudrak 884482fba1 MDL-19211 workshop uses editors_get_preferred_format() instead of hard coded default formats 2010-07-27 22:30:34 +00:00
David Mudrak 6a0d85aa67 NOMDL Workshop: File API in mod_form fixed 2010-07-19 13:21:55 +00:00
Petr Skoda 64f93798d4 MDL-22950 adding new component column to the files table, unfortunately this change requires changes in all 2.0dev code, please review all custom code that was already upgraded to 2.0; fixing multiple problems and regressions in mod/assignment 2010-07-03 13:37:13 +00:00
David Mudrak e2a81c66eb MDL-22276 Workshop 2.0 help and missing strings fixed 2010-05-02 21:50:09 +00:00
David Mudrak de2f199b8b workshop: datetime submit/assess restriction instead of date only 2010-01-11 10:43:40 +00:00
David Mudrak 0d0b7d99db workshop uses plain checkbox instead of advcheckbox 2010-01-04 18:27:07 +00:00
David Mudrak ec0753e35b Dropping support for scheduled release of grades - it is gradebook's
duty
2010-01-04 18:24:28 +00:00
David Mudrak f6e8b31802 workshop: general cleanup
Moving stuff from lib.php into static methods in localib.php. Removing
things from workshop core that were implemented in a subplugin. Dropping
stuff related to features not to be implemented in 2.0.
2010-01-04 18:22:10 +00:00
David Mudrak b4857acb92 Display real grade values in the grading report 2010-01-04 18:17:47 +00:00
David Mudrak 15d12b54f0 Instructions for reviewers work 2010-01-04 18:07:17 +00:00
David Mudrak 6516b9e9e4 Added instructions for submitting
File API seems to be broken right now so I can't test properly. The new
mod/page code was re-used here.
2010-01-04 18:02:27 +00:00
David Mudrak b398c4c28d Dropping support for Workshop password
Discussed with Petr. Password protection should be sorted out at the
core level (conditionlib maybe).
2010-01-04 17:54:03 +00:00
David Mudrak 74e28b263a Petr's review: Removing assignment by reference 2010-01-04 17:52:45 +00:00
David Mudrak 6405b2549c Assessment dimensions now have unique id which allows to embed media. 2010-01-04 17:49:23 +00:00
David Mudrak 53fad4b90c MDL-19870 Initial work on random allocator
Initial sketches of random allocator. Refactoring of the rest of the
module here and there. Also, this commit removes trailing whitespace and
running empty lines.
2010-01-04 17:47:09 +00:00
David Mudrak 7a02d1f2e5 Removed anonymity and hidegrades
These will be controlled by capabilities, as suggested by Eloy.
2010-01-04 17:45:03 +00:00
David Mudrak 6867e05d88 Adding formal source code conventions 2010-01-04 17:42:27 +00:00
David Mudrak 4eab2e7fbb MDL-17827 workshop: initial check in of the files
Exported from David's git repository
2010-01-04 17:34:08 +00:00