moodle.git
11 years agoMDL-21781 trying to fix context+page title filtering trouble
Petr Skoda [Fri, 23 Apr 2010 10:39:47 +0000 (10:39 +0000)]
MDL-21781 trying to fix context+page title filtering trouble

11 years agoadding new forced upgrade version
Petr Skoda [Fri, 23 Apr 2010 10:36:56 +0000 (10:36 +0000)]
adding new forced upgrade version

11 years agoMDL-22155 useful new method html_writer::nonempty_tag.
Tim Hunt [Fri, 23 Apr 2010 10:34:07 +0000 (10:34 +0000)]
MDL-22155 useful new method html_writer::nonempty_tag.
It outputs a tag only if the contents you pass is non-empty.

Also, unit tests for the basic parts of html_writer.

11 years agorating MDL-21657 updated version of ratings including checks for both new system...
Andrew Davis [Fri, 23 Apr 2010 09:44:19 +0000 (09:44 +0000)]
rating MDL-21657 updated version of ratings including checks for both new system capabilities and old per module capabilities

11 years agoMDL-21781 removing user from cohorts during delete
Petr Skoda [Fri, 23 Apr 2010 09:18:12 +0000 (09:18 +0000)]
MDL-21781 removing user from cohorts during delete

11 years agoMDL-21781 improved cohort table comments
Petr Skoda [Fri, 23 Apr 2010 09:17:24 +0000 (09:17 +0000)]
MDL-21781 improved cohort table comments

11 years agoMDL-21781 fixed cohort access control in groups UI
Petr Skoda [Fri, 23 Apr 2010 09:16:53 +0000 (09:16 +0000)]
MDL-21781 fixed cohort access control in groups UI

11 years agoMDL-21781 fixed coding style
Petr Skoda [Fri, 23 Apr 2010 09:16:18 +0000 (09:16 +0000)]
MDL-21781 fixed coding style

11 years agoMDL-21781 added support for autocreation of groups from cohorts
Petr Skoda [Fri, 23 Apr 2010 09:15:55 +0000 (09:15 +0000)]
MDL-21781 added support for autocreation of groups from cohorts

11 years agoMDL-21781 fixed case
Petr Skoda [Fri, 23 Apr 2010 09:15:27 +0000 (09:15 +0000)]
MDL-21781 fixed case

11 years agoMDL-21781 protect cohorts created by external systesm - we can not edit them with...
Petr Skoda [Fri, 23 Apr 2010 09:15:04 +0000 (09:15 +0000)]
MDL-21781 protect cohorts created by external systesm - we can not edit them with our UIs

11 years agoMDL-21781 move cohorts away when deleting course category
Petr Skoda [Fri, 23 Apr 2010 09:14:36 +0000 (09:14 +0000)]
MDL-21781 move cohorts away when deleting course category

11 years agoMDL-21781 cohorts may be moved to different course categories/system context
Petr Skoda [Fri, 23 Apr 2010 09:13:49 +0000 (09:13 +0000)]
MDL-21781 cohorts may be moved to different course categories/system context

11 years agoMDL-21781 integrating cohorts into UI - admin tree and list of categories in edit...
Petr Skoda [Fri, 23 Apr 2010 09:13:19 +0000 (09:13 +0000)]
MDL-21781 integrating cohorts into UI - admin tree and list of categories in edit mode (there is no other better place which shows all categories imho)

11 years agoMDL-21781 temporary cohort icon
Petr Skoda [Fri, 23 Apr 2010 09:12:28 +0000 (09:12 +0000)]
MDL-21781 temporary cohort icon

11 years agoMDL-21781 fixed some more cohort assign issues
Petr Skoda [Fri, 23 Apr 2010 09:11:48 +0000 (09:11 +0000)]
MDL-21781 fixed some more cohort assign issues

11 years agoMDL-21781 fixed incorrect options in user selectors
Petr Skoda [Fri, 23 Apr 2010 09:11:16 +0000 (09:11 +0000)]
MDL-21781 fixed incorrect options in user selectors

11 years agoMDL-21781 fixed nav bar
Petr Skoda [Fri, 23 Apr 2010 09:10:43 +0000 (09:10 +0000)]
MDL-21781 fixed nav bar

11 years agoMDL-21781 cohort id duplicates detection
Petr Skoda [Fri, 23 Apr 2010 09:10:05 +0000 (09:10 +0000)]
MDL-21781 cohort id duplicates detection

11 years agoMDL-21781 adding cohort as new core subsystem
Petr Skoda [Fri, 23 Apr 2010 09:09:34 +0000 (09:09 +0000)]
MDL-21781 adding cohort as new core subsystem

11 years agoMDL-21781 fixed cap checks
Petr Skoda [Fri, 23 Apr 2010 09:08:37 +0000 (09:08 +0000)]
MDL-21781 fixed cap checks

11 years agoMDL-21781 very basic cohorts UI
Petr Skoda [Fri, 23 Apr 2010 09:07:51 +0000 (09:07 +0000)]
MDL-21781 very basic cohorts UI

11 years agoMDL-21781 cohort main version bump
Petr Skoda [Fri, 23 Apr 2010 09:06:31 +0000 (09:06 +0000)]
MDL-21781 cohort main version bump

11 years agoMDL-21781 cohort capabilities
Petr Skoda [Fri, 23 Apr 2010 09:05:56 +0000 (09:05 +0000)]
MDL-21781 cohort capabilities

11 years agoMDL-21781 cohort tables upgrade code
Petr Skoda [Fri, 23 Apr 2010 09:05:11 +0000 (09:05 +0000)]
MDL-21781 cohort tables upgrade code

11 years agoMDL-21781 cohorts db structure
Petr Skoda [Fri, 23 Apr 2010 09:04:19 +0000 (09:04 +0000)]
MDL-21781 cohorts db structure

11 years agocourse MDL-20628 Fixed up topics so section names are printed on view
Sam Hemelryk [Fri, 23 Apr 2010 08:00:30 +0000 (08:00 +0000)]
course MDL-20628 Fixed up topics so section names are printed on view

11 years agohelp strings MDL-21695 changed _hlp to _help and fixed help.php to format those strin...
Martin Dougiamas [Fri, 23 Apr 2010 07:46:35 +0000 (07:46 +0000)]
help strings MDL-21695 changed _hlp to _help and fixed help.php to format those strings properly

11 years agocourse MDL-20628 Added the ability to name a course section, thanks Michael for the...
Sam Hemelryk [Fri, 23 Apr 2010 07:17:21 +0000 (07:17 +0000)]
course MDL-20628 Added the ability to name a course section, thanks Michael for the initial patch

11 years agoMDL-20487 - improve accessibility issue for survey page layout and string.
Rossiani Wijaya [Fri, 23 Apr 2010 05:58:43 +0000 (05:58 +0000)]
MDL-20487 - improve accessibility issue for survey page layout and string.

11 years agoratings MDL-21657 Improving capabilities for ratings.
Martin Dougiamas [Fri, 23 Apr 2010 05:42:22 +0000 (05:42 +0000)]
ratings MDL-21657 Improving capabilities for ratings.

Rather than performing complicated upgrade procedures from the old (broken) logic in three activity modules, we are adding new capabilities to those three modules to make them all consistent, and using them in a callback from the Ratings API.  This is the same as the Comments API.

The downside is that two sets of capabilities need to be enabled for ratings to work.  Hopefully this can be mitigated somewhat when build some sort of shortcuts on the module settings forms to set capabilities.  In the meantime, the effect is reduced somewhat by having all the rating capabilities enabled by default for student and teacher roles.  This means control is in the hands of whatever the modules have set, giving very close backward compatibility.

This is not the perfect solution, but neither were the other two.

11 years agonavigation MDL-22072 Icons are no longer shown on the navigation bar by default.
Sam Hemelryk [Fri, 23 Apr 2010 04:21:33 +0000 (04:21 +0000)]
navigation MDL-22072 Icons are no longer shown on the navigation bar by default.

11 years agoblog MDL-22161 Fixed minor regression
Sam Hemelryk [Fri, 23 Apr 2010 04:08:28 +0000 (04:08 +0000)]
blog MDL-22161 Fixed minor regression

11 years agoblog MDL-22161 Fixed up blog menu block and added navigation options for users.
Sam Hemelryk [Fri, 23 Apr 2010 04:05:16 +0000 (04:05 +0000)]
blog MDL-22161 Fixed up blog menu block and added navigation options for users.

11 years agoUpdated the HEAD build version to 20100423
Moodle Robot [Fri, 23 Apr 2010 00:41:39 +0000 (00:41 +0000)]
Updated the HEAD build version to 20100423

11 years agoMDL-15252 Fixed regression: timezone name string may not be defined
David Mudrak [Fri, 23 Apr 2010 00:11:54 +0000 (00:11 +0000)]
MDL-15252 Fixed regression: timezone name string may not be defined

11 years agoMDL-21657 Fixing regression - wrong SQL upgrade code
David Mudrak [Thu, 22 Apr 2010 22:30:33 +0000 (22:30 +0000)]
MDL-21657 Fixing regression - wrong SQL upgrade code

Would be nice if core developers actually tried to run the code before
they commit it into the repository.

11 years agoMDL-15252 Fixed regression: XMLDB action using optionally defined strings
David Mudrak [Thu, 22 Apr 2010 21:13:53 +0000 (21:13 +0000)]
MDL-15252 Fixed regression: XMLDB action using optionally defined strings

To prevent debugging warning, we check if the string is defined first.
In this case it does not make sense to add new string for every action
as the title is not actually displayed anywhere.

11 years agoMDL-21694 documenting get_core_subsystem() purpose plus one typo
David Mudrak [Thu, 22 Apr 2010 19:40:22 +0000 (19:40 +0000)]
MDL-21694 documenting get_core_subsystem() purpose plus one typo

11 years agoMDL-22056 More tidying up of pluginnames for course reports, and more component names...
Martin Dougiamas [Thu, 22 Apr 2010 15:54:20 +0000 (15:54 +0000)]
MDL-22056 More tidying up of pluginnames for course reports, and more component names tidying

11 years agoMDL-21695 adding help strings
Helen Foster [Thu, 22 Apr 2010 15:38:54 +0000 (15:38 +0000)]
MDL-21695 adding help strings

11 years agoMDL-15252 Fixing a bug and improving the display of component names (for role assign...
Martin Dougiamas [Thu, 22 Apr 2010 15:37:54 +0000 (15:37 +0000)]
MDL-15252 Fixing a bug and improving the display of component names (for role assign page mostly)

11 years agoFixed some missing strings (for role assign page mostly)
Martin Dougiamas [Thu, 22 Apr 2010 15:32:14 +0000 (15:32 +0000)]
Fixed some missing strings (for role assign page mostly)

11 years agorepository/merlot MDL-20648 Added a missing string for capability
Martin Dougiamas [Thu, 22 Apr 2010 14:44:36 +0000 (14:44 +0000)]
repository/merlot MDL-20648 Added a missing string for capability

11 years agoi have a function removed by mistake
Andreas Grabs [Thu, 22 Apr 2010 12:02:12 +0000 (12:02 +0000)]
i have a function removed by  mistake

11 years agoAssignment MDL-7206 - download all submissions as a zip - finally pushing this into...
Dan Marsden [Thu, 22 Apr 2010 11:33:17 +0000 (11:33 +0000)]
Assignment MDL-7206 - download all submissions as a zip - finally pushing this into head.

11 years agoMDL-21227 - convert Feedback to new files api
Andreas Grabs [Thu, 22 Apr 2010 11:26:02 +0000 (11:26 +0000)]
MDL-21227 - convert Feedback to new files api

11 years agoMDL-21695 adding help strings
Helen Foster [Thu, 22 Apr 2010 09:43:41 +0000 (09:43 +0000)]
MDL-21695 adding help strings

11 years agoSCORM MDL-21555 improved Report interface - now allows export as text/excel/ods...
Dan Marsden [Thu, 22 Apr 2010 09:42:28 +0000 (09:42 +0000)]
SCORM MDL-21555  improved Report interface - now allows export as text/excel/ods - probably could do with some more refactoring/improvement, but this is much better than it was. Thanks to Valerian for the initial patch. (missed lang file)

11 years agoSCORM MDL-21555 improved Report interface - now allows export as text/excel/ods...
Dan Marsden [Thu, 22 Apr 2010 09:41:41 +0000 (09:41 +0000)]
SCORM MDL-21555  improved Report interface - now allows export as text/excel/ods - probably could do with some more refactoring/improvement, but this is much better than it was. Thanks to Valerian for the initial patch.

11 years agoMDL-21694 usin new core_subsystesm() in renderers too; adding more docs
Petr Skoda [Thu, 22 Apr 2010 08:45:36 +0000 (08:45 +0000)]
MDL-21694 usin new core_subsystesm() in renderers too; adding more docs

11 years agoblock-navigation MDL-22044 Level 1 branches are no longer indented, and home/myhome...
Sam Hemelryk [Thu, 22 Apr 2010 07:51:52 +0000 (07:51 +0000)]
block-navigation MDL-22044 Level 1 branches are no longer indented, and home/myhome link is no longer collapsible. Also fixed the everything bold issue

11 years agonavigation MDL-22044 Fixed bug: when not logged in it is now home not my home. Thanks...
Sam Hemelryk [Thu, 22 Apr 2010 07:42:04 +0000 (07:42 +0000)]
navigation MDL-22044 Fixed bug: when not logged in it is now home not my home. Thanks Eloy for spotting

11 years agoworkshop: fixing CSS regressions
David Mudrak [Thu, 22 Apr 2010 06:37:32 +0000 (06:37 +0000)]
workshop: fixing CSS regressions

11 years agoMDL-22160 workshop: fixing parameters order
David Mudrak [Thu, 22 Apr 2010 06:16:25 +0000 (06:16 +0000)]
MDL-22160 workshop: fixing parameters order

11 years agoworkshop: removing "Login as random participant" which was used during development
David Mudrak [Thu, 22 Apr 2010 06:07:34 +0000 (06:07 +0000)]
workshop: removing "Login as random participant" which was used during development

11 years agorating MDL-21657 updated version of ratings including forum and glossary integration
Andrew Davis [Thu, 22 Apr 2010 05:15:23 +0000 (05:15 +0000)]
rating MDL-21657 updated version of ratings including forum and glossary integration

11 years agoblogs MDL-22161 Fixed typo in blog menu block
Sam Hemelryk [Thu, 22 Apr 2010 02:12:53 +0000 (02:12 +0000)]
blogs MDL-22161 Fixed typo in blog menu block

11 years agoblgos MDL-22161 Fixed unknown context bug by setting system context is no valid cours...
Sam Hemelryk [Thu, 22 Apr 2010 01:58:01 +0000 (01:58 +0000)]
blgos MDL-22161 Fixed unknown context bug by setting system context is no valid course is provided in blog/edit

11 years agoweb service MDL-21351 add a bit more information to the exception message when functi...
jerome mouneyrac [Thu, 22 Apr 2010 01:51:24 +0000 (01:51 +0000)]
web service MDL-21351 add a bit more information to the exception message when function implementation is missing

11 years agonavigation MDL-22044 Course format can now choose the string that is used for section...
Sam Hemelryk [Thu, 22 Apr 2010 01:26:45 +0000 (01:26 +0000)]
navigation MDL-22044 Course format can now choose the string that is used for section 0, defaults to general

11 years agoUpdated the HEAD build version to 20100422
Moodle Robot [Thu, 22 Apr 2010 00:41:31 +0000 (00:41 +0000)]
Updated the HEAD build version to 20100422

11 years agoMDL-21695 obsolete help file
Helen Foster [Wed, 21 Apr 2010 20:41:10 +0000 (20:41 +0000)]
MDL-21695 obsolete help file

11 years agoMDL-21695 adding help strings
Helen Foster [Wed, 21 Apr 2010 20:36:53 +0000 (20:36 +0000)]
MDL-21695 adding help strings

11 years agoMDL-21695 obsolete help file
Helen Foster [Wed, 21 Apr 2010 20:11:42 +0000 (20:11 +0000)]
MDL-21695 obsolete help file

11 years agoMDL-21695 adding help strings
Helen Foster [Wed, 21 Apr 2010 18:12:44 +0000 (18:12 +0000)]
MDL-21695 adding help strings

11 years agoMDL-21432 backup - plan builder can have harcoded format
Eloy Lafuente [Wed, 21 Apr 2010 16:41:37 +0000 (16:41 +0000)]
MDL-21432 backup - plan builder can have harcoded format

11 years agoMDL-22076 temptables - warn and dropped on disposal
Eloy Lafuente [Wed, 21 Apr 2010 16:12:27 +0000 (16:12 +0000)]
MDL-22076 temptables - warn and dropped on disposal

11 years agoMDL-21695 help string rewording as suggested by Martin
Helen Foster [Wed, 21 Apr 2010 15:18:51 +0000 (15:18 +0000)]
MDL-21695 help string rewording as suggested by Martin

11 years agoMDL-21432 backup 2.0 - initial commit. Enable forum backup
Eloy Lafuente [Wed, 21 Apr 2010 14:17:11 +0000 (14:17 +0000)]
MDL-21432 backup 2.0 - initial commit. Enable forum backup

11 years agoMDL-21432 backup 2.0 - initial commit. backup DB structures
Eloy Lafuente [Wed, 21 Apr 2010 14:05:12 +0000 (14:05 +0000)]
MDL-21432 backup 2.0 - initial commit. backup DB structures

11 years agorenamed the styles.php in styles.css
Andreas Grabs [Wed, 21 Apr 2010 13:23:19 +0000 (13:23 +0000)]
renamed the styles.php in styles.css

11 years agothe function feedback_print_item() now is splitted into 3 functions
Andreas Grabs [Wed, 21 Apr 2010 11:48:49 +0000 (11:48 +0000)]
the function feedback_print_item() now is splitted into 3 functions
feedback_print_item_preview()
feedback_print_item_complete()
feedback_print_item_show_value()
Now there is more control over the output

11 years agonavigation MDL-22044 Added setting to limit content that is shown on the navigation...
Sam Hemelryk [Wed, 21 Apr 2010 09:44:16 +0000 (09:44 +0000)]
navigation MDL-22044 Added setting to limit content that is shown on the navigation back into the navigation block

11 years agonavigation MDL-22044 Fixed bug preventing module AJAX expansion
Sam Hemelryk [Wed, 21 Apr 2010 09:40:25 +0000 (09:40 +0000)]
navigation MDL-22044 Fixed bug preventing module AJAX expansion

11 years agoNOBUG: Improve vis. of exception params.
Eloy Lafuente [Wed, 21 Apr 2010 09:37:26 +0000 (09:37 +0000)]
NOBUG: Improve vis. of exception params.

11 years agoMDL-21432 backup 2.0 - initial commit. forum moodle2 backup
Eloy Lafuente [Wed, 21 Apr 2010 09:35:30 +0000 (09:35 +0000)]
MDL-21432 backup 2.0 - initial commit. forum moodle2 backup

11 years agoMDL-21432 backup 2.0 - initial commit. blocks custom bits
Eloy Lafuente [Wed, 21 Apr 2010 09:33:31 +0000 (09:33 +0000)]
MDL-21432 backup 2.0 - initial commit. blocks custom bits

11 years agoMDL-21432 backup 2.0 - initial commit. controller
Eloy Lafuente [Wed, 21 Apr 2010 09:26:06 +0000 (09:26 +0000)]
MDL-21432 backup 2.0 - initial commit. controller

11 years agoMDL-21432 backup 2.0 - initial commit. moodle2 format
Eloy Lafuente [Wed, 21 Apr 2010 09:19:30 +0000 (09:19 +0000)]
MDL-21432 backup 2.0 - initial commit. moodle2 format

11 years agoMDL-21432 backup 2.0 - initial commit. util dir
Eloy Lafuente [Wed, 21 Apr 2010 09:17:06 +0000 (09:17 +0000)]
MDL-21432 backup 2.0 - initial commit. util dir

11 years agomod-forum MDL-22114 Enhanced navigation options for forum in regards to subscription.
Sam Hemelryk [Wed, 21 Apr 2010 08:05:03 +0000 (08:05 +0000)]
mod-forum MDL-22114 Enhanced navigation options for forum in regards to subscription.

11 years agouser MDL-20204 Fixed bug with paging bar rendering
Sam Hemelryk [Wed, 21 Apr 2010 07:36:34 +0000 (07:36 +0000)]
user MDL-20204 Fixed bug with paging bar rendering

11 years agonavigation MDL-21350 Implemented trim options for the navigation block, can now set...
Sam Hemelryk [Wed, 21 Apr 2010 07:05:39 +0000 (07:05 +0000)]
navigation MDL-21350 Implemented trim options for the navigation block, can now set trim mode (right/left/center) and trim length

11 years agoassignment/lang MDL-21695 Fixing regression, new help strings contained bare single...
Martin Dougiamas [Wed, 21 Apr 2010 06:48:31 +0000 (06:48 +0000)]
assignment/lang MDL-21695 Fixing regression, new help strings contained bare single quotes

11 years agoweb service MDL-21351 list of selectabl users should not include deleted user
jerome mouneyrac [Wed, 21 Apr 2010 06:30:50 +0000 (06:30 +0000)]
web service MDL-21351 list of selectabl users should not include deleted user

11 years agoMDL-21695 adding help strings
Helen Foster [Wed, 21 Apr 2010 06:05:22 +0000 (06:05 +0000)]
MDL-21695 adding help strings

11 years agothemes MDL-21489 Added support for a legacy theme used with old browsers. Thanks...
Sam Hemelryk [Wed, 21 Apr 2010 04:21:53 +0000 (04:21 +0000)]
themes MDL-21489 Added support for a legacy theme used with old browsers. Thanks Brendan for the patch
Admin can now select a theme for modern browsers and old browsers, the user then sees the modern theme with modern browsers and legacy theme with old browsers. Currenlty IE6 (or less) are considered old browsers.

11 years agoRemoving rubbish screenshot from base
Martin Dougiamas [Wed, 21 Apr 2010 03:00:52 +0000 (03:00 +0000)]
Removing rubbish screenshot from base

11 years agoroles MDL-22126 Fixed up usage of admin/roles/tags.php
Sam Hemelryk [Wed, 21 Apr 2010 02:43:02 +0000 (02:43 +0000)]
roles MDL-22126 Fixed up usage of admin/roles/tags.php

11 years agoUpdated the HEAD build version to 20100421
Moodle Robot [Wed, 21 Apr 2010 00:42:18 +0000 (00:42 +0000)]
Updated the HEAD build version to 20100421

11 years agoMDL-22054 Fixed 'Edit' string in core strings
David Mudrak [Tue, 20 Apr 2010 17:57:12 +0000 (17:57 +0000)]
MDL-22054 Fixed 'Edit' string in core strings

AMOS BEGIN
 CPY [edit,core],[edita,core]
 REM do not forget to drop placeholder from [edit,core] in all languages
AMOS END

11 years agoMDL-20204 Some rewording of designer mode help text
Martin Dougiamas [Tue, 20 Apr 2010 17:07:58 +0000 (17:07 +0000)]
MDL-20204 Some rewording of designer mode help text

11 years agoRemoving an annoying capitalised word from "Theme Selector"!
Martin Dougiamas [Tue, 20 Apr 2010 17:00:42 +0000 (17:00 +0000)]
Removing an annoying capitalised word from "Theme Selector"!

11 years agotheme gui MDL-20204 Don't show the base theme for selection unless in theme designer...
Martin Dougiamas [Tue, 20 Apr 2010 16:58:23 +0000 (16:58 +0000)]
theme gui MDL-20204 Don't show the base theme for selection unless in theme designer mode

11 years agotheme/anomaly MDL-20175 Tidy up screenshot, can be replaced with a better one anytime!
Martin Dougiamas [Tue, 20 Apr 2010 16:52:35 +0000 (16:52 +0000)]
theme/anomaly MDL-20175 Tidy up screenshot, can be replaced with a better one anytime!

11 years agotheme/base MDL-21862 some docs and a default screenshot (also used for base unfortuna...
Martin Dougiamas [Tue, 20 Apr 2010 16:46:49 +0000 (16:46 +0000)]
theme/base MDL-21862 some docs and a default screenshot (also used for base unfortunately)

11 years agotheme/standard MDL-21862 Adding a sample screenshot to show people where they are
Martin Dougiamas [Tue, 20 Apr 2010 16:22:00 +0000 (16:22 +0000)]
theme/standard MDL-21862 Adding a sample screenshot to show people where they are

11 years agotheme/standard MDL-21862 Adding a readme string so themers know how to do it.
Martin Dougiamas [Tue, 20 Apr 2010 16:06:51 +0000 (16:06 +0000)]
theme/standard MDL-21862 Adding a readme string so themers know how to do it.

11 years agoJust adding a temporary screenshot. I assume Patrick will fix later
Martin Dougiamas [Tue, 20 Apr 2010 15:59:00 +0000 (15:59 +0000)]
Just adding a temporary screenshot.  I assume Patrick will fix later