894 Commits

Author SHA1 Message Date
David Mudrak
d20bffa2fd MDL-32714 workshop: fixed SQL to load assessment form fields
Obvious problems emerged once there were some records in the
workshopform_rubric table with no workshopform_rubric_levels. As l.id
(empty in that case) was used as the key of the returned array, they all
were collapsed into a single one.
2012-05-12 10:27:34 +02:00
Ankit Agarwal
3afe75a79c MDL-31902 general: Removing deprecated functions 2012-05-11 10:30:40 +08:00
Frederic Massart
114dd080e1 MDL-32718 Fixed typo in column name 2012-05-08 15:54:11 +08:00
David Mudrak
6c09cb4a64 MDL-32718 fixing an SQL typo in workshop_get_recent_mod_activity() 2012-05-07 10:02:41 +02:00
Dan Poltawski
307621dfce Merge branch 'MDL-32638-workshop-files' of git://github.com/mudrd8mz/moodle 2012-05-02 18:01:40 +08:00
David Mudrak
f08c15685b MDL-32638 fixing the area names and file_browser::get_file_info() API call
These two bug made the file browsing non-working in workshop 2.x
2012-05-02 11:39:30 +02:00
Dan Poltawski
35a1c03448 Merge branch 'MDL-27508-workshop-groups' of git://github.com/mudrd8mz/moodle 2012-05-01 11:16:20 +08:00
David Mudrak
7528e238e0 MDL-32638 workshop_pluginfile() checks for access rights to get the submission files 2012-04-27 14:58:59 +02:00
David Mudrak
92039f1cb4 MDL-32638 fixed capability checks for instructauthors and instructreviewers
The workshop_pluginfile() can't be more restrictive than the code that
actually displays the text with the embedded images. To view both
instructions fields in view.php, the capability to view the workshop is
enough. So the same level of access control is applied here by
require_login() at the top of the function.
2012-04-27 14:56:15 +02:00
David Mudrak
b7a5e3d603 MDL-32638 improved file browser access to submission_content and submission_attachment areas
The user has to have viewallsubmissions capability to be able to see the
submission files in the browser. Additionally, in the separate groups
mode, the user has to have accessallgroups or share at least one group
with the submission author to view their files.
2012-04-27 14:56:14 +02:00
David Mudrak
76966a0058 MDL-32638 fixed workshop file info library comments 2012-04-27 14:56:14 +02:00
David Mudrak
a1df59bea9 MDL-27508 workshop does not use get_users_by_capability() any more
This is a big win, we are now taking enrolment fully into account.
Also, no need to fetch big data from DB just to get their count. Should
have much better performance now.
2012-04-27 14:41:59 +02:00
David Mudrak
74f54102dc MDL-27508 display submission link at the manual allocator page 2012-04-27 14:41:59 +02:00
David Mudrak
25bae250ee MDL-27508 workshop manual allocator supports groups
Pagination support improved, too.
2012-04-27 14:41:59 +02:00
David Mudrak
079219bf07 MDL-27508 introducing workshop::count_participants() 2012-04-27 14:41:59 +02:00
David Mudrak
c90a88bfb7 MDL-27508 improving the docs for workshopallocation_manual_allocations class 2012-04-27 14:41:59 +02:00
David Mudrak
ec1bf0f23d MDL-27508 workshop manual allocator supports configurable page size for items pagination 2012-04-27 14:41:59 +02:00
David Mudrak
dda42a19cd MDL-27508 workshop::prepare_grading_report_data() accepts $groupid
Workshop grades reports in all three last phases were fixed to support
the group selection. They layout of the report has been unified to be
consistent across all phases.
2012-04-27 14:41:59 +02:00
David Mudrak
8741ebb0bd MDL-27508 introducing workshop::get_participants() and workshop::is_participant()
Note how the participant is defined: it is a user that (1) can submit or
assess or both and (2) is actively enrolled in the course. This means
that usually admins or managers won't be considered as workshop
participants, for example.
2012-04-27 14:41:59 +02:00
David Mudrak
11a97e66e8 MDL-27508 workshop supports configurable page size for items pagination 2012-04-27 14:41:59 +02:00
David Mudrak
5547b0dce1 MDL-27508 introducing mod_workshop_renderer::perpage_selector() 2012-04-27 14:41:58 +02:00
David Mudrak
0d2331cce3 MDL-27508 workshop supports pagination at the submissions list in the submission phase 2012-04-27 14:41:58 +02:00
David Mudrak
8a23733753 MDL-27508 common pagination and sorting interface across all phases in view.php 2012-04-27 14:41:58 +02:00
David Mudrak
cd57f558d9 MDL-27508 introducing workshop::count_submissions() and pagination support for get_submissions() 2012-04-27 14:41:58 +02:00
David Mudrak
9326a2aa84 MDL-27508 fixing the description of groups related behaviour of some capabilities 2012-04-27 14:41:58 +02: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
f65bc55fcd MDL-27508 workshop checks separate groups membership when displaying a submission 2012-04-27 14:41:58 +02:00
David Mudrak
a4e848360d MDL-27508 workshop_user_complete() checks group membership in separate groups mode 2012-04-27 14:41:58 +02:00
David Mudrak
1c0c3ef5ee MDL-27508 workshop shows submissions per group in the submission phase 2012-04-27 14:41:58 +02:00
David Mudrak
872ed8591e MDL-27508 workshop::get_submissions() now accepts optional $groupid 2012-04-27 14:41:58 +02:00
David Mudrak
9691e2b10e MDL-27508 workshop::get_users_with_capability_sql() supports groupmembersonly
If the method is called with $groupid set to 0 and the workshop is in
the groupmembersonly mode, a recursive call is used to populate the
fragments of SQL code that fetch users from all relevant groups. These
fragments are then concatenated using UNION statement.
2012-04-27 14:41:58 +02:00
David Mudrak
21f58287d7 MDL-27508 workshop: improved getting of potential authors and reviewers
This patch reimplements get_potential_authors() and get_potential_reviewers()
so that get_enrolled_sql() is used instead of get_users_by_capability().
This excludes non-enrolled users (or users with suspended enrolment)
from the list of potential users.

The patch also extends the returned user structure. Objects in the
returned collection are now suitable for user_picture renderer.
2012-04-27 14:41:58 +02:00
Eloy Lafuente (stronk7)
0529f63373 Merge branch 'MDL-32630-workshop-calendar' of git://github.com/mudrd8mz/moodle 2012-04-26 02:17:00 +02:00
David Mudrak
de7daa8333 MDL-32630 workshop_calendar_update() does not check for calendar permissions
As discussed in MDL-32631, calendar_event::update() should not do
capability checks at all. Until that issue is fixed, we just explicitly
declare that no capability checks should be done.

The function workshop_calendar_update() is executed when adding or
updating a workshop instance (where permissions to modify the instance
were already checked and are sufficient) and in the upgrade code (where
no check should be performed anyway).
2012-04-25 15:35:59 +02:00
Eloy Lafuente (stronk7)
d7f84a2962 Merge branch 'MDL-32471-thumbnails' of git://github.com/mudrd8mz/moodle 2012-04-25 15:14:27 +02:00
David Mudrak
261cbbacc1 MDL-32471 preview thumbnails support for activity modules
Activity module's xxx_pluginfile() now accepts the $options parameter
that is to be passed to the send_stored_file() function.
2012-04-24 12:09:45 +02:00
Petr Skoda
f596005b6c MDL-32569 drop migrated module tests 2012-04-21 16:58:07 +02:00
Dan Poltawski
bb0bd8cb58 Merge branch 'MDL-25660-workshop-calendar' of git://github.com/mudrd8mz/moodle
Conflicts:
	mod/workshop/lang/en/workshop.php
	mod/workshop/version.php
    mod/workshop/db/upgrade.php
2012-04-17 16:31:41 +08:00
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
33d0cb3ce1 MDL-25660 workshop removes its calendar events on instance deletion 2012-04-13 13:10:04 +02:00
David Mudrak
cb48a42ada MDL-25660 recreate all workshop calendar events
Due to complex workshop upgrade path from 1.9 and missing calendar events
support in 2.x, the only safe way to get rid of potentially invalid
calendar events (such as those reported in MDL-26687) is to remove all
current workshop events and recreate them from scratch.
2012-04-13 04:58:10 +02:00
David Mudrak
ac069aeb9d MDL-25660 workshop registers events in the calendar 2012-04-13 04:52:40 +02:00
David Mudrak
9260bb3c48 MDL-26099 workshop can be switched into the assessment phase automatically 2012-04-13 04:49:46 +02:00
David Mudrak
3fe6d62289 MDL-26099 workshop planner tool displays info about the automatic phase switching 2012-04-13 04:49:46 +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
David Mudrak
a80b772864 MDL-32235 scheduled allocation settings form displays the execution status
AMOS BEGIN
 CPY [allocationsettings,workshopallocation_random],[randomallocationsettings,workshopallocation_scheduled]
AMOS END
2012-04-13 04:49:46 +02:00
David Mudrak
2a3aac40e4 MDL-32235 execute scheduled allocation by cron 2012-04-13 04:49:46 +02:00
David Mudrak
782a35e225 MDL-32235 fixing DB schema
Removing the table "scheduled" created by the XMLDB by default (it's a
bug in XMLDB, I'm just too lazy now to fix it). Adding new fields to
hold the result of the most recent execution.
2012-04-13 04:49:46 +02:00
David Mudrak
f6bc60cbe4 MDL-32235 workshop cron support
On every invocation, the workshop will give its subplugins a chance to
to something useful. For now, we know that the scheduled allocator will
use it, no need to load other plugin types yet (until there will be a
real reason for it).
2012-04-13 04:49:46 +02:00