Commit Graph

137 Commits

Author SHA1 Message Date
c0375ba73f MDL-66369 libraries: Remove [modname]_scale_used functions
These functions were only used by the deprecated function
which was deprecated in 3.1, and removed in 3.6.
2019-08-16 11:56:17 +08:00
96e444665e MDL-65517 block_timeline: Hide completed course modules in Timeline
When some activities are manually completed by students, some are still showing in students' timeline.
This commit fix that for module assign,chat,choice,feedback,lesson,quiz,scorm and workshop.
2019-07-12 09:16:40 +10:00
375e2ecea0 MDL-57487 mod_assign: final deprecation xxx_print_overview
Apart from deprecating assign_print_overview , the following methods
have been also deprecated because they are not used anymore:
- assign_get_mysubmission_details_for_print_overview
- assign_get_grade_details_for_print_overview
2019-06-14 17:41:18 +02:00
c3781ebeb3 MDL-64879 mod_assign: deprecate legacy assign_cron() function 2019-02-26 11:25:58 +08:00
f5d1dbb37f MDL-62893 mod: Grade visibility bug in the Outline/Complete reports
Grades that have been hidden will appear in the outline/complete
report - even if the user is a student.

The modules that have been fixed are:
* mod_assign
* mod_data
* mod_forum
* mod_glossary
* mod_lesson
* mod_scorm
* mod_workshop
2019-02-05 20:01:32 +10:30
064f15033f MDL-60474 assign: Consistent user filters
Use the current filters and sorting on the user grading table in the single
page grading app when it is possible.

This replaces the popover used to configure the filters to one that closely matches the
one from the grading table. It supports standard filters, workflow filters and allocated marker filters.

It will also support group filtering and suspended user filtering but we don't show the controls for those in
the single grading page.
2018-12-19 10:10:23 +08:00
939218c2b6 MDL-46783 permissions: let some moodle/ caps be overriden in all mods
The capabilities changed ('contextlevel' => CONTEXT_COURSE changed to
'contextlevel' => CONTEXT_MODULE) are:

* moodle/site:accessallgroups
* moodle/site:viewfullnames
* moodle/site:trustcontent
* moodle/site:viewuseridentity

This list came from reviewing the _get_extra_capabilities functions in
all core activities. They were all somewhat inconsistent, but I think it
makes sense that these capabilities are consistently overridable in all
activities. E.g. moodle/site:accessallgroups affects conditional
availability even if there is no other user of groups, and
moodle/site:viewuseridentity and moodle/site:viewfullnames affect the
logs report, if nothing else.

As a result of this, several _get_extra_capabilities functions are no
longer needed, and all the rest have been simplified.
2018-12-05 16:44:25 +00:00
bd5fdcfccd MDL-63422 general: review core loop / switch / case / continue
This commit reviews all continue uses in core happening within a
loop / switch / case hierarchy. This does not cover:

- Changes to libraries. Will be handled in another issue / commit.
- Uses out from loops, will be reviewed by other commit.

The policy followed has been:
- When possible, take rid of the continue.
- When clearly the intention was to jump to next element in loop
  change to continue 2
- When it was not clear, keep old behavior switching to break, no
  matter how weird the behavior may be.
2018-10-31 00:17:59 +01:00
bbf1fde412 MDL-62944 activities: Activities should not require capability
Activities should not require the user manipulating them to have
calendar capabilities for their events to be added to the Moodle
calendar
2018-08-31 10:15:37 +01:00
521ebb76b0 Merge branch 'MDL-61870-master' of git://github.com/damyon/moodle 2018-08-07 23:48:31 +02:00
8ea4df50c9 MDL-61870 mod_assign: Fix/clean up imported group override duedates
Applying patch supplied from Damyon Wiese to address the root-cause
of this issue in the backup/restore logic.
2018-08-02 12:55:13 +08:00
6bcc6f877a MDL-61870 mod_assign: Fix/clean up imported group override duedates
- Prevent group override duedate events from being imported when groups are excluded
- Clean up any existing group override duedate events when editing assignment in upgradelib.php
- Updated lib.php unit tests
2018-08-02 12:55:12 +08:00
fda4374a67 MDL-58768 mod_assign: Added userid param to calendar callbacks
The mod_assign_core_calendar_is_event_visible and mod_assign_core_calendar_provide_event_action
functions now accept a new parameter ($userid) so they are not always dependet to the logged in user.
2018-07-28 07:51:33 +10:00
6688ae2ba2 MDL-60062 calendar: prevent drag and drop of override events 2017-11-07 05:47:18 +00:00
478b1d194f MDL-60062 calendar: remove validate_event_timestart callback 2017-11-07 01:25:33 +00:00
dbe537fb50 MDL-60058 assign: add missing locallib require_once calls 2017-10-17 03:04:47 +00:00
7ec6d873e1 MDL-60058 assign: stop teacher from seeing due date event on dashboard
Thanks to Damyon Wiese for the patch.
2017-10-13 06:38:03 +00:00
028fa14436 MDL-60058 assign: Updating gradingduedate on drag/drop 2017-10-13 06:38:02 +00:00
f4c2156189 MDL-60058 assign: allow update of assign calendar action events 2017-10-13 06:18:43 +00:00
4c1145009a MDL-60058 assign: show due date calendar event for teachers 2017-10-10 03:51:18 +00:00
e04be435e0 MDL-56646 assign: Don't rescale any negative grades 2017-08-28 06:58:43 +00:00
9ffbdafc95 MDL-59287 calendar_events: Update modules to create all events.
All events equals all calendar events including completion events.
2017-07-10 09:40:02 +08:00
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
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
7f53e8aa22 MDL-58267 completion: allow to set default activity completion
Part of MDL-58138 epic
2017-04-19 08:54:35 +08:00
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
6a346ab440 Merge branch 'MDL-58507_master' of git://github.com/markn86/moodle 2017-04-17 10:42:48 +01:00
59391e80ad MDL-58501 mod_*: improved docs for new calendar callbacks 2017-04-12 17:43:52 +08:00
063b7ee647 MDL-58507 core: link functions with final deprecation issue 2017-04-12 12:38:51 +08:00
23605e9fbc Merge branch 'MDL-58504_master' of git://github.com/markn86/moodle 2017-04-11 08:57:30 +08:00
ad6478225b Merge branch 'MDL-57858-master' of git://github.com/pavelsokolov/moodle 2017-04-10 14:14:59 +02:00
01f96180ff MDL-58504 mod_*: fixed PHPDoc return type for *_provide_event_action 2017-04-06 15:00:02 +08:00
1e4e5c52d7 Merge branch 'MDL-55611-master' of git://github.com/danpoltawski/moodle 2017-04-04 17:07:41 +01:00
3651c22b75 MDL-57607 mod_assign: Make assign_refresh_events refresh overrides
Part of MDL-55611 epic.
2017-04-04 11:01:54 +01:00
e1cd93ce20 MDL-58423 core_calendar: moved \core_calendar\event class
Part of MDL-55611 epic.
2017-04-04 11:01:49 +01:00
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
a82becaa25 MDL-58087 mod_assign: Apply overrides in event action callback
Part of MDL-55611 epic.
2017-04-04 11:01:39 +01:00
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
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
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
294dce6764 MDL-57730 mod_assign: added action events
Part of MDL-55611 epic.
2017-04-03 11:36:33 +08:00
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
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
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
e9dfeec94e MDL-57434 core: deprecated xxx_print_overview() and related functions
Part of MDL-55611 epic.
2017-04-03 11:33:55 +08:00
0a34838725 MDL-57411 course: Return modules updates for teachers 2017-04-01 19:39:02 +02:00
7d77fb1421 Merge branch 'MDL-58255-master' of git://github.com/junpataleta/moodle 2017-03-20 13:08:54 +00:00
32ad5c86ae MDL-57858 mod_assign: fix submissions count for assign with scales 2017-03-17 18:28:43 +03:00
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
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