115 Commits

Author SHA1 Message Date
Cameron Ball
56d1ddd775
MDL-58777 mod_assign: Explicitly sort records and set event priority
The assign update events code depends on the "old" events in the
DB being returned in the same order as they were originally made,
however there was no guarantee that this would be the case.

There were also situations where the priority would not be explicitly
set (e.g., when creating the "original" event).
2017-05-10 13:41:18 +08:00
Cameron Ball
30aa540fe7
MDL-58578 mod_assign: Correctly update user override priority
Since we now sort priority in ASC order, the top priority should be 0.
2017-04-27 15:15:12 +08:00
Marina Glancy
7f53e8aa22 MDL-58267 completion: allow to set default activity completion
Part of MDL-58138 epic
2017-04-19 08:54:35 +08:00
Jake Dallimore
b54bcddda4 MDL-58190 completion: callbacks to get completion rule descriptions
- Activities can have their custom completion rules added to cm_info
through the get_coursemodule_info callback.
- Descriptions of a modules active completion rules can be fetched using
the component callback mod_xxx_get_completion_active_rule_descriptions
which takes in a cm_info object and returns an array of strings.

Part of MDL-58138 epic
2017-04-19 08:52:57 +08:00
Dan Poltawski
6a346ab440 Merge branch 'MDL-58507_master' of git://github.com/markn86/moodle 2017-04-17 10:42:48 +01:00
Mark Nelson
59391e80ad MDL-58501 mod_*: improved docs for new calendar callbacks 2017-04-12 17:43:52 +08:00
Mark Nelson
063b7ee647 MDL-58507 core: link functions with final deprecation issue 2017-04-12 12:38:51 +08:00
Andrew Nicols
23605e9fbc Merge branch 'MDL-58504_master' of git://github.com/markn86/moodle 2017-04-11 08:57:30 +08:00
David Monllao
ad6478225b Merge branch 'MDL-57858-master' of git://github.com/pavelsokolov/moodle 2017-04-10 14:14:59 +02:00
Mark Nelson
01f96180ff MDL-58504 mod_*: fixed PHPDoc return type for *_provide_event_action 2017-04-06 15:00:02 +08:00
Dan Poltawski
1e4e5c52d7 Merge branch 'MDL-55611-master' of git://github.com/danpoltawski/moodle 2017-04-04 17:07:41 +01:00
Jun Pataleta
3651c22b75 MDL-57607 mod_assign: Make assign_refresh_events refresh overrides
Part of MDL-55611 epic.
2017-04-04 11:01:54 +01:00
Mark Nelson
e1cd93ce20 MDL-58423 core_calendar: moved \core_calendar\event class
Part of MDL-55611 epic.
2017-04-04 11:01:49 +01:00
Mark Nelson
1054c6f879 MDL-58188 mod_assign: added missing require_once and updated docs
The only reason the exclusion of require_once was not exploding before
is because the call to provider_event_action() was being triggered first
which required the file. We can't rely on this happening all the time.

The doc update describes when the usage of is_event_visible() is appropriate.

Part of MDL-55611 epic.
2017-04-04 11:01:45 +01:00
Cameron Ball
a82becaa25 MDL-58087 mod_assign: Apply overrides in event action callback
Part of MDL-55611 epic.
2017-04-04 11:01:39 +01:00
Andrew Nicols
d846cb244d MDL-58337 mod_assign: Do not show submitted assignments in dashboard
Part of MDL-55611 epic.
2017-04-03 11:37:09 +08:00
Jun Pataleta
fb36d8dd2c MDL-58048 mod: New callback implementation
* Callback function implementation of
<modname>_core_calendar_event_action_shows_item_count for:
 - mod_assign
 - mod_forum

Part of MDL-55611 epic.
2017-04-03 11:37:06 +08:00
Jun Pataleta
c7d75292f0 MDL-58240 mod_assign: Only use due for assign override event types
Part of MDL-55611 epic.
2017-04-03 11:37:06 +08:00
Mark Nelson
294dce6764 MDL-57730 mod_assign: added action events
Part of MDL-55611 epic.
2017-04-03 11:36:33 +08:00
Cameron Ball
aa457b7dee MDL-57730 core_calendar: Action interface aware of actionability
We need a way to decide whether an action can currently be completed
(e.g., an assignment where submissions are not yet open can not
be actioned, even though it may be displayed on the upcomming events
list).

To do this, the action interface now contains an is_actionable method.

Part of MDL-55611 epic.
2017-04-03 11:36:33 +08:00
Cameron Ball
5ca71c2dc3 MDL-57442 core_calendar: Allow course modules to create actions for events
Course modules can now implement the function mod_{module}_core_calendar_provide_event_action
which allows them to return an action to attach to an event.

Part of MDL-55611 epic.
2017-04-03 11:36:07 +08:00
Mark Nelson
e057f279e4 MDL-57497 core_calendar: added new calendar event class
Moved calendar_event class to new location using replaceclasses.php

Part of MDL-55611 epic.
2017-04-03 11:33:55 +08:00
Mark Nelson
e9dfeec94e MDL-57434 core: deprecated xxx_print_overview() and related functions
Part of MDL-55611 epic.
2017-04-03 11:33:55 +08:00
Juan Leyva
0a34838725 MDL-57411 course: Return modules updates for teachers 2017-04-01 19:39:02 +02:00
Dan Poltawski
7d77fb1421 Merge branch 'MDL-58255-master' of git://github.com/junpataleta/moodle 2017-03-20 13:08:54 +00:00
Pavel Sokolov
32ad5c86ae MDL-57858 mod_assign: fix submissions count for assign with scales 2017-03-17 18:28:43 +03:00
Damyon Wiese
3e6adcd69c MDL-40759 icons: Rename activity_icon
image_icon is a better name because there are some valid uses for these other than for activity icons.

E.g. Old JS code that is not worth re-writing.
2017-03-17 15:52:18 +08:00
Damyon Wiese
663640f5b3 MDL-40759 icons: convert uses of pix_url to pix_icon
Also change filepicker to use scaled svgs instead of sets of custom pngs. The svgs are taken from font-awesome.
2017-03-17 15:52:17 +08:00
Jun Pataleta
f3ec5411b0 MDL-58255 mod_assign: Fix usage of assign object for overrides
* Fix the parameters being passed for the assign constructor.
* Use assign::get_instance() instead of assign::get_context() to fetch
the assignment instance's properties.
2017-03-17 09:33:00 +08:00
Jun Pataleta
f7a9bca847 MDL-55956 mod_assign: Remove calendar events with 'open' eventtype
Remove creation of calendar events for mod_assign with
eventtype = 'open'. Since mod_assign instance creation only creates a
calendar event for the due date, there's no point in creating an override
event for an event type that does not exist.
2017-03-07 11:33:17 +08:00
Jun Pataleta
98239b2df8 MDL-55956 mod: Set event priority for activity overrides
Set the event priority of the following activity overrides:
* mod_assign
* mod_lesson
* mod_quiz
Always create separate events for start and end dates of activities.
2017-03-07 11:33:13 +08:00
Mike Churchward
559cfa03f4 MDL-36233 mod_assign: fixed submission time comparison sql and test. 2017-01-30 09:06:55 +08:00
Henning Bostelmann
5c4bd8f4e8 MDL-56566 mod_assign: ignore "doanything" in course overview
Do not count site admin "doanything" capability for determining
what should be shown in the course overview for assignments.
2016-12-08 19:53:37 +00:00
David Monllao
cf4019cf40 Merge branch 'MDL-29795_master' of https://github.com/dmonllao/moodle 2016-11-07 09:20:59 +08:00
Juan Leyva
65b2669d98 MDL-56307 course: Return time updated and times updated 2016-10-25 10:10:55 +01:00
Juan Leyva
02a73d767c MDL-56307 course: New course_check_module_updates_since method 2016-10-25 10:10:52 +01:00
Ilya Tregubov
d685b95935 MDL-29795 mod_assign: Add user/group override assignment module 2016-10-24 11:03:49 +01:00
Juan Leyva
6492401d1c MDL-56307 mod: Add missing FEATURE_COMMENT in modules 2016-10-21 09:21:28 +01:00
Andrew Nicols
5e171c6986 MDL-54873 assign: Seed recordid to print_recent_activity 2016-08-30 11:57:57 +08:00
Steve Bader
9569b01cc9 MDL-49852 mod_assign: Fix group assignment completion tracking
Fixes completion tracking for group assignments where either only
one student is required to click Submit when submitting the
assignment for grading, all students are required to submit,
or no students are required to click submit (meaning that simply
uploading submits for grading).
2016-05-26 16:03:03 +08:00
Damyon Wiese
bb690849c9 MDL-52954 assign: Rebuild the assignment single grade page. 2016-03-30 13:47:21 +08:00
Damyon Wiese
d629c601c5 MDL-48634 grades: Add an option to rescale when changing the maxgrade 2016-02-05 18:20:17 +08:00
Jun Pataleta
418a0d0465 MDL-43594 mod_assign: Fix calendar update on course reset
This patch fixes the updating of calendar events when the course
is reset and its start date is changed.
2015-09-29 13:46:27 +08:00
Tim Lock
d89dc6daa5 MDL-42670 mod_assign: Fix recent activity block when blind marking is on 2015-09-07 22:41:41 +02:00
Damyon Wiese
5ce0f749a6 MDL-46078 Assign: Completion is not using assignment API.
Should not be directly querying the DB to get the submission, use the API!
2015-07-28 10:19:59 +08:00
David Monllao
608132d7e4 MDL-47172 print_overview: Fixing indentation 2015-02-16 09:38:05 +08:00
Ankit Agarwal
a7366bc858 MDL-47172 print_overview: Show assignments only when needed
The intended behaviour is not to display this notification when:-
1) The assignment is closed.
2) User is a student and has a valid submission in place.
3) User is a teacher and there is nothing to grade.

Beisdes the above changes the patch also includes minor other fixes such as:-
1) Fixed phpdocs
2) Fixed inconsistent return value.
3) Fixed unit tests that had arguments in wrong order.
2015-02-13 11:12:12 +05:30
Mark Nelson
bd3ee80716 MDL-46498 mod_assign: display correct grading status 2014-12-23 23:46:22 -08:00
Zachary Durber
8c1050f87d MDL-47694 mod_assign: Grades require a grade to show as graded
Special thanks to Howard Miller.
2014-12-09 15:55:29 +08:00
Damyon Wiese
9e035dae1b MDL-47655 assign: Treat 'new' status as never submitted.
This fixes the recent activity callbacks to ignore submissions with a 'new' status.

The unit tests for recent activity were modified, because they were relying on the old behaviour of 'submitted' being the default status.

AMOS BEGIN
     CPY [submissionstatus_,mod_assign],[submissionstatus_new,mod_assign]
AMOS END
2014-10-16 13:56:07 +08:00