Compare commits

..

848 Commits

Author SHA1 Message Date
moodler a3159a7685 OK, this is IT. 2004-05-25 01:51:01 +00:00
mits 3dc778ef6e translated some. 2004-05-24 23:56:48 +00:00
anvergara db3aae5f42 questiontypes.html added to cvs for the first time. 2004-05-24 22:49:48 +00:00
martignoni 096f061e53 Date updated 2004-05-24 21:17:38 +00:00
koenr bf905b360b filling in missing strings... 2004-05-24 21:16:14 +00:00
martignoni 3f72b15446 New file translated 2004-05-24 21:15:36 +00:00
martignoni efc1faa21e Added two configuration variables to the config page: configextendedusernamechars and forceloginforprofiles 2004-05-24 21:14:04 +00:00
stronk7 fc7b0911f2 Changed to single quotes... :-) 2004-05-24 18:14:55 +00:00
stronk7 e8bce1c806 Cambiado a comillas sencillas...:-) 2004-05-24 18:12:59 +00:00
stronk7 f7e7a51a6b Traduccion para el filtro activitynames. Incluido por Eloy para que
salga en la 1.3. en unas horitas...
2004-05-24 18:06:58 +00:00
moodler 19f671d373 Fixed quotes in titles ... well nearly. 2004-05-24 17:58:46 +00:00
stronk7 341d554fdb Avoid linking to labels and to hidden activities... 2004-05-24 17:43:11 +00:00
stronk7 45a1ad99a2 Allow every activity name in texts to be linked to the
original activity.
Bug 1454.
(http://moodle.org/bugs/bug.php?op=show&bugid=1454)
2004-05-24 17:30:56 +00:00
moodler a55cf56f1b Some updates 2004-05-24 17:28:07 +00:00
moodler 0612f40d51 Fixed some short tags ... see bug 1376 2004-05-24 16:18:40 +00:00
bobopinna e991f7a80e First release of old release doc 2004-05-24 15:03:00 +00:00
defacer d56d4e230f Some speed improvements for the calendar month blocks. 2004-05-24 14:45:02 +00:00
defacer 43db620d22 Fixed stupid bug I put in a couple of hours ago. 2004-05-24 14:25:04 +00:00
defacer c3553a553f Small bugfix: when entering the calendar with "on-the-fly" login, the breadcrumbs
now display correctly. Even though there isn't normally any link that allows you
to do this.
2004-05-24 14:20:32 +00:00
koenr 258388f55a initial translation by Hans de Zwart 2004-05-24 13:56:51 +00:00
bobopinna 066cb9ee62 Updated to Moodle 1.3 final release 2004-05-24 13:45:47 +00:00
bobopinna c08e138afb Updated to Moodle 1.3 release 2004-05-24 13:32:45 +00:00
defacer 11b0ffe898 Adding event from day view defaults to that day for event start. 2004-05-24 12:28:38 +00:00
defacer 0d5d9de2ba Fixed a bug just introduced before in the event type selection screen. 2004-05-24 12:23:08 +00:00
defacer eb15f829b6 The filters are back with a vengeance in event.php! Coupled with the breadcrumb
course mirroring, everything works like a charm now! :-)
2004-05-24 12:12:41 +00:00
barias 94ab38a771 Latest updates 2004-05-24 12:08:47 +00:00
defacer 3756ef3d48 The course link in the breadcrumbs now mirrors the active course filter. 2004-05-24 11:40:34 +00:00
defacer 8ccc9d060f The way this was written before, it produced a warning for unregistered extensions. 2004-05-24 11:16:06 +00:00
defacer 2ef75eee2f Fixed a couple of warnings which happened if you accessed a course while
not being logged in, during the redirection to login screen.
2004-05-24 11:10:00 +00:00
defacer 2727648d55 Gotcha! The event time in day view didn't respect the user's time format
preference. Now it does.
2004-05-24 10:54:52 +00:00
defacer fbb56b9db7 Fixed a bug where editing an event did display the "duration in minutes"
stuff, but totally ignored it when submitting changes. Also, fixed one
warning in the "minutes" field.
2004-05-24 10:49:01 +00:00
barias 5e2b88c23b Latest updates 2004-05-24 10:46:42 +00:00
defacer a2e1ee6d92 Bump 2004-05-24 10:38:16 +00:00
defacer c635dcda6c Fix for bug 1451:
Now when moving to a calendar screen (technically, view.php) from a course
block, the course drop down list defaults to that course. The implementation
is OK, but I may change it (there is a faster way).
2004-05-24 10:35:43 +00:00
defacer e9584ca3e2 Fix for bug 1453:
Automatic "Re:" prefixes in forum replies now don't get chained in languages
where the "re:" string has length != 3.
2004-05-24 10:04:59 +00:00
adamtpaw cf800c27a1 First translation of calendar module. 2004-05-24 09:54:13 +00:00
defacer 40448bc24d Removed some notices with uninitialized variables when adding a new event. 2004-05-24 09:52:57 +00:00
defacer 227bc46b51 Preliminary fix for bug 1451 (needs some more work).
Also a couple of notices removed.
2004-05-24 09:20:01 +00:00
moodler cdac797c5d Moodle will look for language files within modules as a last resort.
eg   moodle/mod/somemodule/lang/en/somemodule.php
2004-05-24 09:19:59 +00:00
moodler 205e53357c Tweaks 2004-05-24 09:00:59 +00:00
bobopinna 1e9f32fb6d First translation release 2004-05-24 09:00:18 +00:00
moodler 760bbc7926 Indonesian for Moodle 1.2 2004-05-24 08:51:20 +00:00
bobopinna e3cc5d31fb Added no user data backup 2004-05-24 08:43:29 +00:00
bobopinna 8b8c350ae4 Translated by Andrea Bicciolo 2004-05-24 08:31:19 +00:00
moodler 5ec98a94c3 Latest settings in config-dist.php (removed some) 2004-05-24 07:43:09 +00:00
moodler c72a2ab824 Added two configuration variables to the config page.
configextendedusernamechars

   forceloginforprofiles

These were already in the config-dist.php
2004-05-24 07:39:54 +00:00
moodler a7b44978a3 Changed the default default blocks so that calendar block is not shown
(for CPU issues) and upcoming_events is now shown on the right between
news and recent activity

The default blocks can be overridden by a setting in config.php

   $CFG->defaultblocks


See:  http://moodle.org/mod/forum/discuss.php?d=7784&parent=39296
2004-05-24 07:24:36 +00:00
bobopinna 478ef4492b Fixed two lost PHP short tags 2004-05-24 07:15:40 +00:00
moodler 5e8eb9e2f6 Remove override of fullname order .... not sure why it was there....? 2004-05-24 06:15:22 +00:00
koenr f93956e508 initial translation by Koen Roggemans 2004-05-24 06:14:20 +00:00
koenr a13074149c filling in missing strings... 2004-05-24 06:13:12 +00:00
koenr d70fe20621 adding new resource-type. 2004-05-24 06:12:15 +00:00
moodler cd6469cb4d More aligned calendar controls on courses without groups 2004-05-24 05:13:34 +00:00
moodler 41d30a8e52 Fixes to icons in upcoming events and popups 2004-05-24 03:39:05 +00:00
moodler c535952e9a Tweaks to popups 2004-05-24 02:54:41 +00:00
moodler deb2b89636 Just about there 2004-05-24 02:42:43 +00:00
moodler 8c165fe91a Fix for bug 1449
Hidden events are now never shown.

There is a new parameter in calendar_sql_where which can show them if necessary.
2004-05-24 01:44:48 +00:00
moodler 3cb9ee3949 Fix for bug 1442
- notices
   - course is now properly passed to calendar_filter_controls from block
2004-05-24 01:28:28 +00:00
stronk7 d980b5da22 Now only approved entries are showed in RSS feeds... 2004-05-24 00:10:38 +00:00
barias f05ded416f Latest updates 2004-05-23 22:42:21 +00:00
gustav_delius f81be26aee Fixed bug 1443: In the case of a "Teacher Forum" the "Subscribe everyone to this forum" button now only subscribes teachers. 2004-05-23 20:46:29 +00:00
gustav_delius 52c4ef835a Changed readme text because copying of theme folder is no longer needed as theme is now in main CVS 2004-05-23 20:23:19 +00:00
barias ae86d0286d Latest updates 2004-05-23 19:51:47 +00:00
stronk7 e41ba0024b Bump to possible release day.
Note: not relevant, but my 2nd Wedding Anniversary!! :-)
2004-05-23 19:28:22 +00:00
gustav_delius 7f21ed0a08 Changed example for dirroot which must not contain capital letters 2004-05-23 18:55:20 +00:00
stronk7 ea596d330b Now integers < 1000 in conceps and aliases are avoided in the filter. Bug 1446.
(http://moodle.org/bugs/bug.php?op=show&bugid=1446)
2004-05-23 18:54:01 +00:00
barias 6e6cf9f2ea Latest updates 2004-05-23 18:24:26 +00:00
stronk7 d1aebae82e Now only integers < 1000 are avoided... Bug 1441
(http://moodle.org/bugs/bug.php?op=show&bugid=1441)
2004-05-23 18:20:50 +00:00
moodler 421b0337b6 Fix to allow ordinary users to edit events. :-) 2004-05-23 16:21:40 +00:00
martignoni 035b8529b0 Small correction 2004-05-23 15:52:58 +00:00
barias ded1d37523 Latest updates 2004-05-23 15:23:37 +00:00
barias ecc8258203 Latest updates 2004-05-23 14:21:37 +00:00
barias c0e4bbac82 Latest updates 2004-05-23 12:10:53 +00:00
barias e58e1e43ed Last updates 2004-05-23 11:59:48 +00:00
paca70 b61107dd34 Corrected some typos 2004-05-23 11:55:43 +00:00
stronk7 bbb9be5c9f Avoid filtering names whose lenght is 2 or less chars.
Bug 1441.
(http://moodle.org/bugs/bug.php?op=show&bugid=1441)
2004-05-23 11:49:58 +00:00
paca70 affee369dc updates 2004-05-23 11:36:21 +00:00
moodler 9958a08cfa Calendar fixes (this was the last thing I wanted to fix for 1.3).
- events are now shown in a consistent way
  - upcoming events and days are calculated with the same function
  - it's now not possible to edit module events directly
  - various tidying up
2004-05-23 11:05:45 +00:00
moodler b1049b0bdd Added styles for full event display 2004-05-23 10:29:46 +00:00
stronk7 13cbc82969 Bump. 2004-05-23 10:26:34 +00:00
moodler 565340c670 Simpler way to update events for a quiz 2004-05-23 10:25:46 +00:00
moodler f96831ee67 Now the same colours as standard 2004-05-23 06:38:48 +00:00
anvergara 82ede06bbe Added to the CVS for the first time 2004-05-22 23:31:29 +00:00
julmis b136a79771 Fixing [Bug 1427] (Better than just uncommenting :-) ) 2004-05-22 17:58:14 +00:00
moodler e60624da41 Remove forcelogin 2004-05-22 17:34:26 +00:00
julmis b7f630f2d2 Fast fix on _closeOnEsc funtion (uncommenting funtion calls) 2004-05-22 17:07:55 +00:00
moodler a18ebcc3c0 Blocks admin to bottom 2004-05-22 09:18:12 +00:00
moodler 9743a982b3 Print Blocks admin down the bottom ... hopefully less
confusion for new teachers just trying to add activities

Also, the new blocks appear there anyway
2004-05-22 09:17:06 +00:00
moodler 0948ab2609 Display README.html as well 2004-05-22 08:53:58 +00:00
moodler 7387fa2620 Improved Standard Logo theme now actually uses the standard logo. ;-)
Replacing the logo is as easy as dropping a logo.jpg in the Moodle
home directory OR in the site files
2004-05-22 08:53:22 +00:00
martignoni 115b815f93 New ressource added: Directory and some tweaks. 2004-05-22 08:46:35 +00:00
moodler f722b73c88 Print a theme README.txt if there is one. 2004-05-22 08:04:10 +00:00
moodler 2367e13d6c LOTS of theme fixes for calendars etc 2004-05-22 07:53:40 +00:00
moodler e71d0740a8 Added some missing icons 2004-05-22 07:32:27 +00:00
moodler 552064d391 Some improvements in display
I'm not finished yet, just checking in to continue on another server
2004-05-22 07:14:49 +00:00
moodler 85431a207f This is a much better version of overlib called overlibmws 2004-05-22 07:13:31 +00:00
moodler c488e669cc Updated standard styles for new calendar popups 2004-05-22 07:03:55 +00:00
moodler 27a353e6f9 Prevent blank entries 2004-05-22 05:13:08 +00:00
moodler 2d88c72afa Better fix for courses menu 2004-05-22 04:32:35 +00:00
moodler ed05bdfa9d Some cleanups for the courses menu 2004-05-22 04:28:36 +00:00
moodler b5b90f269d Removed a warning message 2004-05-22 04:02:02 +00:00
moodler e23ef951fa Fixes for the problem creating directories.
It was just a missing $CFG, but I got rid of scorm_mkdirs to use
the moodlelib equivalent instead
2004-05-22 04:00:34 +00:00
moodler 8a45aa5a95 Added the Directory type 2004-05-22 01:53:03 +00:00
martignoni 8fc9eb4bc3 Removed obsolete string 2004-05-21 23:19:11 +00:00
stronk7 e30a276249 Now paging will mantain the "fullsearch" option.
Bug 1438.
(http://moodle.org/bugs/bug.php?op=show&bugid=1438)
2004-05-21 19:24:23 +00:00
stronk7 e2ba5060d4 Escape "/" char in preg_quote(). Bug 1436.
(http://moodle.org/bugs/bug.php?op=show&bugid=1436)
2004-05-21 18:56:21 +00:00
anvergara c7afb2a834 Added to cvs 2004-05-21 17:23:59 +00:00
anvergara b4b9e5aa2b Translated into 'es' 2004-05-21 16:16:39 +00:00
moodler a5daf57cdc Remember timeaccess settings even after returning from logging as
another person
2004-05-21 15:10:47 +00:00
martignoni 46a6505fd5 New string 'Score' 2004-05-21 14:29:41 +00:00
defacer 515e49edfb Removed obsolete strings 2004-05-21 13:52:32 +00:00
defacer f10f1b7bdc * Removed one obsolete function
* Changed the expired events' color to dimmed
* Added "new event" button in upcoming events screen
* Small improvement (more robust) in redirection from set.php to upcoming events
2004-05-21 13:51:02 +00:00
defacer f5e99d07a0 Removed obsolete class 2004-05-21 13:47:15 +00:00
moodler 5ba21e557e Workshop now supports calendar events for the deadline date 2004-05-21 13:20:36 +00:00
defacer ab9f24ad00 Small fix (added method attribute to form) and some comments for the future 2004-05-21 13:07:11 +00:00
defacer 8792061c55 Modified to use popup_form() instead of custom code 2004-05-21 13:03:59 +00:00
defacer dfad5bde30 Different icons for different event types, shamelessly stolen from moodle.org 2004-05-21 12:28:42 +00:00
defacer 09462fcadc Small polishing change: the "go to calendar" link takes you to the
upcoming events screen.
2004-05-21 12:03:06 +00:00
defacer 4c479acb6c Bump 2004-05-21 11:25:56 +00:00
defacer f434283f4f Bye bye event details view... 2004-05-21 11:24:22 +00:00
defacer 0784eb7ef1 Now we can get a list of the blocks being on display in the course page.
Could be used by one block to detect the existence of another, for example.
2004-05-21 11:06:49 +00:00
defacer c5507e52f4 Small addition for the future: blocks will be able to define their own
HTML attributes.
2004-05-21 10:59:40 +00:00
defacer 34bf3ad4f3 Lots of usability improvements and some bugfixes:
Fixed wrong redirection after changing filters for all calendar screens
Fixed course selection menu to work without javascript
Moved course selection menu to the header, and added it to all screens
All screens now conform to the selected course in the menu
Small improvements in the way guests are handled
2004-05-21 10:54:46 +00:00
moodler 14fcda781a Tiny fix to improve display of date ranges 2004-05-21 05:49:37 +00:00
moodler d8bb005603 Removed referer for site events ($site is not a valid global anyway) 2004-05-21 05:35:54 +00:00
moodler c5163bfdbe Putting in Bobo's latest changes (from the contrib version) 2004-05-21 01:42:17 +00:00
moodler e511b4cff9 New string from Bobo 2004-05-21 01:36:49 +00:00
stronk7 43d2c51413 Avoid one more notice... 2004-05-20 23:07:59 +00:00
stronk7 1c908d9b12 Solved one bug causing category->name to be cleared
when editing them.
2004-05-20 23:04:23 +00:00
martignoni 82433dac1e Updated for release of 1.3 2004-05-20 20:08:31 +00:00
stronk7 165278015e Solve some notice with debug = on.
Thanks to skodak. Bug 1405.
(http://moodle.org/bugs/bug.php?op=show&bugid=1405)
2004-05-20 19:51:23 +00:00
martignoni cdc3de7e12 Some fixes 2004-05-20 19:46:40 +00:00
martignoni 6947952b2f Adding SCORM module translation 2004-05-20 19:37:33 +00:00
martignoni 2783cef1c6 New strings for backup 2004-05-20 19:30:26 +00:00
martignoni 59c776eac1 New string 'eventsfromcourse' 2004-05-20 19:21:36 +00:00
stronk7 e84ce5c8ca Avoid some notices in edit page (debug=on)
:-)
2004-05-20 19:04:42 +00:00
stronk7 e1e108d41d Avoid one notice in course page (debug=on)
:-)
2004-05-20 19:01:42 +00:00
stronk7 fcd6cf2340 Now "none-users" backups are allowed. See bug 1420.
(http://moodle.org/bugs/bug.php?op=show&bugid=1420)
2004-05-20 18:39:18 +00:00
stronk7 fa96ad2f97 New feature implemented allowing none-user course backups.
See bug 1420.
(http://moodle.org/bugs/bug.php?op=show&bugid=1420)
2004-05-20 18:36:59 +00:00
stronk7 b4d3bed714 Now in glossary module, preferences->backup_users = 2 (none users) has precedence
over include teacher entries in the backup. Used to support the glossary module
in "none users" backups. See bug 1420.
(http://moodle.org/bugs/bug.php?op=show&bugid=1420)
2004-05-20 18:19:07 +00:00
moodler 43ef6722c7 Tweak to calendar event (full display) column widths 2004-05-20 17:40:11 +00:00
stronk7 a3a1b66d14 Added "includenoneusers" string 2004-05-20 17:39:40 +00:00
moodler a85dba32ba Transparent edges to my SUGGESTED new SCORM icon. 2004-05-20 17:32:59 +00:00
moodler 1b1e79f55c Use the new images in pixpath 2004-05-20 17:30:20 +00:00
moodler 0acd5afd30 Event icons for different types ... CURRENTLY SAME PICTURE 2004-05-20 17:27:25 +00:00
stronk7 520b115d97 Added the backupnoneusersinfo string to inform users about the
consequences of select "None Users". Please, check it!!
2004-05-20 17:18:02 +00:00
moodler 98ca59f6e1 Putting SCORM into maintree CVS, to make it easier to test.
It's getting pretty useful now!
2004-05-20 17:06:19 +00:00
stronk7 64d6c09b7a Now the Admin/Variables and Admin/Backup pages show a
warning if XML support isn't enabled.
Bug 1432
(http://moodle.org/bugs/bug.php?op=show&bugid=1432)
2004-05-20 16:05:29 +00:00
defacer 9a2ba13e51 One more bugfix introduced just now: enabling course events shouldn't
enable site events, too.
2004-05-20 15:36:20 +00:00
defacer f26c1535b6 One new string for the calendar, used in the latest changes. 2004-05-20 15:29:01 +00:00
stronk7 2f29ee130c Now scheduled bakup checks for required XML functions to work.
Bug 1432. Closed now... :-)
(http://moodle.org/bugs/bug.php?op=show&bugid=1432)
2004-05-20 15:19:19 +00:00
stronk7 1029856e40 Now scheduled bakup checks for required XML functions to work.
Bug 1432 related.
(http://moodle.org/bugs/bug.php?op=show&bugid=1432)
2004-05-20 15:17:39 +00:00
defacer 43c3ffbe22 Major calendar overhaul:
1. Much better and more intuitive handling of filters.
2. Simplified user interface for guests.
3. Feature request implemented: bug #1431
4. A number of significant bugfixes
2004-05-20 15:16:42 +00:00
bobopinna c0d7749124 Last update to Moodle 1.3 Nearly Ready 2004-05-20 12:10:57 +00:00
bobopinna 9d5287f29f First translation 2004-05-20 11:31:54 +00:00
defacer e1ce345e40 Fix for bugs 1423, 1424 (duplicated):
Now hiding/showing course events in the course view works once more.
Ready for a release, it seems....
2004-05-20 10:02:49 +00:00
defacer 250712fd7f Minor modification to the way the course event filter works
(same functionality but more robust now).
2004-05-20 09:58:14 +00:00
moodler 5acb92ac9f Italian translation for SCORM module 2004-05-20 09:55:52 +00:00
moodler 929f4875ab Adding SCORM module 2004-05-20 09:55:01 +00:00
moodler 9a0353c0d4 Shorter vrsions of days 2004-05-20 08:41:49 +00:00
moodler 28d548eb44 Latest updates 2004-05-20 08:24:03 +00:00
stronk7 30f649342c Bump to 1.3 Final. Ready...
(only bug 1420 ) remains in process...
2004-05-20 08:22:15 +00:00
martignoni f951727ebf New string 'attemptsexist' added 2004-05-20 07:58:53 +00:00
martignoni b436485f09 New string for opening quizzes 2004-05-20 07:57:29 +00:00
martignoni dedcd2e973 Added a new string for the new scales.php alternative. 2004-05-20 07:55:05 +00:00
moodler 6b7a10329c Updated for release of 1.3 2004-05-20 05:15:43 +00:00
moodler 4db1fd85e0 Metal theme from A. Chavan 2004-05-20 04:31:01 +00:00
moodler b5305428bb Some fixes for CVS docs 2004-05-20 04:12:13 +00:00
moodler f0fa88f896 Latest tags file 2004-05-20 03:58:06 +00:00
moodler 0186df304d Bump bump de bump, yeah 2004-05-20 03:50:21 +00:00
moodler ae6f861d20 A problem with brackets was reported, but I couldn't duplicate it.
Just in case, I've added an escape for them.
2004-05-20 03:37:57 +00:00
moodler fcc0e250bc Just fixing the footer link on course list blocks 2004-05-20 00:55:11 +00:00
stronk7 3168c823a4 Hi !!
Solved one bug before being posted to the Bugs System. Incredible !!!
(http://moodle.org/mod/forum/discuss.php?d=8089)
:-D
2004-05-19 23:34:51 +00:00
stronk7 ba484b2108 Now day-names are showed properly always. Bug 1422.
Using gmt functions to avoid TZ displacements...
(http://moodle.org/bugs/bug.php?op=show&bugid=1422)
And BUMP version.
2004-05-19 23:08:03 +00:00
stronk7 4b92953150 Patched file. Bug 1425 closed.
(http://moodle.org/bugs/bug.php?op=show&bugid=1425)
2004-05-19 07:12:40 +00:00
moodler 52b201eeb5 Teacher forum never has groups 2004-05-19 06:43:22 +00:00
moodler 6cd48cb119 I've recoded Farsi from Numeric Character References to Windows-1256
(it was never actually UTF!!)
2004-05-19 05:11:47 +00:00
moodler bd76032e1b Fixed the link I just added 2004-05-19 03:52:34 +00:00
moodler 56215ed40f If a quiz has been attempted and the teacher is editing the quiz,
then let them know about the attempts.

bug 321

Thanks, Bernard!
2004-05-19 03:22:21 +00:00
moodler a601728c8d Fix for BUg 320 from Bernard Boucher 2004-05-19 02:53:03 +00:00
stronk7 b66dcd725d Fixed bug avoiding teachers create new scales...
NEED BUG 1425 SOLVED!!
(http://moodle.org/bugs/bug.php?op=show&bugid=1425)
2004-05-18 17:08:41 +00:00
moodler 4b4d25fa36 Suppress some errors in set_time_limit ... (these scripts aren't used yet) 2004-05-18 14:16:34 +00:00
moodler 1bf4c86205 Suppress warnings on set_time_limit 2004-05-18 14:14:47 +00:00
moodler a71bfa1c78 Supress errors on set_time_limit() for servers with safe mode restrictions 2004-05-18 14:12:21 +00:00
moodler d5f286f1aa A fix from boman in bug 1421 that allows the script to be
run from anywhere on the command line in PHP > 4.3.0.

ie:

   php /some/dir/moodle/admin/php.php

   ... now works again
2004-05-18 13:38:58 +00:00
moodler ffdd209ad2 Use fullname() functions for quiz reports 2004-05-18 13:31:37 +00:00
defacer 4e17c6f39e Fix for bug 1416:
Now the module icon is shown before the event name in the mini-month tooltips.
Maybe this would be better with the module name instead, but I don't know.
Comment in the bugtracker if this isn't what we want.
2004-05-18 07:51:46 +00:00
moodler 6be91aab91 Changed some CSS to font tags, so that IE looks more consistent 2004-05-18 07:10:17 +00:00
moodler cb1c64a821 New string for opening quizzes 2004-05-18 04:22:34 +00:00
moodler a796d0b8c3 Don't show the replies column when no replies are allowed - it seems to
upset some people.
2004-05-18 03:15:32 +00:00
moodler d31262021a Minor tweaks I forgot to check in from a long time ago 2004-05-18 03:14:01 +00:00
julmis 5ac539aedb Removing select_color.html 2004-05-17 22:57:08 +00:00
stronk7 9c00263349 Completely rewritten scales interface. It allows to delete unused
scales, edit and move them between custom and standar (only admins).
Editing teacher can modify only custom scales.
Bug 1223.
(http://moodle.org/bugs/bug.php?op=show&bugid=1223)
Please, test and decide...
2004-05-17 22:19:23 +00:00
stronk7 8e82f5ac4f Added a new string for the new scales.php alternative. Bug 1223
(http://moodle.org/bugs/bug.php?op=show&bugid=1223)
2004-05-17 22:08:42 +00:00
moodler b2a3cd2d24 Quizzes with long periods (longer than 5 days) are now handled
in the calendar as two separate events ... one for open and one for close

bug 1402
2004-05-17 17:04:01 +00:00
moodler 36eb856f04 Delete events when activity is deleted 2004-05-17 16:24:19 +00:00
moodler d6533f314c Strip tags from Resource names before filtering bug 1418 2004-05-17 16:04:05 +00:00
moodler d89c6578a5 Fix resource names properly 2004-05-17 15:36:47 +00:00
moodler 1c3abdb092 SHow event name in upcoming events (not activity name) bug 1415 2004-05-17 14:29:55 +00:00
martignoni 29114b96f2 New string for Resource auto-linking filter 2004-05-17 09:58:29 +00:00
martignoni 4288d6d76b New string 'Edit files' 2004-05-17 09:56:17 +00:00
defacer 65b0e53770 Fix for bug 1194:
Now forum_print_user_discussions does not show discussions in hidden
forums, unless you are an an editing teacher.

** NOISY DIFF WARNING **
I don't know why this happens, but the only changes are in function
forum_print_user_discussions (10 lines or so).
2004-05-17 09:31:06 +00:00
defacer b1bcd540f0 Fix for bug 1323:
When the admin is logged in as a different user, user events are shown
correctly in the calendar.

Also, fixed a very-recently-introduced bug which appears to have escaped
notice so far.
2004-05-17 09:07:05 +00:00
defacer b1295c5e21 Random refinements. 2004-05-17 08:54:23 +00:00
moodler d034765aeb Added a line to disable this function:
HTMLArea.prototype.stripBaseURL

since it seemed to be stripping parts of URLs in some cases (bug 1411)
2004-05-17 08:04:28 +00:00
defacer 4131f3743f Fix for bug 1395:
view.php now does require_login(). Also some minor refinements.
2004-05-17 07:31:54 +00:00
moodler 7708837eff Latest files from Paula for pt_br 2004-05-17 07:10:59 +00:00
paca70 05ba8bd0d9 Postgresql uses smallint instead of tinyint. 2004-05-17 06:52:06 +00:00
koenr fed354f2ba filling in missing strings... 2004-05-17 04:32:34 +00:00
stronk7 35055d3786 Step4 done. :-) 2004-05-16 18:05:02 +00:00
julmis 1665e6c80d Changing link dialog and adding new select color dialog. 2004-05-16 16:09:23 +00:00
moodler 2d33fc00d1 Allow other Google thigns into the site too ... in particular translate.google.com 2004-05-16 14:19:35 +00:00
moodler 6f80940b1e Simpler method for recent activity .... I had problems with the other
Use last access to course if it exists, otherwise two days ...
2004-05-16 10:34:17 +00:00
stronk7 4f006bc149 Added support for CFG->forcelogin in some files. Bug 1396
(http://moodle.org/bugs/bug.php?op=show&bugid=1396)
2004-05-16 10:26:04 +00:00
moodler 8cadd23f98 Some cleaning up of the navigation bars in quizzes 2004-05-16 10:20:26 +00:00
moodler a32c99e288 To prevent notices in unusual situations (empty lang files) bug 1404 2004-05-16 09:28:41 +00:00
moodler 952b728086 New string "edit files" 2004-05-16 09:11:38 +00:00
moodler 891581dbde Add a link across to the Files area 2004-05-16 09:11:17 +00:00
moodler 16a5602cd7 1. Directory Resources now support sub directories
2.  Subdirectories in File Manager now display their total size
2004-05-16 08:52:32 +00:00
moodler d5aacf3e04 Resource auto-linking filter! Developed by Eloy - thanks! (see bug 1389) 2004-05-16 06:41:39 +00:00
moodler b7f3582008 Use overlib feedback on cloze-style questions 2004-05-16 03:14:03 +00:00
stronk7 2127fedda8 Step 2 of Bug 1223 done.
(http://moodle.org/bugs/bug.php?op=show&bugid=1223)
2004-05-16 00:36:00 +00:00
stronk7 0f1a97c2fb Step 1 of Bug 1223 done.
(http://moodle.org/bugs/bug.php?op=show&bugid=1223)
2004-05-15 23:18:24 +00:00
stronk7 9d05e26118 Now firstname and lastname fields are trimmed before saving them to db.
This should close Bug 1235
(http://moodle.org/bugs/bug.php?op=show&bugid=1235)
2004-05-15 22:18:53 +00:00
stronk7 d9ddff71d7 Change one comment. Simply. Bug 1393
(http://moodle.org/bugs/bug.php?op=show&bugid=1393)
2004-05-15 18:52:12 +00:00
stronk7 e0147c9bc7 Now entry->concept is always printed in FORMAT_MOODLE format, instead
of using the entry->format field. This should close Bug 1298.
(http://moodle.org/bugs/bug.php?op=show&bugid=1298)
2004-05-15 17:34:43 +00:00
stronk7 c2e684d6d7 One missing "</ul>" tag... 2004-05-15 17:30:30 +00:00
stronk7 7856dd5949 Opps. I forgot to commit this files yesterday... :-(
This close Bug 1370
(http://moodle.org/bugs/bug.php?op=show&bugid=1370)
2004-05-15 17:27:50 +00:00
moodler c032f72069 FIxed a recently-introduced bug preventing assignment grading bug 1390 2004-05-15 15:21:29 +00:00
moodler f24a6c878e Bump 2004-05-15 15:12:30 +00:00
moodler 9e51847a18 Slight change to recent activity calculations in RA block.
Upon login, the last access to each course is stored in the USER session
variable.

The earliest date of recent activity now shown is now the earliest of:

   - this last access time
   - the last login time

If this value is older than two days, then just use two days instead.
2004-05-15 14:58:12 +00:00
martignoni 411a96bfed Added string 'notenoughanswers' 2004-05-15 09:16:20 +00:00
martignoni 9cecd5c03b Added 'for group' string 2004-05-15 09:13:10 +00:00
martignoni cb4ceecb2e Added new strings for editor 2004-05-15 09:10:55 +00:00
moodler c9ca1fa5a1 A new option (off by default) will remove restrictions on usernames.
$CFG->extendedusernamechars
2004-05-15 07:30:31 +00:00
moodler db6450c5e4 Added new strings for editor 2004-05-15 03:21:41 +00:00
stronk7 4528ab53dd Added missing Id: cvs tag. Bug 1394
http://moodle.org/bugs/bug.php?op=show&bugid=1394
2004-05-14 19:36:39 +00:00
stronk7 187e22dbe0 Upgraded glossary to 2004051400. The process will launch an
update of entry->concept and alias->alias to trim them.
This should close bug 985 forever...
(http://moodle.org/bugs/bug.php?op=show&bugid=985)
2004-05-14 19:14:57 +00:00
stronk7 b965603072 Now, the entry->concept and alias->alias fields are trimmed
in edit, import, export, backup and restore.
To solve bug 985
(http://moodle.org/bugs/bug.php?op=show&bugid=985)
2004-05-14 18:37:30 +00:00
stronk7 5cca249645 Reverted to revision 1.8 (left join) to continue working in bug 985. 2004-05-14 17:23:42 +00:00
stronk7 26a71d0d05 Changed an "if" a bit... :-) 2004-05-14 17:07:48 +00:00
stronk7 eab0f15aa3 Now, nextexecutiontime is recalculated everytime the form is submitted to
have the time updated in the logs page.
2004-05-14 16:37:45 +00:00
martignoni 5acd402377 Correction of bad translation (connected and separated) 2004-05-14 14:47:38 +00:00
moodler e70bda424b Fixes to prevent users from creating bad quiz questions with not
enough answers in them.

Thanks to Shane Elliott (Ikawhero)
2004-05-14 14:36:32 +00:00
defacer f36e581d60 Fix for bug 1330:
Now when creating a new event you only have to select a group. And you are
always limited to the current course and its groups.
2004-05-14 14:15:24 +00:00
defacer e4bbaab3c3 Half the work done for bug 1330:
Now when creating events you don't select a course, the current course is
selected implicitly.
2004-05-14 13:49:42 +00:00
defacer 8c54cec650 Month view: NOW it's working as I wanted it to. But is that as it should work? 2004-05-14 13:39:29 +00:00
bobopinna 5547284aa4 Translated and reviewed by Claudio Maggi 2004-05-14 13:12:55 +00:00
bobopinna a8f73e5ec8 Translated by Claudio Maggi 2004-05-14 13:04:01 +00:00
defacer 9ff136e503 Behavior change, according to Gustav's remarks on the forums. Events from
courses other than the one you are browsing are not displayed in the month
views or as upcoming events, except only if you explicitly do it in the
full month view. However, if you manually go to a day with such an event and
get a day view, you will see the event. Should I find a way to hide that too?
2004-05-14 12:48:50 +00:00
defacer 1bb9d624c4 Fix for bug 1354:
(REAL fix this time! ;-)

Thanks for the report, Eloy. I now know what I was doing wrong. Because on my
dev site I have the same TZ as the server, sometimes I can make mistakes and
"get away with them". :-/
2004-05-14 07:34:10 +00:00
defacer ef3ae69ebd Martin pointed out that only editing teachers get to see all the groups. 2004-05-14 07:11:48 +00:00
moodler c40aeb21f8 Bigger textarea on site settings 2004-05-14 06:13:46 +00:00
stronk7 c484d58cf8 Now wiki links to activities are decoded to its new location
when restoring courses. If the link belongs to the course, it's
adjusted as internal, else it's modified to link its original
source.
2004-05-14 00:17:29 +00:00
koenr 69b0786b8f filling in missing strings... 2004-05-13 19:36:06 +00:00
stronk7 00f7f08d6b Now the show=concept|alias
has been decoupled into 2 sql statements to make it works
under every MySQL version.
Hope this close Bug 985 forever...
2004-05-13 19:27:52 +00:00
martignoni 5bc1a9b43c Short names for CIQ were missing 2004-05-13 18:56:24 +00:00
martignoni d0d6b9844b Added some harcoded strings in glossary module 2004-05-13 18:51:13 +00:00
bobopinna 559b772508 Translated by Andrea Bicciolo, Luca Arese, Adriano De Vita and Marinella Lagosta 2004-05-13 16:08:50 +00:00
bobopinna f105bc0077 Updated to Moodle 1.3 devel + 2004-05-13 16:01:08 +00:00
stronk7 c6e02da78f Just to be "aligned" with main Moodle version...:-) 2004-05-13 16:00:48 +00:00
defacer a8ae6b3923 Removed the "hardcoded" method to find the block name, the correct is to ask
the block itself. It was causing errors for blocks with no lang file. Also,
removed some useless commented code.
2004-05-13 12:24:11 +00:00
defacer 6c9584d1e5 Addressing bug 1384:
Now if you are a teacher in a course, you now see ALL group events in that course.
As a result, admins see group events for all courses.

Maybe it needs more work than this, though.
2004-05-13 10:32:12 +00:00
moodler b6b3deb48c Fix for Bug 1383. Added support for the Critical Incident Survey type in the Complete Activity Reports
(Shane Elliott)
2004-05-13 08:57:39 +00:00
moodler 9cc093f199 Fixed bug 1379 .... 2004-05-13 08:50:37 +00:00
moodler 35ebf5c09b Fix for the way question texts were displayed bug 1381 2004-05-13 08:46:25 +00:00
moodler f87fd4ae44 Just to make things clearer 2004-05-13 08:23:06 +00:00
moodler 406764ebeb Short names for CIQ were missing 2004-05-13 08:11:48 +00:00
moodler 58d2472072 Some fixes for confirmation emails on sites with long names
- include a HTML version of the email

   - wrap all text emails at 79 characters now, not 70
     I think quoting of text based emails on 80-character terminals
     would be pretty rare these days
2004-05-13 03:09:47 +00:00
koenr 299e75b10c initial translation by Koen Roggemans 2004-05-12 21:00:25 +00:00
koenr 94ea7d1b25 pollishing translation 2004-05-12 20:59:00 +00:00
stronk7 189bec8895 Bug 1296 solved.
Now duplicate entries are showed in all the lists. Simply I've changed
the fields order in select statements to make entryid (unique) the first.

Not detected negative consequences...ciao :-)
http://moodle.org/bugs/bug.php?op=show&bugid=1296
2004-05-12 20:39:34 +00:00
stronk7 5f5fb0c441 Solved bug 1377. Now scheduled backups config will use
CFG->admin instead of hardcoded admin.
(http://moodle.org/bugs/bug.php?op=show&bugid=1377)
2004-05-12 19:12:54 +00:00
stronk7 8e68d64a2d Added some harcoded strings in glossary module (Bug 1062)
(http://moodle.org/bugs/bug.php?op=show&bugid=1062)
2004-05-12 19:03:42 +00:00
stronk7 465e3ae35d Solved bug 985. Now "show" will work with aliases and with concepts
with and without aliases. Changed the cuery to a left join to
be able to process entries without aliases. This type of operation
should be changed to boolean queries sometime in MySQL 4!!
Test it!!
http://moodle.org/bugs/bug.php?op=show&bugid=985
2004-05-12 18:44:15 +00:00
stronk7 2a2525257f Solved bug 1378. Missing encoding in glossary/print.php
(http://moodle.org/bugs/bug.php?op=show&bugid=1378)
2004-05-12 17:59:07 +00:00
stronk7 3a4b8c823d Changed some incorrect <?= tags to <php p()...
Skodak has found more incorrect tags. See bug 1376
(http://moodle.org/bugs/bug.php?op=show&bugid=1376)
2004-05-12 16:55:48 +00:00
martignoni 591ee236ea Small correction 2004-05-12 16:36:39 +00:00
jungwirr 4358842a68 fixed bug #1380 - string in index.php 2004-05-12 15:35:37 +00:00
defacer bc1728752a Added a colon here, instead of the language strings. 2004-05-12 12:39:59 +00:00
defacer a600911257 English: added CVS $Id$ and moved a semicolon to the event edit form
Greek: added $Id$, and some strings that were missing
2004-05-12 12:28:16 +00:00
koenr 94441f7ecd initial translation by Koen Roggemans 2004-05-12 10:28:39 +00:00
koenr 6d0894afd2 filling in missing strings... 2004-05-12 10:04:42 +00:00
defacer d4950608dd Update, better and simpler handling. 2004-05-12 07:33:06 +00:00
martignoni 1b26bfc4d1 End of small changes 2004-05-12 06:20:13 +00:00
martignoni 3aa3ecdcd6 Small corrections 2004-05-12 06:00:58 +00:00
stronk7 ab892a4fa2 Modified slighty the format_text() function!!
Now, in PLAIN AND WIKI formats, the rebuildnolinktag() function
is called to rebuild:

    &lt;nolink&gt;  to <nolink> again (open and close tags)

This should avoid showing the "<nolink>" word always in this formats!!

Used to solve Bug 1232 and potentially, others...
(http://moodle.org/bugs/bug.php?op=show&bugid=1232)

Please check it because it's really a CORE change!!
2004-05-11 23:17:25 +00:00
stronk7 3eb2f7ecf8 Solved bug 1086.
Please, verify (and close) it. Patch submitted by Petr Skoda. Thanks!
I've modified some lines in formats to avoid some Notices and make
everything display more consistent. Please, test it!!
2004-05-11 22:38:45 +00:00
stronk7 701fff2145 Now, concept and aliases are not linked when
viewing entry itself. This will close bugs 1145 and 1295.
Thanks to Petr Skoda and his patch!
2004-05-11 19:59:17 +00:00
stronk7 d34b9c5f2d Now concepts are not enclosed by paragraph tags. Bug 1298. 2004-05-11 18:06:56 +00:00
stronk7 3483856eb8 Now glossary concepts are not linked (bug 1366).
Patch submitted by Petr Skoda.
2004-05-11 17:31:43 +00:00
defacer 828c4e095a Preparation for Nuke blocks integration, and relaxing of requirements for
block db upgrade scripts. We 're getting to a point where you can really
have a directory with just a single 20-line file for your block and Moodle
will do all the rest. Much like Nuke does now. That is A Good Thing! :-)
2004-05-11 16:08:03 +00:00
moodler c15cea3604 Added some checks for forcelogin on resources 2004-05-11 13:16:20 +00:00
martignoni c57c35533f New release information for Moodle 1.3 Beta (and for 1.2.1, that weren't translated yet) 2004-05-11 12:39:46 +00:00
defacer f765674612 Fix for bug 1365 (supplementary):
Here's the other half of the fix.
2004-05-11 10:36:35 +00:00
moodler 3c801a5df1 Added email2, thanks Howard! bug 1369 2004-05-11 10:33:23 +00:00
martignoni 1976f1ae39 Fixing date/time strings for french usage 2004-05-11 09:59:13 +00:00
martignoni f0855bdf53 New string "Go to calendar" 2004-05-11 09:52:44 +00:00
martignoni 65e6098258 Typos corrected 2004-05-11 09:52:08 +00:00
defacer 00341feafb Fix for bug 1365:
This one was most insidious. Usually we get bugs that have to do with the
user/server timezone interaction, but by now I 've learned to be extra
careful about that. This one, however, only had to do with the server's
timezone and was 100% certain to happen if you are GMT minus something.
Considering that I 'm GMT+2, it went unnoticed. Sorry!
2004-05-11 07:20:44 +00:00
defacer dab9f47075 Fix for bug 1363:
Now clicking on an event time in the "upcoming" block always takes you to the correct date in the calendar.

Martin, you were right. Too much was going on. Once too much! ;-)
2004-05-11 07:01:17 +00:00
koenr 7e52dc4354 small error (bug 1364) 2004-05-11 05:47:55 +00:00
moodler 097ab88510 Small fix for bug 1364 when talking about database support in future 2004-05-11 03:31:20 +00:00
julmis 9b9e3f1037 Removing unnecessary files 2004-05-10 21:36:15 +00:00
julmis 285ce16112 Removing hard coded strings 2004-05-10 21:16:16 +00:00
moodler b6650a256a Borders on mailed posts 2004-05-10 18:26:31 +00:00
stronk7 87299b3133 Solved another notice in glossary config page with glossary_entbypage 2004-05-10 18:24:58 +00:00
moodler e2d4106275 Wasting time with tweaks 2004-05-10 18:14:49 +00:00
moodler 26bba779ff Tweaking the formatting of the footers a bit 2004-05-10 18:12:32 +00:00
stronk7 fce0e06d81 Solved some notices (debug mode) when creating new entries... 2004-05-10 18:10:17 +00:00
moodler 89fa8e4a49 FIxed short tag 2004-05-10 17:47:54 +00:00
moodler e730321594 FIxed some short tags 2004-05-10 17:46:35 +00:00
moodler 7e07c5cced Fixed some short tags (found by Eloy!) 2004-05-10 17:40:10 +00:00
moodler 99ef3747fd Removed short tag 2004-05-10 17:37:33 +00:00
moodler 545e48d00e OK, this is IT for Moodle 1.3 Beta 2004-05-10 17:35:35 +00:00
moodler cb0ac23269 Cleanups 2004-05-10 17:34:40 +00:00
moodler bdbffc969d Removed commas ... sorry, but this date format just looks wierd to me. :-) 2004-05-10 17:27:57 +00:00
moodler 22188ece5e New release information for Moodle 1.3 Beta 2004-05-10 17:19:54 +00:00
moodler e1753dcffe Fixed Yankee ordering of month, day 2004-05-10 17:17:48 +00:00
moodler 4a54f79067 FIxed English order of day, month 2004-05-10 17:17:25 +00:00
moodler d13403fb1b Some tweaks for formatting sideblock footers (esp upcoming events) 2004-05-10 17:09:06 +00:00
moodler 91ba8c9878 MOve hidden sections setting down a bit 2004-05-10 16:29:27 +00:00
defacer acc61dc449 Added small links for the monthly calendar and adding a new event at the
bottom of the block, as discussed in the forums.
2004-05-10 16:29:20 +00:00
moodler c1a1f0a975 Slight correction to 'hiddensections' 2004-05-10 16:28:00 +00:00
moodler 59bb9e22ff Handle resource names with slashes better 2004-05-10 16:10:55 +00:00
stronk7 2a72282163 Added some messages in integrity checks to be more explicit.
Howard Miller suggested it.
2004-05-10 16:02:03 +00:00
stronk7 f30541559a Deleted one string. It had a typo and es version was fine!! 2004-05-10 15:55:44 +00:00
moodler 2ef140494c Don't need to bundle a font since the default one in lib/default.ttf works fine
with Greek.
2004-05-10 15:38:59 +00:00
moodler f39b489656 Print footers in side_blocks even when non-list $content is supplied 2004-05-10 15:15:44 +00:00
moodler 56e29ea0f4 Added a CVS version number 2004-05-10 13:27:09 +00:00
moodler 1cbb892849 Time to draw a line in the mud 2004-05-10 13:20:37 +00:00
martignoni f12fc85911 Now glossaries can produce RSS feeds too !! 2004-05-10 12:30:04 +00:00
martignoni b42412bc8f New strings for RSS feeds in glossaries 2004-05-10 12:21:39 +00:00
carlesbellver e93a97e7d8 *** empty log message *** 2004-05-10 11:40:51 +00:00
martignoni 65ceac9b95 Some strings (RSS related) has been moved from forum.php to moodle.php to avoid suplicating them once per module. 2004-05-10 11:09:33 +00:00
defacer f319962d8a Fix for bug 1354:
Eloy discovered that there was too much compensation for the user's timezone
in the monthly view event popups. Removed it and now it's OK.
2004-05-10 08:35:03 +00:00
stronk7 646c20b5ff Solved a small bug in scheduled backups when encoding links!!
I've tested it against 10 courses (manual and scheduled) and
everything seems to work fine. In some days I'll test it againt
some BIG course (if moodle.org is updated to this version).
Dump version to 1.3 beta (as I think everything is finished now).

:-)
2004-05-09 23:15:56 +00:00
stronk7 7923318e97 Included some missing colons...I forgot. 2004-05-09 23:10:46 +00:00
julmis ccf9102153 Some minor fixes (HTMLArea 3.0RC1) 2004-05-09 23:05:21 +00:00
stronk7 294c52b46c Opps. reordering some lines... 2004-05-09 22:30:56 +00:00
stronk7 87b00f0ee1 Now glossary->rsstype and glossary->rssarticles are in backup & restore.
Added two missing strings too.
2004-05-09 22:27:44 +00:00
stronk7 2dda0bbbc7 Now glossaries can produce RSS feeds too !!
Some strings (RSS related) has been moved from forum.php to moodle.php
to avoid suplicating them once per module.
It seems to work fine, please test...:-)
2004-05-09 22:20:05 +00:00
stronk7 c0f778a269 Added some consistency with the show/hide feature in Moodle.
Now if the course is hidden or the activity is hidden, only
teachers cand download the feed.
2004-05-09 18:59:36 +00:00
stronk7 ca87cbe100 Some improvements in RSS:
- Article's author is showed if present.
- In forum posts feeds, show post->subject instead of discussion->name
- Description contents in every article are passed to format_text() to
  show contents like the rest of Moodle.
2004-05-09 18:34:33 +00:00
moodler edc23b1686 Improvements for editing Unicode 2004-05-09 09:10:29 +00:00
gustav_delius 6ecde2bef3 replaced very old install.html with current version from lang/en/doc. I guess this is duplicated here to make it easier to find for people? 2004-05-08 22:09:46 +00:00
gustav_delius d71cca4bea corrected small type reported in bug 1152 2004-05-08 22:06:33 +00:00
gustav_delius 78d7fa79cf implemented a provisional hack by roger to avoid division by zero reported in bug 1231. 2004-05-08 21:27:33 +00:00
gustav_delius c12007857b removed some undefined variable errors. However there are lots of them in edit.html, see bug 1344 2004-05-08 20:52:53 +00:00
gustav_delius a86ea57ddf category list now sorted when adding entry, thanks to Bernard, bug 1010 2004-05-08 20:47:14 +00:00
martignoni 60bc460972 New name for block 2004-05-08 19:43:16 +00:00
martignoni ac283ca7bc New string for backup/restore 2004-05-08 19:41:54 +00:00
gustav_delius 4bb0a732cc got rid of undefined variables warnings 2004-05-08 18:56:45 +00:00
stronk7 5b76e6fc51 Now every link to forums (from resources and forums) and every link
to resources (from resources and forums) are re-encoded in backup/restore.

I could reduce the code size but for now I prefer to have it this looong
form to clarify what it's doing.

Please, test, test and test...
2004-05-08 18:30:30 +00:00
julmis 92ff72590c Prefilled textbox added (bug id 1339) 2004-05-08 18:23:18 +00:00
mits 46e1c7fd95 Translated some. 2004-05-08 18:16:44 +00:00
gustav_delius c9e2967077 fixed bug 990 which allowed students to see grades even when they were not supposed to by typing in the URL 2004-05-08 15:56:37 +00:00
gustav_delius c2ce7ea4d8 maxlength set in textfields to avoid exceeding length of database fields 2004-05-08 14:48:02 +00:00
moodler 047ab76eb6 Changed language direction and resorted file 2004-05-08 14:28:31 +00:00
moodler 0b5e8ed7d5 bug 753 2004-05-08 14:02:18 +00:00
defacer 33683b3655 Fix for bug 1334:
Yesterday I was in such a hurry to leave that I forgot to check it in...
Sorry Martin! :-)
2004-05-08 13:35:11 +00:00
stronk7 3a238a355a Changed the system to recode links to forums. Now it it detect
that the link doesn't belong to the course being restored, then
the original link is mantained.
With this, the backup/restore should be finished. Now some
tests to check everything !!
2004-05-07 23:40:41 +00:00
stronk7 3c01fbf4ba Now $course->showrecent is out from backup & restore 2004-05-07 22:39:37 +00:00
stronk7 18b13a8370 Added rss needed images for this theme 2004-05-07 18:09:23 +00:00
stronk7 1adf511c7e Included global $THEME to support custom images... 2004-05-07 18:08:54 +00:00
gustav_delius 274e05dbd5 fixed bug 1093 by applying clean_text to $forum->intro 2004-05-07 17:48:02 +00:00
gustav_delius 8644437d66 fixed bug 1037 by improving clean_filename() 2004-05-07 17:07:31 +00:00
moodler cc88e7f105 6 Meg file in a language pack? er, no. :-) 2004-05-07 14:36:22 +00:00
gustav_delius af91aca09c block name is now 'Section links' 2004-05-07 12:36:52 +00:00
defacer 61854a2fff Eloy discovered this little bug hiding under the rug. Even though this code
is not used at all right now, it was wrong and would need to be fixed when
we have calendars for the site front page.

Thanks Eloy! :)
2004-05-07 10:46:34 +00:00
defacer bacafa1ca9 Modified the behavior of upcoming events block to be the same as month block,
even though there is no way to go from it to the detailed month view right now.
2004-05-07 10:42:11 +00:00
defacer 51f8a12f28 Fix for bug 1321:
When clicking the month name from the month view block and go to detailed
month view, only events from the course you where in are shown by default.
2004-05-07 10:39:30 +00:00
defacer bd1195678c Fix for bug 1320:
Upcoming events were not displayed before calendar_session_vars() was called
at least once. The upcoming events block did not do that, because once upon a
time it was displayed below the month view, which was known to do it :)

Solution: calendar_session_vars() is now called directly from lib.php.
2004-05-07 10:15:10 +00:00
martignoni c85afffd71 Added string 'unsubscribeshort' 2004-05-07 10:05:56 +00:00
martignoni af9930e10a Added 'parentlanguage' 2004-05-07 10:02:38 +00:00
martignoni a5552ef859 Added two strings about deleting blocks from admin interface... 2004-05-07 10:00:14 +00:00
martignoni e62f4fc705 Typos corrected 2004-05-07 09:53:32 +00:00
martignoni 38be1c7a73 It is possible to create weekly repeating events 2004-05-07 07:28:54 +00:00
martignoni 8a0878918c New file translated 2004-05-07 07:24:09 +00:00
moodler 49d9b738cf Email from forums is marked as "bulk" to reduce vacation bounces etc 2004-05-07 03:31:01 +00:00
moodler b68dca1934 Moodle mail can set precedence levels for email 2004-05-07 03:29:11 +00:00
moodler a9688f538f Mailer handles precedence header 2004-05-07 03:25:04 +00:00
moodler 06c66f4576 Renamed file 2004-05-07 02:30:24 +00:00
moodler d208d07b7f Renamed "weeks_topics" to "section_links" 2004-05-07 02:27:56 +00:00
stronk7 c9c8984582 Now ORIGINAL_WWWROOT is saved in backup and restored too!! 2004-05-06 23:20:25 +00:00
stronk7 1ea2e64c65 Now links to forums are encoded properly 2004-05-06 22:53:04 +00:00
stronk7 c3ff2d75c6 Added two strings about deleting blocks from admin interface... 2004-05-06 22:41:55 +00:00
stronk7 4c49c802d0 Some minor changes about the system to encode file.php calls included.
Solve an important issue about scheduled backups not working properly
    when encoding links...
Added support for event->visible in backup & restore.

TODO: Add wwwroot to backup/restore to use it when decoding.
      Change the system to encode forum calls.
2004-05-06 22:17:45 +00:00
koenr 94701e1f8d pollishing translation 2004-05-06 19:40:21 +00:00
koenr 2a58aab560 initial translation by Koen Roggemans 2004-05-06 19:40:07 +00:00
jungwirr afa120e3c0 fixed bug 1325 - hard-coded string for add multiple rolls 2004-05-06 19:39:42 +00:00
gustav_delius aff97c0b2e a new block providing links to weeks/topics, see http://moodle.org/mod/forum/discuss.php?d=7648 2004-05-06 19:16:46 +00:00
gustav_delius fab178a10b add anchors to week/topics on course homepage 2004-05-06 19:02:25 +00:00
gustav_delius cc539b6aaf Updated CVS info in foreign language docs 2004-05-06 16:37:55 +00:00
gustav_delius f86aaab21c It is possible to create weekly repeating events but it is not yet possible to edit or delete them together. Also it is now possible to specify the duration in minutes as an alternative to specifying the end time and date. 2004-05-06 16:30:12 +00:00
defacer d715f7c4c0 Fix for 3-month pane event filters, now you don't get a "missing required parameter"
error when you click on them. Reported by Ger Tielemans in the forums.
2004-05-06 07:45:10 +00:00
moodler 319b472958 Fix for bug 1312 ... just for robustness in the URLs 2004-05-06 03:11:15 +00:00
jungwirr 68d0db38e8 added help files for most options of the module. Updated and clarified
the main module description help file.
2004-05-05 17:08:38 +00:00
jungwirr 311b524ac2 changed the options settings to be more compliant with the rest of the
modules.
Added help page links for many options.
Changed the style of the add multiple interface to match mod.php
2004-05-05 17:06:56 +00:00
moodler 3120f6f20b Hide users in "hidden" chats from students. bug 1308 2004-05-05 08:19:03 +00:00
moodler 480ec24e52 Latvian translation! 2004-05-05 07:19:09 +00:00
gustav_delius dcd338ffdc Events associated to hidden activities are now invisible in calendar, using new field 'visible' in table 'event' which is updated each time a course module is hidden or unhidden. 2004-05-05 07:07:56 +00:00
carlesbellver b0942cf145 *** empty log message *** 2004-05-05 07:06:18 +00:00
martignoni 9a8247cacc Added string for "Take Attendance" in view.php 2004-05-04 20:38:45 +00:00
jungwirr 88521dee99 fixed a bunch more foreach loops to test for null value on the iterated
collection
2004-05-04 19:13:53 +00:00
jungwirr 2f226580b5 fixed viewall.php to reflect the (unlikely) circumstance where a user is a
student AND a teacher in a course.
2004-05-04 19:05:41 +00:00
jungwirr 018e87bedb Fixed the empty grades for attendance.
Added log_display database records
2004-05-04 17:18:02 +00:00
jungwirr 8fc1384b78 added string for "Take Attendance" in view.php 2004-05-04 16:13:08 +00:00
jungwirr 86eb8c6e0d Added "Take attendance" option that allows a teacher without edit
privileges to modify the appropriate aspects of the roster.
2004-05-04 16:12:15 +00:00
martignoni f54f7a35b0 Added two help files for forum rsstype & rssarticles. 2004-05-04 15:30:52 +00:00
martignoni 0cc5e64ef7 Fixed CVS hosts 2004-05-04 15:22:06 +00:00
martignoni 1a1f9bda82 Addes new translated file 2004-05-04 15:05:15 +00:00
martignoni 6d05983872 More realistic dates 2004-05-04 14:57:11 +00:00
martignoni d33b9f2bfe A new resource type called Directory 2004-05-04 14:50:28 +00:00
martignoni 3c08b668bf Added two missing strings for scheduled backups. 2004-05-04 14:46:38 +00:00
martignoni 4899a25981 'strftimedayshort' modified 2004-05-04 14:44:46 +00:00
martignoni 1d374f3610 Some new strings for RSS 2004-05-04 14:43:00 +00:00
martignoni 32dc30a453 User pictures can now be deleted - interface is improved a little 2004-05-04 14:37:42 +00:00
martignoni ffe8aa5fe0 Changed hiddentopics to hiddensections 2004-05-04 14:36:09 +00:00
martignoni 5389dd473f New strftime string for use by the calendar: Month Year. 2004-05-04 14:34:20 +00:00
bobopinna fa45fbc6c8 Updated by Bobo. 2004-05-04 14:23:22 +00:00
moodler 162c360538 Fixed CVS hosts 2004-05-04 12:24:57 +00:00
andreabix 95eaae26f8 Changed calendar colors to accomplish needs of people with visual deficiencies. 2004-05-04 09:39:09 +00:00
bobopinna 09eaa1926e Traslated by Bobo 2004-05-04 08:48:52 +00:00
bobopinna df41e4108c Updated and translated by Bobo 2004-05-04 08:19:01 +00:00
bobopinna 77ff610fb3 Traslated by Andrea Bicciolo 2004-05-04 06:46:29 +00:00
moodler 8a3cfc4d76 Quick fix for bug 1303 ... but I'll come back to this today 2004-05-04 01:58:20 +00:00
moodler bf5c2e8445 FIxed a logic bug when getting files ... bug 1305 2004-05-04 01:21:17 +00:00
koenr d37b85b38b pollishing translation 2004-05-03 21:33:51 +00:00
koenr 54d06dd823 filling in missing strings... 2004-05-03 21:20:43 +00:00
koenr 6bd9e1b51b initial translation by Koen Roggemans 2004-05-03 21:20:04 +00:00
jungwirr 51383e2cdf fixed another foreach problem in lib.
Added a todo section to the README
2004-05-03 19:59:02 +00:00
stronk7 6b7deae418 Added two help files for forum rsstype & rssarticles.
Please, check them...
2004-05-03 19:50:24 +00:00
stronk7 bbe3c5e391 Added two missing strings for scheduled backups.
Please, check them...
2004-05-03 18:25:30 +00:00
stronk7 c05e7d7e53 Added support for rsstype and rssarticles in forum's
backup & restore.
2004-05-03 18:18:54 +00:00
defacer e70fdac090 L10n fixes and a bug fix... at least I _hope_ they were fixes... 2004-05-03 15:26:55 +00:00
moodler 555b85139f Better protection against Googlers 2004-05-03 15:03:31 +00:00
moodler c81c6d0e34 Document $CFG->forceloginforprofiles 2004-05-03 14:57:11 +00:00
moodler 1ffb5c8989 Forcelogin works on user profiles, and a new setting can now forcelogin
just for these pages even if the site forcelogin is off.

   $CFG->forceloginforprofiles
2004-05-03 14:55:33 +00:00
koenr e5f8351bdf pollishing translation 2004-05-03 14:42:31 +00:00
moodler 2195fb5896 Some new strings for RSS 2004-05-03 14:36:06 +00:00
defacer aa870ca24a Some l10n problems fixed. 2004-05-03 14:07:35 +00:00
moodler 67a2a1d8ce More realistic dates 2004-05-03 12:14:31 +00:00
moodler 4464fcf74a Minor change to table format 2004-05-03 05:36:11 +00:00
moodler c1f86c2afa Removing some security checks that seem to cause trouble 2004-05-03 02:12:45 +00:00
koenr 328f7d2870 removing file 2004-05-03 00:34:32 +00:00
koenr efdb42a174 initial translation by Koen Roggemans 2004-05-03 00:33:24 +00:00
koenr 1b5859b6f1 filling in missing strings... 2004-05-03 00:19:34 +00:00
stronk7 759a8abbad I suppose that now forum needs current version of Moodle
to work (modified cron system...), isn't it?
2004-05-02 23:14:53 +00:00
stronk7 8adcb49f8e First version of RSS System.
Discussion and post forum feeds supported.
Integrated in cron system.
Some strings missing.
Test, test, test...
2004-05-02 23:08:19 +00:00
stronk7 750024e833 Changed hiddentopics to hiddensections in backup and restore 2004-05-02 22:34:13 +00:00
moodler 7e62329aa0 Use the folder icon for Directory resources 2004-05-02 17:18:48 +00:00
paca70 6c3cea8877 Updates 2004-05-02 16:47:21 +00:00
moodler 47bb59fbf2 Indicating dependency 2004-05-02 15:32:21 +00:00
moodler 55fd81779e This is required for directory resources 2004-05-02 15:31:23 +00:00
moodler 593d774fb0 Fix path problem with main directory listing 2004-05-02 15:25:46 +00:00
moodler cd2dea0a8d Added file size and table headings to Directory resource 2004-05-02 15:22:00 +00:00
moodler 7ba54e1b78 A new resource type called Directory ... it simply lists all the
files in a directory to make them available to students.
2004-05-02 15:10:04 +00:00
moodler fb9ec10f46 Some modifications to texts 2004-05-02 02:36:45 +00:00
moodler ff62c65990 Some fixes to headers 2004-05-02 02:25:04 +00:00
moodler 31085e5057 Don't require login to site level glossary entries 2004-05-02 02:13:58 +00:00
stronk7 67591c6706 Small change in navmenu() to hide hiddensections,
aplying latest Martin's changes... Ciao :-)
2004-05-01 23:46:02 +00:00
moodler 396b61f00a Fixed doubling in upcoming events block, I think. 2004-05-01 17:42:32 +00:00
moodler 8ad2936eaa Removed a doubling of event names 2004-05-01 17:37:11 +00:00
moodler 1e1ff33b2e Some interface cleanups ...
- simplified the screens some more (headers etc)

 - preferences are all on one page, and the code was rewritten
   for simplicity and consistency

Changes are not well tested yet but I'm off to bed  :-)
2004-05-01 17:32:37 +00:00
koenr be89c70ced filling in missing strings... 2004-05-01 15:15:55 +00:00
koenr 36b9b5e9e1 typo and missing strings 2004-05-01 15:10:20 +00:00
koenr b4a7544f25 typo 2004-05-01 14:49:59 +00:00
koenr 7b45d97d9d Fixed severe errors in translation, apparantly due to change of meaning of some strings (phases). 2004-05-01 14:46:37 +00:00
moodler ec67cbf237 User pictures can now be deleted - interface is improved a little 2004-05-01 14:34:21 +00:00
moodler 2859efacea Latest version from Benito 2004-05-01 12:34:34 +00:00
moodler d45bd055d7 Parameters fix for files.
This allows

   http://example.com/file.php/1/somefile.swf?a=xxx&b=xxxx

Thanks to Bernard Boucher!
2004-05-01 03:33:10 +00:00
bobopinna a8b1f8623d Updated by Bobo 2004-04-30 16:33:18 +00:00
bobopinna faa5b3fb0c Updated by Bobo 2004-04-30 16:30:14 +00:00
moodler 6cc3e56349 Norwegian Primary School version ie (Grunnskole) from Anders Bjerkholt
anders@skoleveven.no
2004-04-30 15:34:21 +00:00
moodler cf5f5cb0b6 Removed some old crap 2004-04-30 13:33:26 +00:00
moodler 4bd22e0f4e Bug fix for possible XSS situation in Bug 1292 2004-04-30 12:45:55 +00:00
moodler 2c0d657437 Chat now logs "talk" events ... which also updates last access in the course
so chatters appear in the online users block so Tom is happy.  :-)

Seriously though, it's good to have talking events in the log.
2004-04-30 12:40:42 +00:00
moodler db7da819d5 Use $course->hiddensections in topics and weeks 2004-04-30 12:17:49 +00:00
moodler 464fd803fa Sorry, Eloy, my directions were wrong.
I've changed hiddentopics to hiddensections ...
2004-04-30 12:10:46 +00:00
moodler acaad8a283 Added enablerssfeeds 2004-04-30 11:58:57 +00:00
defacer 6e8e8ec685 Fix to display correctly formatted dates in some cases where they were not
being localized as they should. Also, small cosmetic addition of a space between
words in the date representation (I had missed it).
2004-04-30 08:59:04 +00:00
defacer a322925858 New strftime string for use by the calendar: Month Year. 2004-04-30 08:48:39 +00:00
moodler 58259e3217 Can use $CFG->journal_showrecentactivity to hide recent activity for journals 2004-04-30 04:50:41 +00:00
moodler 1aacb5033d Make sure new picture is saved to DB even when form has errors 2004-04-30 04:44:47 +00:00
moodler 806021014b Some fixes to ensure students can't post to hidden forums 2004-04-30 01:54:56 +00:00
defacer 47a2aa48da Fix for bug #1280: the "showrecent" course setting has to go.
Bump, to force db upgrade.
2004-04-29 10:29:48 +00:00
defacer 7a8bcd59e8 Fix for bug #1280: the "showrecent" course setting has to go.
Don't check for this setting anymore.
2004-04-29 10:29:23 +00:00
defacer 9ac503147c Fix for bug #1280: the "showrecent" course setting has to go.
Updated script and editing page.
2004-04-29 10:28:58 +00:00
defacer 10ee08cc65 Fix for bug #1280: the "showrecent" course setting has to go.
The pgsql .php update script needs to be updated, but I 'm not sure about
the pgsql alter table syntax... mysql works, oracle is still under dev, so
no problem there.
2004-04-29 10:28:19 +00:00
defacer 0ef7c97344 Small change to better respect the lang file date settings. Should be objectively
"better" now. See http://moodle.org/mod/forum/discuss.php?d=7450 for the issue.
2004-04-29 07:50:12 +00:00
stronk7 b9f2b9bd99 Small typo in las cvs version. Arghhh!! 2004-04-28 22:29:39 +00:00
martignoni cb95019c45 Strings modified for hidden topics 2004-04-28 18:48:08 +00:00
moodler 5d2ae09da9 A very nice default Unicode font under the GPL licence
http://www.nongnu.org/freefont/
2004-04-28 15:59:25 +00:00
moodler b3fc547b68 Allow a big catch-all Unicode font to be placed in lib/default.ttf
eg ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/Cyberbit.ZIP
2004-04-28 15:39:32 +00:00
defacer 7a4d9aa83d New FREE Unicode TTF with Greek (and other languages, too). 2004-04-28 15:28:32 +00:00
defacer 89ace59751 Fixed my own stupidities... 2004-04-28 15:21:38 +00:00
defacer df8d70ae6f Dubious legally... so removed. 2004-04-28 15:02:21 +00:00
moodler e226c03b7e SMall fix to make new cached encoding work with course languages 2004-04-28 15:02:14 +00:00
moodler 6ebd2c691b Uses iconv by default to convert texts into UTF-8 to keep GD happier. 2004-04-28 14:18:25 +00:00
koenr cd2d90e3bf filling in missing strings... 2004-04-28 10:55:14 +00:00
koenr f7db7e0c1b initial translation by Koen Roggemans 2004-04-28 10:54:15 +00:00
defacer ef3b39b791 There are serious problems with event.php and mini-calendars, mainly because
we don't have much information about courses at that stage. Started to fix
things up, but there is still work to be done.
2004-04-28 10:20:30 +00:00
defacer 6e245258d2 Changed a few visuals, mainly colors to better distinguish among event types.
It's probably better this way.
2004-04-28 09:46:56 +00:00
carlesbellver ac43f398bf *** empty log message *** 2004-04-28 07:31:14 +00:00
moodler adb590fb76 Added some missing icons 2004-04-28 03:15:31 +00:00
moodler 931d5119f5 Minimum rows can be smaller 2004-04-28 02:57:37 +00:00
moodler d2f308c091 Support for events.
Ouch - I thought I'd checked this in days ago
2004-04-28 02:56:40 +00:00
stronk7 22c8200ff4 If group isn't detected when restoring events, default it to 0 2004-04-27 22:37:01 +00:00
koenr 43719c6c9b filling in missing strings... 2004-04-27 22:29:04 +00:00
koenr 94f14f4d58 initial translation by Koen Roggemans 2004-04-27 22:28:31 +00:00
koenr 506867075c filling in missing strings... 2004-04-27 22:10:37 +00:00
stronk7 70da9e72ce Update it a bit too! 2004-04-27 19:57:18 +00:00
stronk7 d2b5f1e8bf event->format is now in backup & restore. 2004-04-27 19:51:12 +00:00
mudrd8mz 25970a89d6 Fixed names of linked pages according to translated ones 2004-04-27 17:55:48 +00:00
mudrd8mz 993b6f7c0b Just some fixes and adds 2004-04-27 17:49:20 +00:00
mudrd8mz 290eac9db9 Prepared to be finished in several days 2004-04-27 17:47:56 +00:00
mudrd8mz 4f8ace3e23 Daniel Miksik added into the list of authors of this lang pack. 2004-04-27 17:44:14 +00:00
mudrd8mz b6243dff88 Czech documentation package translated by students at www.phil.muni.cz (coordinated by Daniel Miksik) 2004-04-27 17:41:49 +00:00
moodler de52774805 I think it's better for translators to have the whole phrases ...
not all languages will work with the split  sentence
2004-04-27 17:37:06 +00:00
moodler 0b0be145f9 Small sorting fix when getting site users 2004-04-27 17:31:12 +00:00
stronk7 723507f36e Bump because some changes have arrived...:-) 2004-04-27 17:23:45 +00:00
stronk7 19a4030924 As changes to version are comming very often, I save this
now. To be used in rss feeds...
2004-04-27 17:21:02 +00:00
moodler 9cc67480a5 Me being fussy :-) 2004-04-27 17:16:33 +00:00
moodler 9a9ea9bf03 Some rephrasing 2004-04-27 17:15:14 +00:00
martignoni d1971cc88f Now, in topics format, every course can decide about how to display hidden topics (collapsed or invisible) 2004-04-27 17:08:54 +00:00
martignoni e67a34b6f8 Some cleanup 2004-04-27 17:06:34 +00:00
martignoni 017be1ba67 Now, in topics format, every course can decide about how to display hidden topics (collapsed or invisible) 2004-04-27 17:05:12 +00:00
moodler f7d617820c Some changes to event editing. HTML editor now supported, plus some
other reformatting ... more to come.  :o)
2004-04-27 17:01:48 +00:00
ralf-bonn 3fe80ba7a3 *** empty log message *** 2004-04-27 16:48:40 +00:00
stronk7 559d33f678 Bump 2004-04-27 16:44:47 +00:00
moodler cda21d485c Added a format field to the event table 2004-04-27 16:41:16 +00:00
stronk7 86a4eb2bd4 Now, in topics format, every course can decide about how to
display hidden topics (collapsed or invisible)
Version bump.
2004-04-27 16:38:47 +00:00
stronk7 87808d0a01 Now, in topics format, every course can decide about how to
display hidden topics (collapsed or invisible)
Added support for course->hiddentopics in backup & restore
2004-04-27 16:37:53 +00:00
stronk7 eccc37c033 Now, in topics format, every course can decide about how to
display hidden topics (collapsed or invisible)
Now it can be set in every course and it's applicable in topics format
2004-04-27 16:36:01 +00:00
defacer 93c2cbcff1 OpenType Unicode font with Greek support (Arial) plus lang_decode.php so
that we can have graphs with greek legends.
2004-04-27 16:32:50 +00:00
stronk7 5b044cc120 Now, in topics format, every course can decide about how to
display hidden topics (collapsed or invisible)
Some strings and one help file. Please, review it!!
2004-04-27 16:32:29 +00:00
andreabix 5321d59360 Addressed some transparency issues affecting the calendar popup winndow. Corrected the border color of the same popup window. 2004-04-27 16:30:39 +00:00
stronk7 ca189cecf8 Now, in topics format, every course can decide about how to
display hidden topics (collapsed or invisible)
Small change to navmenu() to support it
2004-04-27 16:29:21 +00:00
stronk7 009cc72698 Now, in topics format, every course can decide about how to
display hidden topics (collapsed or invisible)
2004-04-27 16:27:11 +00:00
moodler 4cc5141feb Latest updates 2004-04-27 15:14:09 +00:00
moodler 387a1c1986 New version of Chinese Traditional in UTF8, from jiang@tkvs.ylc.edu.tw 2004-04-27 14:03:15 +00:00
moodler 48151fd02e Whoops, forgot part of the optimisation. 2004-04-27 13:58:54 +00:00
moodler cec0a0fc30 New developmental setting to force UTF for the whole server
Plus, some optimisation on the way encoding is stored (in the session).
2004-04-27 13:57:46 +00:00
moodler 37aaf07463 Change all the lang fields to 10 characters ... to make room for utf
versions.
2004-04-27 13:39:33 +00:00
villate 7e2bd14454 Translated a few new variables in version 1.3 beta 2004-04-27 13:05:20 +00:00
villate 5ff0db6b4f New files in version 1.3 beta 2004-04-27 12:40:13 +00:00
martignoni c04c7c3f57 Small correction 2004-04-27 12:11:30 +00:00
martignoni 1234372bad The "Add" block is now called "Blocks" ... other block admin stuff can go in this block later. 2004-04-27 12:09:56 +00:00
martignoni def8a4beef Strings in language files should always be lower case 2004-04-27 12:00:28 +00:00
villate e0a64b92a6 New variables translated 2004-04-27 11:59:54 +00:00
moodler 4fad7af8e1 Bold teachers 2004-04-27 10:18:11 +00:00
martignoni 60ab709a81 You can now unenrol all students quickly with one button
bug 1238
2004-04-27 09:58:10 +00:00
martignoni 5eae3600a0 Subscriber editing is group-aware.
Groups can be subscribed or unsubscribed with one click.
2004-04-27 09:55:03 +00:00
moodler ce4ec6dc2e Trying some sorting of users 2004-04-27 09:43:46 +00:00
mits 92556ad5e8 translated some. 2004-04-27 09:41:45 +00:00
moodler c598d270de The "Add" block is now called "Blocks" ... other block admin stuff can
go in this block later.
2004-04-27 09:30:44 +00:00
moodler 5bb18f6835 Renamed Czechj to cs 2004-04-27 09:04:32 +00:00
moodler 0b410d78ad Latest tags (getting big!!) 2004-04-27 08:51:54 +00:00
moodler ff2ec3b570 Some changes to the layout to remove blocks etc 2004-04-27 08:49:22 +00:00
moodler 36c34ab6f6 Allow some European characters in the username bug 1249 2004-04-27 08:24:04 +00:00
moodler 5eda8473dc Latest Arabic 2004-04-27 05:13:37 +00:00
moodler be5208a03d Latest changes 2004-04-27 05:11:53 +00:00
koenr 687c5b34d4 pollishing translation 2004-04-26 21:53:09 +00:00
moodler 822ede9244 Update all the modinfo fields to make the resource icons work 2004-04-26 15:45:02 +00:00
moodler 7e1500acd7 WEBLINKs and WEBPAGEs can have icons too 2004-04-26 15:44:25 +00:00
moodler 9d361034ec Much requested: Uploaded resources are now shown using the relevant icon. 2004-04-26 15:31:22 +00:00
fiedorow 7363a0355b Commented out debugging code 2004-04-26 15:20:10 +00:00
moodler bd23e396a4 You can now unenrol all students quickly with one button
bug 1238
2004-04-26 14:16:05 +00:00
moodler c215cee456 Put a submit button at the top too. 2004-04-26 13:39:39 +00:00
moodler 0acd686363 Show no grade on entries without any feedback 2004-04-26 13:35:33 +00:00
defacer 9159b0fed6 Fixed bug reported by John Ryan (http://moodle.org/mod/forum/discuss.php?d=7347)
which caused group events to not display under any circumstances.
2004-04-26 10:44:16 +00:00
moodler 0a1a564e5b Strings in language files should always be lower case 2004-04-26 09:37:12 +00:00
defacer 46fec6a3f9 Well, this is a bug FIX at least! :)
All teachers showed up as having editing rights... corrected now.
2004-04-26 09:31:02 +00:00
defacer ce557a6eac Rollback the previous change: I introduced a bug by mistake! :/
But the system is a bit... strange... shouldn't the "editing mode" flag be
propagated in the session variables or something? It confused me having to
click "Edit" a second time after I 'd just clicked it in the course view.
2004-04-26 09:28:28 +00:00
defacer dfd479fd67 Fixed an unset property warning if you are an editing teacher but no edit
variable is set in the URL.
2004-04-26 09:20:41 +00:00
moodler 95d0820979 Changed the string: 'showsubscribers'
from

    Show subscribers
to

    Show/edit current subscribers


The old string is not invalid, which is why I decided to change the
existing string rather than create a new one
2004-04-26 09:06:56 +00:00
defacer 381b379798 Removed obsolete function from pre-OO days. 2004-04-26 09:03:40 +00:00
moodler 6673d7bdf6 Subscriber editing is group-aware.
Groups can be subscribed or unsubscribed with one click
2004-04-26 08:55:00 +00:00
moodler e5890e7160 file.php now calculates content-length correctly for filtered text and HTML files.
Bug 1240
2004-04-26 03:41:45 +00:00
moodler 3315ee39b1 Fixed a hard-coded string. bug 1269 2004-04-26 03:01:00 +00:00
moodler 426c04370a FIx to help PostgreSQL .... fix from Bruno Vernier Bug 1270 2004-04-26 02:54:55 +00:00
gniske dc7afaa7e1 Added missing files 2004-04-25 22:20:13 +00:00
gniske e96dcc765a Added missing strings 2004-04-25 22:18:21 +00:00
stronk7 ff4c50a9a2 As showing/hiding "Save my answers" button was based in empty($results),
moved $results->attemptbuildsonthelast to $attemptbuildsonthelast.
This was introduced in my latest CVS version, trying to take out
some notices...solved now.
2004-04-25 09:16:19 +00:00
stronk7 c18490b89b Take our some notices... 2004-04-25 08:43:42 +00:00
moodler c23ec730b9 Some fixes to improve editing of rtl languages 2004-04-25 03:54:25 +00:00
moodler 8496c4af27 Calendar support for the Chat module 2004-04-25 03:05:58 +00:00
moodler 36257d39d5 Check attachment variable to prevent warnings 2004-04-25 02:15:48 +00:00
moodler 7969713a4f Added gz 2004-04-25 02:11:48 +00:00
moodler fce9c67b20 Fix for bug 1268 2004-04-25 01:43:20 +00:00
moodler 48bef97ce6 Deleted a bad line to fix bug 1237 2004-04-24 15:45:39 +00:00
moodler 5c87e15a0a Solution for bug 1258 I think ... needs testing 2004-04-24 15:08:57 +00:00
moodler bbb56db78a New functions by Jenny Watt, to make workshops show up on Recent Activity
workshop_get_recent_mod_activity()
 workshop_print_recent_mod_activity()


 Thanks, Jenny!
2004-04-24 12:47:52 +00:00
martignoni 82dbaf5493 French translation added 2004-04-24 12:43:19 +00:00
martignoni 4a0d7d422c Some slight modifications 2004-04-24 12:42:47 +00:00
moodler c69cb506b8 Don't send out notifications for hidden assignments until they are unhidden
Bug 1259
2004-04-24 04:51:56 +00:00
stronk7 9b690d2b48 Now encoding some fields to be non-ASCII aware. Thanks to Petr Skoda.
See bug 1266 (http://moodle.org/bugs/bug.php?op=show&bugid=1266&pos=14).
Applied the same patch to alias too!!
2004-04-24 00:48:57 +00:00
stronk7 56eea82e08 First version of inter-activities mantained in backup/restore.
All the conversion to some pseudo-codes are done at backup time.
In the restore process, every link is decoded to new ids.
For now, this is supported:
- In backup:
  -all links to forums are encoded.
- In restore:
  - all links to forums are decoded.
      - from forums (post->message).
      - from resources (resource->alltext).
The process requires a backup made with the same version (because it
has to be properly encoded at backup time). Old backups will work
without conversions at all.
Only tested with some little courses.
It would be perfect to have some "big" course to test it.
Please, test and feedback, ciao :-)
2004-04-24 00:40:45 +00:00
martignoni 3f00574fc6 Typo corrected 2004-04-23 20:44:51 +00:00
martignoni dc8ebcb9eb Strings for handling the time display format. 2004-04-23 06:45:47 +00:00
moodler cf55faf8e8 Deal with apostrophes better in assignments 2004-04-22 16:30:01 +00:00
stronk7 e91e2b6a36 Now the scheduled_backup needs lib/blocklib.php to be able to
backup & restore blocks configuration. Done!!
2004-04-22 13:49:45 +00:00
carlesbellver d192fce493 *** empty log message *** 2004-04-22 12:00:41 +00:00
carlesbellver 0a9398c167 *** empty log message *** 2004-04-22 11:40:25 +00:00
andreabix 293c959426 Changed group event color to better differentiate Group and Course event 2004-04-22 11:37:02 +00:00
defacer 1b0ebe79b1 Addressing bug 1257:
Changed the handling of time display format; now it's read from the language
file by default, and a new preference has been added to allow each user to
manually specify his preferred time format.
2004-04-22 09:02:23 +00:00
defacer c867774d76 Changed the way the fix for bug 1255 works, while making sure it still works :)
It just didn't feel right to intrusively set object properties from "outside",
and since it's now one variable assignment less, I thought why not... :)
2004-04-22 07:11:55 +00:00
moodler 72957fa54b FIxed a character escpaping problem, recently introduced bug 1250 2004-04-22 06:02:41 +00:00
koenr 701f6a7e38 pollishing translation
Special thanks to Marie Lesy for rereading.
2004-04-21 21:38:55 +00:00
koenr 951ed6e974 typo (mising < can mess things up) 2004-04-21 17:50:54 +00:00
stronk7 acf4fe1773 Solved one issue that caused the show/hide option to fail.
See bug 1255 (http://moodle.org/bugs/bug.php?op=show&bugid=1255)
2004-04-21 16:18:51 +00:00
moodler 2aa3970439 Blank 2004-04-21 12:19:53 +00:00
stronk7 229f852a8a Now blockinfo is fully supported in backup & restore. For old backups
(without blockinfo field, default blocks are applied). Every block
visibility is mantained in the process.
Bump versions a bit (2004042100) :-)
2004-04-20 23:28:46 +00:00
stronk7 5216e2c63c This hasn't sense because get_list_of_plugins() exclude it
using its new parameter.
2004-04-20 17:47:36 +00:00
moodler 0cb77f5adf Fixing a recent change to get_list_of_plugins that was causing
auth/db to be invisible    bug 1245
2004-04-20 15:14:15 +00:00
defacer 95a892257c Corrected a bug that prevented admins from seeing events for ALL site courses
(today's functionality was not complete yet).

Also, minor sorting change to display the course filter sorted by shortname.
2004-04-20 13:00:39 +00:00
defacer 053c98cff9 Fixed a whole bunch of warnings and minor bugs, which all shared a common cause:
The preferences screens weren't handling filter changes correctly.
2004-04-20 12:49:02 +00:00
defacer 562727705f Upgrade with more intelligent CSS rules.
Maybe needs some color changes, but I 'm not really much of an interior decorator... :)
2004-04-20 12:14:57 +00:00
defacer 9087d5e219 Upgrade with more intelligent CSS rules.
This one needed color changes.
2004-04-20 12:03:20 +00:00
defacer ec1a875cbb Upgrade with more intelligent CSS rules.
I tried very hard not to undo any of Andrea's changes. Took a couple of
guesses along the way. Sorry if I guessed wrong!
2004-04-20 11:57:41 +00:00
defacer 65660de888 Upgrade with more intelligent CSS rules.
Maybe needs some color changes, but I 'm not really much of an interior decorator... :)

Coincidentally fixed a typo in the theme: "0" was "o".
2004-04-20 11:41:18 +00:00
defacer 66c785e1a5 Upgrade with more intelligent CSS rules.
Looks like no calendar colors need to be changed from standard.
2004-04-20 11:18:35 +00:00
defacer 496659193f Upgrade with more intelligent CSS rules. 2004-04-20 11:17:31 +00:00
defacer 92668ad2e5 Revision of the calendar tables HTML. Current version outputs a LOT less HTML
(mainly class attributes) but requires ALL themes to update their CSS rules.

Coming up next... can you guess? ;)
2004-04-20 11:14:55 +00:00
defacer 2b7591ccbc Fixed an "unset variable" warning in the filter controls in the upcoming events calendar screen. 2004-04-20 09:27:59 +00:00
defacer 1f695119c5 Admins can now filter events by course and set events for groups and courses
regardless of whether they are course members.
2004-04-20 09:21:30 +00:00
defacer 6c127628a7 Removed some long-dead code and commented out some newly-dead code, now that
we have the blocks system. Making the file parse faster... yum! :)
2004-04-20 08:44:06 +00:00
defacer d7baeddac5 Grand Bugslayer Eloy at work again: Hiding the blocks if they have no content
should mean "if they have no content AND no footer".
2004-04-20 08:38:56 +00:00
defacer 48f508ab94 If group mode is no groups and forced, there is no point in displaying the
group events filter. Just a nice touch, fixed only in course view for now.

Also, minor code rewrite for clarification.
2004-04-20 08:24:37 +00:00
defacer ca319818fc Don't display blocks that have no content at all. I 'm not sure if this
could cause any confusion, but it solves the problem with the admin block
being displayed to guests.

The thought about a "display only to X and Y kinds of users" feature came
to mind, but maybe that would be more confusing than useful.
2004-04-20 07:43:26 +00:00
defacer 82b181f265 Eloy is probably right, the preferred width calculation should be cached. 2004-04-20 07:32:57 +00:00
stronk7 1eb25080df Detected a display bug when looking for possible causes of
bug 1248. Widhts were only calculated in teacher mode and
they were down to 100px in student mode!!
Perhaps we could make some session caching to avoid some
calculations every time the course is displayed. Seems to
work fine now.
Anyway, if I compare the right column width
in my server (with blocks running) against moodle.org (without
blocks), it seems that the right column is narrower in my test server...
2004-04-19 19:24:42 +00:00
ralf-bonn fc4458a244 ?nderungen, damit Bl?cke gleich breit sind 2004-04-19 19:05:26 +00:00
koenr dca2c8298b filling in missing strings... 2004-04-19 19:00:05 +00:00
ralf-bonn f5ea0302d5 ?bersetzung optimiert 2004-04-19 18:15:00 +00:00
mits 38370cec4c New translation. 2004-04-19 18:06:54 +00:00
stronk7 9f336d716d Forgot to include blocks in this page.
Closing bug 1246.
2004-04-19 17:40:57 +00:00
martignoni 0356ba4c6e Strings for first official release of the "Blocks System". 2004-04-19 11:54:37 +00:00
martignoni bb2de3c054 Strings for the first Official release of the "Blocks System". 2004-04-19 11:46:18 +00:00
defacer 6757c3cdc6 Added content "caching", same as all other blocks have. 2004-04-19 09:36:07 +00:00
bobopinna 7cd0cc52b2 Updated by Bobo 2004-04-19 09:28:29 +00:00
bobopinna 68c208043c Update and review by Claudio Maggi 2004-04-19 08:46:19 +00:00
defacer 59d2a75d99 Fixed/added some things so that the instructions are mostly correct. 2004-04-19 07:39:43 +00:00
paca70 a595c0b6ea Files for postgresql 2004-04-19 04:30:55 +00:00
paca70 ce24161b7e First versions for postgressql 2004-04-19 04:15:24 +00:00
stronk7 7ef144842f Forgot this BUMP !! :-) 2004-04-18 23:33:00 +00:00
stronk7 0f3fe4b6ad First Official realease of the "Blocks System".
Integrated with Moodle:
    - Install automatically.
    - Update course->blockinfo for each course at installation time.
    - Modified course creation to insert into blockinfo field.
    - Modified restore to insert into blockinfo field.
    - Admin options (hide, show, delete, config) from admin page.
    - Lang strings inserted (en only).
    - Database support to mysql and postgresql (not tested!!).
Moodle, backup and block versions updated to 2004041800.
Tested with mysql: Install fresh and upgrade from previous.
section_activities block renamed to social_activities and created
its own lang file to support name "Social Activities". This can
be changed at any time.

TODO:
=====
Support it really in backup/restore.
????

Enjoy!! Ciao :-)
2004-04-18 23:20:53 +00:00
koenr e8f1458ce1 typo 2004-04-18 19:38:17 +00:00
koenr b8b10d1d02 filling in missing strings... 2004-04-18 19:22:14 +00:00
moodler 6dc78d860d New translation 2004-04-18 16:53:46 +00:00
moodler 131c2a8509 Latest updates from Benito 2004-04-18 16:53:05 +00:00
moodler cce96a89c2 Added Flash and some cleanups in display 2004-04-18 10:01:44 +00:00
koenr c59b07ece6 filling in missing strings... 2004-04-18 08:26:31 +00:00
koenr e78e763f4c typo 2004-04-18 08:25:38 +00:00
moodler 67905aceda SOme fixes for
- the URL used in recent activity links
  - the display of single entries
2004-04-18 05:54:33 +00:00
moodler 5da09684e2 Better if autostart is off for the filter 2004-04-18 05:15:50 +00:00
moodler 81fcd0f019 Bug fix in get_directory_list() for files named 0 :-) 2004-04-17 14:01:53 +00:00
moodler 0043ddbb1a decalre $THEME to stop some notices ... 2004-04-17 13:37:54 +00:00
martignoni 0f068d1211 New string for LDAP protocol version 2004-04-17 08:13:01 +00:00
moodler 16bc83d693 QUicktime should use "aspect" for best results on different movies 2004-04-17 07:49:54 +00:00
moodler 245f5aaa61 Using scaling when displaying quicktime 2004-04-17 07:32:54 +00:00
moodler a72170fb39 Found the scale paramter for Quicktime 2004-04-17 07:29:41 +00:00
moodler 1b090b2f92 Added support for Quicktime and Media PLayer plugins 2004-04-17 06:59:25 +00:00
moodler b124c95ab4 clean the filenames to make sure there aren't funny characters 2004-04-17 03:30:26 +00:00
moodler 1cd06b9b9c Fixed the text file too 2004-04-17 03:28:29 +00:00
moodler deba41af8c Clean filenames to prevent possible problems with IE 2004-04-17 03:27:27 +00:00
moodler 7001130bac Fixed possible prblems with Excel names bug 1243 2004-04-17 03:24:42 +00:00
adamtpaw be99333b5d New file 2004-04-16 21:56:20 +00:00
adamtpaw 72a951f966 New files 2004-04-16 21:48:24 +00:00
andreabix 8694611593 Html code cleanup 2004-04-16 16:14:55 +00:00
moodler 450c3d39cc Link to teacher forum is now shown in the current langage always 2004-04-16 07:13:10 +00:00
moodler bbf4d8e656 Simplification and improvement of clean_filename, thanks to suggestions
from Martin Langhoff <martin@catalyst.net.nz>
2004-04-16 06:30:01 +00:00
ralf-bonn 105d8f71a4 Fehler in der Anzeige beim Einf?gen von Aktivit?ten beseitigt 2004-04-15 20:44:02 +00:00
moodler d8627a477e Thanks to Dave Lopata <Dave@Lopata.Net>, Moodle now supports LDAP 3 2004-04-15 15:57:32 +00:00
fiedorow 1af376eca4 Fix for bug on Windows and Mac servers while generating quiz reports 2004-04-15 15:41:06 +00:00
moodler 39e1c4158f I think this might solve the mysterious problems with
session garbage collection and timeouts not working.

Note: upgrading to this will KILL all current sessions, so
you will need to log back in.
2004-04-15 14:46:54 +00:00
fiedorow 811cf8919d Allow use of alternate delimiters in csv files 2004-04-14 20:46:39 +00:00
paca70 eb3daafe3f Updates 2004-04-14 18:40:38 +00:00
paca70 e98d89e86e Updates, thanks to Jussi Kurikka. 2004-04-14 18:10:33 +00:00
stronk7 c7f3fdf70c Modified the clean_filename() function to strip parenthesis and slashes.
Not really sure if the method used is 100% correct ot no so, if you can
check it....
Perhpas I should make the stripping in backup process, istead of using this
central function. What do you think?
2004-04-14 18:09:41 +00:00
andreabix 6ef9481d6c Added compatibility with the calendar functions. Added some minor refinements. 2004-04-14 16:31:43 +00:00
defacer 46971293dc 1. Wrong translation of the word "by" in this context
2. Translated $a member variables! God help us! (no wonder eval() complained)
2004-04-14 14:13:22 +00:00
stigbjarne 61b8135261 Cleand up and smaller local file. 2004-04-14 11:32:45 +00:00
moodler 695f71e1bd Fix problem editing category names containing html 2004-04-14 02:41:22 +00:00
martignoni 4742585700 Small typos corrected 2004-04-13 18:38:56 +00:00
martignoni 08985a17a4 Added a new string for use in the upcoming events block. 2004-04-13 18:15:08 +00:00
koenr b6b337950d pollishing translation 2004-04-13 14:58:38 +00:00
koenr ff45c1f62b typo 2004-04-13 14:49:26 +00:00
defacer 00e651d1c1 Added a new string for use in the upcoming events block. 2004-04-13 12:19:33 +00:00
moodler d591b40f51 Bug fixed when determining who can post into a forum when groups are used 2004-04-12 10:12:43 +00:00
moodler 196ca3fe59 Fixed a bad bug where the Recent News block wasn't obeying Groups properly. 2004-04-12 09:57:14 +00:00
martignoni 45f4877043 Added string "refreshingevents". Used in restore. 2004-04-12 09:45:41 +00:00
moodler b656e2a976 Use the fullname function to display name on minmal forum listings 2004-04-12 06:34:44 +00:00
stronk7 1a930732ba Exclude "db" dir when detecting plugins (to be used in blocks
registration). No problems (I think) at all with mod registration.
2004-04-10 23:44:50 +00:00
stronk7 5fef34d7a9 Avoid one warning where $content and $list were empty. 2004-04-10 22:24:23 +00:00
koenr 38371ea9e9 filling in missing string with some help from Eloy 2004-04-10 20:08:44 +00:00
stronk7 c72e41bc77 Added string "refreshingevents". Used in restore. 2004-04-10 00:03:45 +00:00
stronk7 9c48354deb Modified the function. Now it accepts a courseid to restrict the check
to assignments belonging to one exact course. if not specified all
assignments in site are checked (old approach).
This function in used by restore_refresh_events() to recalculate module events.
Perhaps it should become a standard function in NEWMODULE to allow new modules
implement it.
Ciao :-)
2004-04-09 23:55:02 +00:00
stronk7 df9a165ecc Now, after restoring the course, the restore proccess executes
every MODULE_refresh_events() function to recalculate every
activity event automatically.
2004-04-09 23:40:37 +00:00
stronk7 866eb2ffbd Update a bit. 2004-04-09 21:41:00 +00:00
adamtpaw e90ee8637f few updates 2004-04-09 19:18:34 +00:00
martignoni fa9ce73c4f Optional use of the HTML editor and other fixes. 2004-04-09 16:04:35 +00:00
martignoni 8d737b6deb Unset $string['default'] variable fixed. 2004-04-09 16:01:25 +00:00
moodler db3e8b844b Tiny typo 2004-04-09 13:12:36 +00:00
bobopinna 0c6b032cca Update to 1.3develop 2004-04-09 07:50:26 +00:00
bobopinna 3751b01835 Easter cleaning. File not yet translated. Old wrong adding. 2004-04-09 07:07:32 +00:00
bobopinna 2c63a06ce0 Easter cleaning. Not yet translated, old wrong adding. 2004-04-09 06:50:36 +00:00
bobopinna db8daff32b Translated by Claudio Maggi 2004-04-09 06:45:30 +00:00
moodler 149dbaf1b3 Fix for bug 1226 2004-04-09 02:24:02 +00:00
moodler e441aac877 FIxed some quotes 2004-04-08 16:25:53 +00:00
moodler fdff1f63a3 Fixes when displaying lists of users in group mode 2004-04-08 15:12:35 +00:00
moodler 1b1c19fff7 A small fix to show the right users on the view page when groups are being used 2004-04-08 14:35:36 +00:00
moodler 6a5b5a20f4 Ack! Stupid typo fixed - thanks, Bobo! 2004-04-08 14:28:38 +00:00
koenr 4e142f770b Expanded with help for creating new initial content 2004-04-08 09:49:58 +00:00
carlesbellver e8cb0ea4a6 *** empty log message *** 2004-04-08 07:53:11 +00:00
stronk7 464edd6d2e Solved two small typos preventing quiz being deleted properly in
quiz_delete_instance() function:
public----------------------------------->publish
get_record("quiz_attempts")------------->get_records("quiz_attempts")
2004-04-07 23:38:48 +00:00
koenr 5acc5ecb97 typo 2004-04-07 22:18:27 +00:00
koenr cd0f78e7d4 initial translation by Koen Roggemans 2004-04-07 22:16:25 +00:00
koenr 76caa31ef0 move to folder without minus 2004-04-07 20:22:26 +00:00
koenr ebc80c53a0 filling in missing strings (and it works now :-) ) 2004-04-07 20:09:53 +00:00
moodler e6d8258521 A fix to help some misconfigured sites (without DirectoryIndex) 2004-04-07 13:07:38 +00:00
stigbjarne 2ec0b1eff6 Most recent local file Moodle 1.2. 2004-04-07 11:43:09 +00:00
carlesbellver 924adf9a59 *** empty log message *** 2004-04-07 11:41:29 +00:00
koenr 21989b6ebc missing strings 2004-04-07 10:56:36 +00:00
moodler 3606275985 More robust handling when creating glossary export files 2004-04-07 08:33:17 +00:00
koenr 678380e943 missing strings 2004-04-07 06:55:03 +00:00
koenr c5fc7ca339 initial translation by Koen Roggemans.
In my opinion some pages could be left out for the use in Moodle, such as the features, softwarenotes and other, not user related pages
2004-04-07 06:53:30 +00:00
koenr a8042ee627 missing string 2004-04-06 22:49:04 +00:00
anvergara afb04c9432 *** empty log message *** 2004-04-06 22:42:02 +00:00
julmis 3414788e09 Toolbar imageload fix and undo and redo fix. 2004-04-06 21:27:30 +00:00
mits d1823398c4 New translation & Polish 2004-04-06 19:28:38 +00:00
anvergara 5afab44dd6 *** empty log message *** 2004-04-06 16:26:38 +00:00
defacer 73341343a6 Corrected an oversight: the id variable isn't needed on the front page.
(Or so I think... brain's a bit moodled right now... ;)
2004-04-06 14:01:43 +00:00
carlesbellver 6a8bd8087e *** empty log message *** 2004-04-06 12:12:53 +00:00
anvergara 5670698e96 Revised 2004-04-06 11:33:23 +00:00
carlesbellver 22d61b9c1a *** empty log message *** 2004-04-06 10:12:48 +00:00
anvergara 8ee43a1d33 No longer in es_es 2004-04-06 08:30:13 +00:00
julmis 378e453317 Form position and style updates. 2004-04-06 00:43:49 +00:00
stronk7 f895027eeb Fix one SQL... 2004-04-05 22:49:23 +00:00
stronk7 632d6e50ce Incremented memory max to 80MB. To avoid possible pclzip bug...
See bugs 1216 and 1222
2004-04-05 21:37:29 +00:00
moodler cac358352f Just for fun 2004-04-05 16:57:40 +00:00
anvergara 8b88e52d62 No longer available in es_es 2004-04-05 16:37:21 +00:00
anvergara 2d48ad0f8d No longer available in es_es. 2004-04-05 16:25:02 +00:00
fiedorow d442864213 Fixed type in category.php 2004-04-05 16:07:59 +00:00
carlesbellver 9180d5cead *** empty log message *** 2004-04-05 10:49:43 +00:00
martignoni 2aad1eb0d2 Better dates 2004-04-05 06:56:09 +00:00
martignoni 3749b076e1 One new string...to restore. 2004-04-05 06:54:48 +00:00
carlesbellver 591d5168cb *** empty log message *** 2004-04-05 06:17:14 +00:00
fiedorow 9ff5310a08 Bug fix for sort order in category display and allow limit on recursive display of categories and courses 2004-04-05 03:13:10 +00:00
fiedorow 1372c95ada Compatibility update for new mimetex version 2004-04-05 02:46:52 +00:00
fiedorow 23b9d1d209 Security updates for Linux and Windows based on new source from John Forkosh 2004-04-05 02:45:11 +00:00
koenr f69be8f5a8 initial translation for wiki development version 2004-04-04 21:44:36 +00:00
stronk7 b31355aa81 One new string...to restore. 2004-04-04 18:44:35 +00:00
stronk7 70441d0f8c Now, all "with/without user data" can be selected from one option. This
should avoid a lot of clicks to Gustav. :-D
Current implementation can  be modified to buttons...if desirable.
2004-04-03 23:52:23 +00:00
moodler bdb2f23f70 Started out with a small user interface fix (to use standard functions)
and ended up cleaning up the code quite a bit
2004-04-03 13:04:00 +00:00
moodler d552efcee0 Links to enrolled courses in user profile page now link to the
user profile page in that course.

Makes it easy to see their discussions etc
2004-04-03 07:08:16 +00:00
moodler 9698bf15b9 Some changes to make login a little more robust on some sites that have
multiple addresses
2004-04-03 04:55:35 +00:00
moodler 70fb77128f WHoops, my last checkin had a typo 2004-04-03 04:50:30 +00:00
moodler c7ef02178e Whoah ... bad typo! Fixed bug 1214 - thanks Eloy! 2004-04-03 02:47:11 +00:00
moodler 426b19373d Strip tags in log menus too 2004-04-03 01:32:03 +00:00
mits 8d82cfac82 modified 2004-04-02 18:34:31 +00:00
mits 7716acfe6d New help file & polish 2004-04-02 18:24:19 +00:00
selliott ebb71a34e1 Added support for Multiple Choice Questions with Multiple answers 2004-04-02 17:16:41 +00:00
rkingdon 0f9b19dd91 Correcting field name usemaxgrade in update files. 2004-04-02 16:16:21 +00:00
rkingdon 4c8479f705 Fix bug when the last page of a lesson has no question. 2004-04-02 15:54:07 +00:00
moodler 8bcdebef81 Better dates 2004-04-02 15:48:32 +00:00
moodler a1d72936b1 Strip tags from module names .... sigh 2004-04-02 13:42:20 +00:00
carlesbellver e0d31576fb *** empty log message *** 2004-04-02 12:40:54 +00:00
carlesbellver 1ba5c9e679 *** empty log message *** 2004-04-02 10:40:43 +00:00
bobopinna efcfc0d8f8 Update to Moodle 1.3develop 2004-04-02 09:57:18 +00:00
carlesbellver 689d947e2f *** empty log message *** 2004-04-02 09:34:03 +00:00
martignoni 4aa19d3b01 More lesson version 3 updates 2004-04-02 09:22:10 +00:00
carlesbellver 2d227731cc *** empty log message *** 2004-04-02 06:46:14 +00:00
stronk7 01f50e060e First attempt to encode/decode some absolute path parts
in the backup/restore process in order to have every call to file.php
working in destination courses. Specially useful to contents created
with th HTML editor because it uses this type of URLs to images, smiles...

NOTE: This make 1.3 backups not restorable in 1.2 systems !!
2004-04-01 23:31:56 +00:00
koenr b6eddad2c4 bump dutch translation of lesson to be compatible with version 4 2004-04-01 20:05:22 +00:00
mits 91da0e03cd Polish + new translation + new translated files. 2004-04-01 19:06:58 +00:00
mits 46d656ef92 Polished. 2004-04-01 18:29:18 +00:00
rkingdon 45c27c7e4b Optional use of the HTML editor. 2004-04-01 16:56:56 +00:00
rkingdon faf63f9854 Optional use of HTML editor. 2004-04-01 16:48:16 +00:00
moodler ecc8e21b26 Update old events 2004-04-01 15:41:25 +00:00
moodler e6a4906bee Assignment module can now maintain its own events in the calendar. :-) 2004-04-01 15:40:39 +00:00
defacer 2b10fcf5a8 Following Eloy's suggestion and Martin's clarification, the wizard is going
to demonstrate a feat where 10 lines of code turn into 2, and a global var
dependency vanishes at the same time! ;)
2004-04-01 12:51:24 +00:00
defacer f30fe8d063 As per Martin's suggestion:
Added new function: get_user_timezone($timezone = 99) which retrieves
the user's timezone, respecting the $USER->timezone and $CFG->timezone
settings.

Modified all date/time library functions to use this.
2004-04-01 12:27:37 +00:00
defacer f3d142dae4 Fix for the fix: Turns out that next() returns false if an array element's
value is 0 (the php docs speak only about the key... :/). Good thing that my
test user's timezone is set to GMT+0. This should work no matter what.
2004-04-01 11:29:25 +00:00
defacer 556596510a The check for setting event dates before the course start date was written
incorrectly. What was I thinking?
2004-04-01 10:59:46 +00:00
defacer a36166d327 The timezone selection didn't work correctly... if there WAS a $USER->timezone
set but it was set to 99, it didn't check the $CFG->timezone setting.
Fixed now. Fancy implementation, forgive me please! ;)
2004-04-01 10:39:06 +00:00
defacer d8ba183c39 Checking for the $CFG->timezone value as a last resort in the various user
date/time functions didn't work because there was no global $CFG; :O
2004-04-01 10:11:20 +00:00
defacer 516a684ad7 In Eloy's notice-finding spirit, I continue by fixing another notice which
also (damnation! :) caused the HRs not to be displayed as they should.
2004-04-01 09:27:23 +00:00
defacer f80c8e0f52 Eloy's finding: The name and description fields were not initialized when
going into the "new event" form, so they printed warnings INSIDE the fields
with error_reporting(E_ALL). Added initialization as empty strings.

Now I 'm beginning to understand why Martin calls him "Eagle Eyes" :)
2004-04-01 09:08:23 +00:00
defacer 93db786cdc Eloy's finding: If the user is not a teacher or a student anywhere, this
caused an SQL error. It was handled correctly, but why an SQL query at all
if we can optimize it away?

Thanks Eloy! :)
2004-04-01 08:58:29 +00:00
defacer 3696526bf3 Eloy's finding: fixed three 'undeclared variable' notices. Leftovers from
cutting and pasting code, I just deleted them.
2004-04-01 08:52:34 +00:00
defacer efc81294eb Eloy's finding: Unset $string['default'] variable fixed. 2004-04-01 08:45:38 +00:00
carlesbellver 5bb52974d6 *** empty log message *** 2004-04-01 07:46:17 +00:00
moodler 9c8b8eeeb5 Fix for the display of hidden forums to students - bug 1209 2004-04-01 03:45:34 +00:00
moodler 07c270c127 Upgraded to latest version and fixed some undefined variables 2004-04-01 03:16:25 +00:00
moodler 66e5f959e9 Can now handle a $CFG->filelifetime to determine cacheability of files 2004-04-01 02:32:04 +00:00
paca70 c5dfc3be93 Updates, thanks to Jussi Kurikka. 2004-03-31 19:43:08 +00:00
paca70 f33facc30a More updates 2004-03-31 19:25:54 +00:00
paca70 6d94f0cd6c Updates 2004-03-31 19:24:07 +00:00
paca70 392b116c73 Replaced ` with "
CVS: ----------------------------------------------------------------------
2004-03-31 16:00:06 +00:00
carlesbellver 9593fd11ab *** empty log message *** 2004-03-31 15:27:36 +00:00
koenr c805bda56a bump dutch translation of lesson to be compatible with version 3 2004-03-31 11:31:43 +00:00
moodler 1ec2364fa3 Standard favicon 2004-03-31 09:25:20 +00:00
moodler 3c04621957 Standard favicons 2004-03-31 09:24:45 +00:00
moodler 974511397d Improved Favicon matches the logo 2004-03-31 09:11:58 +00:00
moodler 47b307976b Removing a line from stripslashes_safe ... not sure why we were replacing
these double slashes ...
2004-03-31 08:45:11 +00:00
moodler ff8352de94 Some fixes to highlighting ... it is now performed AFTER the format_text.
This means that searches can no longer mess up the TeX formatting.

Also, the concept names are now formatted, allowing multilang, TeX etc
2004-03-31 08:34:41 +00:00
moodler 34aeb9360f Make searching parameters sticky 2004-03-31 08:14:10 +00:00
moodler cc345ff6db Fixed missing argument $ratings 2004-03-31 08:05:52 +00:00
moodler 4da52954df Escape some concept strings that can cause trouble in eregi 2004-03-31 07:46:59 +00:00
defacer ed151929e3 Modified handling of the first day of the week to default to the "firstdayofweek"
language string value, according to Eloy's suggestion. Thanks for the tip! :)
2004-03-31 07:18:32 +00:00
moodler a4b35ba282 Get tough on possible sessioncookies to avoid possible lockout problems
caused by some characters in the cookie name
2004-03-31 04:14:13 +00:00
koenr b1ac0e8200 missing string 2004-03-30 21:39:27 +00:00
koenr 5ec22adafa new pollish. Should be good 2004-03-30 18:34:23 +00:00
mits c0d0fb9a8a Polishe and New translation. 2004-03-30 18:30:02 +00:00
fiedorow 1b71c53e1d Bug fix for incorrect handling of negatives in equations and inequalities 2004-03-30 17:11:56 +00:00
martignoni a388106403 Typos corrected 2004-03-30 09:41:55 +00:00
koenr e9f65c768c translation with already a lot of pollishing thanks to Jean-Pierre Pawlak 2004-03-29 22:33:20 +00:00
moodler 829b0c27a3 Added styles as per Jon's recommended install. Things may change though. 2004-03-29 15:40:15 +00:00
moodler 0d250ac10e Adding calendars by default --- later we need a course option to control
visibility
2004-03-29 15:33:26 +00:00
moodler 3ab966a2c6 Adding calendar string files 2004-03-29 15:30:37 +00:00
moodler 7423f11664 Checking in latest calendar code! Looking great, Jon! 2004-03-29 15:28:15 +00:00
stigbjarne 9757fd9a34 New file. Moodle v.1.2. 2004-03-29 11:50:59 +00:00
stigbjarne 0db0847e2e Improved. Updated to Moodle 1.2. 2004-03-29 11:49:49 +00:00
stigbjarne b51b51dc00 Updated log file 2004-03-29 11:45:58 +00:00
moodler 7626969c9c Fixed Tim's bug with the chat not updating - bug 1151
His chat->intro had 'quotes' in it
2004-03-29 06:02:21 +00:00
fiedorow 30fc04e4e8 replaced js alert by popup 2004-03-28 22:35:49 +00:00
koenr 9998c70788 Initial translation by Koen Roggemans 2004-03-28 10:07:39 +00:00
moodler 09cbeb40a2 An improvemement, I think, in the way Javascript is stripped in clean_text 2004-03-28 06:31:27 +00:00
martignoni dc24657f07 Attachments can now be completely disabled in forums 2004-03-27 22:25:28 +00:00
martignoni 78594891c8 Update to version 3 2004-03-27 22:23:11 +00:00
fiedorow d633b4eb27 Expression image now links to TeX source or debug script 2004-03-27 18:33:30 +00:00
moodler 69e8e9848f Phew, finally finished upgrading all my customers! :-) 2004-03-27 17:58:07 +00:00
moodler 56eb160c8e Attachments can now be completely disabled in forums 2004-03-27 14:32:57 +00:00
mudrd8mz 43872eb159 Arial TTF latin2 font from old 'cz' pack 2004-03-27 13:34:35 +00:00
paca70 c13edeca6a Added default values 2004-03-27 13:08:21 +00:00
rkingdon e2a9adcc57 Version 2 and 3 updates. 2004-03-27 05:01:22 +00:00
rkingdon 9e93d4d03f Version 3 update 2004-03-27 04:15:29 +00:00
rkingdon 44cbe38d7f Version 3 updates 2004-03-27 04:07:37 +00:00
adamtpaw fe79f7d2fe Translation updates for Moodle 1.2 2004-03-26 22:14:26 +00:00
bobopinna 423e19f924 Updated by Roberto "Bobo" Pinna 2004-03-26 15:45:36 +00:00
mits 87d10572a5 New translation 2004-03-26 12:50:33 +00:00
mits 8fbd4d290d Polished. 2004-03-26 12:48:18 +00:00
mits c697a53fb3 Polished. 2004-03-26 12:04:42 +00:00
julmis cfa3f2622e Cleaning up javascript and trying to make code less
memory consuming.
2004-03-26 09:29:44 +00:00
koenr 7f6de0ee70 updated to 1.2.1 2004-03-25 20:05:41 +00:00
martignoni f3c2b2b99c Some typos corrected 2004-03-25 16:32:29 +00:00
1447 changed files with 56672 additions and 20368 deletions
+44 -1
View File
@@ -3,6 +3,7 @@
require_once("../config.php");
require_once("../backup/lib.php");
require_once("../backup/backup_scheduled.php");
require_login();
@@ -57,6 +58,42 @@
foreach ($config as $name => $value) {
backup_set_config($name, $value);
}
//And now, we execute schedule_backup_next_execution() for each course in the server to have the next
//execution time updated automatically everytime it's changed.
$status = true;
//get admin
$admin = get_admin();
if (!$admin) {
$status = false;
}
//get backup config
if (! $backup_config = backup_get_config()) {
$status = false;
}
if ($status) {
//get courses
if ($courses = get_records("course")) {
//For each course, we check (insert, update) the backup_course table
//with needed data
foreach ($courses as $course) {
//We check if the course exists in backup_course
$backup_course = get_record("backup_courses","courseid",$course->id);
//If it doesn't exist, create
if (!$backup_course) {
$temp_backup_course->courseid = $course->id;
$newid = insert_record("backup_courses",$temp_backup_course);
//And get it from db
$backup_course = get_record("backup_courses","id",$newid);
}
//Now, calculate next execution of the course
$nextstarttime = schedule_backup_next_execution ($backup_course,$backup_config,time(),$admin->timezone);
//Save it to db
set_field("backup_courses","nextstarttime",$nextstarttime,"courseid",$backup_course->courseid);
}
}
}
if (!$error) {
redirect("$CFG->wwwroot/$CFG->admin/index.php", get_string("changessaved"), 1);
exit;
@@ -82,7 +119,13 @@
echo "<br />";
print_simple_box_start("center", "", "$THEME->cellheading");
include("$CFG->dirroot/backup/config.html");
//Check for required functions...
if(!function_exists('utf8_encode')) {
print_simple_box("<font color=\"red\">You need to add XML support to your PHP installation</font>", "center", "70%", "$THEME->cellheading", "20", "noticebox");
}
include ("$CFG->dirroot/backup/config.html");
print_simple_box_end();
print_footer();
+60
View File
@@ -0,0 +1,60 @@
<?PHP // $Id$
// block.php - allows admin to edit all local configuration variables for a block
require_once('../config.php');
require_once($CFG->libdir.'/blocklib.php');
require_login();
if (!isadmin()) {
error('Only an admin can use this page');
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
require_variable($_REQUEST['block']);
$blockid = intval($_REQUEST['block']);
if(($blockrecord = get_record('blocks', 'id', $blockid)) === false) {
error('This block does not exist');
}
$block = block_instance($blockrecord->name, NULL);
if($block === false) {
error('Problem in instantiating block object');
}
/// If data submitted, then process and store.
if ($config = data_submitted()) {
unset($config['block']); // This will always be set if we have reached this point
$block->handle_config($config);
print_header();
redirect("$CFG->wwwroot/$CFG->admin/blocks.php", get_string("changessaved"), 1);
exit;
}
/// Otherwise print the form.
$stradmin = get_string('administration');
$strconfiguration = get_string('configuration');
$strmanageblocks = get_string('manageblocks');
$strblockname = $block->get_title();
print_header($site->shortname.': '.$strblockname.": $strconfiguration", $site->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> ".
"<a href=\"blocks.php\">$strmanageblocks</a> -> ".$strblockname);
print_heading($strblockname);
print_simple_box('<center>'.get_string('configwarning').'</center>', 'center', '50%');
echo '<br />';
$block->print_config();
print_footer();
?>
+172
View File
@@ -0,0 +1,172 @@
<?PHP // $Id$
// Allows the admin to configure blocks (hide/show, delete and configure)
require_once('../config.php');
require_once($CFG->libdir.'/blocklib.php');
optional_variable($_GET['hide']);
optional_variable($_GET['show']);
optional_variable($_GET['delete']);
optional_variable($_GET['confirm'], 0);
$delete = $_GET['delete']; // Dependency remover
require_login();
if (!isadmin()) {
error("Only administrators can use this page!");
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
/// Print headings
$stradministration = get_string('administration');
$strconfiguration = get_string('configuration');
$strmanageblocks = get_string('manageblocks');
$strdelete = get_string('delete');
$strversion = get_string('version');
$strhide = get_string('hide');
$strshow = get_string('show');
$strsettings = get_string('settings');
$strcourses = get_string('courses');
$strname = get_string('name');
print_header("$site->shortname: $strmanageblocks", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strmanageblocks");
print_heading($strmanageblocks);
/// If data submitted, then process and store.
if (!empty($_GET['hide'])) {
if (!$block = get_record('blocks', 'id', $_GET['hide'])) {
error("Block doesn't exist!");
}
set_field('blocks', 'visible', '0', 'id', $block->id); // Hide block
}
if (!empty($_GET['show'])) {
if (!$block = get_record('blocks', 'id', $_GET['show'])) {
error("Block doesn't exist!");
}
set_field('blocks', 'visible', '1', 'id', $block->id); // Show block
}
if (!empty($delete)) {
if (!$block = get_record('blocks', 'id', $delete)) {
error("Block doesn't exist!");
}
$blockobject = block_instance($block->name, $site);
$strblockname = $blockobject->get_title();
if (!$_GET['confirm']) {
notice_yesno(get_string('blockdeleteconfirm', '', $strblockname),
'blocks.php?delete='.$block->id.'&amp;confirm=1',
'blocks.php');
print_footer();
exit;
} else {
// Delete block
if (!delete_records('blocks', 'id', $block->id)) {
notify("Error occurred while deleting the $strblockname record from blocks table");
}
blocks_update_every_block_by_id($block->id, 'delete'); // Delete blocks in all courses by id
// Then the tables themselves
if ($tables = $db->Metatables()) {
$prefix = $CFG->prefix.$block->name;
foreach ($tables as $table) {
if (strpos($table, $prefix) === 0) {
if (!execute_sql("DROP TABLE $table", false)) {
notify("ERROR: while trying to drop table $table");
}
}
}
}
$a->block = $strblockname;
$a->directory = $CFG->dirroot.'/blocks/'.$block->name;
notice(get_string('blockdeletefiles', '', $a), 'blocks.php');
}
}
/// Main display starts here
/// Get and sort the existing blocks
if (!$blocks = get_records('blocks')) {
error('No blocks found!'); // Should never happen
}
foreach ($blocks as $block) {
if(($blockobject = block_instance($block->name, NULL)) === false) {
// Failed to load
continue;
}
$blockbyname[$blockobject->get_title()] = $block->id;
$blockobjects[$block->id] = $blockobject;
}
ksort($blockbyname);
/// Print the table of all blocks
if (empty($THEME->custompix)) {
$pixpath = '../pix';
// [pj] This is not used anywhere, but I'm leaving it in for the future
//$modpixpath = '../mod';
} else {
$pixpath = '../theme/'.$CFG->theme.'/pix';
// [pj] This is not used anywhere, but I'm leaving it in for the future
//$modpixpath = '../theme/'.$CFG->theme.'/pix/mod';
}
$table->head = array ($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strdelete, $strsettings);
$table->align = array ('LEFT', 'RIGHT', 'LEFT', 'CENTER', 'CENTER', 'CENTER');
$table->wrap = array ("NOWRAP", "", "", "", "","");
$table->size = array ("100%", "10", "10", "10", "10","12");
$table->width = "100";
foreach ($blockbyname as $blockname => $blockid) {
// [pj] This is not used anywhere, but I'm leaving it in for the future
//$icon = "<img src=\"$modpixpath/$block->name/icon.gif\" hspace=10 height=16 width=16 border=0>";
$blockobject = $blockobjects[$blockid];
$delete = '<a href="blocks.php?delete='.$blockid.'">'.$strdelete.'</a>';
$settings = ''; // By default, no configuration
if($blockobject->has_config()) {
$settings = '<a href="block.php?block='.$blockid.'">'.$strsettings.'</a>';
}
$count = blocks_get_courses_using_block_by_id($blockid);
$class = ''; // Nothing fancy, by default
if ($blocks[$blockid]->visible) {
$visible = '<a href="blocks.php?hide='.$blockid.'" title="'.$strhide.'">'.
'<img src="'.$pixpath.'/i/hide.gif" style="height: 16px; width: 16px;" /></a>';
} else {
$visible = '<a href="blocks.php?show='.$blockid.'" title="'.$strshow.'">'.
'<img src="'.$pixpath.'/i/show.gif" style="height: 16px; width: 16px;" /></a>';
$class = ' class="dimmed_text"'; // Leading space required!
}
$table->data[] = array ('<p'.$class.'>'.$blockobject->get_title().'</p>', $count, $blockobject->get_version(), $visible, $delete, $settings);
}
echo '<p>';
print_table($table);
echo '</p>';
print_footer();
?>
+52
View File
@@ -404,6 +404,21 @@
<?php print_string("configfullnamedisplay") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>extendedusernamechars:</td>
<td>
<?php
unset($options);
$options[0] = get_string("no");
$options[1] = get_string("yes");
choose_from_menu ($options, "extendedusernamechars", $config->extendedusernamechars, "", "", "");
?>
</td>
<td>
<?php print_string("configextendedusernamechars") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>forcelogin:</td>
<td>
@@ -419,6 +434,21 @@
<?php print_string("configforcelogin") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>forceloginforprofiles:</td>
<td>
<?php
unset($options);
$options[0] = get_string('no');
$options[1] = get_string('yes');
choose_from_menu ($options, "forceloginforprofiles", $config->forceloginforprofiles, "", "", "");
?>
</td>
<td>
<?php print_string("configforceloginforprofiles") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>opentogoogle:</td>
<td>
@@ -435,6 +465,28 @@
</td>
</tr>
<tr valign=top>
<td align=right><p>enablerssfeeds:</td>
<td>
<?php
unset($options);
$options[0] = get_string("no");
$options[1] = get_string("yes");
choose_from_menu ($options, "enablerssfeeds", $config->enablerssfeeds, "", "", "");
?>
</td>
<td>
<?php
print_string("configenablerssfeeds");
//Check for required functions...
if(!function_exists('utf8_encode')) {
echo "<font color=\"red\"> You need to add XML support to your PHP installation.</font>";
}
?>
</td>
</tr>
<tr>
<td colspan=3 align=center>
<input type="submit" value="<?php print_string("savechanges") ?>"></td>
+1 -1
View File
@@ -28,7 +28,7 @@
print_header();
foreach ($config as $name => $value) {
if ($name == "sessioncookie") {
$value = clean_filename($value);
$value = eregi_replace("[^a-zA-Z]", "", $value);
}
unset($conf);
$conf->name = $name;
+2
View File
@@ -32,6 +32,8 @@
get_string("adminhelplanguage"));
$table->data[] = array("<b><a href=\"modules.php\">".get_string("managemodules")."</a></b>",
get_string("adminhelpmanagemodules"));
$table->data[] = array("<b><a href=\"blocks.php\">".get_string("manageblocks")."</a></b>",
get_string("adminhelpmanageblocks"));
$table->data[] = array("<b><a href=\"filters.php\">".get_string("managefilters")."</a></b>",
get_string("adminhelpmanagefilters"));
if (!isset($CFG->disablescheduledbackups)) {
+26 -2
View File
@@ -14,6 +14,14 @@
$FULLME = "cron";
$starttime = microtime();
/// The current directory in PHP version 4.3.0 and above isn't necessarily the
/// directory of the script when run from the command line. The require_once()
/// would fail, so we'll have to chdir()
if (!isset($_SERVER['REMOTE_ADDR']) && isset($_SERVER['argv'][0])) {
chdir(dirname($_SERVER['argv'][0]));
}
require_once("../config.php");
@@ -118,14 +126,16 @@
if (!isset($CFG->disablescheduledbackups)) { // Defined in config.php
//Execute backup's cron
//Perhaps a long time and memory could help in large sites
set_time_limit(0);
@set_time_limit(0);
ini_set("memory_limit","56M");
if (file_exists("$CFG->dirroot/backup/backup_scheduled.php") and
file_exists("$CFG->dirroot/backup/backuplib.php") and
file_exists("$CFG->dirroot/backup/lib.php")) {
file_exists("$CFG->dirroot/backup/lib.php") and
file_exists("$CFG->libdir/blocklib.php")) {
include_once("$CFG->dirroot/backup/backup_scheduled.php");
include_once("$CFG->dirroot/backup/backuplib.php");
include_once("$CFG->dirroot/backup/lib.php");
require_once ("$CFG->libdir/blocklib.php");
echo "Running backups if required...\n";
flush();
@@ -137,6 +147,20 @@
}
}
if (!empty($CFG->enablerssfeeds)) { //Defined in admin/variables page
if (file_exists("$CFG->dirroot/rss/rsslib.php")) {
include_once("$CFG->dirroot/rss/rsslib.php");
echo "Running rssfeeds if required...\n";
flush();
if ( ! cron_rss_feeds()) {
echo "Something went wrong while generating rssfeeds!!!\n";
} else {
echo "Rssfeeds finished\n";
}
}
}
echo "Cron script completed correctly\n";
$difftime = microtime_diff($starttime, microtime());
+2 -2
View File
@@ -51,8 +51,8 @@
$plugins = get_list_of_plugins($filterlocation);
foreach ($plugins as $key => $plugin) {
if (is_readable("$CFG->dirroot/$filterlocation/$plugin/filter.php")) {
$name = get_string("filtername", $plugin);
if ($name == "[[filtername]]") {
$name = trim(get_string("filtername", $plugin));
if (empty($name) or $name == "[[filtername]]") {
$name = $plugin;
}
$allfilters["$filterlocation/$plugin"] = $name;
+12 -14
View File
@@ -18,11 +18,11 @@
die;
}
/// Check some PHP server settings
$documentationlink = "please read the <A HREF=\"../doc/?frame=install.html&sub=webserver\">install documentation</A>";
if (ini_get_bool('session.auto_start')) {
error("The PHP server variable 'session.auto_start' should be Off - $documentationlink");
}
@@ -36,15 +36,6 @@
}
/// Check that sessions are supported
if (!is_readable(ini_get('session.save_path')) and !ini_get_bool('safe_mode')) {
$sessionpath = ini_get('session.save_path');
notify("Warning: It appears your server does not support sessions (session.save_path = '$sessionpath')");
}
/// Check that config.php has been edited
if ($CFG->wwwroot == "http://example.com/moodle") {
@@ -77,7 +68,7 @@
/// Turn off time limits, sometimes upgrades can be slow.
set_time_limit(0);
@set_time_limit(0);
/// Check if the main tables have been installed yet or not.
@@ -203,11 +194,16 @@
/// Upgrade backup/restore system if necessary
require_once("$CFG->dirroot/backup/lib.php");
upgrade_backup_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Upgrade blocks system if necessary
require_once("$CFG->dirroot/lib/blocklib.php");
upgrade_blocks_db("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Check all blocks and load (or upgrade them if necessary)
upgrade_blocks_plugins("$CFG->wwwroot/$CFG->admin/index.php"); // Return here afterwards
/// Find and check all modules and load them up or upgrade them if necessary
if (!$mods = get_list_of_plugins("mod") ) {
@@ -295,7 +291,7 @@
print_heading($module->name);
$updated_modules = true;
$db->debug = true;
set_time_limit(0); // To allow slow databases to complete the long SQL
@set_time_limit(0); // To allow slow databases to complete the long SQL
if (modify_database("$fullmod/db/$CFG->dbtype.sql")) {
$db->debug = false;
if ($module->id = insert_record("modules", $module)) {
@@ -383,6 +379,8 @@
get_string("adminhelplanguage")."</font><br />";
$configdata .= "<font size=+1>&nbsp;</font><a href=\"modules.php\">".get_string("managemodules")."</a> - <font size=1>".
get_string("adminhelpmanagemodules")."</font><br />";
$configdata .= "<font size=+1>&nbsp;</font><a href=\"blocks.php\">".get_string("manageblocks")."</a> - <font size=1>".
get_string("adminhelpmanageblocks")."</font><br />";
$configdata .= "<font size=+1>&nbsp;</font><a href=\"filters.php\">".get_string("managefilters")."</a> - <font size=1>".
get_string("adminhelpmanagefilters")."</font><br />";
if (!isset($CFG->disablescheduledbackups)) {
+4 -3
View File
@@ -206,8 +206,8 @@
$envalue = str_replace("\\","",$envalue); // Delete all slashes
echo "<tr>";
echo "<td width=20% bgcolor=\"$THEME->cellheading\" nowrap valign=top>$key</td>";
echo "<td width=40% bgcolor=\"$THEME->cellheading\" valign=top>$envalue</td>";
echo "<td dir=ltr lang=en width=20% bgcolor=\"$THEME->cellheading\" nowrap valign=top>$key</td>";
echo "<td dir=ltr lang=en width=40% bgcolor=\"$THEME->cellheading\" valign=top>$envalue</td>";
$value = $string[$key];
$value = str_replace("\r","",$value); // Bad character caused by Windows
@@ -218,7 +218,8 @@
$value = str_replace("\n\n\n","\n",$value);
$value = str_replace("\\","",$value); // Delete all slashes
$value = str_replace("%%","%",$value);
$value = htmlspecialchars($value);
$value = str_replace("<","&lt;",$value);
$value = str_replace(">","&gt;",$value);
$cellcolour = $value ? $THEME->cellcontent: $THEME->highlight;
+1 -1
View File
@@ -27,7 +27,7 @@
<br />
</font>
</td>
<td><?php print_textarea($usehtmleditor, 10, 50, 600, 400, "summary", $form->summary); ?></td>
<td><?php print_textarea($usehtmleditor, 20, 50, 600, 400, "summary", $form->summary); ?></td>
</tr>
<tr valign=top>
<td align=right><P><?php print_string("frontpageformat") ?>:</td>
+1 -1
View File
@@ -20,7 +20,7 @@
/// Turn off time limits, sometimes upgrades can be slow.
set_time_limit(0);
@set_time_limit(0);
/// Print header
+17 -4
View File
@@ -30,6 +30,18 @@
$struploadusers = get_string("uploadusers");
$straddnewuser = get_string("importuser");
$csv_encode = '/\&\#44/';
if (isset($CFG->CSV_DELIMITER)) {
$csv_delimiter = '\\' . $CFG->CSV_DELIMITER;
$csv_delimiter2 = $CFG->CSV_DELIMITER;
if (isset($CFG->CSV_ENCODE)) {
$csv_encode = '/\&\#' . $CFG->CSV_ENCODE . '/';
}
} else {
$csv_delimiter = "\,";
$csv_delimiter2 = ",";
}
/// Print the header
@@ -88,7 +100,7 @@
"group5" =>1);
// --- get header (field names) ---
$header = split("\,", fgets($fp,1024));
$header = split($csv_delimiter, fgets($fp,1024));
// check for valid field names
foreach ($header as $i => $h) {
$h = trim($h); $header[$i] = $h; // remove whitespace
@@ -111,11 +123,12 @@
foreach ($optionalDefaults as $key => $value) {
$user->$key = addslashes($adminuser->$key);
}
//Note: commas within a field should be encoded as &#44
$line = split("\,", fgets($fp,1024));
//Note: commas within a field should be encoded as &#44 (for comma separated csv files)
//Note: semicolon within a field should be encoded as &#59 (for semicolon separated csv files)
$line = split($csv_delimiter, fgets($fp,1024));
foreach ($line as $key => $value) {
//decode encoded commas
$record[$header[$key]] = preg_replace('/\&\#44/',',',trim($value));
$record[$header[$key]] = preg_replace($csv_encode,$csv_delimiter2,trim($value));
}
if ($record[$header[0]]) {
// add a new user to the database
+18
View File
@@ -17,6 +17,9 @@
if (!isset($config->ldap_bind_pw)) {
$config->ldap_bind_pw = "";
}
if (empty($config->ldap_version)) {
$config->ldap_version = "2";
}
?>
<tr valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_host_url:</TD>
@@ -29,6 +32,21 @@
</TD>
</TR>
<tr valign="top" BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_version:</TD>
<TD>
<?php
$versions[2] = "2";
$versions[3] = "3";
choose_from_menu($versions, "ldap_version", $config->ldap_version, "");
if (isset($err["ldap_version"])) formerr($err["ldap_version"]);
?>
</TD>
<TD>
<?php print_string("auth_ldap_version","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?php echo $THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_contexts:</TD>
<TD>
+4
View File
@@ -221,6 +221,10 @@ function auth_ldap_connect(){
$result = ldap_connect($CFG->ldap_host_url);
if ($result) {
if (!empty($CFG->ldap_version)) {
ldap_set_option($result, LDAP_OPT_PROTOCOL_VERSION, $CFG->ldap_version);
}
return $result;
} else {
+16 -3
View File
@@ -116,17 +116,19 @@ Backup Details:
- Browse backup files........................................DONE
- Download backup files......................................DONE
- Delete backup files........................................DONE
- Program scheduled backups..................................IN PROGRESS
- Program scheduled backups..................................DONE
- Build a configuration inteface..........................DONE
- Create the script.......................................DONE
- Integrate it in cron....................................DONE
- View logs...............................................IN PROGRESS
- View logs...............................................DONE
- Send email..............................................DONE
- Select manually the desired activities to backup...........NOT EXISTS
- Modify the backup frontend..............................NOT EXISTS
- Modify the backup of course_sections and course_modules.NOT EXISTS
- Modify every module backuplib to work properly..........NOT EXISTS
- Encode every possible internal link........................DONE
- Links to forums.........................................DONE
- Links to resources......................................DONE
Restore Details:
===============
- Delete old entries at restore start........................DONE
@@ -243,6 +245,17 @@ Restore Details:
- From database...........................................DONE
- From filesystem.........................................DONE
- Upload backup files........................................DONE
- Decode every possible internal link........................DONE
- Links to forums.........................................DONE
- From forums (post->message)..........................DONE
- From forums (forum->intro)...........................DONE
- From resources (resource->summary)...................DONE
- From resources (resource->alltext)...................DONE
- Links to resources......................................DONE
- From forums (post->message)..........................DONE
- From forums (forum->intro)...........................DONE
- From resources (resource->summary)...................DONE
- From resources (resource->alltext)...................DONE
========== ========== ========== =========== =========== =========== ===
+2 -1
View File
@@ -6,6 +6,7 @@
require_once ("../config.php");
require_once ("lib.php");
require_once ("backuplib.php");
require_once ("$CFG->libdir/blocklib.php");
optional_variable($id); // course id
optional_variable($cancel);
@@ -87,7 +88,7 @@
//Adjust some php variables to the execution of this script
ini_set("max_execution_time","3000");
ini_set("memory_limit","56M");
ini_set("memory_limit","80M");
//Call the form, depending the step we are
if (!$launch) {
+27
View File
@@ -132,6 +132,32 @@
//Now print the To Do list
echo "<tr>";
echo "<td colspan=\"2\" align=\"center\"><P><B>";
//Here we check if backup_users = None. Then, we switch off every module
//user info, user_files, logs and exercises and workshop backups. A Warning is showed to
//inform the user.
if ($backup_users == 2) {
if ($allmods = get_records("modules") ) {
foreach ($allmods as $mod) {
$modname = $mod->name;
$var = "backup_user_info_".$modname;
if (isset($$var)) {
$$var = 0;
}
$var = "backup_".$modname;
if (isset($$var)) {
if ($modname == "exercise" || $modname == "workshop") {
$$var = 0;
}
}
}
$backup_user_files = 0;
$backup_logs = 0;
}
print_simple_box("<font color=\"red\">".get_string("backupnoneusersinfo")."</font>","center", "70%", "$THEME->cellheading", "20", "noticebox");
echo "<hr noshade size=\"1\">";
}
echo get_string("backupdetails").":";
echo "</td></tr>";
@@ -180,6 +206,7 @@
echo "<td colspan=\"2\"><P><B>";
$user_options[0] = get_string("includeallusers");
$user_options[1] = get_string("includecourseusers");
$user_options[2] = get_string("includenoneusers");
echo "<li>".$user_options[$backup_users]."<P>";
//Add as hidden name
echo "<input type=\"hidden\" name=\"backup_users\" value=\"".$backup_users."\">";
+1 -2
View File
@@ -14,7 +14,6 @@
}
}
//Check site
if (!$site = get_site()) {
error("Site not found!");
@@ -110,7 +109,7 @@
echo "</td><td>";
$user_options[0] = get_string("all");
$user_options[1] = get_string("course");
//$user_options[2] = get_string("needed");-->NOT IMPLEMENTED
$user_options[2] = get_string("none");
choose_from_menu($user_options, "backup_users", $backup_users, "");
echo "</td></tr>";
+16
View File
@@ -11,6 +11,12 @@ function schedule_backup_cron() {
$emailpending = false;
//Check for required functions...
if(!function_exists('utf8_encode')) {
echo " ERROR: You need to add XML support to your PHP installation!\n";
return true;
}
//Get now
$now = time();
@@ -462,6 +468,13 @@ function schedule_backup_course_execute($preferences,$starttime = 0) {
$preferences->backup_version = $CFG->backup_version;
$preferences->backup_release = $CFG->backup_release;
//Some parts of the backup doesn't know about $preferences, so we
//put a copy of it inside that CFG (always global) to be able to
//use it. Then, when needed I search for preferences inside CFG
//Used to avoid some problems in full_tag() when preferences isn't
//set globally (i.e. in scheduled backups)
$CFG->backup_preferences = $preferences;
//Check for temp and backup and backup_unique_code directory
//Create them as needed
schedule_backup_log($starttime,$preferences->backup_course," checking temp structures");
@@ -612,6 +625,9 @@ function schedule_backup_course_execute($preferences,$starttime = 0) {
$status = clean_temp_data ($preferences);
}
//Unset CFG->backup_preferences only needed in scheduled backups
unset ($CFG->backup_preferences);
return $status;
}
+131 -65
View File
@@ -33,79 +33,84 @@
function user_check_backup($course,$backup_unique_code,$backup_users) {
//$backup_users=0-->all
// 1-->course (needed + enrolled)
// 2-->none
global $CFG;
global $db;
$count_users = 0;
//If we've selected none, simply return 0
if ($backup_users == 0 or $backup_users == 1) {
//Calculate needed users (calling every xxxx_get_participants function + scales users)
$needed_users = backup_get_needed_users($course);
//Calculate needed users (calling every xxxx_get_participants function + scales users)
$needed_users = backup_get_needed_users($course);
//Calculate enrolled users (students + teachers)
$enrolled_users = backup_get_enrolled_users($course);
//Calculate enrolled users (students + teachers)
$enrolled_users = backup_get_enrolled_users($course);
//Calculate all users (every record in users table)
$all_users = backup_get_all_users();
//Calculate all users (every record in users table)
$all_users = backup_get_all_users();
//Calculate course users (needed + enrolled)
//First, needed
$course_users = $needed_users;
//Calculate course users (needed + enrolled)
//First, needed
$course_users = $needed_users;
//Now, enrolled
if ($enrolled_users) {
foreach ($enrolled_users as $enrolled_user) {
$course_users[$enrolled_user->id]->id = $enrolled_user->id;
//Now, enrolled
if ($enrolled_users) {
foreach ($enrolled_users as $enrolled_user) {
$course_users[$enrolled_user->id]->id = $enrolled_user->id;
}
}
}
//Now, depending of parameters, create $backupable_users
if ($backup_users == 0) {
$backupable_users = $all_users;
} else {
$backupable_users = $course_users;
//Now, depending of parameters, create $backupable_users
if ($backup_users == 0) {
$backupable_users = $all_users;
} else {
$backupable_users = $course_users;
}
//If we have backupable users
if ($backupable_users) {
//Iterate over users putting their roles
foreach ($backupable_users as $backupable_user) {
$backupable_user->info = "";
//Is Admin in tables (not is_admin()) !!
if (record_exists("user_admins","userid",$backupable_user->id)) {
$backupable_user->info .= "admin";
}
//Is Course Creator in tables (not is_coursecreator()) !!
if (record_exists("user_coursecreators","userid",$backupable_user->id)) {
$backupable_user->info .= "coursecreator";
}
//Is Teacher in tables (not is_teacher()) !!
if (record_exists("user_teachers","course",$course,"userid",$backupable_user->id)) {
$backupable_user->info .= "teacher";
}
//Is Student in tables (not is_student()) !!
if (record_exists("user_students","course",$course,"userid",$backupable_user->id)) {
$backupable_user->info .= "student";
}
//Is needed user (exists in needed_users)
if (isset($needed_users[$backupable_user->id])) {
$backupable_user->info .= "needed";
}
//Now create the backup_id record
$backupids_rec->backup_code = $backup_unique_code;
$backupids_rec->table_name = "user";
$backupids_rec->old_id = $backupable_user->id;
$backupids_rec->info = $backupable_user->info;
//Insert the record id. backup_users decide it.
//When all users
$status = insert_record("backup_ids",$backupids_rec,false,"backup_code");
$count_users++;
}
//Do some output
backup_flush(30);
}
}
//If we have backupable users
if ($backupable_users) {
//Iterate over users putting their roles
foreach ($backupable_users as $backupable_user) {
$backupable_user->info = "";
//Is Admin in tables (not is_admin()) !!
if (record_exists("user_admins","userid",$backupable_user->id)) {
$backupable_user->info .= "admin";
}
//Is Course Creator in tables (not is_coursecreator()) !!
if (record_exists("user_coursecreators","userid",$backupable_user->id)) {
$backupable_user->info .= "coursecreator";
}
//Is Teacher in tables (not is_teacher()) !!
if (record_exists("user_teachers","course",$course,"userid",$backupable_user->id)) {
$backupable_user->info .= "teacher";
}
//Is Student in tables (not is_student()) !!
if (record_exists("user_students","course",$course,"userid",$backupable_user->id)) {
$backupable_user->info .= "student";
}
//Is needed user (exists in needed_users)
if (isset($needed_users[$backupable_user->id])) {
$backupable_user->info .= "needed";
}
//Now create the backup_id record
$backupids_rec->backup_code = $backup_unique_code;
$backupids_rec->table_name = "user";
$backupids_rec->old_id = $backupable_user->id;
$backupids_rec->info = $backupable_user->info;
//Insert the record id. backup_users decide it.
//When all users
$status = insert_record("backup_ids",$backupids_rec,false,"backup_code");
$count_users++;
}
//Do some output
backup_flush(30);
}
//Prepare Info
//Gets the user data
$info[0][0] = get_string("users");
@@ -123,7 +128,7 @@
function backup_get_needed_users ($courseid) {
global $CFG;
global $CFG, $THEME;
$result = false;
@@ -426,6 +431,8 @@
//Return the start tag, the contents and the end tag
function full_tag($tag,$level=0,$endline=true,$content,$to_utf=true) {
//Here we encode absolute links
$content = backup_encode_absolute_links($content);
$st = start_tag($tag,$level,$endline);
$co="";
if ($to_utf) {
@@ -455,6 +462,8 @@
fwrite ($bf,full_tag("BACKUP_RELEASE",2,false,$preferences->backup_release));
//The date
fwrite ($bf,full_tag("DATE",2,false,$preferences->backup_unique_code));
//The original site wwwroot
fwrite ($bf,full_tag("ORIGINAL_WWWROOT",2,false,$CFG->wwwroot));
//Te includes tag
fwrite ($bf,start_tag("DETAILS",2,true));
//Now, go to mod element of preferences to print its status
@@ -480,8 +489,10 @@
//The user in backup
if ($preferences->backup_users == 1) {
fwrite ($bf,full_tag("USERS",3,false,"course"));
} else {
} else if ($preferences->backup_users == 0) {
fwrite ($bf,full_tag("USERS",3,false,"all"));
} else {
fwrite ($bf,full_tag("USERS",3,false,"none"));
}
//The logs in backup
if ($preferences->backup_logs == 1) {
@@ -549,6 +560,7 @@
fwrite ($bf,full_tag("SUMMARY",3,false,$course->summary));
fwrite ($bf,full_tag("FORMAT",3,false,$course->format));
fwrite ($bf,full_tag("SHOWGRADES",3,false,$course->showgrades));
fwrite ($bf,full_tag("BLOCKINFO",3,false,blocks_get_block_names($course->blockinfo)));
fwrite ($bf,full_tag("NEWSITEMS",3,false,$course->newsitems));
fwrite ($bf,full_tag("TEACHER",3,false,$course->teacher));
fwrite ($bf,full_tag("TEACHERS",3,false,$course->teachers));
@@ -557,7 +569,7 @@
fwrite ($bf,full_tag("GUEST",3,false,$course->guest));
fwrite ($bf,full_tag("STARTDATE",3,false,$course->startdate));
fwrite ($bf,full_tag("NUMSECTIONS",3,false,$course->numsections));
fwrite ($bf,full_tag("SHOWRECENT",3,false,$course->showrecent));
//fwrite ($bf,full_tag("SHOWRECENT",3,false,$course->showrecent)); INFO: This is out in 1.3
fwrite ($bf,full_tag("MAXBYTES",3,false,$course->maxbytes));
fwrite ($bf,full_tag("SHOWREPORTS",3,false,$course->showreports));
fwrite ($bf,full_tag("GROUPMODE",3,false,$course->groupmode));
@@ -565,6 +577,7 @@
fwrite ($bf,full_tag("LANG",3,false,$course->lang));
fwrite ($bf,full_tag("MARKER",3,false,$course->marker));
fwrite ($bf,full_tag("VISIBLE",3,false,$course->visible));
fwrite ($bf,full_tag("HIDDENSECTIONS",3,false,$course->hiddensections));
fwrite ($bf,full_tag("TIMECREATED",3,false,$course->timecreated));
$status = fwrite ($bf,full_tag("TIMEMODIFIED",3,false,$course->timemodified));
//Print header end
@@ -935,13 +948,23 @@
$scales = get_records_sql("SELECT id, courseid, userid, name, scale, description, timemodified
FROM {$CFG->prefix}scale
WHERE courseid = '0' or courseid = $preferences->backup_course");
//Pring scales header
//Copy only used scales to $backupscales. They will be in backup (unused no). See Bug 1223.
$backupscales = array();
if ($scales) {
foreach ($scales as $scale) {
if (course_scale_used($preferences->backup_course, $scale->id)) {
$backupscales[] = $scale;
}
}
}
//Pring scales header
if ($backupscales) {
//Pring scales header
fwrite ($bf,start_tag("SCALES",2,true));
//Iterate
foreach ($scales as $scale) {
foreach ($backupscales as $scale) {
//Begin scale tag
fwrite ($bf,start_tag("SCALE",3,true));
//Output scale tag
@@ -986,11 +1009,13 @@
fwrite ($bf,full_tag("ID",4,false,$event->id));
fwrite ($bf,full_tag("NAME",4,false,$event->name));
fwrite ($bf,full_tag("DESCRIPTION",4,false,$event->description));
fwrite ($bf,full_tag("FORMAT",4,false,$event->format));
fwrite ($bf,full_tag("GROUPID",4,false,$event->groupid));
fwrite ($bf,full_tag("USERID",4,false,$event->userid));
fwrite ($bf,full_tag("EVENTTYPE",4,false,$event->eventtype));
fwrite ($bf,full_tag("TIMESTART",4,false,$event->timestart));
fwrite ($bf,full_tag("TIMEDURATION",4,false,$event->timeduration));
fwrite ($bf,full_tag("VISIBLE",4,false,$event->visible));
fwrite ($bf,full_tag("TIMEMODIFIED",4,false,$event->timemodified));
//End event tag
fwrite ($bf,end_tag("EVENT",3,true));
@@ -1107,6 +1132,47 @@
}
//This function encode things to make backup multi-site fully functional
//It does this conversions:
// - $CFG->wwwroot/file.php/courseid ----------------------> $@FILEPHP@$
// - Links to forums everywhere (DB) are encoded.
//
function backup_encode_absolute_links($content) {
global $CFG,$preferences;
//Check if preferences is ok. If it isn't set, we are
//in a scheduled_backup to we are able to get a copy
//from CFG->backup_preferences
if (!isset($preferences)) {
$mypreferences = $CFG->backup_preferences;
} else {
//We are in manual backups so global preferences must exist!!
$mypreferences = $preferences;
}
//First, we check for every call to file.php inside the course
$search = array($CFG->wwwroot."/file.php/".$mypreferences->backup_course);
$replace = array("$@FILEPHP@$");
$result = str_replace($search,$replace,$content);
foreach ($mypreferences->mods as $name => $info) {
//Check if the xxxx_encode_content_links exists
$function_name = $name."_encode_content_links";
if (function_exists($function_name)) {
$result = $function_name($result,$mypreferences);
}
}
if ($result != $content && $CFG->debug>7) { //Debug
echo "<br><hr>".$content."<br>changed to<br>".$result."<hr><br>"; //Debug
} //Debug
return $result;
}
//This function copies all the needed files under the "users" directory to the "user_files"
//directory under temp/backup
function backup_copy_user_files ($preferences) {
+3 -3
View File
@@ -163,13 +163,13 @@
if (!isset($firstdayofweek) || $firstdayofweek != 1) {
$firstdayofweek = 0;
}
//Now create the timestamp of a well-know sunday (02/25/2001, my 31th birthday (stronk7) !!)
$onesunday = make_timestamp(2001,2,25);
//Now create the GMT timestamp of a well-know sunday (02/25/2001, my 31th birthday (stronk7) !!)
$onesunday = gmmktime(0,0,0,2,25,2001);
$i = 0;
$day_names = "";
$check_names = "";
while ($i<7) {
$day_names[] = strftime("%A",$onesunday + (($firstdayofweek+$i)*86400));
$day_names[] = gmstrftime("%A",$onesunday + (($firstdayofweek+$i)*86400));
//Calculate standard day of week (0=Sunday......6=Saturday)
//to store info in that exact order in DB
$stddayofweek = ($i+$firstdayofweek) % 7;
+3 -3
View File
@@ -339,7 +339,7 @@
$db->debug = false;
if (set_config("backup_version", $backup_version) and set_config("backup_release", $backup_release)) {
notify(get_string("databasesuccess"), "green");
notify(get_string("databaseupgradebackups", "", $backup_release));
notify(get_string("databaseupgradebackups", "", $backup_version));
print_continue($continueto);
exit;
} else {
@@ -362,7 +362,7 @@
$db->debug=false;
if (set_config("backup_version", $backup_version) and set_config("backup_release", $backup_release)) {
notify(get_string("databasesuccess"), "green");
notify(get_string("databaseupgradebackups", "", $backup_release));
notify(get_string("databaseupgradebackups", "", $backup_version));
print_continue($continueto);
exit;
} else {
@@ -481,7 +481,7 @@
//This function is used to add slashes and decode from UTF-8
//It's used intensivelly when restoring modules and saving them in db
function backup_todb ($data) {
return addslashes(utf8_decode($data));
return restore_decode_absolute_links(addslashes(utf8_decode($data)));
}
//This function is used to check that every necessary function to
+6 -6
View File
@@ -37,9 +37,9 @@
//Lastlog view
if (!$courseid) {
print_header("$site->shortname: $strconfiguration: $strbackup", $site->fullname,
"<a href=\"../admin/index.php\">$stradmin</a> -> ".
"<a href=\"../admin/configure.php\">$strconfiguration</a> -> ".
"<a href=\"../admin/backup.php\">$strbackup</a> -> ".
"<a href=\"../$CFG->admin/index.php\">$stradmin</a> -> ".
"<a href=\"../$CFG->admin/configure.php\">$strconfiguration</a> -> ".
"<a href=\"../$CFG->admin/backup.php\">$strbackup</a> -> ".
$strlogs);
print_heading($backuploglaststatus);
@@ -81,9 +81,9 @@
//Detailed View !!
} else {
print_header("$site->shortname: $strconfiguration: $strbackup", $site->fullname,
"<a href=\"../admin/index.php\">$stradmin</a> -> ".
"<a href=\"../admin/configure.php\">$strconfiguration</a> -> ".
"<a href=\"../admin/backup.php\">$strbackup</a> -> ".
"<a href=\"../$CFG->admin/index.php\">$stradmin</a> -> ".
"<a href=\"../$CFG->admin/configure.php\">$strconfiguration</a> -> ".
"<a href=\"../$CFG->admin/backup.php\">$strbackup</a> -> ".
"<a href=\"log.php\">$strlogs</a> -> ".
$strbackupdetails);
+2 -1
View File
@@ -9,6 +9,7 @@
require_once ("../course/lib.php");
require_once ("lib.php");
require_once ("restorelib.php");
require_once("$CFG->libdir/blocklib.php");
//Optional
optional_variable($id);
@@ -94,7 +95,7 @@
//Adjust some php variables to the execution of this script
ini_set("max_execution_time","3000");
ini_set("memory_limit","56M");
ini_set("memory_limit","80M");
//Call the form, depending the step we are
if (!$launch) {
+20
View File
@@ -10,6 +10,10 @@
$restore = $SESSION->restore;
}
//Add info->original_wwwroot to $restore to be able to use it in all the restore process
//(mainly when decoding internal links)
$restore->original_wwwroot = $info->original_wwwroot;
//Check login
require_login();
@@ -267,6 +271,22 @@
}
}
//Now, if all is OK, adjust activity events
if ($status) {
echo "<li>".get_string("refreshingevents");
if (!$status = restore_refresh_events($restore)) {
notify("Could not refresh events for activities!");
}
}
//Now, if all is OK, adjust inter-activity links
if ($status) {
echo "<li>".get_string("decodinginternallinks");
if (!$status = restore_decode_content_links($restore)) {
notify("Could not refresh events for activities!");
}
}
//Now if all is OK, update:
// - course modinfo field
// - categories table
+39 -8
View File
@@ -98,7 +98,21 @@
?>
<form name="form" method="post" action="<?php echo $ME ?>">
<SCRIPT LANGUAGE="JavaScript">
<!--
function selectItemInMenuByName(formId, menuName, selectIndex ) {
myForm = document.getElementById(formId)
for (i=0,n=myForm.elements.length;i<n;i++) {
myLen = menuName.length;
myName = myForm.elements[i].name;
if (myName.substring(0,myLen) == menuName)
myForm.elements[i].options[selectIndex].selected = true;
}
}
-->
</script>
<form name="form1" id="form1" method="post" action="<?php echo $ME ?>">
<table cellpadding=5>
<?php
@@ -123,6 +137,17 @@
echo "<tr><td colspan=\"2\"><hr noshade size=\"1\"></td></tr>";
//Now, check modules and info and show posibilities
if ($allmods = get_records("modules") ) {
//Print option to select/deselect every "with user info" popup. For Gustav, lol, Eloy :-)
echo "<tr>";
echo "<td colspan=\"2\" align=\"right\"><font size=\"-1\">";
echo get_string("userdata").":";
echo "<a href=\"javascript:void(0);\" onclick=\"selectItemInMenuByName('form1', 'restore_user_info_', '1');\">".
get_string("all")."</a>/";
echo "<a href=\"javascript:void(0);\" onclick=\"selectItemInMenuByName('form1', 'restore_user_info_', '0');\">".
get_string("none")."</a>";
echo "</font></td>";
echo "</tr>";
echo "<tr><td colspan=\"2\"><hr noshade size=\"1\"></td></tr>";
foreach ($allmods as $mod) {
$modname = $mod->name;
$modrestore = $modname."_restore_mods";
@@ -178,14 +203,20 @@
echo "<td align=\"right\"><P><B>";
echo get_string("users").":";
echo "</td><td>";
//If all users are in the backup file
if ($info->backup_users == "all") {
$user_options[0] = get_string("all");
//If some user is present in the backup file
if ($info->backup_users == "all" or $info->backup_users == "course") {
//If all users are in the backup file
if ($info->backup_users == "all") {
$user_options[0] = get_string("all");
}
$user_options[1] = get_string("course");
$user_options[2] = get_string("none");
choose_from_menu($user_options, "restore_users", $restore_users, "");
} else {
echo get_string("none");
echo "<input type=\"hidden\" name=\"restore_users\" value=\"2\">";
}
$user_options[1] = get_string("course");
$user_options[2] = get_string("none");
//$user_options[2] = get_string("needed");-->NOT IMPLEMENTED
choose_from_menu($user_options, "restore_users", $restore_users, "");
echo "</td></tr>";
//Now print the Logs tr
+9 -3
View File
@@ -68,20 +68,26 @@
//Now copy he zip file to dataroot/temp/backup/backup_unique_code
if ($status) {
echo "<li>".get_string("copyingzipfile");
$status = backup_copy_file($file,$CFG->dataroot."/temp/backup/".$backup_unique_code."/".basename($file));
if (! $status = backup_copy_file($file,$CFG->dataroot."/temp/backup/".$backup_unique_code."/".basename($file))) {
notify("Error copying backup file. Invalid name or bad perms.");
}
}
//Now unzip the file
if ($status) {
echo "<li>".get_string("unzippingbackup");
$status = restore_unzip ($CFG->dataroot."/temp/backup/".$backup_unique_code."/".basename($file));
if (! $status = restore_unzip ($CFG->dataroot."/temp/backup/".$backup_unique_code."/".basename($file))) {
notify("Error unzipping backup file. Invalid zip file.");
}
}
//Now check for the moodle.xml file
if ($status) {
$xml_file = $CFG->dataroot."/temp/backup/".$backup_unique_code."/moodle.xml";
echo "<li>".get_string("checkingbackup");
$status = restore_check_moodle_file ($xml_file);
if (! $status = restore_check_moodle_file ($xml_file)) {
notify("Error checking backup file. Invalid or corrupted.");
}
}
$info = "";
+253 -6
View File
@@ -52,6 +52,199 @@
return $status;
}
//This function iterates over all modules in backup file, searching for a
//MODNAME_refresh_events() to execute. Perhaps it should ve moved to central Moodle...
function restore_refresh_events($restore) {
global $CFG;
$status = true;
//Take all modules in backup
$modules = $restore->mods;
//Iterate
foreach($modules as $name => $module) {
//Only if the module is being restored
if ($module->restore == 1) {
//Include module library
include_once("$CFG->dirroot/mod/$name/lib.php");
//If module_refresh_events exists
$function_name = $name."_refresh_events";
if (function_exists($function_name)) {
$status = $function_name($restore->course_id);
}
}
}
return $status;
}
//This function makes all the necessary calls to xxxx_decode_content_links_caller()
//function in each module, passing them the desired contents to be decoded
//from backup format to destination site/course in order to mantain inter-activities
//working in the backup/restore process
function restore_decode_content_links($restore) {
global $CFG;
$status = true;
echo "<ul>";
foreach ($restore->mods as $name => $info) {
//If the module is being restored
if ($info->restore == 1) {
//Check if the xxxx_decode_content_links_caller exists
$function_name = $name."_decode_content_links_caller";
if (function_exists($function_name)) {
echo "<li>".get_string ("to")." ".get_string("modulenameplural",$name);
$status = $function_name($restore);
}
}
}
//Now I'm going to decode to their new location all the links in wiki texts
//having the syntax " modulename:moduleid".
echo "<li>wiki";
$status = restore_decode_wiki_texts($restore);
echo "</ul>";
return $status;
}
//This function search for some wiki texts in differenct parts of Moodle to
//decode them to their new ids.
function restore_decode_wiki_texts($restore) {
global $CFG;
$status = true;
echo "<ul>";
if (file_exists("$CFG->dirroot/mod/resource/lib.php")) {
include_once("$CFG->dirroot/mod/resource/lib.php");
}
$formatwiki = FORMAT_WIKI;
$typewiki = WIKITEXT;
//FORUM: Decode every POST (message) in the course
//Check we are restoring forums
if ($restore->mods['forum']->restore == 1) {
echo "<li>".get_string("from")." ".get_string("modulenameplural","forum");
//Get all course posts
if ($posts = get_records_sql ("SELECT p.id, p.message
FROM {$CFG->prefix}forum_posts p,
{$CFG->prefix}forum_discussions d
WHERE d.course = $restore->course_id AND
p.discussion = d.id AND
p.format = $formatwiki")) {
//Iterate over each post->message
$i = 0; //Counter to send some output to the browser to avoid timeouts
foreach ($posts as $post) {
//Increment counter
$i++;
$content = $post->message;
//Decode it
$result = restore_decode_wiki_content($content,$restore);
if ($result != $content) {
//Update record
$post->message = addslashes($result);
$status = update_record("forum_posts",$post);
if ($CFG->debug>7) {
echo "<br><hr>".$content."<br>changed to</br>".$result."<hr><br>";
}
}
//Do some output
if (($i+1) % 5 == 0) {
echo ".";
if (($i+1) % 100 == 0) {
echo "<br>";
}
backup_flush(300);
}
}
}
}
//RESOURCE: Decode every RESOURCE (alltext) in the coure
//Check we are restoring resources
if ($restore->mods['resource']->restore == 1) {
echo "<li>".get_string("from")." ".get_string("modulenameplural","resource");
//Get all course resources of type=8 WIKITEXT
if ($resources = get_records_sql ("SELECT r.id, r.alltext
FROM {$CFG->prefix}resource r
WHERE r.course = $restore->course_id AND
r.type = $typewiki")) {
//Iterate over each resource->alltext
$i = 0; //Counter to send some output to the browser to avoid timeouts
foreach ($resources as $resource) {
//Increment counter
$i++;
$content = $resource->alltext;
//Decode it
$result = restore_decode_wiki_content($content,$restore);
if ($result != $content) {
//Update record
$resource->alltext = addslashes($result);
$status = update_record("resource",$resource);
if ($CFG->debug>7) {
echo "<br><hr>".$content."<br>changed to</br>".$result."<hr><br>";
}
}
//Do some output
if (($i+1) % 5 == 0) {
echo ".";
if (($i+1) % 100 == 0) {
echo "<br>";
}
backup_flush(300);
}
}
}
}
echo "</ul>";
return $status;
}
//This function receives a wiki text in the restore process and
//return it with every link to modules " modulename:moduleid"
//converted if possible. See the space before modulename!!
function restore_decode_wiki_content($content,$restore) {
global $CFG;
$result = $content;
$searchstring='/ ([a-zA-Z]+):([0-9]+)\(([^)]+)\)/';
//We look for it
preg_match_all($searchstring,$content,$foundset);
//If found, then we are going to look for its new id (in backup tables)
if ($foundset[0]) {
//print_object($foundset); //Debug
//Iterate over foundset[2]. They are the old_ids
foreach($foundset[2] as $old_id) {
//We get the needed variables here (course id)
$rec = backup_getid($restore->backup_unique_code,"course_modules",$old_id);
//Personalize the searchstring
$searchstring='/ ([a-zA-Z]+):'.$old_id.'\(([^)]+)\)/';
//If it is a link to this course, update the link to its new location
if($rec->new_id) {
//Now replace it
$result= preg_replace($searchstring,' $1:'.$rec->new_id.'($2)',$result);
} else {
//It's a foreign link so redirect it to its original URL
$result= preg_replace($searchstring,$restore->original_wwwroot.'/mod/$1/view.php?id='.$old_id.'($2)',$result);
}
}
}
return $result;
}
//This function read the xml file and store it data from the info zone in an object
function restore_read_xml_info ($xml_file) {
@@ -338,6 +531,7 @@
$course->summary = addslashes($course_header->course_summary);
$course->format = addslashes($course_header->course_format);
$course->showgrades = addslashes($course_header->course_showgrades);
$course->blockinfo = addslashes($course_header->blockinfo);
$course->newsitems = addslashes($course_header->course_newsitems);
$course->teacher = addslashes($course_header->course_teacher);
$course->teachers = addslashes($course_header->course_teachers);
@@ -346,7 +540,7 @@
$course->guest = addslashes($course_header->course_guest);
$course->startdate = addslashes($course_header->course_startdate);
$course->numsections = addslashes($course_header->course_numsections);
$course->showrecent = addslashes($course_header->course_showrecent);
//$course->showrecent = addslashes($course_header->course_showrecent); INFO: This is out in 1.3
$course->maxbytes = addslashes($course_header->course_maxbytes);
$course->showreports = addslashes($course_header->course_showreports);
$course->groupmode = addslashes($course_header->course_groupmode);
@@ -354,8 +548,23 @@
$course->lang = addslashes($course_header->course_lang);
$course->marker = addslashes($course_header->course_marker);
$course->visible = addslashes($course_header->course_visible);
$course->hiddensections = addslashes($course_header->course_hiddensections);
$course->timecreated = addslashes($course_header->course_timecreated);
$course->timemodified = addslashes($course_header->course_timemodified);
//Adjust blockinfo field.
//If the info doesn't exist in backup, we create defaults, else we recode it
//to current site blocks.
if (!$course->blockinfo) {
//Create blockinfo default content
if ($course->format == "social") {
$course->blockinfo = blocks_get_default_blocks (NULL,"participants,search_forums,calendar_month,calendar_upcoming,social_activities,recent_activity,admin,course_list");
} else {
//For topics and weeks formats (default built in the function)
$course->blockinfo = blocks_get_default_blocks();
}
} else {
$course->blockinfo = blocks_get_block_ids($course->blockinfo);
}
//Now insert the record
$newid = insert_record("course",$course);
if ($newid) {
@@ -979,6 +1188,7 @@
//Now build the EVENT record structure
$eve->name = backup_todb($info['EVENT']['#']['NAME']['0']['#']);
$eve->description = backup_todb($info['EVENT']['#']['DESCRIPTION']['0']['#']);
$eve->format = backup_todb($info['EVENT']['#']['FORMAT']['0']['#']);
$eve->courseid = $restore->course_id;
$eve->groupid = backup_todb($info['EVENT']['#']['GROUPID']['0']['#']);
$eve->userid = backup_todb($info['EVENT']['#']['USERID']['0']['#']);
@@ -987,12 +1197,12 @@
$eve->eventtype = backup_todb($info['EVENT']['#']['EVENTTYPE']['0']['#']);
$eve->timestart = backup_todb($info['EVENT']['#']['TIMESTART']['0']['#']);
$eve->timeduration = backup_todb($info['EVENT']['#']['TIMEDURATION']['0']['#']);
$eve->visible = backup_todb($info['EVENT']['#']['VISIBLE']['0']['#']);
$eve->timemodified = backup_todb($info['EVENT']['#']['TIMEMODIFIED']['0']['#']);
//Now search if that event exists (by description and timestart field) in
//restore->course_id course
$eve_db = get_record("event","courseid",$restore->course_id,"description",$eve->description,"timestart",$eve->timestart);
$eve_db = get_record("event","courseid",$eve->courseid,"description",$eve->description,"timestart",$eve->timestart);
//If it doesn't exist, create
if (!$eve_db) {
$create_event = true;
@@ -1012,6 +1222,9 @@
$group = backup_getid($restore->backup_unique_code,"group",$eve->groupid);
if ($group) {
$eve->groupid = $group->new_id;
} else {
//Assign it to group 0
$eve->groupid = 0;
}
//The structure is equal to the db, so insert the event
@@ -1034,6 +1247,31 @@
return $status;
}
//This function decode things to make restore multi-site fully functional
//It does this conversions:
// - $@FILEPHP@$ -------------------------------> $CFG->wwwroot/file.php/courseid
//
//Note: Inter-activities linking is being implemented as a final
//step in the restore execution, because we need to have it
//finished to know all the oldid, newid equivaleces
function restore_decode_absolute_links($content) {
global $CFG,$restore;
//Now decode wwwroot and file.php calls
$search = array ("$@FILEPHP@$");
$replace = array ($CFG->wwwroot."/file.php/".$restore->course_id);
$result = str_replace($search,$replace,$content);
if ($result != $content && $CFG->debug>7) { //Debug
echo "<br><hr>".$content."<br>changed to<br>".$result."<hr><br>"; //Debug
} //Debug
return $result;
}
//This function restores the userfiles from the temp (user_files) directory to the
//dataroot/users directory
function restore_user_files($restore) {
@@ -1849,6 +2087,9 @@
case "DATE":
$this->info->backup_date = $this->getContents();
break;
case "ORIGINAL_WWWROOT":
$this->info->original_wwwroot = $this->getContents();
break;
}
}
if ($this->tree[3] == "DETAILS") {
@@ -1928,6 +2169,9 @@
case "SHOWGRADES":
$this->info->course_showgrades = $this->getContents();
break;
case "BLOCKINFO":
$this->info->blockinfo = $this->getContents();
break;
case "NEWSITEMS":
$this->info->course_newsitems = $this->getContents();
break;
@@ -1952,9 +2196,9 @@
case "NUMSECTIONS":
$this->info->course_numsections = $this->getContents();
break;
case "SHOWRECENT":
$this->info->course_showrecent = $this->getContents();
break;
//case "SHOWRECENT": INFO: This is out in 1.3
// $this->info->course_showrecent = $this->getContents();
// break;
case "MAXBYTES":
$this->info->course_maxbytes = $this->getContents();
break;
@@ -1976,6 +2220,9 @@
case "VISIBLE":
$this->info->course_visible = $this->getContents();
break;
case "HIDDENSECTIONS":
$this->info->course_hiddensections = $this->getContents();
break;
case "TIMECREATED":
$this->info->course_timecreated = $this->getContents();
break;
+2 -2
View File
@@ -5,6 +5,6 @@
// database (backup_version) to determine whether upgrades should
// be performed (see db/backup_*.php)
$backup_version = 2004032500; // The current version is a date (YYYYMMDDXX)
$backup_version = 2004052400; // The current version is a date (YYYYMMDDXX)
$backup_release = "1.2.1"; // User-friendly version number
$backup_release = "1.3"; // User-friendly version number
+53
View File
@@ -0,0 +1,53 @@
-------------------------------------------------------------------------------
CREATING NEW BLOCKS
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
WARNING - PRELIMINARY DOCUMENTATION
This is designed to point new block developers in the right direction. At times
it may NOT be fully up-to-date with the source, or it may even contain some
tiny bit of misinformation that has slipped our notice. If you encounter such a
case, please:
1. Use the existing block code as reference
2. Come to the moodle.org forums and tell the world! :) We 'll help you!
-------------------------------------------------------------------------------
You have to derive a class that extends MoodleBlock.
The derived class MUST:
* Implement a constructor that:
1. Sets $this->content_type (BLOCK_TYPE_LIST or BLOCK_TYPE_TEXT)
3. Sets $this->title
4. Sets $this->version
5. Sets $this->course equal to its only argument
The derived class MAY:
* Declare that the block has a configuration interface.
To do so:
1. Define a method has_config() {return true;}
2. Define a method print_config() that prints whatever
configuration interface you want to have.
3. Define a method handle_config($data) that does what
is needed. $data comes straight from data_submitted().
* Limit the course formats it can be displayed in.
To do so:
1. Define a method applicable_formats() which returns a bitwise
OR of one or more COURSE_FORMAT_XXX defined constants. These
are defined in lib/blocklib.php.
* Select a "preferred" width which the course format will try to honor.
To do so:
1. Define a method preferred_width() which returns an integer.
This is the block's preferred width in pixels.
* Declare that the block is going to hide its header. This will result
in a more lightweight appearance. Ideal for announcements/notices.
To do so:
1. Define a method hide_header() {return true;}
@@ -0,0 +1,39 @@
<?PHP //$Id$
class CourseBlock_activity_modules extends MoodleBlock {
function CourseBlock_activity_modules($course) {
$this->title = get_string('activities');
$this->content_type = BLOCK_TYPE_LIST;
$this->course = $course;
$this->version = 2004041000;
}
function get_content() {
global $USER, $CFG;
// This is really NOT pretty, but let's do it simple for now...
global $modnamesused, $modnamesplural;
if($this->content !== NULL) {
return $this->content;
}
$this->content = New object;
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';
if ($modnamesused) {
foreach ($modnamesused as $modname => $modfullname) {
if ($modname != 'label') {
$this->content->items[] = '<a href="../mod/'.$modname.'/index.php?id='.$this->course->id.'">'.$modnamesplural[$modname].'</a>';
$this->content->icons[] = '<img src="'.$CFG->modpixpath.'/'.$modname.'/icon.gif" height="16" width="16" alt="">';
}
}
}
return $this->content;
}
}
?>
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to MySQL
function activity_modules_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to PostgreSQL
function activity_modules_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
+110
View File
@@ -0,0 +1,110 @@
<?PHP //$Id$
class CourseBlock_admin extends MoodleBlock {
function CourseBlock_admin($course) {
$this->title = get_string('administration');
$this->content_type = BLOCK_TYPE_LIST;
$this->course = $course;
$this->version = 2004041000;
}
function get_content() {
global $USER, $CFG, $THEME;
require_once($CFG->dirroot.'/mod/forum/lib.php');
if($this->content !== NULL) {
return $this->content;
}
$this->content = New object;
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';
if (isguest()) {
return $this->content;
}
if (isteacher($this->course->id)) {
$isteacheredit = isteacheredit($this->course->id);
if ($isteacheredit) {
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/edit.gif" height="16" width="16" alt="">';
if (isediting($this->course->id)) {
$this->content->items[]='<a href="view.php?id='.$this->course->id.'&amp;edit=off">'.get_string('turneditingoff').'</a>';
} else {
$this->content->items[]='<a href="view.php?id='.$this->course->id.'&amp;edit=on">'.get_string('turneditingon').'</a>';
}
$this->content->items[]='<a href="edit.php?id='.$this->course->id.'">'.get_string('settings').'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/settings.gif" height="16" width="16" alt="">';
if (iscreator() or !empty($CFG->teacherassignteachers)) {
if (!$this->course->teachers) {
$this->course->teachers = get_string('defaultcourseteachers');
}
$this->content->items[]='<a href="teacher.php?id='.$this->course->id.'">'.$this->course->teachers.'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/users.gif" height="16" width="16" alt="">';
}
if (!$this->course->students) {
$this->course->students = get_string('defaultcoursestudents');
}
$this->content->items[]='<a href="student.php?id='.$this->course->id.'">'.$this->course->students.'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/users.gif" height="16" width="16" alt="">';
$this->content->items[]='<a href="'.$CFG->wwwroot.'/backup/backup.php?id='.$this->course->id.'">'.get_string('backup').'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/backup.gif" height="16" width="16" alt="">';
$this->content->items[]='<a href="'.$CFG->wwwroot.'/files/index.php?id='.$this->course->id.'&amp;wdir=/backupdata">'.get_string('restore').'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/restore.gif" height="16" width="16" alt="">';
$this->content->items[]='<a href="scales.php?id='.$this->course->id.'">'.get_string('scales').'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/scales.gif" height="16" width="16" alt="">';
}
$this->content->items[]='<a href="grades.php?id='.$this->course->id.'">'.get_string('grades').'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/grades.gif" height="16" width="16" alt="">';
$this->content->items[]='<a href="log.php?id='.$this->course->id.'">'.get_string('logs').'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/log.gif" height="16" width="16" alt="">';
if ($isteacheredit) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/files/index.php?id='.$this->course->id.'">'.get_string('files').'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/files.gif" height="16" width="16" alt="">';
}
$this->content->items[]='<a href="'.$CFG->wwwroot.'/doc/view.php?id='.$this->course->id.'&amp;file=teacher.html">'.get_string('help').'...</a>';
$this->content->icons[]='<img src="'.$CFG->modpixpath.'/resource/icon.gif" height="16" width="16" alt="">';
if ($teacherforum = forum_get_course_forum($this->course->id, 'teacher')) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/mod/forum/view.php?f='.$teacherforum->id.'">'.get_string('nameteacher', 'forum').'</a>';
$this->content->icons[]='<img src="'.$CFG->modpixpath.'/forum/icon.gif" height="16" width="16" alt="">';
}
} else if (!isguest()) { // Students menu
if ($this->course->showgrades) {
$this->content->items[]='<a href="grade.php?id='.$this->course->id.'">'.get_string('grades').'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/grades.gif" height="16" width="16" alt="">';
}
if ($this->course->showreports) {
$this->content->items[]='<a href="user.php?id='.$this->course->id.'&amp;user='.$USER->id.'">'.get_string('activityreport').'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/report.gif" height="16" width="16" alt="">';
}
if (is_internal_auth()) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/login/change_password.php?id='.$this->course->id.'">'.get_string('changepassword').'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" height="16" width="16" alt="">';
} else if ($CFG->changepassword) {
$this->content->items[]='<a href="'.$CFG->changepassword.'">'.get_string('changepassword').'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" height="16" width="16" alt="">';
}
if ($CFG->allowunenroll) {
$this->content->items[]='<a href="unenrol.php?id='.$this->course->id.'">'.get_string('unenrolme', '', $this->course->shortname).'...</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" height="16" width="16" alt="">';
}
}
return $this->content;
}
}
?>
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to MySQL
function admin_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to PostgreSQL
function admin_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
@@ -0,0 +1,63 @@
<?PHP //$Id$
class CourseBlock_calendar_month extends MoodleBlock {
function CourseBlock_calendar_month($course) {
$this->title = get_string('calendar', 'calendar');
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2004052400;
}
function get_content() {
global $USER, $CFG, $SESSION;
optional_variable($_GET['cal_m']);
optional_variable($_GET['cal_y']);
require_once($CFG->dirroot.'/calendar/lib.php');
if ($this->content !== NULL) {
return $this->content;
}
$this->content = New object;
$this->content->text = '';
$this->content->footer = '';
if ($this->course === NULL) {
// Overrides: use no course at all
$courseshown = false;
$filtercourse = array();
} else {
$courseshown = $this->course->id;
$filtercourse = array($courseshown => 1);
}
// We 'll need this later
calendar_set_referring_course($courseshown);
// Be VERY careful with the format for default courses arguments!
// Correct formatting is [courseid] => 1 to be concise with moodlelib.php functions.
calendar_set_filters($courses, $group, $user, $filtercourse, $filtercourse);
if ($courseshown == 1) {
// For the front page
$this->content->text .= calendar_overlib_html();
$this->content->text .= calendar_top_controls('frontpage', array('m' => $_GET['cal_m'], 'y' => $_GET['cal_y']));
$this->content->text .= calendar_get_mini($courses, $group, $user, $_GET['cal_m'], $_GET['cal_y']);
// No filters for now
} else {
// For any other course
$this->content->text .= calendar_overlib_html();
$this->content->text .= calendar_top_controls('course', array('id' => $courseshown, 'm' => $_GET['cal_m'], 'y' => $_GET['cal_y']));
$this->content->text .= calendar_get_mini($courses, $group, $user, $_GET['cal_m'], $_GET['cal_y']);
$this->content->text .= calendar_filter_controls('course', '', $this->course);
}
return $this->content;
}
}
?>
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to MySQL
function calendar_month_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to PostgreSQL
function calendar_month_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
@@ -0,0 +1,55 @@
<?PHP //$Id$
class CourseBlock_calendar_upcoming extends MoodleBlock {
function CourseBlock_calendar_upcoming ($course) {
$this->title = get_string('upcomingevents', 'calendar');
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2004052400;
}
function get_content() {
global $USER, $CFG, $SESSION;
optional_variable($_GET['cal_m']);
optional_variable($_GET['cal_y']);
require_once($CFG->dirroot.'/calendar/lib.php');
if($this->content !== NULL) {
return $this->content;
}
$this->content = New object;
$this->content->text = '';
$this->content->footer = '<br /><a href="'.$CFG->wwwroot.'/calendar/view.php?view=upcoming&amp;course='.$this->course->id.'">'.get_string('gotocalendar', 'calendar').'</a>...';
$this->content->footer .= '<br /><a href="'.$CFG->wwwroot.'/calendar/event.php?action=new">'.get_string('newevent', 'calendar').'</a>...';
if($this->course === NULL) {
// Overrides: use no course at all
$courseshown = false;
$filtercourse = array();
}
else {
$courseshown = $this->course->id;
$filtercourse = array($courseshown => 1);
}
// We 'll need this later
calendar_set_referring_course($courseshown);
// Be VERY careful with the format for default courses arguments!
// Correct formatting is [courseid] => 1 to be concise with moodlelib.php functions.
calendar_set_filters($courses, $group, $user, $filtercourse, $filtercourse, false);
$this->content->text = calendar_get_sideblock_upcoming($courses, $group, $user, get_user_preferences('calendar_lookahead', CALENDAR_UPCOMING_DAYS), get_user_preferences('calendar_maxevents', CALENDAR_UPCOMING_MAXEVENTS));
if(empty($this->content->text)) {
$this->content->text = '<div style="font-size: 0.8em; text-align: center;">'.get_string('noupcomingevents', 'calendar').'</div>';
}
return $this->content;
}
}
?>
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to MySQL
function calendar_upcoming_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to PostgreSQL
function calendar_upcoming_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
+82
View File
@@ -0,0 +1,82 @@
<?PHP //$Id$
class CourseBlock_course_list extends MoodleBlock {
function CourseBlock_course_list ($course) {
$this->title = get_string('mycourses');
$this->content_type = BLOCK_TYPE_LIST;
$this->course = $course;
$this->version = 2004041800;
}
function get_content() {
global $THEME, $CFG, $USER;
if($this->content !== NULL) {
return $this->content;
}
$this->content = New object;
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';
if (empty($THEME->custompix)) {
$icon = "<img src=\"$CFG->wwwroot/pix/i/course.gif\"".
" height=\"16\" width=\"16\" alt=\"".get_string("course")."\">";
} else {
$icon = "<img src=\"$CFG->wwwroot/theme/$CFG->theme/pix/i/course.gif\"".
" height=\"16\" width=\"16\" alt=\"".get_string("course")."\">";
}
if (isset($USER->id) and !isadmin()) { // Just print My Courses
if ($courses = get_my_courses($USER->id)) {
foreach ($courses as $course) {
if (!$course->category) {
continue;
}
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
$this->content->items[]="<a $linkcss title=\"$course->shortname\" ".
"href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</a>";
$this->content->icons[]=$icon;
}
$this->title = get_string('mycourses');
$this->content->footer = "<p><a href=\"$CFG->wwwroot/course/index.php\">".get_string("fulllistofcourses")."</a>...";
return $this->content;
}
}
$categories = get_categories("0"); // Parent = 0 ie top-level categories only
if ($categories) { //Check we have categories
if (count($categories) > 1) { // Just print top level category links
foreach ($categories as $category) {
$linkcss = $category->visible ? "" : " class=\"dimmed\" ";
$this->content->items[]="<a $linkcss href=\"$CFG->wwwroot/course/category.php?id=$category->id\">$category->name</a>";
$this->content->icons[]=$icon;
}
$this->content->footer = "<p><a href=\"$CFG->wwwroot/course/\">".get_string("searchcourses")."</a>...";
$this->title = get_string('categories');
} else { // Just print course names of single category
$category = array_shift($categories);
$courses = get_courses($category->id);
if ($courses) {
foreach ($courses as $course) {
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
$this->content->items[]="<a $linkcss title=\"$course->shortname\" ".
"href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</a>";
$this->content->icons[]=$icon;
}
$this->content->footer = "<p><a href=\"$CFG->wwwroot/course/index.php\">".get_string("fulllistofcourses")."</a>...";
} else {
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = get_string('nocoursesyet');
}
$this->title = get_string('courses');
}
}
return $this->content;
}
}
?>
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to MySQL
function course_list_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to PostgreSQL
function course_list_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
@@ -0,0 +1,29 @@
<?PHP //$Id$
class CourseBlock_course_summary extends MoodleBlock {
function CourseBlock_course_summary ($course) {
$this->title = get_string('blockname','block_course_summary');
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2004041400;
}
function get_content() {
global $USER, $CFG;
if($this->content !== NULL) {
return $this->content;
}
$this->content = New object;
$this->content->text = '';
$this->content->footer = '';
$this->content->text = format_text($this->course->summary, FORMAT_HTML);
return $this->content;
}
function hide_header() {return true;}
}
?>
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to MySQL
function course_summary_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to PostgreSQL
function course_summary_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
+43
View File
@@ -0,0 +1,43 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to MySQL
function blocks_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = execute_sql("CREATE TABLE `{$CFG->prefix}blocks` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(40) NOT NULL default '',
`version` int(10) NOT NULL default '0',
`cron` int(10) unsigned NOT NULL default '0',
`lastcron` int(10) unsigned NOT NULL default '0',
`visible` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`id`)
)
COMMENT = 'To register and update all the available blocks'");
}
//Finally, return result
return $result;
}
?>
+15
View File
@@ -0,0 +1,15 @@
# $Id$
#
# Table structure for table `blocks`
#
CREATE TABLE `prefix_blocks` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(40) NOT NULL default '',
`version` int(10) NOT NULL default '0',
`cron` int(10) unsigned NOT NULL default '0',
`lastcron` int(10) unsigned NOT NULL default '0',
`visible` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
# --------------------------------------------------------
+45
View File
@@ -0,0 +1,45 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to PostgreSQL
function blocks_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = execute_sql("
CREATE TABLE {$CFG->prefix}blocks
(
id SERIAL8 PRIMARY KEY,
name varchar(40) NOT NULL default '',
version INT8 NOT NULL default '0',
cron INT8 NOT NULL default '0',
lastcron INT8 NOT NULL default '0',
visible int NOT NULL default '1'
)
") ;
}
//Finally, return result
return $result;
}
?>
+14
View File
@@ -0,0 +1,14 @@
# $Id$
#
# Table structure for table blocks
#
CREATE TABLE prefix_blocks (
id SERIAL8 PRIMARY KEY,
name varchar(40) NOT NULL default '',
version INT8 NOT NULL default '0',
cron INT8 NOT NULL default '0',
lastcron INT8 NOT NULL default '0',
visible int NOT NULL default '1'
) ;
# --------------------------------------------------------
+265
View File
@@ -0,0 +1,265 @@
<?php // $Id$
define('BLOCK_TYPE_LIST', 1);
define('BLOCK_TYPE_TEXT', 2);
define('BLOCK_TYPE_NUKE', 3);
class MoodleBlock {
var $str;
var $title = NULL;
var $course = NULL;
var $content_type = NULL;
var $content = NULL;
var $edit_controls = NULL;
var $version = NULL;
function name() {
// Returns the block name, as present in the class name,
// the database, the block directory, etc etc.
static $myname;
if($myname === NULL) {
$myname = strtolower(get_class($this));
$myname = substr($myname, strpos($myname, '_') + 1);
}
return $myname;
}
function get_content() {
// This should be implemented by the derived class.
return NULL;
}
function get_title() {
// Intentionally doesn't check if a title is set, for _test_self()
return $this->title;
}
function get_content_type() {
// Intentionally doesn't check if a content_type is set, for _test_self()
return $this->content_type;
}
function get_version() {
// Intentionally doesn't check if a version is set, for _test_self()
return $this->version;
}
function get_header() {
// Intentionally doesn't check if a header is set, for _test_self()
return $this->header;
}
function refresh_content() {
// Nothing special here, depends on content()
$this->content = NULL;
return $this->get_content();
}
function print_block() {
// Wrap the title in a floating DIV, in case we have edit controls to display
// These controls will always be wrapped on a right-floating DIV
$title = '<div style="float: left;">'.$this->title.'</div>';
if($this->edit_controls !== NULL) {
$title .= $this->edit_controls;
}
$this->get_content();
switch($this->content_type) {
case BLOCK_TYPE_NUKE:
case BLOCK_TYPE_TEXT:
if(empty($this->content->text) && empty($this->content->footer)) {
break;
}
if ($this->edit_controls !== NULL || !$this->hide_header()) {
print_side_block($title, $this->content->text, NULL, NULL, $this->content->footer);
} else {
print_side_block(NULL, $this->content->text, NULL, NULL, $this->content->footer);
}
break;
case BLOCK_TYPE_LIST:
if(empty($this->content->items) && empty($this->content->footer)) {
break;
}
if ($this->edit_controls !== NULL || !$this->hide_header()) {
print_side_block($title, '', $this->content->items, $this->content->icons, $this->content->footer);
} else {
print_side_block(NULL, '', $this->content->items, $this->content->icons, $this->content->footer);
}
break;
}
}
function print_shadow() {
$title = '<div style="float: left;">'.$this->title.'</div>';
if($this->edit_controls !== NULL) {
$title .= $this->edit_controls;
}
print_side_block($title, '&nbsp;', NULL, NULL, '');
}
function add_edit_controls($options, $blockid) {
global $CFG, $THEME;
// The block may be disabled
$blockid = intval($blockid);
$enabled = $blockid > 0;
$blockid = abs($blockid);
if (!isset($this->str)) {
$this->str->delete = get_string('delete');
$this->str->moveup = get_string('moveup');
$this->str->movedown = get_string('movedown');
$this->str->moveright = get_string('moveright');
$this->str->moveleft = get_string('moveleft');
$this->str->hide = get_string('hide');
$this->str->show = get_string('show');
}
$path = $CFG->wwwroot.'/course';
if (empty($THEME->custompix)) {
$pixpath = $path.'/../pix';
} else {
$pixpath = $path.'/../theme/'.$CFG->theme.'/pix';
}
$movebuttons = '<div style="float: right;">';
if($enabled) {
$icon = '/t/hide.gif';
$title = $this->str->hide;
}
else {
$icon = '/t/show.gif';
$title = $this->str->show;
}
$movebuttons .= '<a style="margin-right: 10px;" title="'.$title.'" href="'.$path.'/view.php?id='.$this->course->id.'&amp;blockaction=toggle&amp;blockid='.$blockid.'">' .
'<img src="'.$pixpath.$icon.'" /></a>';
$movebuttons .= '<a style="margin-right: 10px;" title="'.$this->str->delete.'" href="'.$path.'/view.php?id='.$this->course->id.'&amp;blockaction=delete&amp;blockid='.$blockid.'">' .
'<img src="'.$pixpath.'/t/delete.gif" /></a>';
if ($options & BLOCK_MOVE_LEFT) {
$movebuttons .= '<a style="margin-right: 3px;" title="'.$this->str->moveleft.'" href="'.$path.'/view.php?id='.$this->course->id.'&amp;blockaction=moveside&amp;blockid='.$blockid.'">' .
'<img src="'.$pixpath.'/t/left.gif" /></a>';
}
if ($options & BLOCK_MOVE_UP) {
$movebuttons .= '<a style="margin-right: 3px;" title="'.$this->str->moveup.'" href="'.$path.'/view.php?id='.$this->course->id.'&amp;blockaction=moveup&amp;blockid='.$blockid.'">' .
'<img src="'.$pixpath.'/t/up.gif" /></a>';
}
if ($options & BLOCK_MOVE_DOWN) {
$movebuttons .= '<a style="margin-right: 3px;" title="'.$this->str->movedown.'" href="'.$path.'/view.php?id='.$this->course->id.'&amp;blockaction=movedown&amp;blockid='.$blockid.'">' .
'<img src="'.$pixpath.'/t/down.gif" /></a>';
}
if ($options & BLOCK_MOVE_RIGHT) {
$movebuttons .= '<a style="margin-right: 3px;" title="'.$this->str->moveright.'" href="'.$path.'/view.php?id='.$this->course->id.'&amp;blockaction=moveside&amp;blockid='.$blockid.'">' .
'<img src="'.$pixpath.'/t/right.gif" /></a>';
}
$movebuttons .= '</div>';
$this->edit_controls = $movebuttons;
}
function _self_test() {
// Tests if this block has been implemented correctly.
// Also, $errors isn't used right now
$errors = array();
$correct = true;
if($this->get_title() === NULL) {
$errors[] = 'title_not_set';
$correct = false;
}
if(!in_array($this->get_content_type(), array(BLOCK_TYPE_LIST, BLOCK_TYPE_TEXT, BLOCK_TYPE_NUKE))) {
$errors[] = 'invalid_content_type';
$correct = false;
}
if($this->get_content() === NULL) {
$errors[] = 'content_not_set';
$correct = false;
}
if($this->get_version() === NULL) {
$errors[] = 'version_not_set';
$correct = false;
}
$allformats = COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS | COURSE_FORMAT_SOCIAL;
if(!($this->applicable_formats() & $allformats)) {
$errors[] = 'no_course_formats';
$correct = false;
}
$width = $this->preferred_width();
if(!is_int($width) || $width <= 0) {
$errors[] = 'invalid_width';
$correct = false;
}
return $correct;
}
function has_config() {
return false;
}
function print_config() {
// This does nothing, it's here to prevent errors from
// derived classes if they implement has_config() but not print_config()
}
function handle_config() {
// This does nothing, it's here to prevent errors from
// derived classes if they implement has_config() but not handle_config()
}
function applicable_formats() {
// Default case: the block can be used in all course types
return COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS | COURSE_FORMAT_SOCIAL;
}
function preferred_width() {
// Default case: the block wants to be 180 pixels wide
return 180;
}
function hide_header() {
//Default, false--> the header is showed
return false;
}
function html_attributes() {
// Default case: we want no extra attributes
return false;
}
}
class MoodleBlock_Nuke extends MoodleBlock {
function get_content() {
if($this->content !== NULL) {
return $this->content;
}
global $CFG;
$this->content = &New stdClass;
// This whole thing begs to be written for PHP >= 4.3.0 using glob();
$dir = $CFG->dirroot.'/blocks/'.$this->name().'/nuke/';
if($dh = @opendir($dir)) {
while (($file = readdir($dh)) !== false) {
$regs = array();
if(ereg('^block\-(.*)\.php$', $file, $regs)) {
// Found it! Let's prepare the environment...
$oldvals = array();
if(isset($GLOBALS['admin'])) {
$oldvals['admin'] = $GLOBALS['admin'];
}
$GLOBALS['admin'] = isteacher($this->course->id);
@include($dir.$file);
foreach($oldvals as $key => $val) {
$GLOBALS[$key] = $val;
}
// We should have $content set now
if(!isset($content)) {
return NULL;
}
return $this->content->text = $content;
}
}
}
// If we reached here, we couldn't find the nuke block for some reason
return $this->content->text = get_string('blockmissingnuke');
}
}
?>
+38
View File
@@ -0,0 +1,38 @@
<?PHP //$Id$
class CourseBlock_news_items extends MoodleBlock {
function CourseBlock_news_items ($course) {
$this->title = get_string('latestnews');
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2004041200;
}
function get_content() {
global $CFG;
if($this->content !== NULL) {
return $this->content;
}
require_once($CFG->dirroot.'/course/lib.php');
$this->content = New object;
$this->content->text = '';
$this->content->footer = '';
if ($this->course->newsitems) {
$news = forum_get_course_forum($this->course->id, 'news');
// Slightly hacky way to do it but...
ob_start();
echo '<font size="-2">';
forum_print_latest_discussions($news->id, $this->course->newsitems, "minimal", "", get_current_group($this->course->id));
echo '</font>';
$this->content->text = ob_get_contents();
ob_end_clean();
}
return $this->content;
}
}
?>
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to MySQL
function news_items_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to PostgreSQL
function news_items_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
+138
View File
@@ -0,0 +1,138 @@
<?PHP //$Id$
class CourseBlock_online_users extends MoodleBlock {
function CourseBlock_online_users ($course) {
$this->title = get_string('blockname','block_online_users');
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2004041800;
}
function has_config() {return true;}
function print_config() {
global $CFG, $THEME;
print_simple_box_start('center', '', $THEME->cellheading);
include($CFG->dirroot.'/blocks/'.$this->name().'/config.html');
print_simple_box_end();
return true;
}
function handle_config($config) {
foreach ($config as $name => $value) {
set_config($name, $value);
}
return true;
}
function get_content() {
global $USER, $CFG;
$timetoshowusers = 300; //Seconds default
if (isset($CFG->block_online_users_timetosee)) {
$timetoshowusers = $CFG->block_online_users_timetosee * 60;
}
if($this->content !== NULL) {
return $this->content;
}
$this->content = New object;
$this->content->text = '';
$this->content->footer = '';
//Calculate if we are in separate groups
$isseparategroups = ($this->course->groupmode == SEPARATEGROUPS and $this->course->groupmodeforce and
!isteacheredit($this->course->id));
//Get the user current group
$currentgroup = $isseparategroups ? get_current_group($this->course->id) : NULL;
$groupmembers = "";
$select = "";
//Add this to the SQL to show only group users
if ($currentgroup !== NULL) {
$groupmembers = ", {$CFG->prefix}groups_members gm ";
$select .= " AND u.id = gm.userid AND gm.groupid = '$currentgroup'";
}
$timefrom = time()-$timetoshowusers;
$students = get_records_sql("SELECT u.id, u.username, u.firstname, u.lastname, u.picture, s.timeaccess
FROM {$CFG->prefix}user u,
{$CFG->prefix}user_students s
$groupmembers
WHERE u.id = s.userid and
s.course = {$this->course->id} and
s.timeaccess > $timefrom $select ORDER BY s.timeaccess DESC");
$teachers = get_records_sql("SELECT u.id, u.username, u.firstname, u.lastname, u.picture, s.timeaccess
FROM {$CFG->prefix}user u,
{$CFG->prefix}user_teachers s
$groupmembers
WHERE u.id = s.userid and
s.course = {$this->course->id} and
s.timeaccess > $timefrom $select ORDER BY s.timeaccess DESC");
if ($teachers || $students) {
if ($students) {
foreach ($students as $student) {
$student->fullname = fullname($student);
$users[$student->id] = $student;
}
}
if ($teachers) {
foreach ($teachers as $teacher) {
$teacher->fullname = '<b>'.fullname($teacher).'</b>';
$users[$teacher->id] = $teacher;
}
}
} else {
$users = null;
}
//Calculate minutes
$minutes = floor($timetoshowusers/60);
$this->content->text = "<font size=\"-2\"><div align=center>(".get_string("periodnminutes","block_online_users",$minutes).")</div></font>";
//Now, we have in users, the list of users to show
//Because they are online
if ($users !== null) {
foreach ($users as $user) {
$this->content->text .= '<div style="text-align: left; font-size: 0.75em; padding-top: 5px;">';
$timeago = format_time(time() - $user->timeaccess);
if ($user->picture==0) {
$this->content->text .= '<img src="'.$CFG->pixpath.'/i/user.gif" style="height: 16px; width=16px; vertical-align: middle;" alt=""> ';
} else {
if ($CFG->slasharguments) {
$imgtag = '<img src="'.$CFG->wwwroot.'/user/pix.php/'.$user->id.'/f2.jpg" style="height: 16px; width=16px; vertical-align: middle;" alt=""> ';
} else {
$imgtag = '<img src="'.$CFG->wwwroot.'/user/pix.php?file=/'.$user->id.'/f2.jpg" style="height: 16px; width=16px; vertical-align: middle;" alt=""> ';
}
$this->content->text .= $imgtag;
}
$this->content->text .= '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$this->course->id.'" title="'.$timeago.'">'.$user->fullname.'</a></div>';
}
/*
$table->align = array("right","left");
$table->cellpadding = 1;
$table->cellspacing = 1;
$table->data[] = array("<img src=\"$CFG->pixpath/i/user.gif\" height=16 width=16 alt=\"\">",$user->fullname);
}
// Slightly hacky way to do it but...
ob_start();
print_table($table);
//$this->content->text .= "<br>".ob_get_contents();
ob_end_clean();
*/
} else {
$this->content->text .= "<font size=\"-1\"><p align=center>".get_string("none")."</p></font>";
}
return $this->content;
}
}
?>
+24
View File
@@ -0,0 +1,24 @@
<form method="post" action="block.php">
<table cellpadding="9" cellspacing="0">
<tr valign="top">
<td align="right"><p>block_online_users_timetosee:</td>
<td>
<input name="block" type="hidden" value="<?php echo intval($_REQUEST['block']); ?>" />
<input name="block_online_users_timetosee" type="text" size="5" value="<?php if(isset($CFG->block_online_users_timetosee)) {
p($CFG->block_online_users_timetosee);
} else {
p(5);
} ?>" />
</td>
<td>
<?php print_string("configtimetosee", "block_online_users") ?>
</td>
</tr>
<tr>
<td colspan="3" align="center">
<input type="submit" value="<?php print_string("savechanges") ?>"></td>
</tr>
</table>
</form>
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to MySQL
function online_users_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to PostgreSQL
function online_users_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
@@ -0,0 +1,54 @@
<?PHP //$Id$
class CourseBlock_participants extends MoodleBlock {
function CourseBlock_participants ($course) {
$this->title = get_string('people');
$this->content_type = BLOCK_TYPE_LIST;
$this->course = $course;
$this->version = 2004041800;
}
function get_content() {
global $USER, $CFG;
if($this->content !== NULL) {
return $this->content;
}
$this->content = New object;
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';
$strgroups = get_string('groups');
$strgroupmy = get_string('groupmy');
$this->content->items[]='<a title="'.get_string('listofallpeople').'" href="../user/index.php?id='.$this->course->id.'">'.get_string('participants').'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/users.gif" height="16" width="16" alt="">';
if ($this->course->groupmode or !$this->course->groupmodeforce) {
if ($this->course->groupmode == VISIBLEGROUPS or isteacheredit($this->course->id)) {
$this->content->items[]='<a title="'.$strgroups.'" href="groups.php?id='.$this->course->id.'">'.$strgroups.'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/group.gif" height="16" width="16" alt="">';
} else if ($this->course->groupmode == SEPARATEGROUPS and $this->course->groupmodeforce) {
// Show nothing
} else if ($currentgroup = get_current_group($this->course->id)) {
$this->content->items[]='<a title="'.$strgroupmy.'" href="group.php?id='.$this->course->id.'">'.$strgroupmy.'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/group.gif" height="16" width="16" alt="">';
}
}
$fullname = fullname($USER, true);
$editmyprofile = '<a title="'.$fullname.'" href="../user/edit.php?id='.$USER->id.'&amp;course='.$this->course->id.'">'.get_string('editmyprofile').'</a>';
if ($USER->description) {
$this->content->items[]= $editmyprofile;
} else {
$this->content->items[]= $editmyprofile." <blink>*</blink>";
}
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" height="16" width="16" alt="">';
return $this->content;
}
}
?>
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to MySQL
function participants_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to PostgreSQL
function participants_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
@@ -0,0 +1,31 @@
<?PHP //$Id$
class CourseBlock_recent_activity extends MoodleBlock {
function CourseBlock_recent_activity ($course) {
$this->title = get_string('recentactivity');
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2004042900;
}
function get_content() {
if($this->content !== NULL) {
return $this->content;
}
$this->content = New object;
$this->content->text = '';
$this->content->footer = '';
// Slightly hacky way to do it but...
ob_start();
print_recent_activity($this->course);
$this->content->text = ob_get_contents();
ob_end_clean();
return $this->content;
}
}
?>
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to MySQL
function recent_activity_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to PostgreSQL
function recent_activity_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
@@ -0,0 +1,31 @@
<?PHP //$Id$
class CourseBlock_search_forums extends MoodleBlock {
function CourseBlock_search_forums ($course) {
$this->title = get_string('search', 'forum');
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2004041000;
}
function get_content() {
global $USER, $CFG, $SESSION;
optional_variable($_GET['cal_m']);
optional_variable($_GET['cal_y']);
if($this->content !== NULL) {
return $this->content;
}
$this->content = New object;
$this->content->text = '';
$this->content->footer = '';
$form = forum_print_search_form($this->course, '', true);
$this->content->text = '<div align="center">'.$form.'</div>';
return $this->content;
}
}
?>
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to MySQL
function search_forums_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to PostgreSQL
function search_forums_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
@@ -0,0 +1,73 @@
<?PHP //$Id$
class CourseBlock_section_links extends MoodleBlock {
function CourseBlock_section_links ($course) {
if ($course->format == 'topics') {
$this->title = get_string('topics', 'block_section_links');
}
else if ($course->format == 'weeks') {
$this->title = get_string('weeks', 'block_section_links');
}
else {
$this->title = get_string('blockname', 'block_section_links');
}
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2004050500;
}
function applicable_formats() {
return (COURSE_FORMAT_WEEKS | COURSE_FORMAT_TOPICS);
}
function get_content() {
global $CFG, $USER;
$highlight = 0;
if($this->content !== NULL) {
return $this->content;
}
if ($this->course->format == 'weeks') {
$highlight = ceil((time()-$this->course->startdate)/604800);
$linktext = get_string('jumptocurrentweek', 'block_section_links');
}
else if ($this->course->format == 'topics') {
$highlight = $this->course->marker;
$linktext = get_string('jumptocurrenttopic', 'block_section_links');
}
$inc = 1;
if ($this->course->numsections > 22) {
$inc = 2;
}
if ($this->course->numsections > 40) {
$inc = 5;
}
$courseid = $this->course->id;
if ($display = get_field('course_display', 'display', 'course', $courseid, 'userid', $USER->id)) {
$link = "$CFG->wwwroot/course/view.php?id=$courseid&amp;topic=all";
} else {
$link = '';
}
$text = '<font size=-1>';
for ($i = $inc; $i <= $this->course->numsections; $i += $inc) {
if ($i == $highlight) {
$text .= "<a href=\"$link#$i\"><b>$i</b></a> ";
} else {
$text .= "<a href=\"$link#$i\">$i</a> ";
}
}
if ($highlight) {
$text .= "<br><a href=\"$link#$highlight\">$linktext</a>";
}
$this->content = New object;
$this->content->header = 'Hello';
$this->content->footer = '';
$this->content->text = $text;
return $this->content;
}
}
?>
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to MySQL
function section_links_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004050500 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
View File
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to PostgreSQL
function section_links_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004050500 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}
@@ -0,0 +1,123 @@
<?php //$Id$
class CourseBlock_social_activities extends MoodleBlock {
function CourseBlock_social_activities ($course) {
$this->title = get_string('blockname','block_social_activities');
$this->content_type = BLOCK_TYPE_LIST;
$this->course = $course;
$this->version = 2004041800;
}
function applicable_formats() {
return COURSE_FORMAT_SOCIAL;
}
function get_content() {
global $USER, $CFG;
if($this->content !== NULL) {
return $this->content;
}
$this->content = New object;
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';
// To make our day, we start with an ugly hack
global $sections, $mods, $modnames;
$section = $sections[0];
// That wasn't so bad, was it?
$groupbuttons = $this->course->groupmode;
$groupbuttonslink = (!$this->course->groupmodeforce);
$isteacher = isteacher($this->course->id);
$isediting = isediting($this->course->id);
$ismoving = ismoving($this->course->id);
if ($ismoving) {
$strmovehere = get_string('movehere');
$strmovefull = strip_tags(get_string('movefull', '', "'$USER->activitycopyname'"));
$strcancel= get_string('cancel');
$stractivityclipboard = $USER->activitycopyname;
}
$modinfo = unserialize($this->course->modinfo);
$editbuttons = '';
if ($ismoving) {
$this->content->items[] = '&nbsp;<img align="bottom" src="'.$CFG->pixpath.'/t/move.gif" height="11" width="11">';
$this->content->icons[] = $USER->activitycopyname.'&nbsp;(<a href="'.$CFG->wwwroot.'/course/mod.php?cancelcopy=true">'.$strcancel.'</a>)';
}
if (!empty($section->sequence)) {
$sectionmods = explode(',', $section->sequence);
foreach ($sectionmods as $modnumber) {
if (empty($mods[$modnumber])) {
continue;
}
$mod = $mods[$modnumber];
if ($isediting && !$ismoving) {
if ($groupbuttons) {
if (! $mod->groupmodelink = $groupbuttonslink) {
$mod->groupmode = $this->course->groupmode;
}
} else {
$mod->groupmode = false;
}
$editbuttons = '<br />'.make_editing_buttons($mod, true, true);
} else {
$editbuttons = '';
}
if ($mod->visible || $isteacher) {
if ($ismoving) {
if ($mod->id == $USER->activitycopy) {
continue;
}
$this->content->items[] = '<a title="'.$strmovefull.'" href="'.$CFG->wwwroot.'/course/mod.php?moveto='.$mod->id.'">'.
'<img height="16" width="80" src="'.$CFG->pixpath.'/movehere.gif" alt="'.$strmovehere.'" border="0"></a>';
$this->content->icons[] = '';
}
$instancename = urldecode($modinfo[$modnumber]->name);
if (!empty($CFG->filterall)) {
$instancename = filter_text('<nolink>'.$instancename.'</nolink>', $this->course->id);
}
$linkcss = $mod->visible ? '' : ' class="dimmed" ';
if (!empty($modinfo[$modnumber]->extra)) {
$extra = urldecode($modinfo[$modnumber]->extra);
} else {
$extra = '';
}
if ($mod->modname == 'label') {
$this->content->items[] = format_text($extra, FORMAT_HTML).$editbuttons;
$this->content->icons[] = '';
} else {
$this->content->items[] = '<a title="'.$mod->modfullname.'" '.$linkcss.' '.$extra.
' href="'.$CFG->wwwroot.'/mod/'.$mod->modname.'/view.php?id='.$mod->id.'">'.$instancename.'</a>'.$editbuttons;
$this->content->icons[] = '<img src="'.$CFG->modpixpath.'/'.$mod->modname.'/icon.gif" height="16" width="16" alt="'.$mod->modfullname.'">';
}
}
}
}
if ($ismoving) {
$this->content->items[] = '<a title="'.$strmovefull.'" href="'.$CFG->wwwroot.'/course/mod.php?movetosection='.$section->id.'">'.
'<img height="16" width="80" src="'.$CFG->pixpath.'/movehere.gif" alt="'.$strmovehere.'" border="0"></a>';
$this->content->icons[] = '';
}
if ($isediting && $modnames) {
$this->content->footer = '<div style="text-align: right;">'.
popup_form($CFG->wwwroot.'/course/mod.php?id='.$this->course->id.'&amp;section='.$section->section.'&amp;add=',
$modnames, 'section0', '', get_string('add').'...', 'mods', get_string('activities'), true) . '</div>';
} else {
$this->content->footer = '';
}
return $this->content;
}
}
?>
+33
View File
@@ -0,0 +1,33 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// blocks system.
//
// Sometimes, changes between versions involve
// alterations to database structures and other
// major things that may break installations.
//
// The upgrade function in this file will attempt
// to perform all the necessary actions to upgrade
// your older installtion to the current version.
//
// If there's something it cannot do itself, it
// will tell you what you need to do.
//
// Versions are defined by backup_version.php
//
// This file is tailored to MySQL
function social_activities_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}
//Finally, return result
return $result;
}

Some files were not shown because too many files have changed in this diff Show More