Commit Graph

237 Commits

Author SHA1 Message Date
4bb39eabc7 MDL-66733 grade: Add helper to get correct user date for grade 2019-09-20 09:50: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
18c1fdbb77 MDL-57487 mod_lesson: final deprecation xxx_print_overview 2019-06-14 17:41:18 +02:00
a4606b7efe MDL-39261 mod_lesson: Move essay answer files to new file area
* Moved answers to a different file area
* Added backup and restore calls
* Include privacy/reset related calls similar to essay responses
2019-04-12 07:27:12 +08:00
095d42c297 Merge branch 'MDL-64238-master' of git://github.com/peterRd/moodle 2019-02-11 23:56:44 +01:00
286631e7c0 MDL-64238 mod_quiz: Check enrollment on calendar_action generator
* Updated unit tests to account for participants
2019-02-08 06:40:52 +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
cea8e2763b MDL-64238 mod_lesson: Check enrollment calendar_action generator
* Updated unit tests to account for participants
2019-01-11 07:56:18 +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
57aaa0c423 Merge branch 'MDL-63143-master' of git://github.com/rezaies/moodle 2018-10-04 00:02:21 +02:00
8ce2f61789 MDL-63143 mod_lesson: Check if the module is visible to the user 2018-09-14 20:34:10 +10:00
e56833ca06 MDL-63143 mod_lesson: Add userid param to mod_lesson calendar callbacks 2018-09-14 20:34:00 +10: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
f077e0af7e MDL-60057 mod_lesson: add calendar drag and drop callbacks
AMOS BEGIN
        CPY [openafterclose,mod_choice],[openafterclose,mod_lesson]
	CPY [closebeforeopen,mod_choice],[closebeforeopen,mod_database]
	CPY [openafterclose,mod_choice],[openafterclose,mod_database]
AMOS END
2017-12-11 14:29:16 +08:00
fac5051624 MDL-60072 mod_lesson: Add missing name attribute 2017-10-20 11:43:15 +08:00
f10721d6b9 MDL-60072 mod: Fix bad event naming 2017-10-16 14:47:09 +08:00
db208667a3 Merge branch 'MDL-59532-master' of git://github.com/jleyva/moodle 2017-08-07 09:42:08 +02:00
0d14fcbc60 MDL-9367 restore: Roll only configuration dates
It was decided to roll only configuration dates and any date related to user content
such as 'timecreated' , 'timemodified' etc should not be rolled forward.
2017-08-01 10:46:37 +05:30
56da66adb6 MDL-59532 mod_lesson: Fix check_updates_since with groups
There were a couple of incorrect SQL queries when the user calling the
function is a teacher and the activity uses separate groups.
2017-07-13 16:18:57 +01: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
8dada7e334 MDL-58777 mod_lesson: Explicitly sort records and set event priority
The lesson 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
e6c0e75ed8 Merge branch 'wip-MDL-58731-master' of git://github.com/marinaglancy/moodle 2017-04-28 10:29:50 +08:00
438c01d0dd MDL-58731 modules: display intro on the course page
something that was forgotten when adding _get_coursemodule_info to activities in MDL-58190
2017-04-28 09:14:25 +08:00
756a132ff6 MDL-58578 mod_lesson: Correctly provide group override priorities
Previously the override priorities were being provided
back to front.
2017-04-27 15:15:12 +08:00
23e5104ae2 MDL-58666 course: add module name to cache
without it there will be an extra db read in get_array_of_activities() to retrieve it for each activity
2017-04-21 13:00:28 +08:00
cdfcfb1f8c Merge branch 'MDL-58498-master' of git://github.com/ryanwyllie/moodle 2017-04-20 07:44:56 +01: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
bfc8fbea97 MDL-58498 mod_lesson: no action after lesson submission
Update the action event callback to not provide an action for the user
if they have already attempted the lesson.
2017-04-11 03:26:08 +00: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
e1cd93ce20 MDL-58423 core_calendar: moved \core_calendar\event class
Part of MDL-55611 epic.
2017-04-04 11:01:49 +01:00
aa1cdff5f6 MDL-58087 mod_lesson: Apply overrides in event action callback
Part of MDL-55611 epic.
2017-04-04 11:01:39 +01:00
8a8bd42528 MDL-57986 mod_lesson: Add action events
Part of MDL-55611 epic.
2017-04-03 11:37: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
635721f5c1 MDL-57762 mod_lesson: Implement the check_updates callback 2017-03-27 10:51:42 +02:00
5d8d3a8ce2 Merge branch 'MDL-57657-master' of git://github.com/jleyva/moodle 2017-03-20 07:24:54 +00:00
2b931458ad MDL-40759 plugins: Add font icon mapping to all plugins 2017-03-17 15:51:29 +08:00
78dbb42c80 MDL-57657 mod_lesson: New WS mod_lesson_get_user_grade 2017-03-16 16:45:01 +01:00
4e0cad1cbd Merge branch 'MDL-58123-master' of git://github.com/junpataleta/moodle 2017-03-10 18:03:53 +00:00
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
efe2497623 MDL-55956 mod: New function *_get_group_override_priorities()
New module functions quiz_get_group_override_priorities() and
lesson_get_group_override_priorities() to calculate the priorities
of group overrides for a quiz/lesson activity.
2017-03-06 16:10:54 +08:00
2b9d97406f MDL-58123 mod_lesson: Fix lesson table name in refresh_events DB query 2017-03-02 10:54:49 +08:00
9ff8cdd971 MDL-55883 mod_lesson: Missing include in lesson_update_events 2016-10-26 21:22:01 -04:00