Commit graph

241 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
2db90397f1 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 13:10:01 +02:00
Juan Leyva
dfcabd3b33 MDL-57724 mod_lesson: Move EOL code to lib methods 2017-03-22 17:23:49 +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
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
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
Simey Lameze
6e4b3752f2 MDL-56670 mod_lesson: adds padding to end of lesson links 2016-11-02 13:12:32 +08:00
Adrian Greeve
839b391f74 MDL-56489 Lib: force_settings_menu added to pagelib.
This introduces a flag to force the settings menu
to be displayed on the page if the theme uses a settings
menu. This is for use by activities and resources.
2016-11-01 10:00:12 +08:00
Adrian Greeve
89644a400d MDL-51735 mod_lesson: A lesson with no content shows a message.
Before it would show an error.
2016-07-25 10:48:14 +08:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Dan Poltawski
c3c5e30930 Merge branch 'MDL-51097_m31v1' of https://github.com/sbourget/moodle 2015-12-08 10:34:44 +00:00
Stephen Bourget
83f3ac5207 MDL-51097 Lesson: allow resume from within a cluster 2015-11-18 23:03:42 -05:00
Simey Lameze
541c5b8552 MDL-48109 mod_lesson: prevent CSRF on password protected lesson
This commit add a new session key hidden field on the lesson password form
and confirm if the session key is valid on related pages to prevent CSRF on
password protected lessons.
2015-11-04 18:46:27 +08:00
Mark Nelson
139645d4a7 MDL-50516 mod_lesson: fixed issue with grade not using minquestions
It's possible to reach the end of the lesson, get your result,
click back until you get to the last question, answer it correctly
and then be awarded a result of 100%. This was because the grade
calculation would only include the questions answered, rather than
all of them in the lesson. However, you can not fix this by always
grading by the amount of questions in the lesson as some lessons
bypass certain questions depending on the answer to previous ones.
The minquestion setting can now successfully be used to prevent this
behaviour by rewording the misleading string and adding logic.
2015-09-09 15:27:23 +08:00
Mark Nelson
d60350ddac MDL-50516 mod_lesson: prevented deletion of previous attempts
The 'startlastseen' flag was removing any previous attempts
the user had from the DB. This meant that the user could
simply re-answer the question, regardless of the number
of attempts allowed.
2015-09-09 15:27:23 +08:00
Stephen Bourget
bb685cf3fa MDL-49581 Lesson: Remove broken high score function 2015-07-20 20:06:44 -04:00
Jean-Michel Vedrine
e0e1a83e2c MDL-49642 mod_lesson: Group/user overrides 2015-04-02 13:56:52 +02:00
Jean-Michel Vedrine
c7d1a37bdb MDL-18966 mod_lesson: Save attempts of practice lessons 2015-03-30 12:58:17 +02:00
Jean-Michel Vedrine
4b570f7144 MDL-48715 mod_lesson: completion rules must not be dependent 2015-03-19 12:24:55 +01:00
Jean-Michel Vedrine
10e2355f8c MDL-48715 mod_lesson: use only one field for time spent rule 2015-03-17 20:47:01 +01:00
Jean-Michel Vedrine
d0445cf70d MDL-48715 mod_lesson: add a time spent custom completion rule 2015-03-15 15:24:55 +01:00
Eloy Lafuente (stronk7)
0967a20d02 Merge branch 'MDL-48962' of git://github.com/jmvedrine/moodle 2015-03-04 00:00:16 +01:00
Jean-Michel Vedrine
a1acc00177 MDL-48962 mod-lesson: maxtime should use a duration form element 2015-02-26 10:28:42 +01:00
Stephen Bourget
6695d5947f MDL-34006 Lesson: Resume lesson loads wrong page. 2015-02-25 10:22:41 -05:00
David Monllao
667ef02858 MDL-18553 mod_lesson: Requiring just the grade constants 2015-02-13 10:40:47 +08:00
Jean-Michel Vedrine
49aaac3e6f MDL-18553 Lesson: No gradeinfo display if lesson grade is zero 2015-02-13 10:28:00 +08:00
Jean-Michel Vedrine
59d7a9dc75 MDL-36877 mod_lesson: Fix while MDL-38578 is not solved 2015-01-28 20:54:38 +01:00
Jean-Michel Vedrine
ccf2a054ae MDL-36877 Lesson: final page not displayed if show gradebook set to no 2015-01-25 18:46:00 +01:00
John Okely
02ff22e925 MDL-39103 lesson: Fix lesson administration block
Credit to Joseph Rézeau for the fix
2015-01-06 14:51:53 +08:00
Andrew Nicols
fc8925206e Merge branch 'MDL-20304-master' of git://github.com/danpoltawski/moodle 2015-01-06 10:37:10 +08:00
Jean-Michel Vedrine
25345cb4cd MDL-48244 Lesson: add custom end of lesson reached completion rule 2014-12-21 16:23:49 +01:00
Dan Poltawski
9bb712a047 MDL-20304 lesson: do not display gradebook link when in practice mode
Practice mode means the grades do not go to the gradebook, so do not
display the gradebook link at the end of the lesson
2014-12-17 15:58:31 +00:00
Joseph Rezeau
4627726954 MDL-36673 mod_lesson: slideshow mode not working 2014-12-05 18:42:03 +01:00
Jean-Michel Vedrine
31f386732b MDL-47587 Lesson: Display progress bar on the end of lesson page 2014-11-18 08:49:22 +01:00
Marina Glancy
fbc4b77841 MDL-44321 events: cleaning up course_module_viewed event 2014-02-28 16:36:09 +08:00
Sam Hemelryk
9b24f68bde MDL-41177 mod_lesson: unified @package use 2014-02-16 11:51:23 +13:00
Mark Nelson
00c027c7e3 MDL-40054 mod_lesson: replaced 'end' add_to_log call with an event 2014-01-02 19:52:49 -08:00
Mark Nelson
9c192d812b MDL-40054 mod_lesson: replaced 'start' add_to_log call with an event 2014-01-02 19:52:48 -08:00
Mark Nelson
7edf27c48e MDL-40054 mod_lesson: replaced 'view' add_to_log call with an event 2014-01-02 19:44:32 -08:00
rwijaya
bc8a409c1f MDL-38664 Lesson mod: code improvement for lesson re-attempt page 2013-10-21 13:47:22 +08:00
Joseph Rézeau
b882b8c678 MDL-38664 Lesson mod: fixed re-attempt unseen page 2013-10-21 13:43:05 +08:00
Damyon Wiese
74df2951d1 Revert "MDL-39876 Change get_record('course') calls to get_course"
This reverts commit ab7632b74c.
2013-08-21 13:42:30 +08:00
sam marshall
ab7632b74c MDL-39876 Change get_record('course') calls to get_course 2013-08-15 11:31:20 +01:00
Rossiani Wijaya
ecea65cace MDL-38429 Lesson Module: improve lesson code by reseting NULL value to use lowercase. 2013-03-25 14:07:18 +08:00
Sam Hemelryk
f44e7d0a77 Merge branch 'MDL-36357' of git://github.com/danpoltawski/moodle
Conflicts:
	user/view.php
2013-01-09 09:34:22 +13:00
Rossiani Wijaya
46ac70b24c MDL-36549 Lesson module: fixed strict standards errors 2012-11-21 11:22:23 +08:00
Dan Poltawski
0e35ba6ffc MDL-36357 cleanup - remove double semicolons 2012-11-15 09:51:26 +08:00
Ankit Agarwal
d43d3418ff MDL-35226 lesson: Adding better titles to pages 2012-09-19 17:00:27 +08:00