Commit graph

254 commits

Author SHA1 Message Date
Juan Leyva
0259109fb5 MDL-58415 mod_lesson: Avoid API http redirections
Deep in the lesson API there are some http redirections in special
pages like clusters.
We need to handle it via new parameters to avoid redirections.
2017-04-20 09:58:44 +02:00
Juan Leyva
16ca026c4b MDL-58415 mod_lesson: Force int type for calculated progress
Under some circumstances the value returned by the function needs
casting.
2017-04-20 09:58:44 +02: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
Cameron Ball
8a8bd42528 MDL-57986 mod_lesson: Add action events
Part of MDL-55611 epic.
2017-04-03 11:37: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
David Monllao
9653e19b7e Merge branch 'MDL-57754-master' of git://github.com/jleyva/moodle 2017-03-29 12:37:35 +02:00
Juan Leyva
8c21800470 MDL-57754 mod_lesson: Include missing required file
The constant LESSON_PAGE_BRANCHTABLE requires the page type file.
2017-03-29 11:31:35 +02:00
Juan Leyva
707d50d1c8 MDL-57760 mod_lesson: New WS mod_lesson_get_pages_possible_jumps 2017-03-27 10:47:07 +02:00
Juan Leyva
87e472bd15 MDL-57759 mod_lesson: Handle offline attempts in view and WS
- Notify the user if there are previous offline attempts
- Set the offline attempts and return additional information via Web
Services
2017-03-27 10:41:09 +02:00
Juan Leyva
49e353782f MDL-57757 mod_lesson: Move user report code to function 2017-03-27 10:37:20 +02:00
Juan Leyva
7d5564d959 MDL-57754 mod_lesson: Move overview report code to function
Move the table and statistics generation to a new function
2017-03-27 10:34:44 +02:00
David Monllao
7e448ee5b4 Merge branch 'MDL-57724-master' of git://github.com/jleyva/moodle 2017-03-23 12:47:19 +01:00
Juan Leyva
f3d9512d34 MDL-57724 mod_lesson: Init progress completed by default 2017-03-23 11:47:39 +01:00
David Monllao
b7cc51ca60 Merge branch 'MDL-57724-master' of git://github.com/jleyva/moodle 2017-03-22 21:20:03 +01:00
Juan Leyva
dfcabd3b33 MDL-57724 mod_lesson: Move EOL code to lib methods 2017-03-22 17:23:49 +01:00
David Monllao
ee82b48efc MDL-57696 lesson: Replace old var reference by self 2017-03-22 13:13:06 +01:00
Juan Leyva
e1f88fe7c4 MDL-57696 mod_lesson: New WS mod_lesson_process_page 2017-03-22 10:54:12 +01:00
Juan Leyva
8d6748380c MDL-57696 mod_lesson: Remove redirects from API
In this commit I removed redirects that potentially could break the Web
Services layer.
Instead doing redirect inside APIs I return a special flag that is
properly checked.
2017-03-21 15:51:51 +01:00
Juan Leyva
61b51764b8 MDL-57696 mod_lesson: Move code to lesson methods
Small refactor to avoid duplication in the Web Service
2017-03-21 15:51:50 +01:00
Juan Leyva
66cd7b8ecc MDL-57693 mod_lesson: Refactor to move code to lesson methods
This is a big refactor to avoid code duplication in the new WS.
Basically I’ve moved code from the page and renderer to the lesson
class.
New code is into methods, there are no code functionality changes (just
minor fixes in comments).
2017-03-21 15:48:17 +01:00
Juan Leyva
dbba944e32 MDL-57688 mod_lesson: Move duplicated code to methods
Some code that will be used by Web Services was moved, we created new
methods to avoid code duplication:
- To generate the lesson messages on page view
- To check the time restrictions in a current attempt
2017-03-21 15:18:44 +01:00
Juan Leyva
f4d0909fc0 MDL-57685 mod_lesson: New Web Service mod_lesson_get_pages 2017-03-21 10:53:35 +01:00
Juan Leyva
592c94f3ba MDL-57665 mod_lesson: New method for get timers 2017-03-20 11:18:29 +01:00
Juan Leyva
b584c49d03 MDL-57664 mod_lesson: New lesson method get_content_pages_viewed 2017-03-20 11:16:46 +01:00
Juan Leyva
7d7a2a4ef1 MDL-57645 mod_lesson: Refactor code to move completion to lib
This commit also fix how completion was being set (before the access
restriction checks)
2017-03-16 16:40:24 +01:00
Juan Leyva
37029e468f MDL-57643 mod_lesson: Refactor, move php code to locallib 2017-03-15 11:35:25 +01:00
Eloy Lafuente (stronk7)
edc44ac356 Merge branch 'MDL-57633-master' of git://github.com/jleyva/moodle 2017-02-21 23:45:14 +01:00
John Okely
1abd43763c MDL-57316 media: Setup media plugins in media_manager::instance() 2017-02-07 09:16:01 +08:00
Juan Leyva
4a3391b694 MDL-57633 mod_lesson: Move to function the lesson availability checks
This commit is just about moving code and updating the lesson class to
manage the context and cm.
2017-01-31 17:01:48 +01:00
Adrian Greeve
0a36b931e2 MDL-57366 mod_lesson: Zero now acceptable numeric answer.
When creating a numerical question. If the answer to the
question is 0 then the answer will not save.
2016-12-20 14:01:30 +08:00
Marina Glancy
fab11235d8 MDL-38158 core_media: Convert media players to new plugin type
AMOS BEGIN
  MOV [siteyoutube,core_media],[pluginname,media_youtube]
  MOV [siteyoutube_desc,core_media],[pluginname_help,media_youtube]
  MOV [sitevimeo,core_media],[pluginname,media_vimeo]
  MOV [sitevimeo_desc,core_media],[pluginname_help,media_vimeo]
  MOV [html5audio,core_media],[pluginname,media_html5audio]
  MOV [html5audio_desc,core_media],[pluginname_help,media_html5audio]
  MOV [html5video,core_media],[pluginname,media_html5video]
  MOV [html5video_desc,core_media],[pluginname_help,media_html5video]
  MOV [flashanimation,core_media],[pluginname,media_swf]
  MOV [flashanimation_desc,core_media],[pluginname_help,media_swf]
AMOS END
2016-11-04 17:30:40 +08:00
Damyon Wiese
e584e6ae46 MDL-55071 theme/output: PHPCS fixes for new theme branch
Part of MDL-55071
2016-09-23 10:57:36 +01:00
Damyon Wiese
63e4df60f6 MDL-55839 behat: Behat fixes for theme_noname
This is a squash of many small fixes.
The list of changes are:

Initial set of behat selectors overrides required for new theme.

set core behat selectors if not overridden by theme

Remove pause

Fix for checkboxes not saving properly

Custom override for click in the user menu

Fix for behat guessing the field type.

Behat fix for guessing the correct field type.

Fix for missing closeElementBefore mforms mess.

Fix for textareas not displaying their contents.

Fix availability form element

Fix action menu selectors for activities in a course page

Fix textareas not retaining their values

Fix selector for blocks

I had to change the single select template to use an input instead of a button because of a
behat bug we have not tracked down yet.

Fix for frozen attribute in form elements

Use input instead of button while behat is still broken

Fix for navigation selector override

Behat selector fixes and multi-select fixes for templated select

Fix for configure blocks selector + booleans for autocomplete

Fixes for course_summary behat tests

Allow optgroups in single_select

Behat fixes for block_navigation

Fixes for url form element and activity chooser selectors

blocks_social - fix specific selector for behat

Fix export_for_template for selectgroups element.

Dont set empty id on the form

Fix direct call to behat_navigation in backup context

Checkbox empty value fix

Fix for assign grading panel popouts

file picker overrides to find a file manager in the page

Fix chat tests to use element name

Make selectors in mod_data behat less specific

MDL-55839: recent activity behat test relies on time()

SQUASH Honour mform element "class" attribute on the container

SQUASH Fixes for behat in mod_forum

SQUASH search form template showing value as text next to the button

SQUASH undo double selectgroup fix

SQUASH - The slightly different structure to action menus breaks course drag and drop

SQUASH Wrap loading icon in a span so the selector still works.

SQUASH Fix fragile javascript in report_loglive

SQUASH Fix tabtree, and selectgroups for mod_feedback

Also - do-not enhance the action menu - we are dropping support for this.

SQUASH Fix filemanager selector and pix_icon template for mod_forum tests.

SQUASH Fixes to breadcrumb and add formid to single select (fixes mod_glossary tests)

SQUASH lesson behat fixes. 95% of lesson styles were rubbish so they were disgarded.

SQUASH Fix lti behat tests - they were cheating and using a context step from quiz

SQUASH Behat fixes for quiz with new theme

SQUASH behat fixes for mod_wiki

SQUASH Workshop behat fixes

SQUASH Frozen form elements cannot use a readonly form element because it screws with the form JS "disabledIf" stuff.

SQUASH Fixes for grades behat tests

SQUASH behat fixes for groups

SQUASH blacklist action menu tests

SQUASH Fix for tag form element missing "manage standard tags" link

SQUASH Incomplete fixes for course behat tests

SQUASH behat fixes for badges

SQUASH Tags fixes for behat

SQUASH filepicker fixes for behat

SQUASH Abort guessing field type when we hit 'html'

SQUASH Fix for admin/tool/behat tests

SQUASH fix for admin tool behat tests

SQUASH fix for availabilty conditions hiding "aria-hidden" elements

SQUASH give the blocks more room. We get behat files because nav tree nodes are not in view

SQUASH Blocks fixed

Fix behaviour of unchecked checkboxes

SQUASH Remove incorrect step in user test

SQUASH behat fixes for course tests

Part of MDL-55071
2016-09-23 10:55:16 +01:00
Adrian Greeve
f4eef5fb25 MDL-55327 mod_lesson: Fix for copying essay and match.
Matching and essay questions would display errors when
being duplicated.
2016-09-21 18:04:08 +08:00
Adrian Greeve
9f937c3bb3 MDL-55327 mod_lesson: Added the ability to duplicate pages. 2016-09-20 10:36:13 +08:00
Mark Nelson
0dea8ed76a MDL-50516 mod_lesson: prevented user from repeating question
It was possible in the lesson module for a user to
answer a question, get the result, then click back
in the browser and re-answer it, even if they exceeded
the number of attempts allowed per question.
2015-09-09 15:27:23 +08:00
Jean-Michel Vedrine
297b32905c MDL-50515 mod_lesson: Can't remove content buttons from content page 2015-08-02 09:32:34 +02:00
Stephen Bourget
bb685cf3fa MDL-49581 Lesson: Remove broken high score function 2015-07-20 20:06:44 -04:00
Jean-Michel Vedrine
2107531f3c MDL-34102 mod_lesson: display feedback
Feedback for incorrect answer was not diplayed when
Provide option to try a question again was set to Yes.
2015-05-02 15:01:17 +02:00
Rajesh Taneja
ceeab15019 MDL-49948 lesson: Answer and response format should be known for each form 2015-04-27 14:35:20 +01:00
Jean-Michel Vedrine
247980b0e8 MDL-49642 mod_lesson: Fix issues found during integration review 2015-04-05 15:05:31 +02:00
Jean-Michel Vedrine
e0e1a83e2c MDL-49642 mod_lesson: Group/user overrides 2015-04-02 13:56:52 +02:00
Jean-Michel Vedrine
7e0551fc45 MDL-48880 mod_lesson: clean lesson_branch when a page is deleted 2015-03-29 21:46:05 +02:00
David Monllao
b7bfbfee2c MDL-49470 mod_lesson: Triggering just 1 event 2015-03-25 15:33:07 +08:00
David Monllao
a2be9de182 Merge branch 'MDL-49430_m29v4' of git://github.com/sbourget/moodle
Conflicts:
	mod/lesson/version.php
2015-03-24 13:25:26 +08:00
Stephen Bourget
14cdeb7ba9 MDL-49470 Lesson: Add page moved event
Conflicts:
	mod/lesson/version.php
2015-03-24 11:05:56 +08:00
Mohamed Alsharaf
324954141e MDL-35482 lesson: return to previous page after edit and page save 2015-03-20 12:01:24 +13:00
Jean-Michel Vedrine
4b570f7144 MDL-48715 mod_lesson: completion rules must not be dependent 2015-03-19 12:24:55 +01:00
Stephen Bourget
e0f7b96347 MDL-49430 Lesson: Add restarted and resumed events 2015-03-18 13:30:29 -04:00
Eloy Lafuente (stronk7)
0967a20d02 Merge branch 'MDL-48962' of git://github.com/jmvedrine/moodle 2015-03-04 00:00:16 +01:00