Compare commits

..

3127 Commits

Author SHA1 Message Date
moodler 04319b3c1c Not quite ready, but anyone trying the Beta at this stage will probably
not need to upgrade.
2003-08-28 16:19:18 +00:00
giro123 bd778c0674 *** empty log message *** 2003-08-28 15:35:41 +00:00
moodler 42de916a91 Bump - release in 12 hours 2003-08-28 12:11:28 +00:00
moodler 46054fa873 Unfinished and unlinked, but I'll check it in for hacking on 2003-08-28 12:10:03 +00:00
moodler d09f3c80ac Initialiase $totalcount to prevent warnings 2003-08-28 11:57:21 +00:00
giro123 5218563541 *** empty log message *** 2003-08-28 03:02:04 +00:00
giro123 21260c2dfa *** empty log message *** 2003-08-28 01:30:32 +00:00
stronk7 ce3ec518ea Take out two debugs !! 2003-08-28 00:50:51 +00:00
stronk7 3b16f21626 Ready !! :-) 2003-08-28 00:50:11 +00:00
stronk7 a20fdf5275 Modificaciones de docs enviadas por David Delgado.
No he guardado en el CVS las versiones que enviadas de
los siguientes ficheros:
   - coding.html
   - release.html
   - upgrade.html
ya que unas horas antes habia una version de ellos guardada
por Claudio y no he querido machacar nada.
Las versiones de estos documentos de David Delgado se pueden
encontrar en el curso "Moodle en Espanol" en el foro de traduccion.
Envio copia de esto a los dos interesados para que se pongan
de acuerdo.
2003-08-28 00:18:17 +00:00
mits e31d2d3d26 New translation. 2003-08-27 23:27:08 +00:00
anvergara e85ca76c8c Updating to version 1.1 2003-08-27 22:57:16 +00:00
anvergara abc3a131a9 *** empty log message *** 2003-08-27 22:22:02 +00:00
giro123 8a3b54de18 *** empty log message *** 2003-08-27 19:48:41 +00:00
rkingdon 630167b908 Addition of strings needed for the scale end-ponts. 2003-08-27 18:21:09 +00:00
rkingdon 7aaf6867bd Removal of hard-wired strings in Scales. 2003-08-27 18:20:03 +00:00
rkingdon c75599f4c3 Fixed unassigned variables in function workshop_print_assignment_info 2003-08-27 17:13:03 +00:00
stronk7 202ba3902e Now STAMP fiel is supported in backup & restore.
If it exists in backup-file used, else, old search-by-name is used.
When inserting new categories, stamp is filled it it doesn't exist.
Updated version to 1.1 Beta +++ !!
2003-08-27 17:09:01 +00:00
rkingdon 1c4968eb7f New help files for teacher admin page. 2003-08-27 15:48:20 +00:00
rkingdon c257097c36 Changes to the handling of example assessments; something on Rubrics. 2003-08-27 15:43:16 +00:00
rkingdon 0ae2c35f33 Mail strings for cron. 2003-08-27 15:41:45 +00:00
rkingdon 41b12a791b Addition of Mail strings to cron routine; More help in admin page; bug
clearance.
2003-08-27 15:39:21 +00:00
anvergara 341684f537 Upgrading to version 1.1 2003-08-27 14:49:54 +00:00
moodler 7612e508c0 SOme corrections 2003-08-27 13:49:24 +00:00
moodler 11326d9d56 New French Canadian translation from Jean-Fran?ois Nadeau 2003-08-27 13:47:33 +00:00
moodler fb2ecb37b7 Tweaks when searching 2003-08-27 13:42:01 +00:00
moodler d9387950cb Little tweaks to messages 2003-08-27 13:40:26 +00:00
moodler de9cbba690 Minor change to make user searches a bit better
Next time I'll put proper paging in
2003-08-27 13:36:22 +00:00
moodler 23b4848794 Quiz categories now also have a unique stamp in them.
This is to make it easier when restoring backups,
especially when the questions are in a published
category from another course that still exists.
2003-08-27 12:53:21 +00:00
anvergara e470f0733f *** empty log message *** 2003-08-27 12:41:08 +00:00
anvergara 533be29a82 *** empty log message *** 2003-08-27 12:10:52 +00:00
moodler fa01ae8be0 FIx for the display of the help window for the current scale 2003-08-27 11:27:40 +00:00
moodler d0117715f3 Added a log display for "course use reports" 2003-08-27 09:33:12 +00:00
moodler 949cf8670c More cleanups for teacher view in particular 2003-08-27 09:03:10 +00:00
moodler d1582a1233 Replacing "view" ... what happened to it?? 2003-08-27 08:29:25 +00:00
moodler 3b10decf84 Slight tidy 2003-08-27 08:28:13 +00:00
moodler 2a0d8c5b05 Fairly radical improvement to the Journal index, putting all the
information on one page.
2003-08-27 08:13:16 +00:00
hansdezwart 7625591b3b Two more missing strings translated 2003-08-27 07:22:09 +00:00
moodler 0fbd1d3c02 Keep defaults even when reediting web links that aren't using new window 2003-08-27 07:21:48 +00:00
hansdezwart 2ff1e0d112 Deleted the .tmp files 2003-08-27 07:18:22 +00:00
hansdezwart 0c65d733ce First translation of a couple of the new help files 2003-08-27 07:08:57 +00:00
moodler 7982ad7a3d Russian update 2003-08-27 06:18:14 +00:00
moodler f4e394ef27 Added mention of Library and fixed a typo 2003-08-27 06:15:58 +00:00
moodler 27326a3eb6 Move Library parsing code into text_to_html 2003-08-27 06:08:34 +00:00
moodler 9609679b76 Bump de bump.... wooo do the bump! 2003-08-27 04:19:26 +00:00
stronk7 461da6bdb6 Now existing categories are used only if their publish
field is set to yes. Else, a new "local" category is created.
Added some lines of code to mantain old compatibility when detecting
existing questions (do it by name if the stamp is not found) and insert
the stamp too !!
Please, test.
2003-08-27 00:40:14 +00:00
anvergara ae45f779c0 Updating to 1.1 version 2003-08-26 23:55:20 +00:00
moodler bf40f9c1ef Added a hook when printing recent activity. If the Library
module is activated, then a Library function is called to print a
list of recently added pages in the library.
2003-08-26 18:45:54 +00:00
moodler a751a4e56f Added a hook to the text formatting, so that if the library module
is activated, then all Moodle text is parsed by it to have links
added to words.
2003-08-26 18:44:09 +00:00
moodler 6849648f51 Deleted error_reporting(15)! Just turn debugging on, Ray! :-) 2003-08-26 17:51:07 +00:00
moodler c81696e599 Make sure that the Site never shows up in My Courses 2003-08-26 15:55:03 +00:00
moodler 7cdcb42239 Added controls for the invisible variable teacherassignteachers which
decides whether teachers can edit teachers in their own courses.
2003-08-26 15:52:22 +00:00
thepurpleblob 0518065ed5 Removed stupid Q. and A. formatting that just confused people. 2003-08-26 14:57:35 +00:00
stronk7 095ebcdc6d Small typo :-) 2003-08-26 14:27:36 +00:00
moodler 7f12f9cdd9 'Extras' in cached course modinfo activities is now returned.
This means that Resources can now employ them on the index listing.

Specifically, Resources that are popup now popup from there too.
2003-08-26 13:47:46 +00:00
moodler 5b47275684 Plain text emails now include URLs in a nice way. Thanks to Russell Jungwirth
for the code.

Also a few docs tweaks
2003-08-26 13:18:10 +00:00
hansdezwart f6b3859c49 Filling in the missing strings 2003-08-26 13:04:30 +00:00
moodler 1ca0226071 Removed useless function 2003-08-26 12:54:50 +00:00
moodler 966d5f09fe typo in variable name for teachersassignteachers 2003-08-26 12:30:48 +00:00
moodler 9997d48051 "Source" button available on Section texts 2003-08-26 12:28:26 +00:00
moodler 4cabd35565 For students, don't search invisible forums! 2003-08-26 12:18:14 +00:00
thepurpleblob 10b1b6d59a Do not allow HTML in wiki text pages. (It causes problems) 2003-08-26 11:59:32 +00:00
hansdezwart 5e4852d9ec This was an old version that has been translated to readme.txt 2003-08-26 11:11:56 +00:00
moodler dbaf630aac Some clean up and documentation for userpix, as well as a default restriction
for admins only.
2003-08-26 09:40:58 +00:00
moodler 785e29e954 Some updates and a projected release date of August 28. 2003-08-26 09:30:25 +00:00
moodler f78a945481 New FAQ and some cleanups 2003-08-26 09:03:31 +00:00
moodler a1b2bec873 Remove half-finished oracle files 2003-08-26 07:09:14 +00:00
moodler 41586fa0ca Bump - looks pretty good now 2003-08-26 07:00:20 +00:00
moodler f0bd2aeddc More language updates for pt_br 2003-08-26 06:28:34 +00:00
moodler 16ef5e7812 Some fixes so that navmenus don't jump out of frames any more.
The navmenu function now takes a third parameter that specifies
the window to change location of (default 'self', but could be "parent" or "top")
2003-08-26 06:01:13 +00:00
moodler 2ae0cc7759 Don't bother checking for magic quotes any more 2003-08-26 03:22:40 +00:00
mits ebfde31f18 New translation. 2003-08-26 03:14:08 +00:00
mits d58bf47ad8 *** empty log message *** 2003-08-26 02:58:11 +00:00
stronk7 d04983d8a3 Now restoring workshops are working too !!
Now all is ready to be 1.1 Beta 1.
Congratulations everybody !!
Anyway, some polish must be done, friends...
2003-08-25 22:40:38 +00:00
stronk7 a34e0c96c7 Now workshops backup are included too !!
Only one step to Beta !! (workshop restore)
Tomorrow, I hope.. :-)
2003-08-25 19:58:26 +00:00
stronk7 6252f5dcd3 Now workshops backup are included too !!
Only one step to Beta !! (workshop restore)
2003-08-25 19:56:42 +00:00
hansdezwart 5c59f72ffb Readme is now translated with information about the Dutch translation and the translators. 2003-08-25 19:42:51 +00:00
moodler 138def3ead Maxlength fields 2003-08-25 17:57:39 +00:00
moodler e550e2d694 Students now see a Change Password link under admin.
Guests see *nothing* now
2003-08-25 17:53:47 +00:00
moodler 61a5e1e902 Sometimes changepassword is 0 or 1 ... so deal with that 2003-08-25 17:42:21 +00:00
moodler d9be205e79 Fixed an uninitialised variable 2003-08-25 17:30:26 +00:00
moodler 0ff42b0fc9 Fixed locale problem (being overwritten by current locale) 2003-08-25 17:30:08 +00:00
stronk7 e02ff1427e Changed comment, sorry 2003-08-25 17:24:44 +00:00
stronk7 cd6232200c Changed to support "negative" values in scale field. 2003-08-25 17:23:31 +00:00
moodler 555ab2139f Very slight change to "welcometocoursetext" ... added "if you have not
done so already" ... so it makes sense with multiple courses.
2003-08-25 16:53:29 +00:00
moodler 7cd4484090 More time formatting fixups 2003-08-25 16:41:54 +00:00
moodler 50508bb88f FIxing up the 24 hr dates again 2003-08-25 16:39:20 +00:00
moodler 487d3ae84d Removed a wrong help link 2003-08-25 16:31:20 +00:00
moodler 72bb2118b6 Fixed reports using the new scales (numerical etc) 2003-08-25 15:59:39 +00:00
moodler eb06f902f4 Undoing one of the less then brilliant changes I did earlier today to Eloy's code 2003-08-25 15:47:37 +00:00
moodler 5315b6f2f0 Added a link to the PHP info page from the admin page, and cleaned
up the PHP info page a bit by using a frame.
2003-08-25 14:56:46 +00:00
moodler ed3957808b Fixed a typo 2003-08-25 13:48:23 +00:00
moodler d6bdd9d5e9 Forum grades can now be numerical as well (like the other modules).
If so, grades in the gradebook are printed as proper numbers and
contribute to the total of the course.
2003-08-25 12:47:36 +00:00
moodler f2f564066b Some improvements to the forum editing interface to make the buttons
hide/show appropriately
2003-08-25 08:04:39 +00:00
moodler 98914efdbe New mini-feature. When choosing ratings in a forum, one can now
specify a range of dates.  Only posts within this range can be rated.
If the range isn't specified then all posts can be rated.
2003-08-25 07:39:06 +00:00
moodler 34b7a42851 A bit more info 2003-08-25 04:43:09 +00:00
moodler b1bacf9c13 Some updates on the future roadmap 2003-08-25 04:38:20 +00:00
moodler 20dc89e50d Put "Source" label after checkbox ... just in case text pushes
the box off screen
2003-08-25 03:48:09 +00:00
moodler eb94392c4b Sometimes there are no answers, so check existence first 2003-08-25 02:52:19 +00:00
moodler 5884d4e2fd Fixed some array indices 2003-08-25 02:48:09 +00:00
moodler 05c47ef78e FIxed display of ratings when they are literally "0"
Also fixed default discussion display mode
2003-08-25 02:41:25 +00:00
moodler a20c109058 Fixed a bug when displaying menus with a zero in them 2003-08-25 02:32:20 +00:00
moodler 0761d83f54 Final ratings are now calculated using rounded mean rather than median.
0.5 scores go UP.
2003-08-25 02:22:35 +00:00
moodler 830ce8241b Some fixes for robustness (make sure variables exist before using them
because it flags errors when in debug mode).

Also, when specifying array values by name use quotes around the name

 eg  $array['value'] instead of $array[value]

Finally, I changed the way user restoring works (slightly).  Before, if a
restored user was found to be a course creator or an admin, then this
status was restored.  I don't think this is a good idea - it could lead
to security problems when copying a backup from one site to another,
or if that person's status has changed since the backup was made.
I think it's best to only restore what is actually part of the course,
ie teacher or student.

If this broke anything else let me know!
2003-08-25 01:44:01 +00:00
moodler 7a3ca193d6 No need to always show the resort button 2003-08-25 01:04:11 +00:00
moodler 3695f5b487 Slight fix for displaying logs for courses starting in the future 2003-08-25 00:56:38 +00:00
stronk7 4545fc3890 Solved one condition that caused some errors in Win32 when extracting. 2003-08-24 22:35:57 +00:00
stronk7 fb2fcf3af5 Added some optional_variables to avoid some NOTICES 2003-08-24 14:46:52 +00:00
stronk7 52cef09ecb Added new scales icon to theme 2003-08-23 18:37:42 +00:00
stronk7 9e31a8e49c Cambiadas un par de cadenas a gerundio. 2003-08-23 18:01:27 +00:00
stronk7 300ae26c2d Ooops I commited some debug source code in previous
versions. Going back. Sorry.
2003-08-23 17:40:27 +00:00
stronk7 41923e7511 Solved one problem when copying empty directories. 2003-08-23 17:33:34 +00:00
stronk7 bbc69d99c1 Changed one notify 2003-08-23 17:02:20 +00:00
selliott e09016006c selliott - fixed some code to allow proper sorting of assignments based on name, lastmodified, and feedback 2003-08-23 16:32:42 +00:00
moodler 1f332285b2 Bump! 2003-08-23 16:31:03 +00:00
rkingdon 0978073ffb Fixing Bug #653. 2003-08-23 15:57:42 +00:00
moodler c79f9629ed Some extra explanation so that hitting "yes" on the restore screen isn't so scary! :-) 2003-08-23 15:47:57 +00:00
moodler 258c8b09bb A few things added 2003-08-23 15:37:15 +00:00
moodler 8826c67031 New questions created via GUI or imported are now given a unique
stamp, and a default version of 1.

When questions are updated, the version number is incremented.
2003-08-23 15:26:10 +00:00
stronk7 1923285635 Now stamp and version are fully supported in backup/restore.
The process look for category, stamp and version to calculate
when to create a question or use a existing one.
This avoid duplicates in RANDOM and RANDOMSAMATCH qtypes.
2003-08-23 15:21:58 +00:00
moodler 757a0abd94 Corrected the stamp I just added and added a separate version field instead 2003-08-23 14:18:44 +00:00
moodler b5012f3eb5 COnfiguration variables can now be edited via GUI 2003-08-23 14:03:14 +00:00
moodler e9d8777ffb New "stamp" field on quiz questions with a unique identifier, as well as
some PostgreSQL fixes (Multianswer stuff had not been done on Postgres yet)
2003-08-23 13:28:32 +00:00
moodler 1ccc73ac3b Use gmdate instead 2003-08-23 12:25:50 +00:00
moodler 280faf9ff7 Added a new function to make a unique ID code, to be used in quiz
questions and elsewhere

It's based on the hostname, time, random string and a supplied version string.
These are packed using '+ separators so they can easily be unpacked if
necessary.

function make_unique_id_code($version=1)
2003-08-23 12:22:27 +00:00
moodler 82ad5e1a9f If the language is the same as the site, then default to using the
same terminology as the site does
2003-08-23 07:26:50 +00:00
moodler 1a5ab4490f Improvements to logs when looking at site logs.
Also, improvements to get_site_users (slower but it works now!)
2003-08-23 06:19:05 +00:00
moodler 742fee1111 Fixed missing "search results" string 2003-08-23 04:39:49 +00:00
stronk7 a057e13d1f Up to 0.8.9 alpha.
Now multianswer questions are working too.
Too complicated !!
2003-08-23 00:36:08 +00:00
stronk7 f53119698e Now multianswer questions are working too.
Too complicated !!
2003-08-23 00:35:21 +00:00
giro123 30c49aa87e Se suma Benito Arias :-) 2003-08-22 18:58:33 +00:00
giro123 2171727fd4 Moodle 1.1 beta 1 2003-08-22 18:55:52 +00:00
rkingdon 6c550a7296 A few addition strings for League Tables and Rubrics. 2003-08-22 18:25:47 +00:00
kaipe 5a22076b10 Correction 2003-08-22 18:20:04 +00:00
kaipe 1ecbe2c476 All question types now have help texts in Swedish 2003-08-22 18:18:09 +00:00
rkingdon a94928f2f0 Added League Table of Submissions (Final Phase); Rubric Assessment
Strategy; Grace time for new submissions; changed elementid to elementno
in rubrics table.
2003-08-22 17:31:49 +00:00
moodler eafc0b4470 Teacher forum name in the list is in fact the name of the teacher forum. 2003-08-22 16:35:04 +00:00
moodler db34bb5992 After rebuilding cache - get the course record again 2003-08-22 16:20:35 +00:00
kaipe f5626b4c6b Corrected the help text for numerical.html
and also included Numerical in questiontypes.html
2003-08-22 15:58:57 +00:00
stronk7 bbe15ef239 Changed the "graphical" representation of the mod to include
multianswer table. I start working with it now !!
2003-08-22 15:46:28 +00:00
moodler f3c40f8d3c English spelling for enrol 2003-08-22 15:04:20 +00:00
moodler 2c8cb30c38 Activities can now be drag-and-dropped within side blocks! 2003-08-22 14:55:38 +00:00
moodler 526c0f708f More asjustments to the display of the admin screen 2003-08-22 14:03:40 +00:00
moodler 1074e1ad05 more tweaks to admin menu displays 2003-08-22 13:46:21 +00:00
kaipe bb9d73d9e1 Corrected translation 2003-08-22 13:44:12 +00:00
moodler a912de3eb7 Add link on admin page about students, for completeness. In the next
version this link will link to the new enrolment subsystem.

Also reduced font size to make the admin page a bit nicer on small screens.
2003-08-22 13:42:27 +00:00
kaipe bfe3068c78 *** empty log message *** 2003-08-22 13:34:41 +00:00
moodler ae5f8de620 Added some more error messages when restoring 2003-08-22 13:20:06 +00:00
moodler 6c2adc074a New files and fixes from Hans De Zwart - thanks! 2003-08-22 13:10:34 +00:00
moodler 7a7ac154a4 Some small fixes when deleting a category 2003-08-22 12:49:37 +00:00
moodler 0ddf039078 pclzip 2.0 RC2 - hopefully better! 2003-08-22 12:35:43 +00:00
moodler 9b16d1eada More tweaks to fix on/off button for admins o ncourse listings 2003-08-22 12:26:36 +00:00
moodler c432fd3213 Put in buttons so that course creators can create courses! :-I
Also, category fix_sorting is done better now when a course is added.
2003-08-22 12:15:35 +00:00
moodler fcd0e8edc7 Upgraded the live log to use the new print_log 2003-08-22 08:42:17 +00:00
rkingdon 553894ced6 Fix bug in Workshops with no teacher submissions. 2003-08-22 08:08:16 +00:00
moodler 519d369f60 Added full paging to all displays of logs! :-) 2003-08-22 06:07:18 +00:00
stronk7 6a0e7bafd4 XML support 2003-08-21 22:54:47 +00:00
giro123 ce9331aeca Moodle 1.1 beta 1 2003-08-21 20:06:02 +00:00
moodler 4d992061f0 Bump! 2003-08-21 18:03:47 +00:00
moodler 22288704de Hidden courses are displayed hidden 2003-08-21 17:30:39 +00:00
moodler 1069e8dc3b Allow the admin to login as teachers from within courses 2003-08-21 17:28:05 +00:00
moodler 2f3499b70d Fixed up get_my_courses().
It's not a tidy SQL statement any more but it's MUCH MUCH faster
with large data sets.
2003-08-21 17:24:40 +00:00
moodler 98e9a035d7 Course category listings now have a search box in the navbar for students
and non-users
2003-08-21 16:24:29 +00:00
moodler ee44a11f06 FIxed a missing quote 2003-08-21 16:15:58 +00:00
moodler 56e34ee405 Fixed bug when moving sections with apostrophes in the summary (bug 641) 2003-08-21 15:06:32 +00:00
moodler 1de5c483cd Removed unused string 2003-08-21 14:37:55 +00:00
moodler f04dc61d72 Ellipsis at start as well 2003-08-21 14:23:31 +00:00
moodler 924cef21d5 Put an ellipsis in paging 2003-08-21 14:22:06 +00:00
moodler 0e69cd0e96 Fixed a typo 2003-08-21 14:16:44 +00:00
moodler 8130b77b40 Split get-courses_page from get-courses so they can specialise 2003-08-21 14:04:04 +00:00
moodler be20753e7e Some better paging that now works with any number of pages 2003-08-21 13:47:14 +00:00
moodler 8058858329 Tweaks to account for teacher editors 2003-08-21 12:24:16 +00:00
moodler 53b67df521 Fixed the SQL for teachers and students 2003-08-21 12:19:09 +00:00
moodler 3041490d17 Initialising $navigation. Again. :-) 2003-08-21 12:12:15 +00:00
moodler f68e5995e5 Fix for non-logged-in person 2003-08-21 09:39:07 +00:00
moodler 8ef9cb5618 Some fixes to handle very very big categories.
- paging
  - more efficient SQL
2003-08-21 09:33:07 +00:00
moodler abe2920fec New number to trigger database upgrade 2003-08-21 08:22:47 +00:00
moodler 356fea4a64 Slightly better 2003-08-21 08:20:20 +00:00
moodler 5640353876 Course search shouldn't find the "site" course. 2003-08-21 08:19:28 +00:00
moodler 3052e775c8 Added an index on courses for the category 2003-08-21 08:14:56 +00:00
mits 8d86ba60a0 Polished. 2003-08-21 06:55:32 +00:00
mits 70941c166f New translation. 2003-08-21 06:43:20 +00:00
moodler 47801ef641 No need for grades with chat 2003-08-21 03:16:32 +00:00
moodler 5128daeeda Strip tags from Excel and Text dumps 2003-08-21 03:05:50 +00:00
moodler f6c05036be Put links on the course icons 2003-08-21 02:58:55 +00:00
moodler f59a65d309 Forgot a feature 2003-08-21 02:56:16 +00:00
moodler e898a9d315 FOr the regular upgraders 2003-08-21 02:55:27 +00:00
moodler b37b6ced88 Typo when including config.html ... not sure how it was working before! 2003-08-21 02:29:16 +00:00
giro123 90e1c1eae6 Moodle 1.1 beta 1 2003-08-21 02:05:30 +00:00
moodler e3f4e47a19 More robust when a journal is unused 2003-08-20 15:01:06 +00:00
moodler d1d74247e4 Invisible courses are now properly dimmed 2003-08-20 13:44:44 +00:00
moodler 5b8540e0d5 OUCH! usegrades should be showgrades 2003-08-20 13:41:56 +00:00
moodler 3ec7dc5704 Fixed a typo in the MySQL database definition that only shows
up when adding resources to courses with IDs higher than 255
2003-08-20 13:06:11 +00:00
moodler e6ea5c0664 Fixed some bad Postgres SQL that I made! :-) 2003-08-20 12:09:15 +00:00
moodler 63d48aad57 The warning should be printed on this page 2003-08-20 12:04:18 +00:00
moodler 44d3044b77 Forgot to check this slight fix in to fix the default days 2003-08-20 12:03:26 +00:00
moodler 704d595629 Changed from DOS to Unix format 2003-08-20 11:54:45 +00:00
moodler c9fb0e180b Some mods 2003-08-20 08:25:06 +00:00
moodler fff79722e5 A new course field called "showgrades" which allows the teacher to
turn the display of the grade book on and off.
2003-08-20 07:32:24 +00:00
moodler 1f6a77c02c FIxed up formatting a little 2003-08-20 02:07:11 +00:00
moodler b6ea346a45 Accidentally had an extra heading 2003-08-20 02:04:31 +00:00
moodler 7cb6e802a5 Pretty much Beta, I'd say 2003-08-19 17:48:42 +00:00
moodler 609b4625a4 More info about the release 2003-08-19 17:46:23 +00:00
moodler b0676bdfd0 Moodle format version 2003-08-19 17:34:53 +00:00
moodler e107b5ca73 Latest changes for pt_br 2003-08-19 17:31:22 +00:00
giro123 920b11ec9c *** empty log message *** 2003-08-19 15:07:28 +00:00
moodler ff9b64d9e1 More fixes and help additions 2003-08-19 15:02:31 +00:00
moodler c572466dc4 A help file for Embedded Answers (Cloze) 2003-08-19 14:57:57 +00:00
moodler 2bf31fc6a6 FIxed line feeds 2003-08-19 14:27:49 +00:00
moodler 9936fe81ea The number of courses in the categories is now cached in the
the category, and only updated when courses are moved/added/deleted etc
or the admin looks at the category listing
2003-08-19 09:26:36 +00:00
adamtpaw 7b5ff88583 Moodle v.1.0.9 2003-08-19 08:08:42 +00:00
adamtpaw ddab82acf7 Moodle v 1.0.9 2003-08-19 08:01:06 +00:00
moodler a8b5671697 Improvements to course searching
- can search for full words or non words with +word -word
 - no longer groups by category, sorts by full name
 - prints paging as well as total number
 - search help
2003-08-19 05:32:20 +00:00
moodler 1930e95964 Even nicer interface with help 2003-08-19 04:45:29 +00:00
moodler 1ede7c03ce tweak 2003-08-19 04:40:35 +00:00
moodler b1267a180d Slightly neater help 2003-08-19 04:39:59 +00:00
moodler e27dbcc8e5 Limit pages to something sensible 2003-08-19 04:37:32 +00:00
moodler 8b9c7aa069 Searching forums now has proper paging. 2003-08-19 03:35:53 +00:00
giro123 7f67a6ed40 *** empty log message *** 2003-08-18 18:06:33 +00:00
moodler 96cd80c8b2 A warning for the settings on the module variables pages 2003-08-18 17:50:00 +00:00
moodler 6f8694bdc8 New strings for the configuration screen 2003-08-18 17:47:28 +00:00
moodler 5925d0ef5b New configuration screen for the resources module 2003-08-18 17:46:51 +00:00
moodler 42282810f8 Better set_config (give immediate results) 2003-08-18 17:41:06 +00:00
moodler 5be7800c12 Switch to using global variables instead of defined values,
controlled using the button on the "Modules" configuration page.
2003-08-18 17:33:40 +00:00
stronk7 6c22e7300e New icon for scales (I'm an artist !!) :-) 2003-08-18 17:27:01 +00:00
moodler f173a591a7 Forgot this file earlier 2003-08-18 17:22:22 +00:00
moodler bda11d2acd Code to enable config.html files in the modules. 2003-08-18 17:21:53 +00:00
rkingdon a21db785d1 Minor bug fixes; additions to teachers admin screen; minor changes to
operation of pre-submission assessments.
2003-08-18 16:43:56 +00:00
moodler c477ecb2ce A few minor changes 2003-08-18 16:41:18 +00:00
moodler 2f4d324bd7 Trying something different with the admin links ... even I was starting
to get a bit lost occasionally.
2003-08-18 16:40:27 +00:00
rkingdon 87f9573f7d A few extra strings. 2003-08-18 16:34:30 +00:00
moodler 3fd866333e Just an uninitialised variable. 2003-08-18 15:17:40 +00:00
bobopinna d0471ed0f8 Updated to Moodle 1.1 2003-08-18 13:39:24 +00:00
stronk7 93e9a4c9cd Some minor changes to restore scales in existing course
(avoid some duplications)
2003-08-18 13:07:02 +00:00
moodler 415cfdcb9a Getting much better now. 2003-08-18 12:58:39 +00:00
moodler 1f7deef685 FIxed bug that was not showing custom scales 2003-08-18 11:58:07 +00:00
stronk7 36001aa95b Now scales are restored in journals too !! 2003-08-18 10:41:34 +00:00
paca70 c46b0a23db Corrected some typos 2003-08-18 08:12:31 +00:00
moodler 5ca03851ae Bug fix: On building attempts after the first one, display question images 2003-08-18 07:45:03 +00:00
moodler ce9aeca5bd Changing that help file name to something shorter 2003-08-18 07:39:23 +00:00
moodler f4e7acb624 Removed link to ratings 2003-08-18 07:24:34 +00:00
moodler 4c71204dd2 Added help button to headings when adding/editing activities. Doh! :-) 2003-08-18 07:10:53 +00:00
moodler efabdeddef Journal grading is now also all converted over to use scales as
well as numerical grades
2003-08-18 05:47:04 +00:00
moodler 734bec5dbf Removed unnecessary database access 2003-08-18 05:33:01 +00:00
moodler 62ca135d98 More cleanups and separation of printing the grades menu into a new function 2003-08-18 05:28:30 +00:00
moodler fdc47ee6c9 New function make_grades_menu() for easily making an array of grades 2003-08-18 05:10:35 +00:00
moodler 94d0cea511 Some polishing for the case when grades are set to zero (no grades).
Also, if the date is set further than on year into the future
then the due date is not shown.
2003-08-18 04:24:12 +00:00
moodler a7d52d7449 Some tidy-ups 2003-08-18 03:47:49 +00:00
stronk7 6466b6bb56 Forgot to change one line !! :-) 2003-08-18 00:04:38 +00:00
stronk7 93d7d97fc8 Scales are now supported in forums backup and restore 2003-08-18 00:03:40 +00:00
stronk7 af847821a2 Scales are now supported in assignments restore
(when grade <0, I suppose).
2003-08-18 00:02:12 +00:00
stronk7 42f1ff47b4 Scales are now supported in backup/restore.
Updated version to 0.8.8 alpha. Please test.
2003-08-18 00:00:22 +00:00
stronk7 e38411a8e1 Strings to support scales in backup/restore 2003-08-17 23:58:48 +00:00
adamtpaw 8b95c7040a Full translation of Moodle 1.0.9 2003-08-17 22:09:49 +00:00
johncaptain dd19fed469 Added: Info re: Firewalls 2003-08-17 21:46:50 +00:00
stronk7 823e087163 Started work with scales !! 2003-08-17 20:17:41 +00:00
moodler 033bac066a Bump the number for debuggers. 2003-08-17 17:00:53 +00:00
moodler a8188c08fe Just some rewording ... (I'm fussy!) 2003-08-17 14:53:25 +00:00
moodler cc2b7ea551 Fixes bug #619 -- moving discussions wasn't moving attachments 2003-08-17 14:46:44 +00:00
moodler 12407705af Check for existence of directory as well to avoid PHP warnings 2003-08-17 14:16:08 +00:00
moodler 487c1711fe There's no point in printing the notice - if there's no directory
there's no files ... pretty simple.
2003-08-17 14:14:12 +00:00
moodler a33c4ae8c2 Cutting and pasting too quick 2003-08-17 13:14:41 +00:00
moodler 3b1bb96902 Slight regression in policy (to bring it back to exactly how it all is in 1.0.9).
Only course creators can assign teacher to courses UNLESS the config variable
teacherassignteachers is true (by default it will be off).
2003-08-17 13:06:10 +00:00
moodler 91719320a0 Fixed display of assignment results when using a scale 2003-08-17 12:45:13 +00:00
moodler 678d11c921 Upgrading to version 2.0 RC1 - hoping it will fix some Windows problems
in the older version.
2003-08-17 12:35:20 +00:00
moodler 415c0dcc70 Assignment module can now use scales for grading. 2003-08-17 10:23:44 +00:00
moodler 4fe8e0d27d More robust adding/removing of admins 2003-08-17 10:17:57 +00:00
moodler aa34b7869e More robust creator adding/removing, using new functions in moodlelib.php 2003-08-17 08:58:18 +00:00
moodler 3041b0f88a More robust teacher adding/removing 2003-08-17 08:51:55 +00:00
moodler 6b42ea66a7 Ordinary teachers can assign students 2003-08-17 07:30:31 +00:00
moodler 4d9d90c006 Tweaking student page, and also making it available to ordinary teachers 2003-08-17 07:29:36 +00:00
moodler 2333cb05b9 More tweaks ... sorts etc 2003-08-17 07:20:40 +00:00
moodler c34509b070 Some tidy-ups for the students page 2003-08-17 07:14:02 +00:00
moodler 905be758d3 Don't need a red notification if it isn't bad 2003-08-17 06:47:39 +00:00
moodler 9314d39e5b New tags file 2003-08-17 06:44:58 +00:00
moodler 6b1a7a1e18 Make the logs icon look slightly less stupid 2003-08-17 06:07:20 +00:00
moodler 92cdab5afd Put user images on teacher and student links 2003-08-17 06:06:36 +00:00
moodler 6815044f28 Exclude vti_cnf directories if they are found 2003-08-17 05:50:47 +00:00
moodler 4d312bbe0f Don't enrol student if they are already enrolled. 2003-08-17 05:48:05 +00:00
moodler 7d569d2861 Simple interface to manually add students to a course. 2003-08-17 05:46:07 +00:00
moodler 6843d309a8 Removing the students script from here 2003-08-17 05:09:26 +00:00
moodler e7952289b6 Changing this string back again 2003-08-17 05:08:07 +00:00
moodler 0c8ee4402c New confirmation step when self-enrolling 2003-08-17 04:53:44 +00:00
moodler d4f253848c Rearranged help button 2003-08-17 02:34:42 +00:00
moodler a3ba14700e Help buttons fixed 2003-08-17 02:32:24 +00:00
moodler 1f38c0e252 New help file for Scales 2003-08-17 02:31:55 +00:00
moodler 94d782eb93 Don't show feedback when running SQL 2003-08-17 01:55:03 +00:00
moodler 64cbb55c2e Make sure it's THIS course that the student is currently enrolled in 2003-08-17 01:49:15 +00:00
moodler 6c38b7e012 Use the new get_recent_enrolments() function in datalib to find users
in recent_activity
2003-08-17 01:46:00 +00:00
moodler 0a08581d61 New function get_recent_enrolments() to more efficiently get recent enrolments 2003-08-17 01:45:26 +00:00
danielfetzer 95ff2ce378 *** empty log message *** 2003-08-16 17:55:14 +00:00
johncaptain 66c7992e52 Fixed typo. 2003-08-16 17:36:28 +00:00
danielfetzer 8978fb514c *** empty log message *** 2003-08-16 17:28:51 +00:00
mits 1224424568 New translation. 2003-08-16 17:09:04 +00:00
moodler 862810dc09 No need to call isteacher and isteacheredit, just isteacheredit will do. :-) 2003-08-16 16:14:25 +00:00
stronk7 9ad580181b Updated the index to show the eachattemptbuildsonthelast.html page 2003-08-16 15:32:01 +00:00
stronk7 9de28d19c3 Help for "eachattemptbuildsonthelast" setting.
Spanish version.
2003-08-16 15:23:23 +00:00
stronk7 b4e7c5c3a1 Help for the 'Each Attempt Builds On The Last' feature.
My English is far to be perfect, so edit it at your needs.
Bug 816 closed.
2003-08-16 15:11:16 +00:00
stronk7 3953f4bdc4 Now the "restore" option is showed to isteacheredit() teachers. 2003-08-16 11:46:54 +00:00
stronk7 f3c6d21942 Show more admin links to isteacheredit() users 2003-08-16 11:44:47 +00:00
stronk7 35a14ba021 Now editall and timemodified are in
backup/restore process
2003-08-16 11:31:32 +00:00
johncaptain 3702c65e91 Added: Windows specific language and region settings info to FAQ 2003-08-16 06:45:04 +00:00
moodler b6c1273289 Only editing teachers see controls and things 2003-08-16 06:44:03 +00:00
moodler aa57804096 Only editing teachers can edit activities 2003-08-16 06:40:35 +00:00
moodler 63bcc9b55b Use isteacheredit instead of isteacher 2003-08-16 06:37:06 +00:00
moodler ec9c0d4421 Show default mode again 2003-08-16 06:20:39 +00:00
moodler d99eab3c9f Allow teacher editors to modify scales 2003-08-16 05:44:40 +00:00
moodler 21f93862bd Backed out the new configuration variable "creatornewcourses" as it
is no longer wanted or needed
2003-08-16 05:43:26 +00:00
moodler 1c54562cdb Teacher editors can edit courses, and course creators get
added as teacher-editors when they create a course
2003-08-16 05:40:27 +00:00
moodler 416d6bc892 Must be an editing teacher to be able to assign teachers 2003-08-16 05:35:08 +00:00
moodler f07c9d23fc FIxed the search 2003-08-16 05:29:29 +00:00
moodler 73047f2f76 OK, this is a new scheme to allow some teachers to edit and others to not
that is much better than the proposal to change the role of course creators.

There is a new field in user_teachers called "editall", which is
ON BY DEFAULT, and allows teachers to edit courses.  It can be modified
on the teacher editing screen (formerly assign teachers).

The value is cached in the session.

To test for it, there is a new function isteacheredit($course->id)
which works much like isteacher did.

I'm going through now and applying this new function wherever
it is needed.
2003-08-16 05:19:24 +00:00
moodler 542a6914e5 Many more mime types added - thanks to D Hawes 2003-08-16 04:33:31 +00:00
moodler 25e3c612ba New icons from dhawes@mac.com 2003-08-16 04:28:21 +00:00
moodler 5fcd1b52aa Hold the presses ... I hate doing this but after going into detail
changing the course creator account like this is the wrong way to
do this.

Instead, I'm going to be adding new fields to user_teachers

Stay tuned
2003-08-16 03:28:56 +00:00
moodler 87002b0e9f Only creators can restore courses 2003-08-16 02:48:18 +00:00
moodler 48d72fa7c9 *** empty log message *** 2003-08-16 02:45:44 +00:00
moodler 6f4f04df3e Fixed database upgrade so that forum->scale is created before the
get_scale_menu tries to use it.
2003-08-16 02:30:23 +00:00
anvergara 5179875d27 updating to new version 2003-08-15 23:41:13 +00:00
stronk7 f19f822b1a Solved one bug when restoring MATCH(5) questions if
the question is an existing one. Some mapping are done
to use after them in responses.
2003-08-15 19:11:55 +00:00
stronk7 887e908592 Solved one bug when restoring RANDOMSAMATCH(6) questions if
they haven't been responsed in the quiz. The answer field in
quiz_responses must have X-0,Y-0 format instead of null.
Curiosly, MATCH(5) questions must have null if they aren'r
responsed.
2003-08-15 18:10:11 +00:00
moodler 11402bbdbc Do a check to create the default scale if it isn't already 2003-08-15 14:30:30 +00:00
moodler d318a24d45 Fixed an admin link 2003-08-15 14:19:11 +00:00
moodler a142b3b4ba New scale table for PostgreSQL 2003-08-15 14:17:15 +00:00
moodler 37eef3ed91 WHoops - you'll need this table. :-) 2003-08-15 14:12:52 +00:00
moodler a57319b1f3 New scales editing page 2003-08-15 14:03:25 +00:00
moodler e9ae66916d A few more files... 2003-08-15 14:02:11 +00:00
moodler 02ebf404c8 WARNING: BIG CHANGES!
OK, this is a big check-in with some big changes, and needs work still.

It seems relatively stable, but I need help identifying the rough patches.

1) First grading scales support.  There is a now a new table called "scale"
   that contains grading scales.  There can be site scales (course=0) and
   custom course scales.  These can be used in modules - I've only done
   forums for now but that was the hard one.  Scales can be edited via
   the new item in the course admin menu.

   There is one default scale - the connected/separate knowing one that used
   to be in forum.  To build this I pull data from the language packs
   to create one during the upgrade, or anytime a scales menu is called
   and no scales are found.

2) New roles for course creator and teachers.  I've fixed up the course
   menus and some other things but there's a lot left to do on this to
   make it all smooth.  The idea is that teachers no longer can edit courses
   unless they are also course creators.  The interface for this needs to
   be smoothed out a fair bit and I need help with this.

   The upgrade will upgrade all teachers to be creators, but will default
   the new site config "creatornewcourses" to "no", so that effectively
   these new teachers have the same privileges.

3) Simplified teacher management.  There is no longer an "assign teachers"
   and a "teacher roles" page - it's all on one page in course/teacher.html.


Phew ... time for a shower and then back into it.
2003-08-15 13:59:24 +00:00
moodler 655f2aaf2f Temporary scales icon 2003-08-15 13:46:45 +00:00
moodler ba73065339 I had to reformat this help file. It is no longer HTML but plain Moodle format.
I"ve done this for all good translations.
2003-08-15 13:43:05 +00:00
moodler c4c9c26fc9 24 hour time 2003-08-15 13:15:14 +00:00
moodler 0177961bd7 Use 24 hour time 2003-08-15 13:09:44 +00:00
moodler 2851e8a2f0 Some fixes for time display (24 hours) 2003-08-15 13:00:45 +00:00
stronk7 37bc898199 Small typo !! :-) 2003-08-15 11:23:29 +00:00
stronk7 f43f3f65bc Solved one important bug in RANDOM(4) and RANDOMSAMATCH(6)
question types.
And modified some of the quiz_answers restore system to
allow remapping answers with existing questions.
//Detected by scott dot elliott at mchsi dot com in Bug 84
2003-08-15 11:08:51 +00:00
stronk7 d968b8e61a Included and commented one new debug 2003-08-15 11:03:07 +00:00
moodler 813d441d56 Fixed up quotes, ordering etc 2003-08-15 10:56:50 +00:00
stronk7 47a5aeef23 Added some spacer.gif to align up and down buttons... 2003-08-15 10:11:22 +00:00
stronk7 41b9b44faf Added the 'Restore' option near the 'Backup' one to course list.
See bug 616. Closed. It needs Martin confirmation.
2003-08-15 08:50:35 +00:00
moodler 2b4c64e98f Better compatibility for POstgreSQL (old regexps were case sensitive) 2003-08-15 08:16:20 +00:00
moodler a74f950c4e Improved search.
Default is now back to subwords, but words can be used with +word and -word
2003-08-15 08:04:54 +00:00
moodler df4f06706a Added get_courses_search() etc 2003-08-14 11:49:57 +00:00
moodler 5195536408 Force rebuild of course cache - just in case! 2003-08-14 10:32:51 +00:00
moodler 1b58c28d15 Removing untranslated versions or incomplete versions of this help file in
preparation for new grading scheme
2003-08-14 10:16:32 +00:00
moodler 63d99fcb1d Added (default) option to search for whole words with forums.
(SQL regular expressions from David Delgado - thanks!)
2003-08-14 06:34:56 +00:00
mits ab38fc7ae6 New translation. 2003-08-13 13:08:21 +00:00
mits f102958c87 New translation. 2003-08-13 12:40:26 +00:00
moodler ef23c7808f Significant improvements to Brazilian 2003-08-13 07:37:04 +00:00
moodler 8f8714be09 Significant updates for pt_br 2003-08-13 07:17:05 +00:00
moodler 2f0adcdb0d Bump 2003-08-13 07:09:42 +00:00
moodler 5dc3d80e29 FIxed some links to all courses 2003-08-13 06:55:57 +00:00
moodler 6e6b61635e Don't interfere if news is selected 2003-08-12 17:01:54 +00:00
moodler 7ea3bbec32 No point in offering the option for really big sites to have all the courses
on the front page.
2003-08-12 16:52:55 +00:00
moodler 3b3ab94282 Never checked this in with the course search 2003-08-12 16:44:22 +00:00
moodler c6ee38d073 Some refinements to the display of forums
- don't show intro box for teacher forum (because it can't be edited)
  - don't show intro box when the text is empty anyway
2003-08-12 16:37:52 +00:00
moodler 1ddf93298b Tweak 2003-08-12 08:29:47 +00:00
moodler 6535be8551 New, shorter intro to styles files that calls a function.
This function sets header information to improve caching (default 5 minutes)

Cookies are also prevented to improve cacheability.
2003-08-12 07:52:19 +00:00
moodler 16e4918d43 Little tweak to fix a caching problem.
User images were not being cached properly because Moodle was
sending a session cookie.  I've turned this off now for user images.
2003-08-12 07:02:34 +00:00
giro123 3bd5733800 *** empty log message *** 2003-08-12 00:27:49 +00:00
moodler 9400ee33c5 Missing picture data in forum_get_recent_posts 2003-08-11 16:56:33 +00:00
moodler 61d7378374 Slight editing 2003-08-11 15:20:31 +00:00
moodler eafd2784b4 Added a simple help popup for chat 2003-08-11 15:06:57 +00:00
moodler c960bed274 New help file for chatting 2003-08-11 15:06:21 +00:00
moodler 895e2afc7d Updated status and plans for chat module 2003-08-11 13:47:18 +00:00
moodler 9b2e1812a2 This icon was missing from the template 2003-08-11 13:31:57 +00:00
moodler 8210692dc3 Added a box to display subcategories 2003-08-11 13:02:45 +00:00
moodler 981181c9f4 Slight re-phrasing 2003-08-11 13:02:21 +00:00
kaipe 608ed9800d Debug
This fix rids warnings that used to come when a student for the first time attempts a quiz with the option "Each attempt builds on the last" = Yes (attemptonlast).
Now the option is not in effect when a student attempts a quiz for the first time, i.e. when there is no last attempt to build on.
2003-08-11 12:37:54 +00:00
moodler c571f3fc8a Little fixes for the course_sideblock 2003-08-11 11:51:08 +00:00
kaipe 85c06eab07 quiz option - "Each attempt builds on the last" 2003-08-11 11:47:30 +00:00
moodler 38a10939db Search engine for courses 2003-08-11 09:45:50 +00:00
moodler 52a554db2c Added new info popup page when courses are in listing format 2003-08-11 07:48:03 +00:00
moodler 4b908eb699 Smaller 2003-08-11 07:09:31 +00:00
moodler 646360408f New "info" icon 2003-08-11 07:00:20 +00:00
moodler 3d95bdb76f Show course access (guest, password etc) on non-editing screens 2003-08-11 05:38:28 +00:00
moodler 49d3bab8aa new resort function for courses in a category 2003-08-11 05:24:48 +00:00
moodler 241ae0d52b Bugfix when renaming 2003-08-11 02:07:17 +00:00
moodler 4e56c82dab get rid of signed parameter when upgrading columns to varchar or text 2003-08-10 14:38:47 +00:00
moodler 75c64d922f Some name changes 2003-08-10 14:37:52 +00:00
moodler 50b5487c54 Get rid of the enumerated type on the course formats, so that
we can think about adding custom course formats into course/format
2003-08-10 14:36:52 +00:00
kaipe 1754624916 Fixed bug that was pointed out by Tom Cat:
The reuse of old quiz_answers records for question type multianswer/embedded did not work properly.
2003-08-10 12:09:49 +00:00
danielfetzer 640cb17e36 *** empty log message *** 2003-08-10 11:56:23 +00:00
moodler 41a2968c28 Emoticons don't make sense. 2003-08-10 09:28:55 +00:00
moodler d47fd1ee7c Added richtext editor to site front page 2003-08-10 09:26:11 +00:00
moodler c15421f26b Tidy up the copyright notice and added a warning. 2003-08-10 09:12:17 +00:00
moodler 440eb0d79d More clean ups 2003-08-10 08:39:29 +00:00
moodler 05c195931c A little timing issue 2003-08-10 08:17:59 +00:00
moodler 55e4b5f97d Some cleanups of the admin page to make it
- more explanatory
  - more expandable

Apologies for the lost muscle memories, but I think this
will work better in the long run.
2003-08-10 08:01:14 +00:00
moodler b48ec6c3c7 New admin icon 2003-08-10 06:53:42 +00:00
moodler 413dd5d798 Can ue more than one keyword now. :-) 2003-08-10 06:47:45 +00:00
selliott 8263539f09 added icon.gif 2003-08-10 05:00:49 +00:00
selliott 9b55522872 added backup.gif 2003-08-10 04:59:13 +00:00
selliott 718cfb2b4b added restore.gif 2003-08-10 04:58:28 +00:00
moodler 6c4441e796 Use direct menu 2003-08-10 02:53:49 +00:00
johncaptain fb5f91ac4e Added link to Redhat Linux info in the "Blank Pages" question 2003-08-09 19:21:46 +00:00
moodler 2c71ddbaa8 To avoid moving to same category 2003-08-09 17:31:33 +00:00
moodler f31200247f My Courses is now shown in the course side block if the user is not
an admin.

Also, this block now appears on course main pages (under admin).
2003-08-09 17:17:21 +00:00
moodler 43da063795 Just to remind myself how fast time is passing 2003-08-09 16:58:35 +00:00
moodler f2bb0045d3 More moodling on the course categories, improving performance for
large categories and making it easier to move large numbers of
courses around.

Also cleaned up some of the navigation bars
2003-08-09 16:53:30 +00:00
moodler 7140a97ae3 Missing string, bug in call to get_string 2003-08-09 12:40:08 +00:00
moodler c6cbe2e30d Minor formatting fixes 2003-08-09 10:11:04 +00:00
moodler 05f53652f3 Displays all user pictures on one page.
This has been on moodle.org for ages, but it might as well be in the
distribution too.   It's not linked from anywhere in Moodle currently.
2003-08-09 08:37:22 +00:00
moodler ceca2ad2b0 Looks better when nothing is found 2003-08-09 07:59:39 +00:00
moodler 3f26745351 Better button behaviour 2003-08-09 06:02:01 +00:00
moodler b800ac5a10 Much improved forum searching, with independent words and paging 2003-08-09 05:35:02 +00:00
moodler 88438a5893 New highlighting function that is able to cope with HTML.
It's a bit slower, but links in forums no longer cause problems.

See bug #589
2003-08-09 03:57:46 +00:00
moodler 33428ff9ae Improved interface for course creators 2003-08-09 02:24:27 +00:00
moodler 25ac0bd195 Better links 2003-08-09 02:10:05 +00:00
moodler e9c2dc1fa0 Robust variable for attchments 2003-08-09 02:00:20 +00:00
moodler f5e8e2f6e1 Better way of specifying backupdata name 2003-08-09 01:54:52 +00:00
selliott 52dd8d7dbf selliott - Fixed mixup in feedback for true/false questions 2003-08-08 18:06:41 +00:00
moodler 28f312c09e Some fixes to make report work at least ... complete mode needs work 2003-08-08 17:38:28 +00:00
moodler 9a0b4d6c1f Fix for the bug causing an error on the user activity page - made a
new function workshop_get_student_submission() based on the version
in 'assignment' ... haven't looked at the functionality yet.
2003-08-08 17:01:38 +00:00
moodler 072426e0c1 Fixed up cancel button on module editing page to avoid error
when returning to course page.

Fix by Scott Elliott.
2003-08-08 16:46:16 +00:00
moodler ee23f384bf Some declarations just in case (for the included files). 2003-08-08 11:29:33 +00:00
moodler 125898afd2 Use the "correct" way of encoding HTML (quoted-printable) instead of
warapping it like text (which was working, but...).
2003-08-08 03:39:25 +00:00
moodler 0351b1f9f4 Language of receiver was not being set correctly 2003-08-08 03:38:18 +00:00
moodler beba8fdb9e SOme updates 2003-08-07 17:37:50 +00:00
moodler 865b2c3aca Sometimes we are blind to the obvious right way of doing things 2003-08-07 17:09:51 +00:00
moodler 973d1e62a8 Slightly nicer icon 2003-08-07 17:06:15 +00:00
moodler b99897718e Little display tweaks 2003-08-07 17:00:06 +00:00
moodler 65d5517a28 Tweaks 2003-08-07 16:49:41 +00:00
moodler 26330001bc Fixed up My Moodle 2003-08-07 16:41:33 +00:00
moodler b8d481e444 Some upper/lower case consistency 2003-08-07 16:31:03 +00:00
moodler 6f065ce390 No margins on bottom or top 2003-08-07 16:20:31 +00:00
moodler 346b820821 Remove margins on UL tag 2003-08-07 16:17:34 +00:00
moodler ee00b8b948 There's always one, isn't there? 2003-08-07 16:15:14 +00:00
moodler dc70c99199 New and updated images 2003-08-07 16:07:06 +00:00
moodler 6a2d42e6fb Changed function name 2003-08-07 16:04:54 +00:00
moodler d2b6ba704e Another big checkin.
This includes some significant cleanups to the new course categories
system.  The basic idea is that the categories/course browser is now
unified under one system, and admin features related to that have
all been moved into the browser (as little icons).

I'm much happier with this as a foundation that can scale and be
built upon.

Still to go:

  - searching
  - paging
  - polishing

Also in here are a lot of little cleanups around the place, such as
the initial setup process.
2003-08-07 16:01:31 +00:00
moodler 7b2e275106 Full name of Macedonia 2003-08-07 15:23:10 +00:00
moodler f27802ad3b Yugoslavia --> Serbia and Kosovo 2003-08-07 15:17:33 +00:00
moodler 5f14e17029 A small fix for mail boundary headers that may have been breaking some
mail programs (notably Exchange).
2003-08-07 11:42:12 +00:00
moodler 81d3268da1 Remove login link on first install 2003-08-07 06:56:34 +00:00
moodler 674416eabd Add two hours to avoid possible daylight savings time problems 2003-08-06 15:32:31 +00:00
danielfetzer b24f1462d3 *** empty log message *** 2003-08-05 16:50:31 +00:00
moodler de5f4552df Craziness. 2003-08-05 11:45:53 +00:00
kaipe 5ee8d89f65 The message "Recently added question!" is shown for questions that have been added since the reviewed attempt was finished.
Closing bug #576
2003-08-05 11:39:49 +00:00
moodler dd137191ca Added help button about cookies 2003-08-05 11:36:07 +00:00
moodler 4e200814c1 Added Cookies to index 2003-08-05 11:35:42 +00:00
moodler 55973e1139 New help file about cookies for login page 2003-08-05 11:34:31 +00:00
moodler 9e1942c056 Fixed a typo on the multianswer table definition 2003-08-05 05:11:43 +00:00
moodler 1efcfce8a3 More missing strings 2003-08-05 03:25:16 +00:00
paca70 0c70f81c0d To fix authentication issue when same ldap-attribute is used multiple fields in Moodle. 2003-08-04 19:34:32 +00:00
stronk7 03877c6c61 Changed "eachattemptbuildsonthelast" column name to
"attemptonlast". Seems to work.
2003-08-04 18:39:25 +00:00
moodler 27c4094294 Fixed some missing strings that no-one picked up before! 2003-08-04 16:07:17 +00:00
moodler 9db31d0df5 Quick icons 2003-08-04 16:01:09 +00:00
stronk7 22ad18b972 ATTEMPTONLAST are included in backup/restore too !! 2003-08-04 10:38:51 +00:00
stronk7 d6478d4f82 Changed "eachattemptbuildsonthelast" column name to
"attemptonlast". Seems to work.
2003-08-04 10:31:12 +00:00
danielfetzer 533af805b8 *** empty log message *** 2003-08-04 08:28:11 +00:00
moodler 688d06f442 Added mailformat to user data returned in class listings.
This fixes a bug where students were getting plain mail only
on forums that were force-subscribed.
2003-08-04 05:48:39 +00:00
moodler 7c4ee4c29f Allow site course to have custom words for student and teachers 2003-08-04 05:02:28 +00:00
kaipe 586b2c82ed New quiz option - "Each attempt builds on the last"
This makes it possible for students to take a tedious quiz, save it half-way and have it graded. The student can then, at a later point, get back to the quiz and have the previous answers already filled in and graded. The student can then continue with the remaining questions as well as redo all the answers that got wrong at the previous attempt.
It seems to work fine with one little twisted exception:
Say that the student attempts the quiz first and that the teacher thereafter edits the quiz and removes or adds a few questions. This will work out fine for as long as the teacher do not get the idea of adding a question with question type RANDOM. The quiz will be fully functional again after removing that RANDOM question or resetting the option 'Each attempt builds on the last" to NO.
Not a very serious problem but it takes someone with greater insight in question type RANDOM to resolve it.

As always, I can not commit lang/en/quiz.php.
---
As I was using the function quiz_get_attempt_responses I had it refactored removing the obsolete argument $quiz. I also changed the call from review.php
2003-08-03 23:00:45 +00:00
stronk7 da2ad42086 Added string necessary to backup/restore 2003-08-03 22:55:56 +00:00
kaipe 0f36ecb9ea New quiz option - "Each attempt builds on the last"
This makes it possible for students to take a tedious quiz, save it half-way and have it graded. The student can then, at a later point, get back to the quiz and have the previous answers already filled in and graded. The student can then continue with the remaining questions as well as redo all the answers that got wrong at the previous attempt.
It seems to work fine with one little twisted exception:
Say that the student attempts the quiz first and that the teacher thereafter edits the quiz and removes or adds a few questions. This will work out fine for as long as the teacher do not get the idea of adding a question with question type RANDOM. The quiz will be fully functional again after removing that RANDOM question or resetting the option 'Each attempt builds on the last" to NO.
Not a very serious problem but it takes someone with greater insight in question type RANDOM to resolve it.

As always, I can not commit lang/en/quiz.php.
2003-08-03 22:54:02 +00:00
stronk7 80de201bfc Updated.
Now chat modules are included in backup and restore
2003-08-03 22:48:41 +00:00
stronk7 9934c7b0d6 Now chats are restored too !! :-) 2003-08-03 22:46:13 +00:00
stronk7 724db57661 Now chats are backuped too !! :-) 2003-08-03 22:24:01 +00:00
stronk7 74a0363f0c LIMIT is now working properly. 2003-08-03 21:49:19 +00:00
kaipe 5a24a01868 Resolving bug #576.
This solution shows the message "Recently added question!" and the question text for each question that has been added since the reviewed attempt.
The advantage with the chosen solution is that it will work fine for the (soon to come) "Each attempt builds on the last" quiz option.

As I don't have the karma needed for updating in lang/en/, the message does not yet look quite as I described it above.
2003-08-03 21:39:32 +00:00
kaipe bdb63d64f2 Debugged question types NUMERICAL and MULTIANSWER (known as embedded answers) as these did not do things right whenever a student had not given any response (was treated as zero etc).
For numerical there was also a need to allow typical shortanswer responses whenever there could be answers like n/a, inf, -inf, nan etc.
Further more about numerical, there can be more than one answer alternative defined (just like for shortanswer). This is not supported by numerical.html but everywhere else. MULTIANSWER included, it is up to any taker to update numerical.html. This is more than likely to lead to overlappings between numerical ranges if more than one is defined. Think of the case where the highest grade answer ranges between 0 and 2 and the half grade answer ranges between 2 and 4. How should we grade 2? We should pick the highest grade!
2003-08-03 20:02:43 +00:00
mits 5ca4f1944f New translation. 2003-08-03 17:33:17 +00:00
stronk7 e5fc599647 Forget delete some debug, sorry. :-) 2003-08-03 16:41:31 +00:00
stronk7 13d0fb4bbf Now, when a category exists, if we are restoring to a different course,
set utomatically the publish field to 1.
If a question exists in DB (by category, questiontext and qtype) it isn't
duplicated.
This produce some problems restoring answes, but avoid duplicates.
2003-08-03 16:36:29 +00:00
stronk7 51de923ed1 Reuse an existing string. 2003-08-03 15:15:23 +00:00
stronk7 38fb24921c More backup related strings... 2003-08-03 15:14:08 +00:00
stronk7 fa383df984 Solved bug. Now user files are checked againt users to backup.
Before this every thir under users was in backup.
2003-08-03 09:39:27 +00:00
paca70 fdc60fd20d Ask only naminattribute when searching for user. 2003-08-03 09:20:05 +00:00
paca70 da7b210a75 Fix from Martin Wwellard to fix PHPs case issue with attribute names. 2003-08-03 09:07:42 +00:00
stronk7 4398d023a9 Updated:
- Teachers can backup/restore their courses.
- New option "restore to existing, deleting old".
- backupdata dirname harcoded.
- backup and restore buttons in main course page.
2003-08-03 01:05:38 +00:00
stronk7 be2a6fc6ca Teacher restoring and admin restoring finished.
Allow restore into new course (only admins),
      restore into existing course deleting old and
      restore into existing course adding to old
Teachers are limited to "current course" while admins ca
select any course. :-)
2003-08-03 00:42:41 +00:00
stronk7 35ea159433 delete_dir_contents function now allows excluding a dir 2003-08-03 00:40:08 +00:00
stronk7 642ac84855 Added suport to new restoreto options 2003-08-02 23:37:41 +00:00
stronk7 ed8ee0910c Take out backupdir string due to some backup
detected problems related to it.
2003-08-02 23:36:13 +00:00
giro123 565ff246e5 *** empty log message *** 2003-08-02 19:44:16 +00:00
stronk7 03162427df The restore option in course page is only showed if th
"backupdata" dir exists
2003-08-02 18:23:58 +00:00
stronk7 0c6e10b33e Now "backupdir" string is hardcoded in backup process. 2003-08-02 16:13:44 +00:00
stronk7 9e426d54ee Added preliminary support to teachers.
Not working yet.
2003-08-02 16:06:33 +00:00
stronk7 8f7ab28112 Now "backupdir" string is hardcoded in backup process.
Backup of logs in chunks is included, but the limit
clause doesn't seem to work. I'll test it later.
2003-08-02 16:03:00 +00:00
moodler 07aeb7b0bf Move the code for clearing out a course into a new function:
remove_course_contents()
2003-08-02 11:32:59 +00:00
stronk7 1692281e40 Minor change to allow continue after upgrade_backup 2003-08-02 10:32:57 +00:00
stronk7 2bd19d60cf Restore option allowed to teachers too.
The course_id is passed to restore.php as a parameter
2003-08-02 10:08:57 +00:00
danielfetzer 47c3f0d4d9 *** empty log message *** 2003-08-02 09:39:38 +00:00
danielfetzer 07f0986e16 *** empty log message *** 2003-08-02 09:00:37 +00:00
moodler 835ad8ef7a Adding missing strings.
Instead of Multi Answers, how about "Embedded Answers" ..?
2003-08-02 05:09:04 +00:00
moodler 8883c4a885 Less fiddly looking icon 2003-08-02 05:05:09 +00:00
moodler 567b01bceb Quick icon for multiple answers 2003-08-02 05:01:02 +00:00
danielfetzer 610faab9e6 *** empty log message *** 2003-08-02 00:40:18 +00:00
stronk7 e9346b95b7 backup_release is now saved to config too. It was losed in lastest changes
to update module facility !!
2003-08-01 23:46:49 +00:00
stronk7 d37ca7c7f8 Chanfed to locate the pclzip properly. 2003-08-01 23:36:07 +00:00
danielfetzer bcd269d24d *** empty log message *** 2003-08-01 22:21:06 +00:00
danielfetzer 1ffb0f1ac3 *** empty log message *** 2003-08-01 21:06:55 +00:00
moodler 001f747fbe Detailed howto needs to be here ... 2003-08-01 15:30:08 +00:00
moodler 274bc21a11 More links 2003-08-01 15:28:53 +00:00
moodler 59d2b54235 Backup stuff 2003-08-01 15:28:07 +00:00
moodler dd167d59c9 Added a missing help file! 2003-08-01 15:26:51 +00:00
moodler 434d01398a Backup and restore buttons on home page 2003-08-01 15:19:23 +00:00
moodler f354106d46 Some tidying up 2003-08-01 15:14:49 +00:00
moodler 65c59e30b8 New restore link for admins so they can restore courses ... 2003-08-01 15:09:35 +00:00
moodler 4210bec136 A quick backup icon 2003-08-01 14:51:19 +00:00
moodler bd38123e98 Completed mods to allow teachers to make backups 2003-08-01 14:42:14 +00:00
moodler 9c1ae5ae32 Removed $moodle_home and $mods_home references.
Also removed direct references to $backup_version and $backup_release

backup.php now accepts teachers of their own course
2003-08-01 14:34:11 +00:00
moodler 10dcde409b Further integration of backup into main Moodle.
The database checks/upgrades are now done on the main
admin page like the other modules.

The database files are now standard format .sql and .php files

PostgreSQL support was added - BUT HAS NOT BEEN TESTED YET!!
2003-08-01 13:59:17 +00:00
kaipe 2e3e1ac76b Added the choice of 16.666% for multichoice fraction 2003-08-01 13:24:05 +00:00
kaipe 8b439f8c16 New question type - multianswer 2003-08-01 08:37:11 +00:00
moodler 4d55f46b0f More details on backups 2003-08-01 02:32:45 +00:00
danielfetzer 76a8a326cd *** empty log message *** 2003-08-01 01:02:40 +00:00
stronk7 101735cc89 Included fix_category_courses() to
adjust the new category structure
2003-07-31 18:01:45 +00:00
johncaptain 3136f5fa70 added: backup Q&A 2003-07-31 17:18:39 +00:00
stronk7 f5786441aa Changed to version.php
(to be more consistent with the rest of the modules)
2003-07-31 16:56:40 +00:00
stronk7 2c54aa080b Copied from old backup_version.php
(to be more consistent with the rest of the modules)
2003-07-31 16:55:11 +00:00
stronk7 d538d4008f Changed calls to backup_version.php to version.php
(to be more consistent with the rest of the modules)
2003-07-31 16:54:05 +00:00
stronk7 2b96840769 Variables passed by reference warning is out !! 2003-07-31 16:44:52 +00:00
danielfetzer 4712035bec *** empty log message *** 2003-07-31 13:27:25 +00:00
moodler e92fe848ab Removed needless pass-by-reference to avoid warnings BUG 573 Thanks Eloy! 2003-07-31 12:23:49 +00:00
moodler 0eeac484f3 Extended get_records so it can deal with LIMITs now 2003-07-31 12:18:22 +00:00
moodler 7e1a999c10 Moved fix_category_courses to datalib.php so it's more accessible 2003-07-31 12:09:17 +00:00
moodler ea4c2d54e7 Removing duplicate 2003-07-31 02:03:59 +00:00
danielfetzer 24e3eaefc9 *** empty log message *** 2003-07-30 22:35:10 +00:00
danielfetzer 452290cf77 *** empty log message *** 2003-07-30 21:26:02 +00:00
danielfetzer 6922fa037c *** empty log message *** 2003-07-30 19:36:18 +00:00
danielfetzer dc265cf339 *** empty log message *** 2003-07-30 18:02:38 +00:00
danielfetzer c76d690b89 *** empty log message *** 2003-07-30 17:34:18 +00:00
danielfetzer 358bbd05dc *** empty log message *** 2003-07-30 17:12:06 +00:00
stronk7 c2bc6f548a Two more backup related strings 2003-07-30 17:10:01 +00:00
stronk7 7d40e78c0d Uncommented clean_temp_data. I forgot it
in lastest tests...
2003-07-30 16:29:53 +00:00
danielfetzer 68234a3061 *** empty log message *** 2003-07-30 15:33:21 +00:00
moodler 4efea825a1 Put here just temporarily for those who might need it. Will be
replaced by the new enrolment code soon anyway.
2003-07-30 15:11:04 +00:00
moodler a6870f0c2c Slightly prettier display 2003-07-30 13:57:39 +00:00
moodler 90c2ca2e68 Fixes for course ordering in one category 2003-07-30 13:56:17 +00:00
moodler f853105459 Missing parameter 2003-07-30 13:35:20 +00:00
moodler 80bcf0a99c Bit more current now 2003-07-30 13:17:37 +00:00
moodler c9704833fa More files related to recent course display changes 2003-07-30 13:05:51 +00:00
moodler c2cb45451f COURSE DISPLAY REVAMP
OK, some big changes here to the front end, particularly in
course categories and course display.

Course categories can now be nested (to any level).

Courses and course categories can now be manually sorted
any way required.

There is a groovy front end for managing these, and a better
range of options for formatting the front page.

It all still needs some polishing, which I'll be doing over
the next couple of days, including better auto-sorting.

I would not use this on production systems just yet.
2003-07-30 13:02:45 +00:00
moodler 474fcf367e Fixed it up (accidentally set it to the journal mods.html before) 2003-07-30 10:58:56 +00:00
moodler dd85cc8189 Fixed missing slashes 2003-07-30 05:21:24 +00:00
moodler c540442ff3 Fixed some missing slashes 2003-07-30 05:20:19 +00:00
moodler 4f20f30fed Slight addition 2003-07-30 05:11:45 +00:00
moodler 3e07e9f754 Added FAQ about secureforms 2003-07-30 05:10:13 +00:00
moodler 754095d63e Secureforms now default to OFF 2003-07-30 04:59:29 +00:00
moodler 66c8c3b6cf More fixes from Daniel Fetzer daniel.fetzer@freenet.de 2003-07-30 04:02:23 +00:00
moodler 4d828270e8 Deleting the bulk of es_mx (Replaced by "es") 2003-07-30 03:25:38 +00:00
stronk7 388052cd9c Solved two importat bugs.
Numerical Questions now working.
Included support to Moodle's language system.
2003-07-29 19:48:06 +00:00
stronk7 7fae2d4809 Restore strings are included now !! 2003-07-29 19:33:33 +00:00
stronk7 a42de97187 Included language support. 2003-07-29 15:38:55 +00:00
stronk7 2aa7d92472 Added and commented some debug lines. 2003-07-29 15:37:38 +00:00
moodler b1c305a331 Changes from Daniel Fetzer daniel.fetzer@freenet.de 2003-07-29 11:02:08 +00:00
moodler 9a1c9f5398 Changes from Ursula Raab 2003-07-29 10:53:37 +00:00
kaipe 44fc346f45 Refactoring only, no new features -
Modified methods are quiz_get_answers and quiz_grade_attempt_results.
For quiz_grade_attempt_results, the switch statement has been separated out into method quiz_grade_attempt_question_result.
2003-07-29 09:11:06 +00:00
moodler 17b88d1910 Fix for POP3 by disabling TLS explicitly.
based on this: http://moodle.org/mod/forum/discuss.php?d=1884
2003-07-29 07:12:31 +00:00
moodler 48705c8d40 Latest fixes from Thomas Robb - thanks Thomas! 2003-07-29 04:18:01 +00:00
moodler 46213aa855 Improved magic_quotes routine (deals with arrays now, too) 2003-07-29 01:54:16 +00:00
stronk7 c45f0ee1cc Fixed important bug when recovering assignments or forums
with files and the moddata/courseid didn't exist.
Now force the creation of the courseid dir from the
restorelib in each module.
2003-07-28 22:31:23 +00:00
stronk7 67805f89ec Prepared to insert string in langs. Tomorrow. 2003-07-28 19:37:37 +00:00
stronk7 1b42805d61 Added chat status 2003-07-28 19:35:36 +00:00
stronk7 902142c079 Added language support 2003-07-28 19:32:51 +00:00
stronk7 a8c0abbfb1 Added language suport 2003-07-28 19:24:09 +00:00
stronk7 957a0d2196 Included every backup string (I think) :-) 2003-07-28 17:42:22 +00:00
rkingdon 0e29a0b1d8 Minor errors fixed; Student can delete submissions and assessments;
Teachers see student names; Tabbed Admin screen.
2003-07-28 17:37:16 +00:00
rkingdon db7def84b7 Some missing strings added. 2003-07-28 17:33:34 +00:00
moodler aa6af0f833 A hack to get around magic_quotes_gpc being turned off 2003-07-28 16:37:12 +00:00
moodler f406e6785e Avoid problems with quotes and so on in user records when updating users 2003-07-28 12:08:31 +00:00
moodler b7aa3aead3 Updated madewithmoodle file (same logo) 2003-07-28 11:53:42 +00:00
moodler 253c44f0fa We need to keep these old images here because old stuff may refer to them. 2003-07-28 11:47:40 +00:00
moodler 67a63a3060 Cleaned up the remaining images:
- moved user images to /pix/u folder, and changed format to .png to allow
   transparent images etc.  These can now be customised in themes.

 - removed legacy madewithmoodle logos
2003-07-28 11:42:53 +00:00
moodler 250e71d967 When a quiz is closing within the next 24 hours, a small countdown
is shown in the titlebar (drawn with javascript).

An alert is shown at ten minutes, and zero minutes.

This doesn't prevent students from doing anything, but it serves
as a reminder and just looks cool.  ;-)
2003-07-28 08:58:47 +00:00
moodler 4458c8a887 I'm hopeful this is a fix for the wrapping problem ... 2003-07-28 05:53:03 +00:00
moodler 1dbb6e5031 Added some flushes in case the indexes take too long ... 2003-07-28 03:28:43 +00:00
moodler 3a04632eb7 Fixes for file names 2003-07-28 03:26:32 +00:00
moodler a8fa25d18d Improved indexing for improved performance on the course page, when viewing
logs and when viewing lists of users ... thanks to Eloy for the one on the log file.
2003-07-28 02:51:56 +00:00
moodler 8b0ef9b0cb Improvements to simplestat (more info in HTML display plus downloads XLS an TXT) 2003-07-28 02:04:58 +00:00
moodler 49caea35c9 Small changes to the restore "continue" button and some missing strings 2003-07-28 01:38:35 +00:00
stronk7 4498d1a402 Prepared to insert string in langs. Tomorrow. 2003-07-27 21:30:24 +00:00
stronk7 92ffd629b2 Typo in course STARTDATE 2003-07-27 21:29:22 +00:00
stronk7 9bd651e876 Small typo in course STARTDATE. 2003-07-27 21:27:48 +00:00
stronk7 c11c6fed95 //Added some debug (commented in production) 2003-07-27 21:26:51 +00:00
moodler 706be21465 Upgraded phpmailer to 1.70 2003-07-27 13:26:07 +00:00
moodler 2b97bd71e3 Use the admin user as the envelope sender (to catch bounces etc) 2003-07-27 13:14:00 +00:00
moodler e561d3c2fc Add a message to help debugging 2003-07-27 12:22:05 +00:00
moodler b2ce450a6b Improved cron jobs for central clean up tasks.
- there is now a randomiser so that these jobs are only run 20% of the time

 - duplicate enrolments are now cleaned up.
2003-07-27 12:20:29 +00:00
giro123 e61611898a *** empty log message *** 2003-07-27 05:28:31 +00:00
giro123 12244e3384 *** empty log message *** 2003-07-27 03:02:50 +00:00
giro123 04c79e281c *** empty log message *** 2003-07-27 02:07:40 +00:00
giro123 7969ce5bd7 *** empty log message *** 2003-07-27 01:16:59 +00:00
moodler 1dc42c2ef8 Fix for Herzogovina 2003-07-25 16:39:14 +00:00
selliott 1ddfec1175 Replaced call to function assignment_get_submission with call to get_record. This should clean up duplicate rows in assignment_submissions table. -- selliott 2003-07-25 14:28:26 +00:00
moodler da0c90c313 Fixed user graphs for site-level, all logs 2003-07-25 13:23:28 +00:00
moodler b0dd12a912 Manual method should just use the standard 'forgot password" button 2003-07-25 13:13:36 +00:00
moodler 5a8625e459 A better way of doing chat_get_latest_message() that doesn't conflict
with the debugging in get_record_sql
2003-07-25 09:01:02 +00:00
moodler 30e72d4227 FIxed the LIMIT bug I just made ... need to find a better way
as this sets off get_record alarms
2003-07-25 08:19:33 +00:00
moodler d2c538f1fb No need for body colour 2003-07-25 08:18:27 +00:00
moodler fcd3a1ee42 New feature - chat scheduling. Can now set a time for the next chat,
as well as rotating weekly or daily period.

Also some small fixes.
2003-07-25 06:47:06 +00:00
moodler f9919efd87 Better averages when students are missing 2003-07-24 16:59:11 +00:00
moodler 40b1a22162 Further changes to tidy up reports 2003-07-24 16:48:10 +00:00
moodler c7538de679 New string for simple stats 2003-07-24 16:44:21 +00:00
moodler c90f563e39 New simplestat report module.
This is very simple so far just to do some tests on larger datasets.

Soon it will have XLS and text download, as well as more question
information.
2003-07-24 16:43:24 +00:00
moodler 351039ae34 Further fixes to the last fix ... the same thing was happening further down. 2003-07-24 14:52:41 +00:00
moodler 5f474ef98a Split up the index.html and mods.html to take advantage of the new
/help.php

Some of these are still empty and will be fixed with text soon.
2003-07-24 12:57:40 +00:00
moodler 1517c0aa4d New version of help.php that automatically constructs the index.html
and mods.html files.

Direct from Mad Alex
2003-07-24 12:56:17 +00:00
moodler 4e29914577 If modules have a config.php file in them then a link to this is
printed in the modules screen.

These config.php screens presumably allow the setting of site-wide
parameters for modules.

Thanks to Mad Alex. :-)
2003-07-24 12:09:32 +00:00
moodler 6c6def145c New FAQ about the admin account 2003-07-24 08:53:43 +00:00
moodler 3712e0b5b5 YES!!! FINALLY fixed that damn bug that was causing the admin user
to be skipped during installation!

Bug 565 has the details, but basically it was caused by not initialising
the variable $user before using it.  Some people probably had a cookie
called "user" that was polluting the variable.

YAY!
2003-07-24 08:36:43 +00:00
moodler a96610151d Latest tags file 2003-07-24 06:43:14 +00:00
moodler 779e79f438 Better string for teacher reports 2003-07-24 06:21:21 +00:00
moodler 29d5d0b40c New modular plugin structure for quiz reports.
The code for reviewing an existing attempt is now separate
in review.php and now has a log entry of it's own.

The overview and regrade reports are now in separate subdirectories
under the "report" directory.  Each has a primary "report.php" file
which implements the report as a class.

These existing reports are very simple, but now more complex ones
can easily be written.  (I am about to do one).
2003-07-24 05:18:00 +00:00
moodler 350a05c4cf Fixed a missing translation string 2003-07-24 04:55:15 +00:00
moodler 0ed00b3b7f Change default logs to be "today's logs" 2003-07-24 02:29:59 +00:00
moodler 582de679a2 Some improved popup windows / links for user pictures 2003-07-24 02:25:23 +00:00
moodler cee5ff1d04 Better layout of gathering quiz results, which mkes it easier for developers
at the cost of perhaps a little efficiency ... some more testing on this i
should be done.   Thanks to Henrick Kaipe for this.
2003-07-24 02:04:22 +00:00
moodler 7e4a64888b When displaying a user's logs for the current day, make the graph
display ALL courses (ie to match the logs printed below).
2003-07-24 01:54:06 +00:00
mits 45a71412ae New translation added. 2003-07-23 14:26:30 +00:00
moodler 699ea457f9 Slight improvement for implementing styles ... since nested styles
don't seem to work as advertised
2003-07-23 14:03:01 +00:00
moodler c28a94c0ac A missing style 2003-07-23 13:35:24 +00:00
moodler 67fab9b4df New entries 2003-07-23 07:03:04 +00:00
moodler fbc9d26e2d New language: Greek! 2003-07-23 06:35:43 +00:00
moodler 7618a8eb92 More debugging/checking on get_record_sql 2003-07-23 06:30:26 +00:00
moodler 4d7a373539 Added some additional error checking of get_record_sql when in debug mode 2003-07-23 04:33:40 +00:00
moodler a4a4b858a3 Slight fix when adding log 2003-07-23 01:44:35 +00:00
thepurpleblob 464712ec77 Yet more minor problems fixed for hyperlink/mailto: conversion
difficulties
2003-07-22 10:11:12 +00:00
moodler 08b63144b8 Fixed missing string 2003-07-22 08:09:46 +00:00
moodler 23bca2c3eb Added a missing string 2003-07-22 05:32:59 +00:00
moodler 003175124d Fixed a typo 2003-07-22 02:00:44 +00:00
moodler c05f2f763b Slightly more robust in case it can't find users. See bug 562. 2003-07-22 01:58:44 +00:00
stronk7 3960a44b62 Reviewing an attempt now works fine with NUMERICAL and SHORTANSWERS
containing the "," character. Bug #561 closed.
2003-07-21 17:25:59 +00:00
moodler 35d01c7f31 When using the "manual" method, I've disabled the external method of
changing passwords, and enabled the internal "change password" button
just like "email" and "none".

Thanks to Danilo Massa for pointing out the inconsistency.
2003-07-21 15:20:58 +00:00
moodler 3e09b6262a Added missing string nomessages 2003-07-21 14:58:07 +00:00
moodler dd0bd5088c Increase the size of the field to store sequences in course_sections 2003-07-21 14:28:04 +00:00
johncaptain 759660c9d9 Added question: Resource1 2003-07-21 13:22:12 +00:00
compuproggy a47765b654 *** empty log message *** 2003-07-21 09:18:22 +00:00
moodler 1efa27fdbb Close loophole for invisible courses by re-enrolment 2003-07-21 07:50:59 +00:00
moodler 9ee379868a New strings for hiding courses 2003-07-21 07:43:04 +00:00
moodler d4f2e3fb55 Backup the new course->visible field 2003-07-21 07:35:58 +00:00
moodler a6d82c3f49 New course parameter "visible" which makes the course available to
students.  Defaults to 1 (on).  Teacher can control this from settings page.
2003-07-21 07:31:01 +00:00
moodler 319ea04166 Better formatting on IE 2003-07-21 05:31:23 +00:00
moodler bd5c05ffa6 Spacers look funny on IE 2003-07-21 05:13:08 +00:00
moodler 1ec3c09b6b Was cropping first/last message - fixed now 2003-07-21 05:08:46 +00:00
moodler b5477371e3 Put link at the top 2003-07-21 05:05:25 +00:00
moodler c3ba081792 Add a display of current users on the view page 2003-07-21 05:03:15 +00:00
moodler d4df9200b6 Moved print_headline() to weblib.php 2003-07-21 04:53:55 +00:00
moodler d861debecc Make session link translatable 2003-07-21 04:20:01 +00:00
moodler bdb4e5e23d Some rewording 2003-07-21 04:10:45 +00:00
moodler a669b1f5f9 Ah! Now we're getting somewhere - chat reports look quite nice now! 2003-07-21 04:08:32 +00:00
moodler 9df9138a77 A bit more usable now 2003-07-21 03:37:53 +00:00
moodler 22a4491ae9 Some new code related to the new reports - uploading for testing on
other server - still very early
2003-07-21 03:16:19 +00:00
moodler cea5796545 Only show "recent activity" for chats in the current course. 2003-07-21 01:35:28 +00:00
moodler f78ae3c432 Fixed translation 2003-07-21 00:59:21 +00:00
moodler 693b57dfde Slight change to string 2003-07-20 14:19:16 +00:00
moodler 058811c1c7 Changes related to new popup capabilities for "Web Links".
TRANSLATORS PLEASE NOTE:  help/resource/resourcetype.html has changed slightly.
2003-07-20 14:07:37 +00:00
moodler 23b8ce894a Added target again for non-Javascript users (I'd taken it out while testing) 2003-07-20 14:02:00 +00:00
moodler 93faa0c4e8 Give each popup a resource a unique window 2003-07-20 13:58:01 +00:00
moodler 3ee3e01a03 Popup windows now work on side links too 2003-07-20 13:56:27 +00:00
moodler 86aa7ccfdf New feature - "Web link" resources can now specify a popup window
fullscreen is currently the only feature left out of this .. I had
trouble getting it to work consistently so I've left it out as being
more troubles than it's worth.
2003-07-20 13:53:31 +00:00
moodler d769d2ee51 Rebuild course cache using the function for it. 2003-07-20 07:56:51 +00:00
stronk7 309fbe5681 Numerical questions included in backup/restore. Up a bit. 2003-07-19 18:02:03 +00:00
stronk7 e2bad68d23 Now numerical questions are included in backup and restore too !! 2003-07-19 18:01:11 +00:00
moodler 8fa367a9fe I'm about to start on some big jobs ... 2003-07-19 13:37:09 +00:00
moodler 66716651d4 For completeness 2003-07-19 11:59:55 +00:00
stronk7 5bcd2fa872 Modified a bit the form to avoid bug 556.
Seems to work fine now (render-html bug)
2003-07-17 22:11:08 +00:00
moodler 94cb8c7d95 Fixed call to get_all_instances_in_course() 2003-07-17 01:35:29 +00:00
palojacko 605fd762e4 update for moodle 1.0.9 2003-07-16 22:09:31 +00:00
rkingdon d90f8c6a54 Removal of debugging code; fixed bug in _get_student_submissions routine 2003-07-16 19:47:24 +00:00
stronk7 9380866797 Little modification to use $CFG->directorypermissions in mkdir 2003-07-16 07:57:10 +00:00
giro123 8cbe6d4b77 en 1.35 2003-07-15 18:20:19 +00:00
giro123 cc1c2fa6f1 en 1.156 2003-07-15 18:19:37 +00:00
giro123 0fa09c7a49 en 1.5 2003-07-15 18:17:52 +00:00
giro123 61036f520a en 1.18 2003-07-15 18:16:24 +00:00
stronk7 042c19f5a5 Changed backup logs default to NO. 2003-07-15 18:12:41 +00:00
stronk7 e487376a8c Added some flushes to avoid some browsers timeouts
when calculating what to backup (check phase).
2003-07-15 18:10:15 +00:00
moodler d246da7c70 UPdates from Paula Magri 2003-07-15 15:42:27 +00:00
rkingdon bd89f04f53 Minor corrections, addition of rubics table - July 2003 2003-07-15 15:24:58 +00:00
moodler f8a51b414b Don't convert URLs into links for the plain text format because
it can mess up code sometimes
2003-07-15 02:19:12 +00:00
moodler 7c55a29b37 Text emails now have html entities translated properly
Thanks to Gustav Delius for the patch
2003-07-15 02:06:51 +00:00
mits 0f46a5f343 New translation. 2003-07-14 23:45:57 +00:00
moodler 493486c43f Removed redundant up/down arrows ... let's see how everyone feels about it 2003-07-14 16:22:42 +00:00
moodler 7977cffdb0 Arbitrary moving of activities (aka cut and paste)
Some of this code was sent by Howard Miller, but I rewrote most of it
to make it shorter and to fit in better with current code.
2003-07-14 13:08:38 +00:00
moodler 29ee5550d3 Removing Chatarea completely from Moodle.
If anyone still wants it, I've made an archive here:

    http://moodle.org/download/modules/chatarea.zip
2003-07-13 14:03:20 +00:00
moodler 263cff8b75 Print images correctly on questions included from categories in
other courses.
2003-07-12 16:24:29 +00:00
moodler 52dcc2f9e6 Some slight cleanup (optimisation) of print_section and print_section_block 2003-07-12 06:52:26 +00:00
moodler cccb016ae4 When displaying index lists of a particular module's activities,
ensure that the order they are displayed in is always the same as the
order they have been defined in.   See bug 553.

This involved API changes to the function get_all_instances_in_course()
2003-07-12 05:19:18 +00:00
moodler 4337380421 Email addresses are now well and truly obfuscated on public profile pages 2003-07-11 08:38:39 +00:00
stronk7 bc66e327c6 Small typo when creating structures in a fresh installation
(no previous backup installed)
2003-07-10 18:21:32 +00:00
moodler 9c02661096 Added a question field to numerical table for completeness 2003-07-10 14:09:43 +00:00
moodler 361f649d7a New question type: Numerical questions.
Mostly coded by Henrik Kaipe - I changed a few things on the way in.
2003-07-10 13:25:07 +00:00
moodler 60bb26021a Whoops forgot to check these babies in 2003-07-10 08:12:18 +00:00
moodler cc3655a22c Just some comments 2003-07-10 08:11:58 +00:00
moodler 3a35179587 Updated a few glaring problems (old style code) 2003-07-10 08:06:09 +00:00
moodler 132911c884 Force unique entries in list 2003-07-10 06:42:44 +00:00
moodler 7d494f1c2e Need to escape slashes here 2003-07-10 06:38:02 +00:00
moodler 4854814402 Minor formatting fix 2003-07-10 04:49:13 +00:00
moodler b7602a115e Chat now prints something useful under recent activity 2003-07-10 04:46:03 +00:00
mits 7f4f4560b9 New translationd added. 2003-07-10 02:20:42 +00:00
moodler d490d8aa15 Right ping now 2003-07-09 13:09:00 +00:00
moodler a808a06f88 A beep is a ping. ;-) 2003-07-09 13:07:53 +00:00
moodler 48bae72ffb Slightly better window name 2003-07-09 12:55:07 +00:00
moodler 7d79236935 Simple beeping is now added ... users can now beep each other
and also beep everyone using "beep all"

There are no controls as yet to disable beeping on a per-user
basis but this would come next
2003-07-09 12:53:26 +00:00
moodler 09f97c8b47 A default beep 2003-07-09 12:37:17 +00:00
compuproggy e0f96309a4 *** empty log message *** 2003-07-09 06:32:50 +00:00
compuproggy 2000cb0671 A fresh translation 2003-07-09 06:23:10 +00:00
moodler 70363f8819 Updated this link too 2003-07-09 04:56:04 +00:00
moodler 2981721b76 Updated backup link (in future perhaps it should link to a generic
page from which backup file management and restores can be done too)
2003-07-09 04:55:10 +00:00
moodler 5351f569c6 Updated paths for new location (that was easy!) 2003-07-09 04:43:10 +00:00
moodler 87828a3a99 Demolishing the old house for these guys 2003-07-09 04:42:26 +00:00
moodler d7c93ec8fa Moving the backup libraries for each module into their new homes.
There's some beer and pies in the fridge, guys, settle in.
2003-07-09 04:40:35 +00:00
moodler a2e9f1c579 Add a notification when people have left 2003-07-09 04:27:23 +00:00
moodler 9f85bed4c3 Added emoting (both the MOO style with a : and the IRC style /me ) 2003-07-09 04:17:27 +00:00
thepurpleblob 28683e6c3b Added support for mailto links 2003-07-08 09:10:22 +00:00
moodler 10696dc1f3 Timezone included in user listing, plus new recent activity stuff 2003-07-08 06:47:44 +00:00
mits 174fffd541 character check. 2003-07-07 20:52:32 +00:00
mits c5444ad7e5 New translation strings and new file chat.php added. 2003-07-07 20:51:06 +00:00
giro123 fbde3cf968 *** empty log message *** 2003-07-07 20:39:52 +00:00
stronk7 e1b3457139 Some minor cleanings 2003-07-07 19:22:52 +00:00
stronk7 04ab6cabc6 Some debug info commented 2003-07-07 19:20:52 +00:00
stronk7 11c1d52551 Added some flush 2003-07-07 18:46:36 +00:00
stronk7 040c7b7099 Changed end 2003-07-07 18:42:19 +00:00
stronk7 d48370a60b Added some flush() to the backup process (in users, questions and logs) 2003-07-07 18:26:11 +00:00
moodler 5da9e4a5ac Small bugfix to allow question categories to be changed 2003-07-07 15:08:03 +00:00
moodler 0485fe6551 Added parsing of links 2003-07-07 13:23:33 +00:00
moodler 0927b54b4d Fixes for "wierd assignment error" - Bug #549, from Scott Elliott 2003-07-07 12:45:08 +00:00
moodler 34ce8fbbf4 Stuff 2003-07-07 12:12:44 +00:00
moodler a63d100a03 Show the intro text now 2003-07-07 12:11:11 +00:00
moodler 51600d9dab Fixed some accidental lowercasing 2003-07-07 11:52:05 +00:00
moodler 1bcb0d8700 Strings 2003-07-07 09:46:00 +00:00
moodler f7e648da70 Some minor improvements 2003-07-07 09:45:08 +00:00
moodler 1515a89e2d Very early version of new chat module, made by Martin using ARSC as
an inspiration.

Works OK already on most newish browsers .. see mod/chat/README.txt for details.
2003-07-07 06:44:16 +00:00
stronk7 96e1bd4a55 Included support to DESCRIPTION qtype.
Mainly, do nothing, but it's supported now :-)
2003-07-06 09:21:56 +00:00
moodler bca64a122b Don't allow grades to ever be set for description questions 2003-07-06 04:19:11 +00:00
moodler f65ed9726a Don't shuffle quiz questions by default (confusing to newcomers) 2003-07-06 04:08:46 +00:00
moodler 575de48fc3 Description questions should not be selected randomly 2003-07-06 04:08:11 +00:00
moodler 5cbf2187ab Added Description question to overall list of question types 2003-07-06 04:02:53 +00:00
moodler 401c8de6c5 New question type called "Description". All it does is print some
text and/or an image, without requiring an answer.  Can be used
to provide text for a following group of questions, or to insert
a joke in the quiz etc ...

This code is based on code sent in by Ursula Raab.  Thanks!

See: http://moodle.org/mod/forum/discuss.php?d=508
2003-07-06 04:00:05 +00:00
stronk7 fcf74f5a80 Changed the backup output to convert every "\r\n\" and "\r"
(Windows and Mac line-break sequences) to "\n" (Unix line-break
sequence) to be treated apropiately by nl2br function.
Updated to 0.8.1 alpha
2003-07-05 23:14:16 +00:00
stronk7 ca5c2e1d3c Now xmlize is invoked with XML_OPTION_SKIP_WHITE = 0 to
avoid \n skipping.
2003-07-05 22:44:29 +00:00
moodler c99ce77b17 Recommitting because of CVS wierdness 2003-07-05 11:52:01 +00:00
moodler 0d27c9ea8b Upgraded ADOdb to 3.60 ... supposed to be faster plus has bugfixes 2003-07-05 06:23:27 +00:00
moodler 221518e109 Added a missing string 2003-07-05 04:31:57 +00:00
moodler 72d497d4ce Display images inline when attached to forum posts 2003-07-05 03:54:10 +00:00
stronk7 7f7d8c9508 Little modification to show the "Backup Course" option if
backup utility is installed (not shwown else)
2003-07-04 17:47:10 +00:00
giro123 56ca681022 *** empty log message *** 2003-07-04 17:02:12 +00:00
moodler d5ded46f61 Just because it's about time to update it, and there's some big developments
starting up.
2003-07-04 13:39:11 +00:00
moodler 163c84ef63 Made a small start on the coding guidelines 2003-07-04 13:24:10 +00:00
stronk7 b1a09588e4 Now quizzes are restored too !! 2003-07-03 23:22:58 +00:00
stronk7 9079f6448c Updated to 0.8.0 alpha. Quizzes included !!
Broken compatibility with previous backups.
2003-07-03 23:21:27 +00:00
stronk7 ad80e394a0 Some comments and debug 2003-07-03 23:18:13 +00:00
stronk7 87cdd48c5a Remove thanks to Daniel in progress :-) 2003-07-03 23:17:07 +00:00
stronk7 39851da158 Now quizzes are restored completely.
Bronken backup compatibility again !!
2003-07-03 23:15:18 +00:00
stronk7 90c2f403e2 Changed to allow correct responses (match_sub) to be restored 2003-07-03 23:04:26 +00:00
giro123 ed51459ee4 Hungarian 2003-07-03 22:01:05 +00:00
bobopinna 8ec7d88384 Fill some new blank in version 1.0.9 2003-07-03 14:09:37 +00:00
moodler 2b32bdddb9 Keep strings cached in memory during a single page to improve performance
on slow filesystems or bad file caching.   (experimental)
2003-07-03 12:19:54 +00:00
bobopinna d82c1d629d Some blank filled. 2003-07-03 09:53:39 +00:00
stronk7 9464f66f82 Solved bug when triyng to backup mod without any module files.
Thanks to Daniel Miksik.
2003-07-02 22:33:25 +00:00
stronk7 7bfa4fade3 Excluded form quiz_choose_random_questions the quiz
questions to avoid duplicates in quiz. Bug #544. Closed.
2003-07-02 17:30:42 +00:00
moodler 3405b2123f For plain format, retain multiple spaces 2003-07-02 11:59:20 +00:00
moodler 0110e35cc0 Allow default countyr to be unset again 2003-07-02 08:37:15 +00:00
moodler ea68853b7c Hungarian credits 2003-07-02 08:09:49 +00:00
moodler 468c8a0949 New translation (based on 1.0.8.1) from Istvan Bozsa (bozsa@jht.gau.hu) 2003-07-02 08:08:24 +00:00
carlesbellver e0b23d06cd *** empty log message *** 2003-07-02 06:25:25 +00:00
mits d3f31aeddf added $string['parentlanguage'] 2003-07-01 14:18:04 +00:00
stronk7 cb0d53106e Little bug in randomsamatch questions. 2003-06-30 21:44:36 +00:00
stronk7 4f93ac2254 Update version to 0.7 alpha
Changes is backup to avoid duplicate tag names !!
Broken backup/restore compatibility with previous versions
2003-06-29 23:03:49 +00:00
stronk7 f82f87d630 Begin restoring quizzes (STEP 2)
Incomplete yet
2003-06-29 22:53:39 +00:00
stronk7 4db6f3f46a Now, restoring quizzes too (STEP 2).
But incomplete, yet !!
2003-06-29 22:51:48 +00:00
stronk7 242c6fe274 Changed some tags.
Old backups are now incompatible !!
2003-06-29 22:31:59 +00:00
stronk7 546431e9b8 Now categories and questions are recovered completely (STEP1)
Go up a bit!!    :-)
2003-06-28 23:24:51 +00:00
stronk7 56f56ca0b2 Now categories and questions are recovered completely (STEP1) 2003-06-28 23:18:37 +00:00
moodler df3fd24968 Better check of server name for unusual web servers 2003-06-28 18:45:19 +00:00
gregb_cc 4de4fdfe86 performance increase for make_editing_buttons, value for 'str' stored in static variable 2003-06-27 22:25:31 +00:00
giro123 dddbc256d3 without extra header info 2003-06-26 00:14:07 +00:00
giro123 2109681d59 *** empty log message *** 2003-06-25 17:36:36 +00:00
mits 91461bb84c Polished. 2003-06-24 20:00:22 +00:00
stronk7 477da948a8 I forget to update the firstpost field in discussions.
Solved.
2003-06-23 23:33:26 +00:00
stronk7 9f61d8aab5 Bug when reassigning firstposts in discussions.
Solved !! Uff !!
2003-06-23 23:20:48 +00:00
stronk7 6dbedc7fb2 Update version. It goes up a bit :-)
(journals and forums included)
2003-06-23 22:56:18 +00:00
stronk7 78e042f1c3 Now forums are restored too 2003-06-23 22:52:02 +00:00
stronk7 4995323f75 Now FORUMs are restored too !! 2003-06-23 22:50:47 +00:00
stronk7 7c7031dd16 Added some <br>... 2003-06-23 22:49:58 +00:00
stronk7 783ab2b07c Bug in backup_getid cause return record when no record
must be returned. Solved.
2003-06-23 22:36:42 +00:00
stronk7 6e0470a646 Changed to avoid backup_name contains whitespaces !! 2003-06-23 17:50:38 +00:00
stronk7 35672383ca Comment about backup name format without spaces 2003-06-23 17:31:02 +00:00
giro123 7406aa6747 *** empty log message *** 2003-06-23 16:16:35 +00:00
moodler ea5037be16 Small fix for string 2003-06-21 23:24:12 +00:00
stronk7 4912fae11b Minor change to avoid timeouts copying user files
and course files.
2003-06-21 22:37:57 +00:00
stronk7 dafb597400 Journals are restored too 2003-06-21 19:10:41 +00:00
stronk7 475a7b8804 Journal are restored now !! 2003-06-21 19:08:20 +00:00
moodler fc093dfa9b Use top, not parent 2003-06-21 08:25:15 +00:00
moodler a47240e69a Added targets for links 2003-06-21 08:24:14 +00:00
moodler a545f04cbe Added some instructions for non-developers 2003-06-21 08:21:07 +00:00
moodler b4a348291b Primary admin should never be allowed to be deleted by sub-admins 2003-06-21 04:09:20 +00:00
moodler 475fe8d16c Removing old files 2003-06-21 02:52:03 +00:00
stronk7 5acc69451e Although a lot of changes have been done in the backup/restore process,
only minor changes in STATUS.
2003-06-20 19:47:46 +00:00
stronk7 8328766280 Changes to work with data from fs instead of db.
Show progress info
Output data to the browser to avoid timeouts.
2003-06-20 19:46:01 +00:00
stronk7 adc8b0c7fe Changes to users restore and some minor bugs detected
(when no modules were selected to restore)
2003-06-20 19:44:06 +00:00
stronk7 af9cd9552e Changes in:
- Saving temp data to fs, instead of db
     (mysql limit bug OUT)
   - Modified clean directories (moodle standard delete dir
     function seems to work wrong with large dirs
   - Send info to browser continuosly to avoid timeouts.
   - Increase php execution time limit
   - More checks.
   - Restore into existing course now works fine
   - Create course_dir if it doesn't exist in the final step
     of backup.
2003-06-20 19:42:20 +00:00
stronk7 28a1cb407a Updated to 0.6.1 alpha (tons of changes) 2003-06-20 19:38:07 +00:00
giro123 f48dce348b *** empty log message *** 2003-06-20 17:45:37 +00:00
moodler 908d7b30fb Seems to be working pretty good - removing old lines no longer needed 2003-06-20 06:58:42 +00:00
moodler f95c2a73ca Anchors on threaded posts too 2003-06-20 06:50:14 +00:00
moodler b22b0e61f0 An initial effort at making posts return to correct context 2003-06-20 06:35:09 +00:00
moodler 0650989c76 About time to update it anyway 2003-06-20 06:31:33 +00:00
moodler f81e6589d6 Removed needless reference to $ME 2003-06-20 04:41:14 +00:00
moodler 4be030098f Some clean up when deleting activity modules 2003-06-20 04:34:22 +00:00
moodler 64a97704be Closed PHP tag 2003-06-20 02:54:33 +00:00
stronk7 6d840b7cb3 Changed backupdir.
Sin espacios ni caracteres raros, por favor. Es el nombre de un directorio.
Da problemas en en proceso de backup.
2003-06-19 23:29:35 +00:00
giro123 d0c8064140 *** empty log message *** 2003-06-19 19:55:56 +00:00
giro123 d9099017d9 *** empty log message *** 2003-06-19 17:53:55 +00:00
moodler 7d064d87ff Fixed a bug affecting the zipping of files within subdirectories,
patch from Robert Hetzel.
2003-06-19 13:12:34 +00:00
moodler 9dc9273aa9 Don't allow adding of users when external authentication is being used. 2003-06-19 03:00:58 +00:00
giro123 afcd2e04c6 *** empty log message *** 2003-06-19 02:31:15 +00:00
moodler dc7e8cb582 Add LIMIT of 1 to get_record functions ... the behaviour of returning false
when there were more than one record returned was sometimes causing
problems if the data was unclean due to a bug somewhere.

For example, if there are two copies of a section, then Moodle keeps
creating new ones because it can't find ONE.  This fix prevents that.
2003-06-19 02:18:51 +00:00
thepurpleblob 6d4952f3cf Added instructions for spell checker 2003-06-18 14:35:33 +00:00
thepurpleblob 5c408aeb8c Added dreadful spell checker option
Fixed bug where formatting at end of line failed
Removed substitution for single quotes bug (ended up as double)
2003-06-18 14:33:51 +00:00
mits e5781b4eed New string translated. 2003-06-18 09:10:40 +00:00
coolbit 19f1cd243e *** empty log message *** 2003-06-17 14:54:54 +00:00
stronk7 39cc53ca83 Go previous state (1.1) 2003-06-16 22:46:24 +00:00
stronk7 090b82f813 Little bug ending script. :-) 2003-06-16 22:03:48 +00:00
koenr 71762178f0 no message 2003-06-16 19:58:40 +00:00
koenr 14da6c3f23 Small changes. 2003-06-16 19:55:45 +00:00
koenr 9207ae6667 Small changes. changed schoolbord back to Blackboard (brandname) 2003-06-16 19:55:20 +00:00
coolbit 8c67a8bc60 *** empty log message *** 2003-06-16 16:51:49 +00:00
moodler 717f40c6d8 Some fixes to avoid pointless uses of $ME 2003-06-16 14:40:51 +00:00
stronk7 f238f38694 Changed backupdir. It must be a single word !! 2003-06-15 08:59:11 +00:00
stronk7 cbc926ef19 Directory name (backup/restore) and somo observation 2003-06-15 07:36:13 +00:00
moodler b8bf90c53f Minor interim change to improve display of discussions on user page
because some of them are getting really long on moodle.org

Eventually this display will be completely different, with information
about all public data.
2003-06-15 07:11:11 +00:00
moodler d0e922a9b2 Full path for some silly Windows machines 2003-06-14 13:04:58 +00:00
moodler 6e66c22f4c Fixed icons - bug 442 2003-06-14 13:02:06 +00:00
moodler d5945ef02c Fixed path 2003-06-14 12:45:09 +00:00
moodler 584ec10ecc JUmp menu from week to week 2003-06-14 12:17:13 +00:00
moodler f43e7c6f0e Firming it up 2003-06-14 12:09:35 +00:00
moodler cb208bf2b4 Silly typo 2003-06-14 12:00:31 +00:00
moodler 5932b3aa6d Slightly nicer trimming of section summaries 2003-06-14 11:59:23 +00:00
moodler 8b00b40692 Shorter menu 2003-06-14 11:54:07 +00:00
moodler 1d0196520e Testing new jump menu for topics 2003-06-14 11:50:32 +00:00
moodler 2c93da8ceb Some info about using crontab 2003-06-14 11:26:55 +00:00
moodler bb3f200a0c Removing English versions so that German speakers don't get out-of-date
help files (some have changed)
2003-06-14 11:10:23 +00:00
moodler 71e8bd81c4 Replace script stuff with xxx instead of space to avoid repeating sequences 2003-06-14 08:41:40 +00:00
mits 98808a46a0 Fixed. 2003-06-14 08:15:38 +00:00
mits a2fff0d348 New translation. Good for managing help file translation :-) 2003-06-14 08:14:27 +00:00
mits 95ba80b830 Polished. 2003-06-14 08:12:59 +00:00
mits e93bef5c20 encode fixed. EUC-JP + LF. 2003-06-14 07:45:36 +00:00
mits 68db5875f0 Polished. 2003-06-14 06:52:57 +00:00
mits aaf6c93c9c Polished 2003-06-14 06:41:55 +00:00
mits 235b320262 New file and translation. 2003-06-14 06:36:48 +00:00
moodler 4171f9b9a8 Fixes to colorchooser 2003-06-14 06:30:04 +00:00
moodler 496f77cce2 Rearranging to make it easier to read 2003-06-14 06:03:07 +00:00
moodler 95397c094a Added link for "Other" documentation 2003-06-14 05:48:57 +00:00
moodler 2cdcb45e84 Fixed some links 2003-06-14 05:47:47 +00:00
moodler feb1b0b019 Some cleanups - translators may want to check these 2003-06-14 05:45:13 +00:00
moodler 7faca74755 Removed some PHP 2003-06-14 04:08:43 +00:00
moodler 95b500763a Added an index to all help files. :-) Manually maintained at the moment. :-( 2003-06-14 03:52:23 +00:00
moodler 2da8349712 Clarified AON format 2003-06-14 03:50:58 +00:00
moodler 7404fe0ea3 Removing duplicate copies of en files 2003-06-14 02:16:17 +00:00
moodler 0880e50d53 Wider question textareas 2003-06-13 16:16:16 +00:00
moodler 7142bc1bbd Check existence of course format 2003-06-13 16:13:51 +00:00
moodler 2136ada61e Slightly bigger window 2003-06-13 16:08:56 +00:00
moodler 19cbf6ffa1 Slightly larger posting window 2003-06-13 16:07:13 +00:00
moodler 6feed269ba Some style changes to reduce the size of the richtext toolbar 2003-06-13 16:06:55 +00:00
moodler 829e2a6de9 Clearer idea of 1.1 2003-06-13 13:43:35 +00:00
uermelin 473f6a925d authentication changed 2003-06-13 12:13:30 +00:00
uermelin 14826bb77c new bug from me removed 2003-06-13 11:04:32 +00:00
uermelin ad004cefa5 deletequestioncheck changed 2003-06-13 10:56:00 +00:00
moodler deca24d5f4 Moving course formats into subdirectory.
This is the first step towards more pluggable course formats that can
be just dropped in to the system.
2003-06-13 08:41:57 +00:00
moodler ef5db7243b <em> tag added to the list of allowed tags 2003-06-13 06:57:42 +00:00
moodler 8e487c3dca Fixed a bug when admins edit user accounts from external databases 2003-06-13 02:37:52 +00:00
stronk7 c05d9c3ee8 Bug solved restoring in existing course. 2003-06-12 22:30:20 +00:00
stronk7 59728e8d4a Modified to flush data to browser... 2003-06-12 17:41:52 +00:00
stronk7 10453b424e Updated version to 2003061100 and modify backup tables (mediumtext) 2003-06-12 17:40:55 +00:00
stronk7 13e1a20fe1 Some improvements and tons of flushes !! 2003-06-12 17:38:36 +00:00
stronk7 5c191b96ee Clear temp data working now (uncommented) 2003-06-12 17:32:22 +00:00
stronk7 60b420af99 Added the backup_flush function use to send some data to the browser
flushing output inmediately
2003-06-12 17:29:16 +00:00
stronk7 d2c94f4b5b Typoooo :-) 2003-06-12 15:37:25 +00:00
stronk7 ac6a7b144d Changed max_execution_time to 3000.
Call to backup_required_functions included.
2003-06-12 15:35:37 +00:00
stronk7 fe3c84ab46 Added backup_required_functions to pre-check required functions in
backup/restore process.
2003-06-12 15:33:25 +00:00
johncaptain bb7ca60b29 correction to loginsetting 2003-06-12 13:20:37 +00:00
johncaptain 532a6cac21 correction 2003-06-12 13:18:39 +00:00
johncaptain 32986803f4 Minor change to expression 2003-06-12 13:15:02 +00:00
johncaptain 3025985d01 fixed typo 2003-06-12 13:09:58 +00:00
johncaptain 260c1b1426 Added item: loginsetting 2003-06-12 13:08:30 +00:00
moodler a6e5c89237 Changes to includes to make it more robust on different versions of PHP
while remaining secure
2003-06-12 12:00:15 +00:00
moodler d87b74c56a Parent language is "en" :-) 2003-06-12 11:56:20 +00:00
moodler db356340d8 Use parentlanguage when printing documentation 2003-06-12 11:55:29 +00:00
moodler 686be5b077 Some fixes to display documentation better in other languages 2003-06-12 11:55:03 +00:00
moodler aa635c4727 Modifications so that help falls back on parent language too 2003-06-12 11:35:12 +00:00
moodler 3fbd5dcc5f Removing optional items ... eventually will remove city and country as well.
This stuff will all be set via the user profile, and will be customisable
by the admin or teacher as well.
2003-06-12 08:01:17 +00:00
compuproggy c3c6b3600f An alle ?bersetzer der deutschen Versionen: Lasst uns koordiniert zusammenarbeiten
To all translators of the German Versions: Let us work together coordinated
2003-06-12 07:16:44 +00:00
compuproggy 66e26415fd *** empty log message *** 2003-06-12 06:11:44 +00:00
compuproggy 097a5aff67 New German Strings added 2003-06-12 06:07:42 +00:00
moodler 8c8a042559 Rmoved dot 2003-06-12 03:42:55 +00:00
moodler ab0f0dcb50 Added definitions for parentlanguage to all Spanish dialects 2003-06-12 03:38:13 +00:00
moodler 541863759f International Spanish.
This is to be the definitive Spanish version and the parent version of all
Spanish dialects.

Claudio Tavares is the maintainer and coordinator of this version.
2003-06-12 03:37:06 +00:00
moodler b282f78294 Personal form of German.
Adapted from "de" translation by Franz Horvath

Note this is the first lannguage to use the new "parentlanguage" string

In this case of course the parent is "de".

de_du probably needs some non-du string strings removed from it
2003-06-12 03:32:05 +00:00
moodler b947c69a71 Cleaned up get_string for language strings - slicker now
Added new feature: if a string "parentlanguage" exists then that
language will be tried before defaulting to English.

Useful for dialects or other languages that are similar.

For example, all the Spanish translations can default to "es"
2003-06-12 03:27:24 +00:00
moodler 34c84a186c Extensions for grades and comments from Thomas Robb. 2003-06-12 03:01:56 +00:00
stronk7 55513d3ec5 Changed max_execution_time and memory_limit php variables
to execute long and heavy scripts (restore and backup)  :-)
Only affects current script execution
2003-06-11 19:13:07 +00:00
giro123 f911710d0f *** empty log message *** 2003-06-10 22:28:13 +00:00
stronk7 d223ada029 Need to addslashes before put summary section data to db !!!
Now restoring sections is working.
User restoring failed !! -> Too much records !!
2003-06-10 17:27:08 +00:00
stronk7 4f39d4fb3a Changed the log_check_backup function to execute a count_records
instead of selecting everyting (crash when there is a lot of log entries).
2003-06-10 16:40:36 +00:00
stronk7 025288e27e Goooo 2003-06-10 15:56:47 +00:00
moodler 25cd6a0133 Fix the up down icons again 2003-06-10 15:51:23 +00:00
stronk7 02fa0aa3b0 Up a bit 2003-06-10 15:43:58 +00:00
stronk7 54b7cd7c60 Changed get_records (every field) in user_check_backup to
get_records (only id). Possible memory shortage when a lot
of users (3999) are retrieved.
2003-06-10 15:42:51 +00:00
moodler d7b97e437f Fixed help strings 2003-06-10 15:36:13 +00:00
moodler 12905134ab Sections can now be moved up and down 2003-06-10 15:27:09 +00:00
stronk7 0aefd39fd4 More debug... 2003-06-10 15:18:48 +00:00
stronk7 e60e65ab5f Some debug 2003-06-10 15:07:12 +00:00
stronk7 fb14b23be5 Little change to avoid iterate when no users are retrieved in
user_check_backup function
2003-06-10 15:02:53 +00:00
uermelin 93628fd361 addingquestions changed 2003-06-10 14:07:38 +00:00
uermelin 6f873e1f7e added addingquestions 2003-06-10 13:57:40 +00:00
moodler ad41694c04 Allow activities to be moved from section 1 to section 0 2003-06-10 13:26:26 +00:00
stronk7 290a1b4a3e Backup quizzes COMPLETED. Two setps finished. 2003-06-10 09:25:27 +00:00
mits c3add1a38a Polished. 2003-06-10 09:21:35 +00:00
moodler 21b1125f63 Make form destinations relative (to course/mod.php) to avoid
some form problems on mis-configured servers (wwwroot not quite right)
2003-06-10 05:33:58 +00:00
moodler 7789a7d16c FIxed the ID line 2003-06-10 05:25:38 +00:00
giro123 9455322c65 *** empty log message *** 2003-06-10 00:34:52 +00:00
giro123 91b17703de *** empty log message *** 2003-06-09 23:48:35 +00:00
stronk7 a7a055fd0d Included some new workings.
Quizzes (step 2) completed.
2003-06-09 17:12:57 +00:00
stronk7 a94891a727 Now quizzes are in backup.
Only STEP 2. Read comments in source !!!
2003-06-09 16:52:09 +00:00
moodler a5f25c0165 No need to shuffle the answers of multi-choice questions 2003-06-09 14:05:37 +00:00
carlesbellver 888bc12d4a *** empty log message *** 2003-06-09 10:05:10 +00:00
mits 0f46f0a1aa Polished. 2003-06-09 10:02:27 +00:00
moodler 0cd84e67ea Added a check to disable VBSscript as well 2003-06-09 06:18:45 +00:00
moodler f1c9d90fbb Better regular expression to catch javascript triggers 2003-06-09 05:54:14 +00:00
moodler 14f593e176 Better setting of defaults 2003-06-09 05:34:24 +00:00
johncaptain d9a145fd76 *** empty log message *** 2003-06-09 04:28:41 +00:00
moodler fc1207584a Better way of stripping Javascript using regular expressions 2003-06-09 03:00:23 +00:00
mits 29a72dd107 New translation and Polish. 2003-06-08 16:58:13 +00:00
mits 98dba8d77b New file translated. 2003-06-08 16:57:42 +00:00
moodler f99329636f Forgot some string conversions 2003-06-08 11:49:25 +00:00
moodler f207d09a64 More explicit byte-order of strings to make it work on non-Intel machines 2003-06-08 11:40:29 +00:00
moodler f065b63894 Fixed pass-by-reference 2003-06-08 11:25:45 +00:00
moodler 21a15d9fae better variable name 2003-06-08 06:46:56 +00:00
coolbit 0df57af8a3 Translation of surveys.html is not completed. 2003-06-08 01:31:21 +00:00
moodler a5a3da8b75 Language file for chatarea module 2003-06-07 08:09:43 +00:00
moodler d1a3dc8867 The session is now named "MoodleSession" to prevent conflicts with
other software.
2003-06-07 06:35:12 +00:00
moodler 8e340cb0b9 Don't return assignment submissions if no sumission has been made 2003-06-07 06:23:31 +00:00
moodler 43a78d7b7c New string for quiz index 2003-06-07 06:09:08 +00:00
moodler 4fa7532c24 Improved display of quiz listing to show the closing date, as well as
direct links for the teacher to review attempts.  Thanks, Scott Elliott!
2003-06-07 06:08:45 +00:00
moodler 51bc7fba59 Changes from Scott Elliott to make the listing more useful for teachers
Thanks, Scott!
2003-06-07 05:54:48 +00:00
coolbit 05a081b141 Add teachers.html 2003-06-07 05:27:28 +00:00
moodler 9fac414498 Slightly better English phrasing 2003-06-07 02:37:39 +00:00
stronk7 5c2365fbaa Backup journals COMPLETED 2003-06-06 20:07:10 +00:00
stronk7 cd7ad30f4b Backup journals COMPLETED. 2003-06-06 20:05:09 +00:00
stronk7 88b20de862 Small typoooooo ;-) 2003-06-06 19:43:10 +00:00
coolbit 33f68a4b56 *** empty log message *** 2003-06-06 14:44:13 +00:00
moodler d5c102d2df Fixed focus 2003-06-06 13:53:55 +00:00
moodler 72e4eac6c8 Use C-version of str_ireplace() if it is defined (PHP 5 only). 2003-06-06 09:46:27 +00:00
moodler 7c3188e286 Added robustness when no courses defined yet 2003-06-06 06:20:57 +00:00
moodler a46092d2d3 Added some missing Javascript events 2003-06-06 06:17:59 +00:00
coolbit 97b3c914f5 A little modified. 2003-06-05 15:22:32 +00:00
moodler e5426203f5 Updates 2003-06-05 12:21:44 +00:00
coolbit 14bf4caa9a *** empty log message *** 2003-06-04 16:14:55 +00:00
anvergara 267829a9c8 Fixed the following mistakes:
In file assignment.php:

string assignmentmailhtml: $a->tarea replaced with $a->assignment

In file journal.php:

string journalmail: $a->diario replaced with $a->journal
string journalmailhtml: $a->diario replaced with $a->journal
2003-06-04 15:46:47 +00:00
moodler 21e0afd404 More changes 2003-06-04 09:32:02 +00:00
moodler 685018d802 More info about setting up sourceforge 2003-06-04 09:10:03 +00:00
moodler 7daee58cb3 Some minor styling ... incidentally, last change was bug 480 2003-06-04 07:15:12 +00:00
moodler 6f9d8d65f6 More robust enrolment screen 2003-06-04 07:12:26 +00:00
moodler 61948621b5 Fixed up missing strings - now on par with English 2003-06-04 06:33:54 +00:00
moodler a1472f5152 Missing file 2003-06-04 06:21:35 +00:00
moodler e20d1105d6 Added contributors 2003-06-04 06:16:52 +00:00
moodler 8bf029f071 Latest version from Antonio Navarro 2003-06-04 03:47:00 +00:00
moodler 46d43bae66 Remove translated credits 2003-06-04 03:36:22 +00:00
moodler 301b2185b9 Unenrol - > unenroll 2003-06-04 01:31:30 +00:00
koenr 6a878fd779 Translated by Koen Roggemans 2003-06-03 21:52:53 +00:00
koenr 60b2ff2144 Translated by Koen Roggemans 2003-06-03 19:51:20 +00:00
koenr a90311c152 no message 2003-06-03 19:33:19 +00:00
stronk7 df09d3f238 Backup forums COMPLETED !! 2003-06-03 18:18:45 +00:00
stronk7 d559e7825a Now backups include forums COMPLETED 2003-06-03 18:17:33 +00:00
stronk7 78bb2765bc Solved little bug counting survey_answers (due to fast copy/paste !!)
:-)
2003-06-03 16:46:12 +00:00
stronk7 686dde9e39 Correct one source tab 2003-06-03 16:33:52 +00:00
stronk7 f28aefbe4f Little bug when renaming existent courses... 2003-06-03 16:32:38 +00:00
coolbit 14b7d47965 Polishing works. 2003-06-03 13:44:56 +00:00
coolbit b1095e3214 Polishing. 2003-06-03 13:01:00 +00:00
moodler 54c1a20cba Strip tags from Window title 2003-06-03 03:23:29 +00:00
moodler e67dd40a46 Added new FAQ fixdirroot 2003-06-03 03:12:02 +00:00
moodler cb5e3cb929 Small fix to not throw up error when current path discovered to be empty 2003-06-03 03:00:37 +00:00
coolbit 647d769dd9 *** empty log message *** 2003-06-03 02:02:34 +00:00
moodler aaa2ebbb0f Add slashes to title to avoid errors with quotes - see bug 479 2003-06-02 16:16:02 +00:00
coolbit db2883ff4e polish. 2003-06-02 11:22:02 +00:00
moodler 5c716ac2b4 Prevent possible error when editing non-HTML pages 2003-06-02 08:14:24 +00:00
coolbit 4c1ced25f5 Teacher manual! 2003-06-02 07:55:37 +00:00
coolbit ebf9d006e0 Polished 2003-06-02 02:24:22 +00:00
stronk7 f2e7f34b19 Serious bug when recoding assignment files. Solved !! 2003-06-01 23:04:38 +00:00
stronk7 9a90d7dbe0 Commented some debug :-) 2003-06-01 22:13:39 +00:00
stronk7 2ffc0358aa Uncommented clean_temp_data. 2003-06-01 19:59:42 +00:00
stronk7 a9367f2644 Due to problems in the FileManager with filenames containing spaces
force a replace from spaces to underscores
2003-06-01 19:58:08 +00:00
stronk7 a474362cf0 Little change to one backup string 2003-06-01 19:51:48 +00:00
stronk7 a498fae1ee Missing phrase change :-) 2003-06-01 19:40:10 +00:00
stronk7 10ee538602 Restore surveys COMPLETED 2003-06-01 19:39:16 +00:00
stronk7 ea2280282e Restore surveys COMPLETED. 2003-06-01 19:38:14 +00:00
stronk7 1552d8b4e1 Little modification. Speed up a bit. 2003-06-01 19:37:08 +00:00
stronk7 304084d937 Restoring choices COMPLETED 2003-06-01 18:19:09 +00:00
koenr b6f6c372cf corrected some minor mistakes 2003-06-01 13:05:00 +00:00
coolbit a6714cb845 Modified quiz help files. 2003-06-01 12:52:20 +00:00
stronk7 65ec0f59d1 Restoring assignmets COMPLETED
Cleaning up temp data
2003-06-01 10:44:35 +00:00
stronk7 bd19b8fa96 Restoring assignments COMPLETED.
Added clean temp structures
Increased version info
2003-06-01 10:40:11 +00:00
stronk7 99d1a496a4 Restoring assignments COMPLETED 2003-06-01 10:39:07 +00:00
stronk7 16f77249aa Added little check 2003-06-01 10:38:39 +00:00
coolbit 486f978c4d modifing 2003-06-01 09:19:38 +00:00
coolbit 9e34c25593 *** empty log message *** 2003-06-01 01:50:25 +00:00
coolbit fe09b894b9 Add resource helps. 2003-05-31 18:12:55 +00:00
stronk7 3ad243153a Typo :-) 2003-05-31 15:27:37 +00:00
stronk7 516c30b75a Now restore resources and final checks are included !!! 2003-05-31 15:24:14 +00:00
stronk7 5146bf9f54 Now readjusting course_modules instance and course modinfo
os implemented and working
2003-05-31 15:21:39 +00:00
stronk7 d6d7461bd9 Restore IMPLEMENTED 2003-05-31 15:20:25 +00:00
stronk7 58d9f06216 Small typo 2003-05-31 15:19:59 +00:00
stronk7 907933f6ae Included course/lib.php to execute rebuild_course_cache() 2003-05-31 14:51:38 +00:00
stronk7 6d18c5a214 Added backup_todb to addslashes and decode
from UTF before inserting info in db.
2003-05-31 10:08:44 +00:00
stronk7 04b353e4d6 Return info to know what modules process... 2003-05-30 22:55:40 +00:00
stronk7 0b1473f971 Stop showing this mods to restore 2003-05-30 21:56:47 +00:00
stronk7 22c5d5271a Only save to backup_ids restoreable modules. 2003-05-30 21:56:08 +00:00
stronk7 b274cafd99 Everything is ready to begin restoring mods... 2003-05-30 21:32:45 +00:00
stronk7 e3df3ece17 Begin restoring mods. Now they are readed and saved to db
(backup_ids) in serialized form.
2003-05-30 21:32:04 +00:00
stronk7 5f94815096 Included lib/xmlize.php to use it intensively
restoring mods.
Perhaps, in a future, the rest of the reading must be
xmlized too !!! (users, course_info, header...), but not now.
2003-05-30 21:30:47 +00:00
moodler 2424845faf Let's move on, shall we? :-) 2003-05-30 13:22:52 +00:00
mits c22d1fce77 New translation. 2003-05-30 12:20:59 +00:00
stronk7 7f5b5a1d1a Bug #468 solved. Missing <? ?> tags 2003-05-29 20:59:28 +00:00
moodler 6c3c1a6fac FIxed a link to my page 2003-05-29 15:50:27 +00:00
moodler 7f9bd7b9c3 Smileys now work in all Wiki texts 2003-05-29 15:39:51 +00:00
moodler 423b77166d A very small speed improvement 2003-05-29 15:24:14 +00:00
moodler e260f95baa No need to do smilies 2003-05-29 15:08:00 +00:00
moodler b28afcdfaa Some tweaks 2003-05-29 14:41:14 +00:00
moodler 5ff38fb4c4 Fixed some links 2003-05-29 14:20:00 +00:00
moodler c2d1141792 Some improvements - still working on these files 2003-05-29 14:13:18 +00:00
thepurpleblob 963163137f Smiley support added 2003-05-29 13:42:31 +00:00
koenr 2f216c360d Translated by Koen Roggemans 2003-05-29 08:49:21 +00:00
koenr c0f353c631 Translated by Koen Roggemans / Not perfect yet. connected and separate learning not translated. 2003-05-29 07:39:29 +00:00
koenr 7c4f60530a Translated by Koen Roggemans 2003-05-29 07:37:54 +00:00
moodler b9bcadeb22 More fixes 2003-05-29 03:36:23 +00:00
moodler 12fa80ff34 Fixed heading on release notes display 2003-05-29 03:24:50 +00:00
moodler 81716d0d33 I'm going to start packaging the release this evening (in about 7 hours).
Any last-minute little bug fixes are very welcome!
2003-05-29 03:22:56 +00:00
moodler 658bf42b26 One new string! :-/ 2003-05-29 03:20:33 +00:00
moodler 3ee8f1715f Added a button on the language page that takes you to the moodle.org
page to download new language packs
2003-05-29 03:20:11 +00:00
moodler 2334e9083c Minor bug fixes 2003-05-29 03:09:37 +00:00
moodler 4a6a574f2a Robustness on finding country name 2003-05-29 03:06:10 +00:00
moodler a205123f06 Fixed page title 2003-05-29 03:02:10 +00:00
moodler a6ee2f5e7d Some minor fixes 2003-05-29 02:36:25 +00:00
moodler 8590fd913d French Canadian translation, based on French, by Jean-Fran?ois Nadeau <JFNadeau@coll-outao.qc.ca> 2003-05-29 02:33:38 +00:00
moodler e7f72d1658 Removed a typo 2003-05-29 02:27:04 +00:00
stronk7 64eed73fa2 Changed bahabior when restoring into a existing course
(don't create sections and assign to section 0 if original
section doesn't exist). Everything is saved in backup_ids
to use it when restoring modules.
2003-05-28 23:41:56 +00:00
stronk7 381ae36075 User files and course files are now working !! 2003-05-28 19:48:10 +00:00
stronk7 1bdeb2ca8e Implemented copying course_files and user_files. 2003-05-28 19:43:11 +00:00
stronk7 8af2a809fb Little modification to show course's full name and short name too. 2003-05-28 18:18:45 +00:00
coolbit 5d224d17b6 Added workshop help files. 2003-05-28 14:37:34 +00:00
coolbit f001154b33 *** empty log message *** 2003-05-28 14:21:10 +00:00
koenr bca7452938 Translated by Koen Roggemans 2003-05-28 12:42:58 +00:00
moodler b366308091 Just about there ... 2003-05-28 08:01:15 +00:00
moodler f38485140c Fixed a bug 2003-05-28 07:43:51 +00:00
moodler 258be26525 Updated translation from Stig Bjarne Haugen (Stig.B.Haugen@hinesna.no) 2003-05-28 07:42:54 +00:00
moodler 5f4c712ea8 Updated translation for 1.0.9 from Emmanuelle Gutierrez y Restrepo (emmanuelle@sidar.org) 2003-05-28 07:16:41 +00:00
moodler 6d9aa82c99 New file 2003-05-28 06:43:25 +00:00
moodler 4c5686d97f Complete 1.0.9, from Claudio Tavares (claudio@enlaceacademico.com) 2003-05-28 06:42:26 +00:00
stronk7 d688c342ad Begin restoring user files. 2003-05-27 22:37:05 +00:00
stronk7 3f676beac0 Finished restoring users.
Now, if selected, restore user files (in progress).
2003-05-27 22:34:29 +00:00
mits 978962c8bb Broken character fixed. 2003-05-27 21:41:41 +00:00
mits 87cc153beb New translation added. 2003-05-27 21:36:05 +00:00
moodler 7647e09126 Fix the version in case I forget later 2003-05-27 16:53:16 +00:00
moodler 0fcd21c3bc Updated the year 2003-05-27 15:21:14 +00:00
moodler b09069a4c7 Various updates, rewrites etc
Overall I'm trying to remove the Martin focus and make it more neutral.

More to go.
2003-05-27 15:18:20 +00:00
mits 576fd161a0 Mod 2003-05-27 14:57:05 +00:00
moodler 16cba4cf88 Latest changes from Howard Miller 2003-05-27 14:25:15 +00:00
moodler fc55b4e900 Latest changes from Howard 2003-05-27 14:24:06 +00:00
moodler ab8c78b03a Getting close now 2003-05-27 03:39:03 +00:00
moodler ba6c4a8701 Fixed a typo (thanks Mits!) 2003-05-27 02:14:44 +00:00
moodler 6337086aca New file 2003-05-27 01:53:52 +00:00
moodler 111bfff48a Latest files from Wim! 2003-05-27 01:52:48 +00:00
koenr 31d7714a84 More strings translated, based on the job by Hans De Zwart. Changed upgeload by ge?pload 2003-05-26 21:54:24 +00:00
koenr 68225f50b4 no message 2003-05-26 21:52:09 +00:00
mits b9f0af5fb0 Polished 2003-05-26 17:49:37 +00:00
mits 7fe2220fc0 New translation. 2003-05-26 17:42:50 +00:00
mits a26d994d2b New translation and Polish 2003-05-26 17:24:37 +00:00
mits e7d1f700d9 New translation. 2003-05-26 16:45:28 +00:00
mits 9fc3e0ebef Polished. 2003-05-26 16:37:12 +00:00
mits cee7b95a10 Polished. 2003-05-26 16:29:06 +00:00
minkowski f933b27c32 revised and rephrased for 1.09 2003-05-26 16:28:05 +00:00
moodler 16ba73512e Slight improvements to import of global variables
- don't globalise cookies
  - better checking of lang variables
2003-05-26 15:38:52 +00:00
mits 84a8415baf *** empty log message *** 2003-05-26 15:32:16 +00:00
mits f6590fb484 Polished 2003-05-26 15:28:57 +00:00
moodler 3662bce5b4 A few tweaks for robustness. 2003-05-26 14:43:19 +00:00
moodler 1dd2451954 Some minor cleanups and debugging of initial setup 2003-05-26 14:38:41 +00:00
moodler 8d2accb64c More robust check of argument 2003-05-26 07:54:53 +00:00
moodler 02e44e7cf4 Print better loggedin info at the top of the page 2003-05-26 07:54:34 +00:00
moodler 8df45f47bd FIxed all moodle.com links 2003-05-26 07:07:53 +00:00
moodler 399266ce40 Removed the non-breaking space &nbsp; from the section summaries because
it would cause problems when the summary ended in a URL
2003-05-26 06:58:10 +00:00
koenr 03fa434bb3 New strings translated, based on the translation by Hans De Zwart 2003-05-26 06:14:42 +00:00
moodler 644f6213f1 Removed funny line feeds? Hope so. 2003-05-26 02:44:29 +00:00
moodler 8fad496688 Still trying to get this retun situation sorted out 2003-05-26 02:42:49 +00:00
moodler c451c1f6bd Removed mystery character? 2003-05-26 02:40:26 +00:00
moodler c8ddb345b9 DOS format 2003-05-26 02:32:11 +00:00
moodler 05c7ec6f2b Trying to force DOS format 2003-05-26 02:20:39 +00:00
moodler f7a6049e57 Checking in the include error code in again, with improvements
The problems I thought were happening were in fact another problem
on someone's installation (missing files).  This code now checks
for that too.
2003-05-26 01:54:11 +00:00
mits ff27a09eca Polished. 2003-05-26 01:39:21 +00:00
mits a166e72e43 New translation. 2003-05-26 01:38:29 +00:00
stronk7 4848d55a9e Few changes to gather info to show in restore progress
(various user counts (existing, new,...)
2003-05-26 00:07:56 +00:00
stronk7 0be7c25ebe Minor bug creating newid when restorinf users 2003-05-25 23:37:07 +00:00
stronk7 2f6c832d5c Included User restore. Hard work !!! 2003-05-25 23:02:09 +00:00
stronk7 a2c7397c42 Restore into new course and existing course implemented.
Restore sections and mod implemented.
Restore users (all, course and none) implemented
2003-05-25 22:58:13 +00:00
mits 4565e9cc0a New translation. 2003-05-25 22:02:50 +00:00
mits b1106eb5ba Polished 2003-05-25 21:58:22 +00:00
koenr 5f6604b578 no message 2003-05-25 21:52:13 +00:00
koenr 018dcb996d Thanks to Kris Gonnissen and Gerd Cornelissen for help and review 2003-05-25 21:49:49 +00:00
mits 131f438648 Polished. 2003-05-25 21:45:19 +00:00
mits bbc2e4226a Polished and New translation added. 2003-05-25 21:32:09 +00:00
palojacko ab34a057ed improved menu translation 2003-05-25 19:53:40 +00:00
mits 092c819e68 Character breaking fixed. 2003-05-25 18:37:57 +00:00
mits 20598e0da3 New translation. 2003-05-25 18:34:25 +00:00
mits 06e9af99e7 New translation 2003-05-25 18:19:54 +00:00
mits df415fbf08 *** empty log message *** 2003-05-25 17:45:41 +00:00
mits 8bcabc74e2 New translation file. 2003-05-25 17:43:53 +00:00
mits 57bcdda9f5 New translation 2003-05-25 16:58:09 +00:00
mits d03e4db1b8 New translation. 2003-05-25 16:02:48 +00:00
mits 8a600d7d1d New translation. 2003-05-25 15:24:30 +00:00
moodler 3926deafe1 Removed three lines - this fixes the path problems occurring when
extracting files in Moodle on Windows platforms.

This should not affect normal use within Moodle on other platforms.
2003-05-25 12:46:17 +00:00
moodler c4ad9158e3 More robust check for $CFG->backup_version 2003-05-25 12:14:15 +00:00
moodler aa140aabfd Going back to old method, as the new one seems to have problems on some
platforms.
2003-05-25 12:11:10 +00:00
stronk7 0535cadae5 Included new "autosubscribe" fiel in users backup 2003-05-25 09:31:17 +00:00
coolbit a5eb9f335f *** empty log message *** 2003-05-25 01:26:48 +00:00
coolbit b391b14bda *** empty log message *** 2003-05-24 16:55:18 +00:00
coolbit 09026b19d9 add forum helps 2003-05-24 16:49:36 +00:00
coolbit 893e0c5c0b add shufflequestions.html 2003-05-24 15:52:02 +00:00
coolbit eefa6d6e06 add some help files. 2003-05-24 15:39:58 +00:00
mits 3c382acc28 New translation 2003-05-24 11:51:01 +00:00
mits bf442dc9d6 Polished 2003-05-24 11:40:23 +00:00
mits 0c59a23c67 text-decoration: underline problem fixed.
copy theme->standard->styles.php to theme->oceanblue->styles.php and
changed a:link, a:visited, a:hover
2003-05-24 11:30:58 +00:00
mits 7a6112792c Polished and New translation added. 2003-05-24 11:06:19 +00:00
stronk7 6a602d47e0 hanged info field in backp_ids to store text data
(used when restoring long portions of data)
2003-05-24 09:23:41 +00:00
stronk7 5881bb7e3c Changed info field in backp_ids to store text data
(used when restoring long portions of data9
2003-05-24 09:23:05 +00:00
moodler 40343df7fd Users were able to see their own user activity reports. This was a hang-over
from long time ago.  As there is no GUI for this, I'm removing it for now so
that students are not able to see their own activity reports.

This issue probably needs to be discussed, and a GUI developed for it.
2003-05-24 07:33:22 +00:00
moodler 783da26290 A bit of an audit and a clean up of require_login to add consistency.
No major problems found, just some code tidy-up
2003-05-24 07:29:17 +00:00
moodler 73fafc3886 Bad bug fixed. Non-teachers could hide/show whole sections. 2003-05-24 06:59:36 +00:00
moodler 522f608d02 Important bug fixed! Non-teachers could modify course! 2003-05-24 06:53:47 +00:00
moodler 12c55f3cd4 Fixed a few obviouos errors and excess blank lines in the language packs 2003-05-24 05:22:05 +00:00
moodler bb515027b5 The single quotes caused problem on the rare occasions that these
unset strings were being written to the database
2003-05-24 02:34:29 +00:00
moodler fe3b0f3a2f New string 2003-05-24 02:32:26 +00:00
moodler 5c0567b4cd Don't allow password changing if the user isn't confirmed yet 2003-05-24 02:25:57 +00:00
stronk7 8fdd5ab2b3 Advance a bit more.
Course, course_sections and course_modules finished.
We have to update instance (in course_modules) and modinfo
(in course) at the end of the restore. We haven't the necessary
info now.
2003-05-24 00:34:27 +00:00
stronk7 7ba7461530 Finished restoring course, course_sections and course_modules.
When ending the restore process, we've to update the instance
field of course_modules and the modinfo field of course. Now
we haven´t the necessary info to do that.
2003-05-24 00:27:45 +00:00
stronk7 47e9035598 In course_modules export the field ADDED too. 2003-05-24 00:23:35 +00:00
mits 7134ebc80b *** empty log message *** 2003-05-23 23:04:04 +00:00
mits feffd1dffe New translation 2003-05-23 22:58:24 +00:00
mits 0aa35815c4 Polished. 2003-05-23 22:47:35 +00:00
mits f897f346a3 New translation. 2003-05-23 22:18:11 +00:00
mits ac722cc42b *** empty log message *** 2003-05-23 21:58:30 +00:00
moodler 219633ea2b organised --> organized 2003-05-23 15:21:32 +00:00
moodler 5325f8b8cf A little more guidance on the quiz page. 2003-05-23 15:20:41 +00:00
moodler b39cadbfe7 Formatting fixes from Windows editor 2003-05-23 14:41:22 +00:00
moodler 020181047d Some hacks to stop the addition of blank lines on Windows machines during editing in the web forms. 2003-05-23 14:25:55 +00:00
moodler a3152e449d Fixed excess blanks using new admin/lang.php 2003-05-23 14:24:48 +00:00
coolbit 02997ce175 complete workshop.php 2003-05-23 13:37:03 +00:00
uermelin 499c23e8fc fullname changed from nachname to Bezeichnung 2003-05-23 09:09:51 +00:00
moodler d8e2e28044 Added a check to make sure CFG->dirroot is correct. 2003-05-23 08:54:36 +00:00
moodler 1cb2266ef7 Tweaking subscribe strings 2003-05-23 05:46:07 +00:00
moodler 40e5eb1b33 Slight rewording 2003-05-23 05:42:46 +00:00
moodler 7f2a3e678e New field for user: autosubscribe
This sets the default value for on-the-fly forum subscription.
Defaults to on = subscribe.

(Also fixed a bug in postgres7.sql - a missing field for htmleditor!)
2003-05-23 05:32:40 +00:00
moodler 4b2b7a7110 Full formatting looks bad (too much whitespace) but smilies are OK 2003-05-23 05:05:49 +00:00
moodler 6687be174a Improvements to the wordings for subscription 2003-05-23 05:00:58 +00:00
moodler f5ca7ebe1a Display forum intros as formatted text 2003-05-23 04:51:28 +00:00
stronk7 f698f3f394 Finished restore frontend. 2003-05-22 22:59:21 +00:00
stronk7 6157b82c7b none 2003-05-22 22:12:32 +00:00
stronk7 7c934d06ed Finished the check phase.
Tomorrow I'll start recovering course info !!
2003-05-22 22:11:17 +00:00
koenr b088919164 New strings translated. Workshop.php = new file => not complete yet 2003-05-22 20:45:12 +00:00
koenr 849f614bd1 no message 2003-05-22 19:57:56 +00:00
thepurpleblob dec96d4f2c Added question/answer formatting to wiki help 2003-05-22 10:52:26 +00:00
thepurpleblob b2878fc5ae Fixed problem with list lines not being formatted
Added CVS hooks for <hr> and Question/Answer (Q. and A.) lines
2003-05-22 10:41:40 +00:00
coolbit ab48c1bb53 *** empty log message *** 2003-05-21 17:07:57 +00:00
bobopinna ec3db5a310 New updates from Roberto Pinna 2003-05-21 15:26:28 +00:00
bobopinna 31861ff29c *** empty log message *** 2003-05-21 15:08:45 +00:00
moodler 7a1205eea9 Changed instructions for Windows to Tortoise CVS 2003-05-21 13:52:07 +00:00
moodler 70d9c95acf New updates from Roberto Pinna 2003-05-21 12:56:34 +00:00
moodler 0e3e960a33 New file for debugging purposes, simply shows phpinfo() 2003-05-21 09:50:17 +00:00
moodler d805c3462e Removed the remote debugging functions.
I used to find these quite useful for helping people debug
configuration problems. I don't think they present a security
problem, but I can see there is the possibility that it can
be PERCEIVED as an issue, and I don't want to be responsible
for that, nor blamed for any break-ins (warranty or not).

So I'll find another way to do remote debugging.
2003-05-21 09:39:51 +00:00
moodler c3219da409 Much improved favicons (transparent and more consistent)
submitted by jdell (bug 442).
2003-05-21 08:48:18 +00:00
moodler c7ba7904cb Ray prefers icon3.gif 2003-05-21 08:13:08 +00:00
moodler be23a53ca9 Some fixes, after some testing 2003-05-21 06:10:43 +00:00
moodler 79da6d8717 Change to parsing to allow answers in any order - needs testing 2003-05-21 05:00:44 +00:00
mits 931ade40e3 New translation 2003-05-20 21:43:15 +00:00
paca70 f64fb7b192 Updates from Teemu Sumi. Thanks again! 2003-05-20 17:27:25 +00:00
moodler 353d033843 get_course_users now calls get_site_users if the course is a site.
There is something wrong with this SQL still though ... it mostly works
but I'm still getting wierd behaviour with small numbers of users.

Need some help here ...  for example just look at get_site_users()
on your test site.

It's supposed to return a list of users who are admins, creators,
teachers or students
2003-05-20 09:33:30 +00:00
moodler 35d606e6fa Just incrementing 2003-05-20 08:17:45 +00:00
moodler 11697b48ea Minor code cleanups
- lowercasing
  - removing short php tags
  - adding some emoticon help here and there
2003-05-20 08:03:12 +00:00
moodler 60ffb53a7d Minor code cleanup 2003-05-20 08:01:40 +00:00
moodler b5987b0f49 Added missing style - .forumpostheadertopic 2003-05-20 06:17:06 +00:00
moodler b1f505771e Fixed the bug I introduced in the last checkin (it was related to the
re-introduction of text fields in surveys)   See bug 441
2003-05-20 04:26:57 +00:00
stronk7 91d7f813e5 Initial checks. More to do !! 2003-05-19 22:34:12 +00:00
stronk7 304d7785ca Now all the required variables are set to call restore_check.html 2003-05-19 22:33:45 +00:00
stronk7 7e092fdaed Now call restore_check.html too. 2003-05-19 22:28:39 +00:00
stronk7 3f50cab58d Checks everything is OK before lanunch the process. It allows to
select the destination course.
Initial version, it doesn't work !!
2003-05-19 19:29:51 +00:00
stronk7 8d5b052f35 Now, one more step. Call to restore_check.html 2003-05-19 19:28:14 +00:00
paca70 844bad05a9 Updates. Thanks to Teemu Sumi. 2003-05-19 17:32:45 +00:00
moodler ad03ae446e Many corrections ... more needed 2003-05-19 15:34:27 +00:00
moodler 043b94f66d Glossary file from John Captain 2003-05-19 15:08:42 +00:00
moodler b95c3ab896 Add slashes to data when setting up guest account 2003-05-19 13:14:29 +00:00
moodler 779a4a8da4 Fixed up some of the headers during installation (remove logout links). 2003-05-19 13:12:27 +00:00
moodler 54242af0d6 Changed default strings to use single-quotes and avoid possible slash problems 2003-05-19 07:41:12 +00:00
moodler e9564a5a80 Fixed previous over-zealous lowercasing 2003-05-19 06:11:56 +00:00
moodler 240aca4b34 missing closing php tag 2003-05-19 04:55:11 +00:00
moodler 5d0f5a599b Removing strings make no worky worky 2003-05-19 03:34:57 +00:00
moodler 3ee236820a Some fixes for check_gd_version -- please test this for me on every server you have! 2003-05-19 03:27:13 +00:00
moodler 17ec8eb684 Remove unnecessary check (from a lazy copy/paste) 2003-05-19 03:03:34 +00:00
moodler 8c5b0c41bb Updated docs to use php_flag instead of php_value for booleans 2003-05-19 02:31:14 +00:00
moodler 730cb6bac3 Updated docs about using php_flag settings instead of php_value 2003-05-19 02:28:47 +00:00
moodler 6a6681294a Should use php_flag, not php_value, for boolean settings!!
See bug 429
2003-05-19 02:25:11 +00:00
stronk7 96376e9a4f Finalized. Form data is displayed dinamically, depending of
every mod features and the backup file-contents.
2003-05-18 22:57:23 +00:00
stronk7 96112b5224 Initial version. Does nothing !!, but needed to show info in
restore_form.php
2003-05-18 22:55:54 +00:00
stronk7 f2deadb30c Control when cancel has been selected. Inform and finalize. 2003-05-18 22:53:11 +00:00
stronk7 87d8623181 One more string to restore. Forget it in previous commit. ;-) 2003-05-18 22:51:52 +00:00
stronk7 4c94c21b11 Some restore strings... 2003-05-18 21:43:55 +00:00
stronk7 fd2f02d4cd Initial version. Form to select where and what to restore. 2003-05-18 21:41:08 +00:00
paca70 775f689b0f Some additions for postgresql 2003-05-18 18:23:07 +00:00
stronk7 c563a9a0d1 added check login, check admin and check site to every page.
If not, it was possible to execute them...!!
2003-05-18 17:15:05 +00:00
stronk7 cc7fa0dc05 Added a 4th OPTIONAL (default "get") parameter to
"print_single_button" function. Now can make "post"
forms too.
2003-05-18 16:41:23 +00:00
stronk7 729035fdaa Advance a bit more... 2003-05-18 15:54:01 +00:00
stronk7 76bf541df8 Course Header and Backup info is showed now !!
I'll start using sessions to mange all this data.
2003-05-18 15:51:20 +00:00
moodler 41a03b45f0 Added a stub for workshop_get_submission to stop errors on activity reports 2003-05-18 14:38:12 +00:00
moodler d41947c6be Some alternative icons for the workshop module!
Any comments, votes?
2003-05-18 09:28:42 +00:00
moodler c525b27592 Strip tags from page title, and some minor code cleanups 2003-05-18 06:05:23 +00:00
moodler 713386aadb Left out a field! mailformat 2003-05-18 02:36:02 +00:00
stronk7 fd43f7d026 Now course header is retrieved too !! 2003-05-17 17:34:30 +00:00
stronk7 48cbf566bb XML generation. Included the main course data under a HEADER tag.
Needed for recover.
2003-05-17 15:58:24 +00:00
moodler cd86c938b2 Some updates from Koen Roggemans 2003-05-17 12:44:28 +00:00
stronk7 ca2129424f Reading more info... 2003-05-17 11:40:27 +00:00
stronk7 a4ad03f175 Debug a bit 2003-05-17 08:56:53 +00:00
moodler 8b50d2a76e Some fixes to make choice reports work better when used at site level.
PLus some HTML lowercasing
2003-05-17 06:17:10 +00:00
moodler 06cffaf0bb No need to get all the user data for forum_subscribed_users 2003-05-17 06:13:38 +00:00
moodler bbf9b1624d Improved get_site_users a bit for efficiency 2003-05-17 06:10:20 +00:00
moodler 2563c5ef7b Improvements to trustworthiness of the registry form (for suspicious admins!)
Hashed password is no longer sent as a key, "secret" field is used instead.

HTML code is now more readable for the View Source crowd.  :-)
2003-05-17 05:34:49 +00:00
moodler 6879123761 This seems to help too. 2003-05-17 05:06:08 +00:00
moodler eab79dc13d Hopefully this will fix the logout problems - it now specifically
checks for PHP 4.3.0 or later, and also does the unset anyway.

Sessions are not consistent in PHP versions.
2003-05-17 04:45:52 +00:00
moodler 958facf055 Better cleanup of site description meta tag 2003-05-17 03:46:31 +00:00
moodler 14159d0960 Post beta 1 stage 2003-05-17 03:16:30 +00:00
moodler 07b586eaa3 Use global variable for phpinfo debugging info 2003-05-17 03:10:22 +00:00
moodler 7170501293 Better detection of register_globals 2003-05-17 03:05:39 +00:00
moodler 4d01ada343 More on Bug 427_ on second thoughts it's better this way, now at least
the true/false entries get updated every time the question is updated.
2003-05-17 03:02:59 +00:00
moodler a6ccb416f1 This should fix the non-translatability of true/false questions bug 427 2003-05-17 02:54:20 +00:00
moodler fcb12a1e0c Every line had three blank lines after it - please be careful Ursula 2003-05-17 02:31:31 +00:00
moodler c39c66a5e8 Using new ini_get_bool function to work around a bug with ini_get where
the result is different for items set in htaccess
2003-05-17 02:05:10 +00:00
stronk7 785ae439eb Begin parsing xml data.
Info tags.
2003-05-16 23:57:35 +00:00
stronk7 d348c53f1f Simple advance. None to do in DB. 2003-05-16 22:05:50 +00:00
stronk7 880fd2146c Updated. Some preliminary steps about restoring done. 2003-05-16 22:04:06 +00:00
stronk7 b9846a9b9e Copy, expand and do preliminary checks from backup file 2003-05-16 21:52:49 +00:00
stronk7 7641819df0 Moved the check_version code to lib.php
Formatted portions of code
2003-05-16 21:51:07 +00:00
stronk7 740aa005dc Interchange delete old data and create temp structures. The first time
an error ocurred, because we were trying to access an no-existent dir.
2003-05-16 17:36:47 +00:00
mits c061b8d2a5 New translation added. 2003-05-16 12:01:41 +00:00
mits 9ba291e88d Polished and New translation added. 2003-05-16 11:19:26 +00:00
uermelin 67d5ab6dc1 Licenz changed to Lizenz 2003-05-16 11:07:58 +00:00
uermelin 05c1cfba93 changed filloutthreequestions, savemyAnswers, marks 2003-05-16 11:06:32 +00:00
uermelin 71f64e123b bug in emailpasswordsent removed 2003-05-16 09:57:21 +00:00
moodler bf2919bf84 Some stuff about workshop 2003-05-16 08:53:22 +00:00
moodler 30739c3daf Added registration info 2003-05-16 08:51:10 +00:00
moodler bfe42924da Latest tags for vi etc 2003-05-16 07:04:09 +00:00
moodler 67fb6d3aaf Added a missing string 2003-05-16 06:40:46 +00:00
moodler 69ec0a8b1d Moved info about automatic unenrolling to the top where it makes more sense
I think.
2003-05-16 06:27:23 +00:00
moodler 5c219ea46d Added hyphen (-) to the list of allowed characters in a filename 2003-05-16 06:08:42 +00:00
moodler 60a60432a1 Explicit casting to (bool) may help 4.2.3 2003-05-16 04:47:40 +00:00
moodler 3a4c2fd089 I knew there was something else I'd forgotten!
Added a check to all modules (well view.php anyway) to check whether a
module is hidden or not.  If it is, then students get a message.
2003-05-15 18:03:22 +00:00
moodler 610603be4d More tweaks 2003-05-15 17:31:56 +00:00
moodler 7adf67875d Some notices to remind people about things they need to do. 2003-05-15 17:26:59 +00:00
moodler cf565fd7cf OK, this is pretty much time to call it 1.0.9 Beta 1 ... I'm going to
do a few last checks then tag it as "Moodle_109_B1" and package it all up.
2003-05-15 17:16:15 +00:00
moodler 33de9f7bdc FIxed bug where questions weren't being shown in reviews. 2003-05-15 17:01:35 +00:00
moodler 17df1ae4bd Obsolete 2003-05-15 16:17:37 +00:00
moodler 455d308f5d Some updates 2003-05-15 16:16:53 +00:00
moodler ae384ef160 New configuration variable: secureforms (defaults to 'true')
Replaces the old $CFG->buggy_referer (reverses it, in fact) and can
now be set in the configuration page (no need for it in config.php).
2003-05-15 15:59:52 +00:00
moodler 6bebcf8d72 Some minor cleanups, nothing functional, just code-level niceness mostly.
- xhtml cleanups, mostly from Peter Bazira
   - removed all short php tags
2003-05-15 14:34:48 +00:00
moodler c6a0f9d5bf Minor touch-ups to the front page HTML 2003-05-15 14:02:13 +00:00
moodler e48feed988 Many little clean-ups for themes.
- Got rid of obvious non-XHTML code in headers and footers.
  - Got rid of all the PHP short tags
  - Added new styles for the headers
2003-05-15 13:55:22 +00:00
mits 3e54b808bc Polished. 2003-05-15 13:15:44 +00:00
mits 0817d5cac0 New translation. 2003-05-15 13:14:40 +00:00
moodler ce729f49c8 New override for Apache's LimitRequestBody parameter which may limit files. 2003-05-15 11:15:55 +00:00
stronk7 0f192e2cd6 Initial version of restore. Simply, a copy from backup.php 2003-05-14 23:25:00 +00:00
stronk7 01a16f7e5e Lib to include all backup particulary functions (came from lib.php), but
desglosed now
2003-05-14 23:24:00 +00:00
stronk7 5aca97a20a Reset to empty lib before start developing 2003-05-14 23:22:50 +00:00
stronk7 476fd9c716 Minor changes to support the "restore" option with zip files. Only
showed if the backup utility is installed ($CFG->backup_version exists)
and the user is an admin. Sent email to Martin to say him this !!
2003-05-14 23:09:34 +00:00
stronk7 52376d940f Now backuplib.php includes all the functions needed in backup, restorelib.php all
the functions needed in restore and lib.php the rest of common functions.
2003-05-14 22:09:30 +00:00
moodler d288fa5255 Better code to deal with shuffleorder.
Now feedback is always in the same order as the quiz, and
reports are always in the natural order.
2003-05-14 16:52:25 +00:00
moodler a53cef7e80 Removed obsolete get_users_search function 2003-05-14 16:29:26 +00:00
moodler d8eece23c9 Revamped "Assign Creators" page with the same code as admins and teachers 2003-05-14 16:27:27 +00:00
moodler 46a244605d Some little fixes (can only see them on a server with lots of users!) 2003-05-14 16:05:21 +00:00
moodler e808d25f56 Fixed up "Assign teacher" page, and moved it to admin directory. 2003-05-14 15:58:48 +00:00
moodler ada728e24d Fix the order of questions when shuffle is NOT being used.
See bug 423 for details: http://moodle.org/bugs/bug.php?op=show&bugid=423
2003-05-14 15:23:54 +00:00
moodler 5a74165523 FIxed up function get_user() which now takes lots of parameters and
can be used all over the place.

Also, related fixes to "add admin" (MUCH better performance) and the user listings

More to come for "add teacher" and "add creator"
2003-05-14 15:19:04 +00:00
moodler 9a2efc9fb0 Don't be so pushy about subscription 2003-05-14 07:47:04 +00:00
moodler 76c1650d02 Changed home page link to moodle.org (from moodle.com)
I did some heavy thinking about this, and I think this is
best for the community.  I had wanted to drive some traffic
past moodle.com (the moodle.com will feature very prominent
links to moodle.org).  What I'll do now, I think, is put a
advertisements on http://moodle.org pointing to moodle.com.

Also some lowercasing of HTML.
2003-05-14 05:01:01 +00:00
moodler b086c2b527 Fixed variable name 2003-05-14 03:37:47 +00:00
moodler edea91f37b Fixed links in emails 2003-05-14 03:23:01 +00:00
moodler b13f7b84ec New Taiwanese (Traditional Chinese) version by Fu-Kwun Hwang (hwang@phy.ntnu.edu.tw)!
Strings mostly done, and about half the help files.
2003-05-14 02:43:27 +00:00
adamtpaw ce3b1d1f7d small corrections 2003-05-13 21:14:28 +00:00
stronk7 4f446b2e36 Minor changes in course_files_check_backup to avoid the backup
of files under get_string("backupdir")
2003-05-13 19:53:17 +00:00
mits 21951923a5 New translation. 2003-05-13 17:00:00 +00:00
rkingdon 16a0e6f05c Addition of teacher admin features 2003-05-13 16:37:47 +00:00
moodler e9d3eca323 Re-order list for consistency 2003-05-13 16:37:34 +00:00
rkingdon 72a2547d05 Some missing strings added; plus strings for admin 2003-05-13 16:33:34 +00:00
rkingdon daec2fede2 Minor change to wording 2003-05-13 16:29:54 +00:00
moodler ae078a9809 Mail-outs for assignment and journal module are now translatable. 2003-05-13 16:02:08 +00:00
moodler 0a9f61b55f When posting a forum, users can unsubscribe/subscribe on the fly.
The flag has a memory, but it keeps pushing you to subscribe.  :-)
(so that by default it behaves like it did before)

Hopefully now subscription is a bit easier to understand.
2003-05-13 13:53:36 +00:00
moodler ac4f6d455f Images are not put in a frame, but embedded in a normal page 2003-05-13 07:51:26 +00:00
moodler fa6a30b75c Added release and version information to registration 2003-05-13 07:35:18 +00:00
moodler 4bcc7ebfd6 Slight update to a string 2003-05-13 01:18:54 +00:00
rkingdon 56a800aac5 Correcting bugs in agreement of assessment and for self assessed
submissions
2003-05-12 21:18:21 +00:00
coolbit 6cdbd5d52a some modification 2003-05-12 15:53:08 +00:00
moodler 64900c048e If you can see this - please try the new admin registration interface! 2003-05-12 15:40:11 +00:00
moodler fe930cf3ca New feature - registration page. Registration should be working,
but I'm still working on the server-side stuff.

Look for the new button on the admin page.
2003-05-12 11:30:19 +00:00
moodler a0deb5db60 Add a backdoor for match_referer ... if the referer is "nomatch" then
it always returns true.
2003-05-12 09:22:00 +00:00
moodler 6a7ce0c1ab Some new strings for the registration function 2003-05-12 09:05:43 +00:00
moodler 170a9c4612 Force subscription on a teacher's forum only includes teachers! 2003-05-12 09:01:23 +00:00
moodler 393c9b4ff4 Fixes for detect_munged_arguments() and default values for p() s() etc 2003-05-12 06:35:32 +00:00
moodler 3551966092 Added new FAQ and fixed the TOC a bit 2003-05-12 05:49:06 +00:00
stronk7 f11d6df519 Survey backup included. 2003-05-11 22:44:40 +00:00
stronk7 af478c0b2b Avoid counting files under get_string("backupdir") as course files 2003-05-11 22:17:56 +00:00
stronk7 9025fec405 Choices are now backupables 2003-05-11 21:14:50 +00:00
stronk7 05b2871dfa Change in comment 2003-05-11 21:13:45 +00:00
stronk7 d06863d95f No it's backupable too 2003-05-11 21:12:28 +00:00
stronk7 df52003fb1 Little bug ending submission tag 2003-05-11 19:47:12 +00:00
stronk7 14014fb7e1 Some backup words... 2003-05-11 17:46:55 +00:00
stronk7 4784696533 Backup finished.
Limitations:
   - Only assignment and resource mods are exported.
Little problems persit:
   - PCLZIP/UNZIP incompatibility
   - Do not count backup files in course_files_check_backup
2003-05-11 17:45:56 +00:00
stronk7 b294bc4b1d Zipping files.
Ok under command line. Bad under pcl lib
2003-05-11 11:06:23 +00:00
stronk7 543009a54d Updated. User and course files copied to backup dir 2003-05-11 00:16:32 +00:00
stronk7 667d2f2a86 User files and course files are saved selectively to backup directory 2003-05-11 00:14:11 +00:00
stronk7 23e3e468aa no comments 2003-05-10 17:49:56 +00:00
stronk7 d0ef834745 Preparing the user_files and course_files copy 2003-05-10 17:44:08 +00:00
stronk7 4f6ae69e0e Bug returning status 2003-05-10 17:31:33 +00:00
stronk7 efead3b909 Now generate mod info about assignments (with file copy to temp/backup)
and resources.
2003-05-10 17:25:20 +00:00
moodler 2f518143de Tidy up of a code - took out all the short PHP tags 2003-05-10 09:36:57 +00:00
moodler be912538fa Tidy up of code, including removal of short php tags 2003-05-10 09:29:53 +00:00
moodler 232d36dffa Some minor cleanups to this page, including removal of short php tags 2003-05-10 09:21:02 +00:00
moodler 215e628dcf Removed some debug statements I'd left in by mistake 2003-05-10 03:02:19 +00:00
stronk7 32ad57746b Avoid undefined backupable mods to be exported 2003-05-09 23:21:55 +00:00
adamtpaw 54157606e0 Few mistakes rem?ved. 2003-05-09 22:37:08 +00:00
rkingdon a3a4cd3ed6 Corrected bug in SQL for workshop_comments table 2003-05-09 22:13:03 +00:00
stronk7 537718f85a Included log generation to XML 2003-05-09 20:05:15 +00:00
moodler 9d85990f62 Some additions 2003-05-09 17:48:31 +00:00
moodler 6d3566f8d5 Black M 2003-05-09 17:43:46 +00:00
moodler 5867bfb50e New feature to manage installed code modules!
You can now hide/show individual activity modules and even delete them completely!

For example, if you hide the "choice" module, then all choice activities
will be hidden throughout the whole site, and "Choice" will not
appear on any "Add..." menu.

Deleting a module is a complete deletion of all data from the database.

If you want to try out the deletion on a real module, I suggest the
pgassignment module, since it will soon be deleted from CVS anyway
(because it's being replaced with workshop).

Look for "Manage modules" on the admin menu.
2003-05-09 17:24:17 +00:00
stronk7 cfb9c52577 User accounts are now included in XML generation 2003-05-09 14:57:41 +00:00
moodler 7e6b0b3b6e Added new 'visible' field for module management. 2003-05-09 13:32:27 +00:00
moodler 767141c19e Latest updates from Hans De Zwart 2003-05-09 12:47:56 +00:00
moodler 92ce3481fc Please don't put English docs in non-English packs ... they are changing
rapidly so these just go out of date for no reason.

Cheers,
Martin
2003-05-09 12:41:20 +00:00
compuproggy de1a5345cb Who is interested working in a free general open source translating network? Mails to
HS@interS4S,net
2003-05-09 07:18:14 +00:00
compuproggy d6be31eeed *** empty log message *** 2003-05-09 07:10:26 +00:00
moodler 6afe855886 Better tooltip help on post attachments 2003-05-09 06:03:47 +00:00
compuproggy 98a792faaf *** empty log message *** 2003-05-09 05:58:22 +00:00
moodler bbc0d9abbf IMPORTANT SECURITY FIX: prevents external PHP code from being run 2003-05-09 02:32:43 +00:00
moodler 9f71c9e713 Use the new $CFG->dbpersist variable in config.php to determine whether
to use persistent connections or not.  The default is to use them (for
speed/efficiency) but now they can be switched off with:

$CFG->dbpersist = false;
2003-05-09 02:20:03 +00:00
moodler 6c8e8b5ed4 IMPORTANT SECURITY FIX: this prevents bad characters being passed to help.php 2003-05-09 02:05:16 +00:00
moodler 3d9f0f81d6 IMPORTANT SECURITY FIX - this makes sure $CFG can not be overridden 2003-05-09 02:02:27 +00:00
rkingdon 9b09f7d0cd workshop: addition of peer agreement 2003-05-08 20:31:05 +00:00
rkingdon 319b375ecc workshop: add peer agreement 2003-05-08 20:26:51 +00:00
rkingdon 5c2ba38c45 version 1.1 with peer agreement 2003-05-08 20:24:41 +00:00
moodler 5f94c13b6b New version of Wiki stuff from Howard Miller.
Some cool new features, including linking to Moodle activities!
2003-05-08 16:20:38 +00:00
moodler e825f27967 New pop-up help page about smileys - clicking on the smiley inserts it
into the form using Javascript!

Also rationalised and patched some of the other help about text formats.

LANGUAGE EDITORS MAY WANT TO RE-CHECK:

   lang/en/help/textformat.html
2003-05-08 16:09:30 +00:00
moodler a9c2c8fd8f New "special" help file with javascript :-) 2003-05-08 16:03:57 +00:00
moodler eb7ec77d68 FIxed bug 406 - richtext setting resets! 2003-05-08 13:34:42 +00:00
compuproggy ac6e435422 *** empty log message *** 2003-05-08 06:55:32 +00:00
compuproggy a414246dc9 *** empty log message *** 2003-05-08 06:28:24 +00:00
compuproggy 729fbeee94 *** empty log message *** 2003-05-08 05:16:07 +00:00
coolbit 1f49a7b780 *** empty log message *** 2003-05-07 23:07:50 +00:00
stronk7 0915679c36 Updated. Sections included !!! 2003-05-07 22:18:05 +00:00
stronk7 52b538621e Changes to support xml sections generation.
And convert htmlentities an utf8
2003-05-07 22:15:14 +00:00
gregb_cc ea6e952d88 fix for bug 324. we are now checking to see if there is a conflict caused by
multiple teachers gradign simultaneously.
2003-05-07 20:53:24 +00:00
stronk7 95f6c01b03 Only admins can execute me !! 2003-05-07 16:09:34 +00:00
moodler e51de1e846 Fixed a typo 2003-05-07 15:08:50 +00:00
moodler ab74168b2d FIxed typo in favicon 2003-05-07 14:12:45 +00:00
moodler d94dc588ab Slightly better favicons 2003-05-07 13:04:52 +00:00
moodler d6513bbb0c Seemed like a good idea. 2003-05-07 11:57:10 +00:00
moodler 0f4f911059 Added .jpe as a JPEG (some people do it I notice! :-( ) 2003-05-07 11:43:08 +00:00
moodler e865ded4ba Don't treat Flash files (.swf) like other images. 2003-05-07 11:41:27 +00:00
moodler 0cb29cc411 Turn off PHP error reporting while connecting to database 2003-05-07 08:07:48 +00:00
moodler 4f5dbd132c Try persistent connection first, but if that fails for some reason then
automatically fall back to a non-persistent connection.
2003-05-07 08:03:43 +00:00
moodler f5fb84cee7 Small bug fixed where last question of a file wasn't detected if it
wasn't followed by a blank line
2003-05-07 05:46:01 +00:00
moodler 7aab220e4b Fixed typo 2003-05-07 02:13:24 +00:00
stronk7 fdcdc04730 Updated. XML generation (header & info only) 2003-05-06 23:01:53 +00:00
stronk7 3b8bad6ff0 Included support to clean /temp/backup automatically and to write
the xml file (header and info only)
2003-05-06 22:48:25 +00:00
stronk7 000969becd Included to get Moodle's version into xml file 2003-05-06 22:47:06 +00:00
moodler 2fb7c49f17 Undoing an accidental check-in. These were some experiments trying to
solve a Windows problem (not successful yet).
2003-05-06 16:06:56 +00:00
moodler 1f33691c86 Cleaned up the initial setup process. It looks a bit smoother now.
Hopefully this is also the end of the occasional errors we keep
hearing about to do with never getting to setup the admin user.
(I think admin/site.php had a redirect that didn't always work).

The setup process is now much better at "trapping" you until it's all done.
2003-05-06 15:58:20 +00:00
moodler 49543158f7 Upgraded to latest code, and add lots of new languages 2003-05-06 11:14:31 +00:00
moodler 851a89ff1b Minor fixes for re-inclusion and also links in email 2003-05-06 03:33:55 +00:00
moodler 813ec7ad65 Prevent guests from taking surveys 2003-05-06 03:06:06 +00:00
moodler fce1ce13c8 Hide admin links (eg grades) from guest accounts 2003-05-06 03:02:58 +00:00
moodler 266fbe1a8a Changes to improve hide/show of individual activities when the last
action was to hide/show a topic
2003-05-06 02:51:38 +00:00
moodler 5f350e8f6d Improvements for PLAIN FORMAT (links) plus some efficiency I think 2003-05-05 16:40:46 +00:00
moodler 01d799665d Better detection of URLs in brackets etc ... plus some tweaks 2003-05-05 16:28:40 +00:00
moodler b879effb4a Fixed bug that was not listing discussions that had identical subjects! 2003-05-05 16:21:45 +00:00
paca70 a918234e91 Postgres limit fix 2003-05-05 16:13:45 +00:00
moodler 11a876e1b6 Minor touches to notice() padding 2003-05-05 12:25:08 +00:00
moodler 4105fe9dd2 Added two styles: .noticebox and .noticeboxcontent 2003-05-05 12:17:34 +00:00
moodler 581d7b4959 Fixes for isadmin() 2003-05-05 11:38:54 +00:00
moodler bb19372c0f Some additions 2003-05-05 09:02:17 +00:00
moodler 068be67d83 Formatting fixes only 2003-05-05 08:31:04 +00:00
moodler 1e2fedeef0 Some additions etc 2003-05-05 08:25:53 +00:00
moodler ea23100a02 Style cleanups. Some consistency, converted all to Unix format, and
added manual setting of the MIME type.
2003-05-05 08:12:28 +00:00
moodler 2bc269fd7b Typo in javascript .... selectedindex should selectedIndex ! 2003-05-05 07:44:53 +00:00
stronk7 be4c89b86a Updated and new entries. Don't forget them !!! 2003-05-04 23:39:24 +00:00
stronk7 674b30f5f7 Begin the execute process. Created temporary structures (dir) 2003-05-04 23:24:48 +00:00
stronk7 39c4f15a40 Removed from CVS. Changed to backup_check.html and backup_form.html 2003-05-04 21:33:05 +00:00
stronk7 b0778a76c3 Changed to link with new files (backup_form.html, backup_check.html
and backup_execute.html)
2003-05-04 21:32:11 +00:00
stronk7 a615cc7bb6 Renamed from check.html, execute.html and backup.html to avoid
problems when doing restore.
Old files deleted from CVS
2003-05-04 21:29:27 +00:00
stronk7 3868b9c666 Finished the check phase. Ready to begin the execute phase. 2003-05-04 21:01:47 +00:00
paca70 465fd00e04 Lang column was missing from postgresql-files (?) 2003-05-04 16:05:59 +00:00
paca70 8a230a7d96 Better postgresql support for column creation 2003-05-04 16:03:45 +00:00
moodler 1215e52299 CVS is acting up 2003-05-04 15:18:25 +00:00
moodler d15cbab76f Remove dashes 2003-05-04 15:17:20 +00:00
moodler 93d64ea469 Get rid of dashes 2003-05-04 15:16:17 +00:00
moodler 1ea7c62794 Weeks now do show/hide too ... and some cleanups all round 2003-05-04 15:10:25 +00:00
moodler b37eb1bf00 Theme updates to suit new course formatting 2003-05-04 15:09:13 +00:00
moodler f50f74f6e4 Missed some pixels 2003-05-04 13:48:39 +00:00
moodler ff82802366 Slightly better logic 2003-05-04 13:44:56 +00:00
moodler 3bb49201b1 Some image spacing issues 2003-05-04 12:56:05 +00:00
moodler 2fe2985a53 Nicer eye :-) 2003-05-04 12:49:35 +00:00
moodler 8140c67e45 More tweaks to the topic interface ... nice light globes! 2003-05-04 12:34:43 +00:00
moodler a6d71a2199 Upgraded ADOdb to version 3.40
Works OK for me in tests under MySQL on my server
2003-05-04 11:59:49 +00:00
paca70 c0ba103ca7 Added transaction around table creation 2003-05-04 10:45:57 +00:00
mits cda45e5506 New translation added. 2003-05-04 10:28:13 +00:00
paca70 5ade559e8e updates 2003-05-04 09:56:35 +00:00
moodler 4fc61176b9 Some tweaks to some strings (hide/show) 2003-05-04 09:44:40 +00:00
moodler dfec7b013f Some clean ups - various things to do with Topics view 2003-05-04 09:43:03 +00:00
paca70 592188b42c First versions for postgres7 2003-05-04 08:56:30 +00:00
mits ffb71387cb no message 2003-05-04 08:36:53 +00:00
moodler 59345eb4ec Removed unused function 2003-05-04 08:36:32 +00:00
mits b2a47e2052 New translation added. 2003-05-04 08:31:16 +00:00
moodler 228b823898 Topic strings etc 2003-05-04 08:14:48 +00:00
moodler 59cd767a99 Beta workshop icon 2003-05-04 08:04:22 +00:00
moodler 46772d8c60 These icons are just temporary - they don't look great 2003-05-04 08:02:07 +00:00
moodler 7d99d6959e New feature: hide/show topics! 2003-05-04 07:59:46 +00:00
moodler 81ed361792 Added new style for hidden topics as well as some docs about
all the changes in this version
2003-05-04 07:58:15 +00:00
moodler 2627a658f8 Latest tags 2003-05-04 04:14:14 +00:00
moodler d342c76370 Added Wiki format as a system-wide format (forums, journals, etc)
Also, added better formatting to plain-text emails via a new function
in weblib.php  -  format_text_email
2003-05-04 04:07:36 +00:00
moodler d7c8a46bc5 Don't throw errors when deleting old logs and unsent mail 2003-05-04 03:46:15 +00:00
moodler 9f0b8269ac Fixed bug where text format of a new discussion was not being saved 2003-05-04 03:43:46 +00:00
moodler eb347b6b68 Fixes to improve the password recovery process. There is now a
confirmation step required before the password is changed and sent.

Also, many of the email texts have been cleaned up.

TRANSLATORS:  check your texts in moodle.php starting with "email.."
2003-05-04 03:00:52 +00:00
stronk7 1b502431a8 Commented the "needed users" option (too complex for this initial release).
Check all and course users.
2003-05-04 01:10:20 +00:00
stronk7 dfe5f88b3b Check mods and check users done 2003-05-04 01:05:58 +00:00
stronk7 b4bee933da Added some entries to the backup/restore utility 2003-05-04 00:01:43 +00:00
stronk7 afbe3de8cf Library to every functions related with the backup/restore matter 2003-05-03 23:20:38 +00:00
stronk7 04aa5b2de1 To mantain updated the db with the auto-update feature.
This file is for mysql installations. Every DB must have
its own file.
2003-05-03 23:19:07 +00:00
stronk7 c4c8f73c4a File that contains currect backup/restore version. To use with the
auto-update feature (copied from moodle main code).
2003-05-03 23:17:40 +00:00
stronk7 8cc242516e Changed to support the backup_ids table in all modules (to store and
convert ids in backup/restore.
Added a check_version (copied from main moodle auto-update) to mantain
changes in backup/restore system.
2003-05-03 23:15:43 +00:00
moodler 8980a4e8db Trying to unregister sessions properly and hopefully avoid the "compat"
warnings on some setups
2003-05-03 11:45:41 +00:00
adamtpaw 24a39b1761 Few corrections to inital translation. 2003-05-03 09:30:22 +00:00
moodler 984a8bf349 Two new language variables implemented.
langmenu  - turns the language menu on and off
langlist  - allows the admin to restrict and/or re-order the available language choices
2003-05-03 06:50:29 +00:00
moodler 107b010b43 Some random lowercasing 2003-05-03 06:49:37 +00:00
paca70 ea563f8f99 Postgres needs full longnames for indexes to prevent overlapping names. 2003-05-03 06:44:03 +00:00
moodler 3565715c76 Moved the "turn editing on" button and tidied some other things up a bit 2003-05-03 05:57:29 +00:00
moodler 005103e0bc Changed some function names, making room for export functions later 2003-05-03 04:31:49 +00:00
stronk7 141097ff80 Finalized every mod check 2003-05-02 23:32:02 +00:00
stronk7 d6545aefbc Check page finished (all mods except quiz). 2003-05-02 17:22:18 +00:00
moodler c6bcd06aba Tidied up the quiz imports a bit, and added AON as a format choice
Also added Scott Elliott's Blackboard module!
2003-05-02 15:31:24 +00:00
stronk7 02fee14e28 Changed the name of the backup 2003-05-02 14:48:11 +00:00
stronk7 82e8e7f569 Two new strings to backup function 2003-05-02 14:40:32 +00:00
stronk7 75da62deee changed backupnameformat 2003-05-02 14:39:54 +00:00
stronk7 519bd9342a Completed the module_check_backup_mods function (used in check.html) 2003-05-02 14:38:16 +00:00
stronk7 61ae5d36ca Modified the userdate() function. No changes needed when invoking it.
Added a new parameter (fixday->default true->old behavior) to avoid
formatting days when invoked with false value.
2003-05-02 09:37:41 +00:00
moodler b1834f2dde More tweaks 2003-05-02 08:42:31 +00:00
moodler 6f40f198d2 Tweaks 2003-05-02 08:35:02 +00:00
moodler e6622eda6a Simplified intro a bit 2003-05-02 08:29:35 +00:00
moodler c45855e551 Added FAQ about quotes 2003-05-02 01:24:27 +00:00
stronk7 7db29e6783 More strings to the backup utility 2003-05-02 00:58:34 +00:00
stronk7 10332943ca Add more things !! 2003-05-02 00:57:57 +00:00
stronk7 d67257815d Completed the module_check_backup_mods function (used in check.html) 2003-05-02 00:54:51 +00:00
stronk7 c53987bbb8 This file shows all the info gathered before launch the backup
process itself.
2003-05-02 00:53:40 +00:00
gregb_cc aa0959690c fixed isadmin so that it checks once on each page view if the user is an admin
fixed check_gd_version to properly identify bundled gd versions (old
check_gd_version was returning 0 instead of 2 for bundled gd).
2003-05-01 23:12:05 +00:00
mits 890a2cfeea New translation added. 2003-05-01 17:50:05 +00:00
stronk7 c5be7d8e8e Included Schema of evey mod (comments) and complete
assignments
2003-05-01 17:43:03 +00:00
stronk7 737c4885be Simplified a lot (I discover the variable variables in php !!) 2003-05-01 17:42:08 +00:00
stronk7 3fe1c56cdd Changed 2003-05-01 17:41:16 +00:00
moodler b3afe8244a Useful function for XML ... currently used only in Blackboard quiz importing 2003-05-01 13:57:35 +00:00
moodler 52ff6a7f44 Updates (removed Peer-graded module) 2003-05-01 13:46:11 +00:00
moodler d22d31c659 Workshop module from Ray Kingdon
This version is still beta!
2003-05-01 13:16:58 +00:00
moodler edffca1558 Changes to make forum mailouts a little more robust, and avoid duplicates
I hope, at least the ones caused by overlapping cron jobs.
2003-05-01 12:56:03 +00:00
stronk7 28408ed2ac Two more strings to backup utility 2003-05-01 12:47:52 +00:00
stronk7 d4ccfc2a2b Now all the variables are correctly transfered
Changer error to notice
2003-05-01 12:41:11 +00:00
stronk7 5f5ea8cc4c Include some entries to use in the backup utility. 2003-05-01 12:06:38 +00:00
stronk7 a36175db4c Now checks dinamically if "backuplib.php" and function "module_backup_mods"
exists !!
2003-05-01 11:19:33 +00:00
moodler 6db95aa730 new help file from Howard Miller (needs a little editing still) 2003-05-01 03:44:30 +00:00
moodler 3e9ca9fbc5 Added new Wiki code to allow Resource web pages to be created/edited using Wiki format
This code contributed by Howard Miller.  Thanks!
2003-05-01 03:43:16 +00:00
stronk7 bf32194357 Initial version. Do nothing. Just exist !! 2003-05-01 00:48:58 +00:00
stronk7 3b777608ac Continue 2003-05-01 00:46:39 +00:00
stronk7 3920667ee3 First Version. Do nothing but I saved it from accidental remove !! 2003-05-01 00:45:40 +00:00
stronk7 ea914a66ae Included possible feature
Restore into new course or existing course
2003-04-29 23:22:34 +00:00
stronk7 d565341a2f Frontend started. 2003-04-29 21:23:20 +00:00
stronk7 ea65b07cdd Included ID info. Simple. 2003-04-29 21:09:27 +00:00
stronk7 6b14fdcb1d Initial version of STATUS.txt
Used to show the detailed status of every part of the backup/restore.
2003-04-29 20:21:27 +00:00
stronk7 482fa9f6c6 Initial version of README.txt
Used for general comments about the backup/restore feature
2003-04-29 20:19:51 +00:00
moodler ca16eaeb31 Make sure all these links break out of subframes and go to mainframe 2003-04-29 13:54:53 +00:00
moodler f855f6062b Some tidying up - too much thesis wool in the head 2003-04-29 13:51:28 +00:00
moodler 5d0d5d5ac5 Images, when displayed as resources, are now centered and controlled
by a new style resourceimage
2003-04-29 13:31:47 +00:00
moodler 31d6331615 Don't go through enrolment procedure if they are already enrolled. 2003-04-29 13:04:22 +00:00
moodler dc95f4a11b Always print full number of student at the top 2003-04-29 12:51:21 +00:00
moodler 9d6f5d42eb Only retrieve records that are needed (eg description never is used) 2003-04-29 03:16:32 +00:00
stronk7 6d41991acc Little spell in word "Recursos" 2003-04-28 21:35:03 +00:00
minkowski 46956de552 no message 2003-04-28 18:08:23 +00:00
moodler a273084d7a Strange no-one has noticed this so far ... ! 2003-04-28 16:56:57 +00:00
moodler 81f186b47a I'm getting wierd numbers of records returned on moodle.org.
This fix makes the page a bit more robust even if this is
happening.
2003-04-28 16:13:46 +00:00
moodler df48be741a Minor fixes 2003-04-28 15:52:51 +00:00
moodler 8de14dc72b Print some nice feedback when a discussion has been moved, to help
prevent accidents.
2003-04-28 15:27:44 +00:00
paca70 28ba0d55cc ...And now it works 2003-04-28 15:24:13 +00:00
paca70 8809fee944 updates 2003-04-28 14:59:28 +00:00
moodler b86fc0e2a6 New feature replacing the old zoom function.
Now these are saved in a new table called course_display,
each user and each course can have independent settings.

I'm intending to expand this table later for all the other
course display stuff (like hidden topics etc)
2003-04-28 13:29:26 +00:00
paca70 9655b654a5 Now postgres works as it should, returned primarykeys are correct. 2003-04-28 12:51:19 +00:00
paca70 6492992616 I did't test previous change well, have take changes back. 2003-04-28 12:02:29 +00:00
paca70 9a652ddb2b Don't give fatal error when questions were not found. 2003-04-28 06:36:14 +00:00
moodler f343161392 Some random tidy-ups 2003-04-28 06:07:02 +00:00
moodler b72c80db7e New info 2003-04-28 05:29:26 +00:00
moodler 95abee03e6 Fixed user images 2003-04-28 04:55:31 +00:00
moodler 028677d7b2 Forgot one 2003-04-28 04:45:44 +00:00
moodler 9d2dda0f85 Added new custompix parameter 2003-04-28 04:45:15 +00:00
moodler e313ef4476 The rest of the images 2003-04-28 04:43:51 +00:00
moodler d14c1e0687 Added example of how "custompix" is to be used 2003-04-28 04:41:21 +00:00
moodler dc0dc7d5dd Tidying up the way pix images are used.
It's now also possible to override the standard pix with a set of new ones
in a theme.
2003-04-28 04:32:55 +00:00
moodler 2b83b7f98b Moving some images around - cleaning up organisation 2003-04-28 03:09:27 +00:00
moodler f0eec3b641 Whoops ... left and old line in there during the last fix 2003-04-28 02:43:18 +00:00
paca70 e8a0fc9a4f Corrected typo 2003-04-27 17:35:54 +00:00
paca70 e9ececbb1e $db->Insert_ID seems to work with postgresql too 2003-04-27 16:03:01 +00:00
paca70 5352ceba67 quiz_match was missing... 2003-04-27 15:33:31 +00:00
moodler dc2590e587 Don't process $usernew->username if it doesn't exist (prevents normal users from editing profile). 2003-04-27 14:50:03 +00:00
moodler e13d05801c Fixed rogue spaces 2003-04-27 12:45:51 +00:00
moodler 16aefd75fb New and very complete translation in Russian, from
Yakov Alperin and http://elearning.microtest.ru
2003-04-27 12:10:27 +00:00
mits 667e2e0293 New translation added. 2003-04-27 11:32:42 +00:00
mits 7716babeb2 New translation added and polished some.
I'm keeping my head above water, Martin :-)
2003-04-27 11:31:45 +00:00
moodler 6d21fd37f2 Added new format to this file ... heads up for translators! 2003-04-27 10:58:20 +00:00
moodler 6901fa7955 New plain text format.
Translates smileys and carriage returns, but prints all other tags and code
as plain text
2003-04-27 10:46:16 +00:00
paca70 e209e0b09e indexes for postgres 2003-04-27 09:54:03 +00:00
moodler f5e82bc7f4 Moved microtime_diff() to moodlelib 2003-04-27 08:13:45 +00:00
moodler 026bcf8ce1 Fixed typo 2003-04-27 06:51:44 +00:00
moodler 7aaedff8de Changed my mind about the default setting for loglifetime 2003-04-27 06:50:19 +00:00
moodler 2656b1351f Some rewording about loglifetime 2003-04-27 06:48:13 +00:00
moodler 81a383ca7a New string - saveall 2003-04-27 06:42:28 +00:00
moodler f8bccb148a iNew configuration variable delete old logs - loglifetime 2003-04-27 06:41:53 +00:00
moodler 540bab47d4 Delete old logs is required 2003-04-27 06:21:15 +00:00
moodler 30f89d6833 New delete_records_select() function 2003-04-27 06:18:03 +00:00
moodler f9d5fd3b3c Added a LIMIT to the SQL query for a bit more efficiency 2003-04-27 03:32:45 +00:00
moodler f9ce68ee7f Using multiple indexes for slightly increased performance 2003-04-27 02:58:26 +00:00
stronk7 c0605295bd Changed to dimm non-visible grades (mods). Bug #378.
Done a bit more:
  - Show dimmed entire column.
  - Difference html (for web) and text (for .xls and .txt export) in
    many variables.
  - Using the dimmed_text style to dimm.
2003-04-26 19:35:27 +00:00
stronk7 85093cf4f9 Added the dimmed_text css style to show normal text dimmed (gray #AAAAAA) 2003-04-26 18:54:37 +00:00
stronk7 0830bae4d7 Changed to hide non-visible grades (mods). Bug #378. 2003-04-26 18:16:36 +00:00
moodler 1ba3960285 Working much better with indexes - update the schema 2003-04-26 15:26:51 +00:00
moodler 6459f225b8 Update to add new indexes to MySQL tables. Speeds up the log access. 2003-04-26 15:24:04 +00:00
moodler 1b5910c4a5 Trying a different tack for recent_activity since the old way was
still producing too much data and overflowing PHP memory on busier
sites (eg moodle.org).

Now, there are more database queries, which is unfortunate, but the
data is much more specific, and no sorting needs to be done, so
this is a performance boost.

I don't know how these will cancel out ... my guess is that very
small sites may be very slightly slower on the course page, but
that large sites will be much faster.

Let's see.
2003-04-26 15:08:34 +00:00
moodler a54b8dd3af Need course module stuff 2003-04-26 14:21:42 +00:00
moodler 667ab3252b Get less logs from the database 2003-04-26 14:12:12 +00:00
moodler b1992e65cf Trying an experiment on moodle.org 2003-04-26 13:49:13 +00:00
moodler 10a95b432c Fix for use of COURSE_MAX_RECENT_PERIOD 2003-04-26 13:41:31 +00:00
moodler ad08fdc277 Performance improvements
- better checking of data before processing
  - used logs are removed to avoid re-processing by other modules
2003-04-26 12:59:41 +00:00
moodler 38e5dbf319 No changes, just rearranges 2003-04-26 12:38:53 +00:00
moodler ec2a28a607 Extended number of select fields allowed for get_field() and set_field() from 1 to 3 2003-04-26 12:38:04 +00:00
moodler 278a229c25 Slight fix to teacheronly coloring 2003-04-26 12:22:52 +00:00
moodler 3d89198946 Cleaned up definition of constant COURSE_* values in course/lib.php
Moved COURSE_TEACHER_COLOR out to style sheets where it belongs (.teacheronly)

Added some efficiency when printing recent activity

 - don't print more than one weeks worth of updates
  - don't keep re-parsing logs once they've been used
2003-04-26 12:17:30 +00:00
moodler 78e0146055 Argh! Excess quotes in CSS 2003-04-26 12:12:30 +00:00
moodler 6eb6cd8753 New style for teacher-only colour (eg when showing teacher posts in recent activity) 2003-04-26 12:07:14 +00:00
stronk7 fbca88e692 Show activity log only from visible surveys. Bug #367. 2003-04-26 11:04:46 +00:00
stronk7 2953d5e865 Show activity log only from visible journals. Bug #367. 2003-04-26 10:14:54 +00:00
stronk7 86e6076b3b Modified the instance_is_visible function. It has a bug, having
the "forum" table harcoded. Simplify a bit. Now seems to work
fine with every mod.
2003-04-26 09:34:11 +00:00
moodler c3357723de FAQ in full is too long - offends my eye :-) 2003-04-26 06:05:24 +00:00
moodler 09368e3938 Moved most-asked question to the top 2003-04-26 06:02:58 +00:00
moodler a95ae47bdf Imprved intro 2003-04-26 05:55:39 +00:00
moodler 50d673157b Long form of FAQ 2003-04-26 05:44:42 +00:00
moodler 65eed52ded Style for question links 2003-04-26 05:42:51 +00:00
moodler d1db7bee92 More cleanup 2003-04-26 05:40:24 +00:00
moodler 39b5b3fa2a more clean up 2003-04-26 05:30:00 +00:00
moodler e317d04919 Cleaned up, with additions 2003-04-26 05:24:07 +00:00
stronk7 dff0db9ad5 Show activity log only from visible forums. Bug #367. 2003-04-26 00:17:42 +00:00
stronk7 746546a8f8 Show activity log only from visible assignments. Bug #367. 2003-04-25 23:49:35 +00:00
stronk7 b3cc742cf9 Avoid showing course updates (add, update, delete) about hidden mods. Bug #367 2003-04-25 23:17:53 +00:00
paca70 c4c575979e Allow caseinsensitive search for postgesql 2003-04-25 19:32:38 +00:00
paca70 3399a22c9f Show adduser only when adding new user from moodle is posible. 2003-04-25 17:18:40 +00:00
paca70 4dd0497164 Dont allow edit username when external authentication is active. 2003-04-25 16:42:07 +00:00
moodler 826293c75b Allowed - and . during signup by email 2003-04-25 12:35:17 +00:00
moodler 5a9126f75a Renamed signup_form.php to signup_form.html (this part of the code is really old) 2003-04-25 12:32:26 +00:00
moodler a2f1ef3067 Some default values for variables 2003-04-25 12:29:52 +00:00
moodler 266cc04fe7 Footers use new styles for links 2003-04-25 09:25:25 +00:00
moodler b328523cc1 Style for "You are logged in as xxx" and the link to the course home page. 2003-04-25 09:23:08 +00:00
moodler a5c411d4c2 Smaller font 2003-04-25 09:01:01 +00:00
moodler 583a7283e9 Edit my profile link goes straight to the edit screen 2003-04-25 08:59:10 +00:00
moodler fc613dff69 Directories are now made using make_upload_directory from moodlelib 2003-04-25 08:39:11 +00:00
moodler 4d4267739c Some minor visual improvements - firstname/lastname separated, initialised some variables 2003-04-25 07:15:12 +00:00
moodler a282d0ffda Adding user's name at the top of the course page.
Just experimenting with it there for a while ... feedback welcome
2003-04-25 06:40:30 +00:00
paca70 87b490dfc6 Hide password field when password change is not supported by auth-module. 2003-04-25 06:01:59 +00:00
moodler 580f2fbc07 New function to detect visibility of a single module, and
use of this function when displaying list of forums
2003-04-25 05:24:29 +00:00
moodler 047d30d1eb MySQL code (etc) to convert all usernames to lowercase ... does a lot more
checking than it really needs to, since MySQL is not case sensitive
2003-04-25 03:54:21 +00:00
paca70 1e22bc9c04 Conver usernames to lowercase for internal use. This prevent duplicate users
when using external authentication and posgresql.
2003-04-24 20:06:40 +00:00
paca70 e40488f80c routines to convert postgeruser to lowercase. 2003-04-24 18:48:09 +00:00
stronk7 c37053ea2f Changed to show the hidden surveys dimmed (bug #364) 2003-04-24 18:28:30 +00:00
stronk7 e6c136e1bf Changed to show the hidden quizzes dimmed (bug #364) 2003-04-24 18:19:23 +00:00
paca70 1dea7ebb04 global $CFG was missing...? 2003-04-24 17:38:20 +00:00
stronk7 f99d236832 Little update to select the forum info (avoid duplicates). 2003-04-24 17:35:34 +00:00
paca70 dbe0be0059 Added missing $ 2003-04-24 17:21:54 +00:00
stronk7 3b0fb381ea Changed to show the hidden forums dimmed (bug #364) 2003-04-24 17:15:59 +00:00
moodler 61367e6417 More robust variable checking 2003-04-24 17:13:52 +00:00
moodler 719e7b04f8 Default value for alltext variable 2003-04-24 17:05:54 +00:00
stronk7 5094d166b7 Changed to show the hidden choices dimmed (bug #364) 2003-04-24 16:47:06 +00:00
stronk7 dd8d521d91 Changed to show the hidden assignments dimmed (bug #364) 2003-04-24 16:38:49 +00:00
stronk7 81cdaada93 Changed to show the hidden resources dimmed (bug #364) 2003-04-24 15:25:21 +00:00
stronk7 7cfb83477c Modified to obtain the visible property too. To use it when showing the list
of instances of every mod (bug #364)
2003-04-24 15:17:43 +00:00
moodler 638f95b1ff Latest things 2003-04-24 15:03:42 +00:00
moodler 88478a664f New authentication method - a very simple one called "manual".
Accounts have to exist in the internal database, and there is
no way to create an account on the site - admins have to do it.
2003-04-24 15:01:15 +00:00
moodler 67b0821af9 Fixed a typo, see bug 361 2003-04-24 14:37:22 +00:00
moodler e1c4617441 Added recent stuff 2003-04-24 14:28:24 +00:00
moodler 3395f2d67e Forum posts are now not allowed to have blank subjects or messages,
if a message is entered with one of these blank then the user gets
an error message and a chance to re-edit the message.
2003-04-24 14:05:47 +00:00
moodler 41ab15fba5 Added Polish info 2003-04-24 08:46:44 +00:00
moodler 1fc49f0019 New feature to allow teachers to move a discussion from one forum
to another.

A simple popup menu now appears when teachers view any discussion.

Includes a new log entry to log when a discussion is moved.
2003-04-24 08:45:27 +00:00
moodler 2a40936834 Mark the hidden ones for teachers 2003-04-23 17:25:20 +00:00
moodler 13df5aeef3 Rebuild course modinfo caches to include the visible variable 2003-04-23 17:02:24 +00:00
moodler 7acaa63d09 Tidy up a bit 2003-04-23 16:57:35 +00:00
moodler feffa4e695 chmod after mkdir (just in case) 2003-04-23 16:51:26 +00:00
stronk7 fec5a6a63f Changed the get_array_of_activities function to return the visible property too 2003-04-23 16:37:37 +00:00
stronk7 cf055081ef Changed the navmenu function to show only visible-mods on the
jumpmenu. Everything is showed when the user is a teacher.
2003-04-23 16:32:11 +00:00
stronk7 00d26a208b Changed the get_course_mods function to obtain the visible property too. 2003-04-23 16:09:56 +00:00
mits d4269e95c0 fix again. 2003-04-23 15:43:56 +00:00
mits 91162b4688 fixed :-) 2003-04-23 15:39:54 +00:00
moodler a7eedb343c Sorry, Mits, I think I broke it :-( ... can you check this file? 2003-04-23 15:34:12 +00:00
moodler f861185a4a Added dynamic display of post delay time as currently defined for the server 2003-04-23 15:30:22 +00:00
moodler b7637a30d4 Dynamic value of minutes displayed in help file 2003-04-23 15:25:27 +00:00
moodler c032b59db9 Help button about subscription on forum page 2003-04-23 15:19:01 +00:00
moodler 312447111c Got a bit slash-happy 2003-04-23 15:01:37 +00:00
moodler 3af4a3653c some HTML tags made a bit more XHTMLish 2003-04-23 14:50:44 +00:00
mits 847179dc91 New translation added and polished some. 2003-04-23 14:22:19 +00:00
moodler bc3df42048 Initial, partial translation from Adam Pawelczak <adamp@wsb.poznan.pl> 2003-04-23 11:30:14 +00:00
stronk7 c7da6f7a8f Bug #363. When everyting is hidden at main-menu, error occurs. Changed the get_all_mods function to check this. 2003-04-22 20:46:12 +00:00
stronk7 e6cf424727 Bug #261 closed. Appended course short-name to distinguish courses
when assigning teacher.
2003-04-22 19:27:11 +00:00
paca70 e05566015e More updates. Thanks to Teemu! 2003-04-22 14:38:37 +00:00
paca70 3c7f99a447 Updates 2003-04-22 14:18:03 +00:00
paca70 7d6cac54f3 New string conversion function to help with multibyte-locales 2003-04-21 16:39:43 +00:00
moodler 3ba2985594 Robustness fixes 2003-04-21 08:08:33 +00:00
moodler b369ff55fe Whoops, chmod not chown 2003-04-21 07:26:23 +00:00
moodler 718ad19f47 trying to fix up old file permissions 2003-04-21 07:21:33 +00:00
moodler 9dd0b37817 Make sure to change the ownership of uploaded files 2003-04-21 07:11:29 +00:00
moodler 3269b238a7 Updated (to make the new release notes show up for CVS people :-) 2003-04-21 06:44:13 +00:00
moodler 6b708b9844 More info about new features in the upcoming release 2003-04-21 06:43:05 +00:00
paca70 978704f095 More comments 2003-04-20 18:15:03 +00:00
paca70 d2802df553 Added mimetype and icon for avi-files. 2003-04-20 07:42:18 +00:00
paca70 44a334d874 Undoing needless change. 2003-04-19 19:09:01 +00:00
paca70 d61bf02f18 Works now also with $a->something 2003-04-19 17:45:50 +00:00
paca70 4dddd64b5f Hilite also empty stings. 2003-04-19 10:25:58 +00:00
paca70 fe8bc4c9a5 Removed two `'s 2003-04-18 21:05:12 +00:00
paca70 cefc7e817e Fix for postgresql column adding( $oldfield is always '"$oldfield"') 2003-04-18 20:50:42 +00:00
moodler 2ab968e937 Trying some optimisations 2003-04-18 09:53:41 +00:00
moodler 32dcc87484 Fixed new bug that was preventing news being shown on course page 2003-04-18 07:25:58 +00:00
moodler fc6a91994e Robustness on a variable 2003-04-18 07:25:32 +00:00
moodler 02a7699f0d Tweak for generalbox 2003-04-18 06:41:34 +00:00
moodler 03aa0dfa10 Style improvements and upgrades 2003-04-18 06:39:40 +00:00
moodler 9e0a08bd28 Discussion, not subject 2003-04-18 06:14:17 +00:00
moodler c20b762a06 Fixed location of Older discussions link 2003-04-18 05:57:45 +00:00
moodler 3c8a606d85 Added simple paging ... only top 100 are shown by default. If there
are more then "older discussions" link shows all of them.

Someday proper 1,2,3,4 paging would be nice but this will do for now.
2003-04-18 05:54:18 +00:00
moodler 546be6dd89 don't valign subjects in html 2003-04-18 05:28:08 +00:00
moodler 96e301a7c9 Undoing last checkin 2003-04-18 05:25:46 +00:00
moodler 9ddb00e600 Improved colours 2003-04-18 05:22:49 +00:00
moodler 29507631a9 First pass at a cleaner display for discussion listings 2003-04-18 03:58:12 +00:00
moodler 801e1f0a3e Set guest name in current language on login 2003-04-18 02:18:12 +00:00
moodler bf3bc898ac Assigned $strsearchresults 2003-04-18 01:57:24 +00:00
moodler a00283d6cd Clear a variable, just in case 2003-04-17 15:46:39 +00:00
moodler c1d9daca3c Clear the variable, just in case 2003-04-17 15:45:57 +00:00
moodler 7226ce02b1 Robustness for $course variable 2003-04-17 13:20:26 +00:00
moodler da63e99627 Updating version because the quiz work is finished, for now 2003-04-16 15:20:21 +00:00
moodler 3abe21ab94 Latest tags 2003-04-16 15:19:23 +00:00
moodler e1122620b5 Er, similar to the last few changes but this way seems to actually work. :-)
Need sleep ...
2003-04-16 13:48:16 +00:00
moodler 2408867e8c Improvements for shuffleorder in collections of random questions 2003-04-16 13:25:03 +00:00
moodler 96192c4459 After doing a quiz that has been shuffled, present the feedback in the
same order.  Note that shuffled ANSWERS may still appear reshuffled.

When viewing reports, all shuffling is switched off so that quizzes
always appear in the default order (for easier comparison).

Also a few tweaks, robustness etc
2003-04-16 13:10:48 +00:00
moodler 77cff58927 Fixes for bug 268 - Changing answers of questions can lose responses for
existing quizzes with those questions.

When updating a question it now checks for existing answers and updates
those instead of making new ones.
2003-04-15 14:43:29 +00:00
moodler eece3a331a Tweakin' icons 2003-04-15 14:29:09 +00:00
mits f24f17c5bb no message 2003-04-15 14:07:48 +00:00
mits 2386e97f89 New translation added. 2003-04-15 14:05:47 +00:00
moodler d6a6331129 Add category to random question names 2003-04-15 13:14:33 +00:00
moodler c9548d4a5d Slight mods ... are they better? 2003-04-15 06:20:27 +00:00
moodler de38e2621d More robust use of $_FILES['imagefile'] 2003-04-15 02:08:27 +00:00
moodler 1acfbce5b6 Hide/show individual activities in any section
Code submitted by Eloy Lafuente (thanks!) for 1.0.8 ... I hand-merged it
into 1.0.9.
2003-04-14 15:11:09 +00:00
moodler 5a25f84d25 Fix for off-by-one grade error when 'Save Grades' had not been used 2003-04-14 13:52:59 +00:00
moodler 8b72b41bf9 Better looking code 2003-04-14 05:44:47 +00:00
moodler b610b4c2fd Showall is sticky, and also you get a warning about the number 2003-04-14 03:02:25 +00:00
moodler dea49bdd6c Changed wording a little 2003-04-14 02:56:31 +00:00
moodler 99de5ed02b New string "showall" 2003-04-14 02:55:48 +00:00
moodler cb77b5b67f Better wording 2003-04-14 02:53:55 +00:00
moodler a625debc38 Simplified display - less unnecessary clutter 2003-04-14 02:52:11 +00:00
moodler 15c715211e Mucking with the formtting 2003-04-14 02:48:40 +00:00
moodler 980d545f4f Smaller info 2003-04-14 02:45:03 +00:00
moodler 9ecb1bd3a4 New strings for showing users 2003-04-14 02:43:53 +00:00
moodler c5b6666eaf Better support for large classes 2003-04-14 02:42:40 +00:00
mits 63a77d2d39 no message 2003-04-13 18:48:24 +00:00
mits c76f49060f New translation added. 2003-04-13 18:47:03 +00:00
moodler 7c81b6e273 Sort subscribers by email address (easier to find subscribers based on
bounced messages)
2003-04-12 07:52:52 +00:00
moodler 752e1c2b62 Don't pass alltext from mod.html to details.php ... more efficient this way 2003-04-12 03:42:17 +00:00
moodler 67b69ce15b No real point to changing the numbers - changing them back to the original plan 2003-04-12 03:18:50 +00:00
moodler cdb0ca8315 Update to stop it falling too far behind 2003-04-12 03:18:02 +00:00
moodler f475564878 Latest tags 2003-04-11 14:46:21 +00:00
moodler 0bf2925db8 Minor fixes 2003-04-11 14:44:12 +00:00
paca70 5e776a02ad To check string sizes 2003-04-11 12:05:21 +00:00
moodler c6eed09730 New "create multiple questions" wizard.
Improvements to the importing routine for AON
2003-04-10 17:55:57 +00:00
moodler 340191ded7 Added Danish 2003-04-10 14:17:01 +00:00
moodler 085e317dbf Danish! From S?ren Vinther Hansen <info@thenavigator.dk> 2003-04-10 14:04:30 +00:00
moodler be09831ac3 More info about admin location and a fix 2003-04-10 13:57:21 +00:00
moodler dae73c05e9 New $CFG->admin directory can override the location of the admin
directory.

Useful because some web hosts use /admin for other things.
2003-04-10 13:46:52 +00:00
moodler bc700e6559 New function swapshuffle_assoc 2003-04-10 13:45:07 +00:00
moodler c05eca327c Importing improved to include pre and post-processing.
Removal of Random Matching code from the generic case.
Implementing a particular custom import style aon.php
2003-04-10 13:12:40 +00:00
moodler da5fb074c3 Minor robustness fix 2003-04-10 13:11:34 +00:00
moodler b1db099b7e New icons 2003-04-10 13:04:20 +00:00
moodler 44ce983d45 Updated number of languages 2003-04-10 06:24:57 +00:00
moodler 66a68c1739 Updated with current thoughts about general path this year 2003-04-10 06:22:04 +00:00
moodler 1365bacde6 Correct a typo 2003-04-09 14:30:04 +00:00
moodler 52c018a0b5 More logical position for shuffle options 2003-04-09 14:27:58 +00:00
moodler 4b85b71712 New quiz switches to
- shuffle questions order
  - shuffle answers order
2003-04-09 13:57:08 +00:00
moodler f5cbbecaf5 empty() --> !isset() 2003-04-09 13:41:11 +00:00
moodler 72e5815533 More fixes resulting from random question feature 2003-04-09 08:11:20 +00:00
moodler 434802d5ce Slightly more efficient database access. 2003-04-09 07:23:42 +00:00
moodler 34d52ad7d2 First implementation of completely random questions.
When you add a random question to a quiz, then a question
is chosen randomly from the same category.

Questions are not repeated in a particular quiz attempt.

This still needs more testing, but it's looking OK so far.
2003-04-09 06:32:51 +00:00
moodler d62413e869 Use "modified" date of posts when displaying them, not the "created" date. 2003-04-08 14:09:24 +00:00
moodler 329f046798 Don't use session.path check when the server is in safe mode 2003-04-08 03:51:38 +00:00
moodler 29cbd93a45 Just much simpler way of doing the last patch. 2003-04-07 16:08:52 +00:00
moodler aa6fbca550 Use the cached admin bit if it's there!
(saves one database access per editable activity on the course page!)  :-/
2003-04-07 15:30:34 +00:00
moodler 8daaf761c3 Added code to catch runaway case when there is more than one news forum.
It shouldn't happen, but I think it can when the database is having
problems.
2003-04-07 15:20:08 +00:00
moodler 8f202463d5 New file 2003-04-07 03:30:50 +00:00
mits b4e3b12234 New translation add and modify $string['configunzip'] , $string['configzip'] :) 2003-04-06 06:15:00 +00:00
moodler e64984a0bb Modifications to allow Moodle files management page to use PclZip
instead of external zip programs.

To use the internal PclZip, the config variables "zip" and "unzip"
must be left blank.

Code for PclZip integration originally from Robert Hetzel, though
I've expanded it and modified it a lot.

The zip files seem compatible with itself and Windows XP, but I had a
compatibility problem trying to unzip a PclZip file using Zip 2.3 on Linux
(directories are unpacked as empty files)
2003-04-06 05:53:47 +00:00
moodler 8ef3483b60 Added Version 1.3 of PclZip to the distribution 2003-04-06 05:48:56 +00:00
mits f07e21dec4 no message 2003-04-06 03:29:28 +00:00
mits f561b68011 Polished 2003-04-06 03:24:49 +00:00
moodler 46d552b810 Partial translation, by Ilia Chipitsine <ilia@chel.skbkontur.ru> 2003-04-05 14:29:26 +00:00
moodler e52c4f2231 Latest improvements from Paula 2003-04-05 14:21:10 +00:00
moodler c4dfc485eb Fixes for main SQL defintions - from Juro Chlebec 2003-04-04 10:47:37 +00:00
moodler ef49e5c301 addslashes to string used for javascript link 2003-04-02 07:24:42 +00:00
moodler 8a205861e0 Added a robustness check for USER->id 2003-04-01 02:38:31 +00:00
moodler 0305fe824d Undoing recent changes 2003-04-01 02:24:58 +00:00
moodler ffb410df03 Sorry, Petri, but we need to undo these changes, because:
- they could break accounts in existing installations
  - strtolower can corrupt strings in multibyte languages

Is it really a problem that usernames are case sensitive on PostgreSQL?
2003-04-01 02:14:16 +00:00
paca70 b398d5ee2a Use always only lowercase version of username.
When using authentication module (ldap, smb, pop etc...) and postgres-database multiple moodle
users were created for usernames like 'Username' 'username' 'userName'
2003-03-31 17:05:52 +00:00
mits 73f131b7a6 New translation added and polished some. 2003-03-31 03:03:20 +00:00
moodler e4be3d5943 Renamed randommatch.html -> randomsamatch.html 2003-03-30 16:51:24 +00:00
moodler 432d39026d New template for Match questions 2003-03-30 16:48:34 +00:00
moodler 54a67a5921 First cut at adding new "fixed" Match question type, which is manually
created.  Works OK after limited testing.

I've also renamed some strings to do with "Random Match", so that this
question type is now called "Random Short-Answer Match".

Later there will be a new 'Random Match' which randomly selects one of the
existing "Match" questions.
2003-03-30 16:46:50 +00:00
moodler 03fd6a965e Fixed a slight typo 2003-03-30 13:54:28 +00:00
moodler 0d0baabf2c Fixed a missing global $CFG declaration. 2003-03-30 13:25:49 +00:00
moodler 2d0b30a028 What was I thinking? This is much cleaner (and no duplicates). 2003-03-29 04:08:51 +00:00
moodler adaf39283c Changes to activate the "force subscribe" option on the Site News forum.
By default it is OFF, but if it is turned on, then site news is emailed
to ALL enrolled students and ALL current teachers.
2003-03-29 03:39:56 +00:00
paca70 754786f1be Updates 2003-03-28 08:58:47 +00:00
paca70 a3b0dbfa80 updates from Jaana 2003-03-27 20:04:24 +00:00
moodler 90707adb7f Added Romanian author, plus some fixes 2003-03-27 03:28:25 +00:00
moodler b8a0fb13a3 Eugen Tanul <roinstitute@fx.ro> 2003-03-27 03:14:44 +00:00
moodler aa9f961b7d New language: Romanian by Eugen Tanul <roinstitute@fx.ro> 2003-03-27 03:13:36 +00:00
moodler bad357c414 Restoring Paula de Waal's versions for the time being 2003-03-26 15:14:52 +00:00
moodler ea6003eb8a New translations of the help files, from Adriana Beal 2003-03-26 15:08:46 +00:00
moodler b60aa549fc Added Bobo 2003-03-26 14:14:16 +00:00
moodler b6f64be2a5 Fixes related to AcceptPathInfo - removed need for ifDefine lines. 2003-03-26 14:13:42 +00:00
moodler 075a591656 Better regular expresssion for detecting URLs at the very start of a text.
I don't know what the old one thought it was doing!  :-)
2003-03-26 07:33:26 +00:00
moodler 0ece16e90c Added tags file for codewalkers who can't generate one.
This file will not be included in distributions.
2003-03-26 06:03:34 +00:00
moodler 036d3c1f90 Typo! 2003-03-26 05:48:21 +00:00
moodler 6eff984aee Added some new indexes on quiz tables in MySQL 2003-03-26 05:46:09 +00:00
moodler 264d4e0b9a Added two new indexes on log table to help speed it up.
See Greg's note in bug 113
2003-03-26 02:17:46 +00:00
mits 1495667946 pgassignment.php done.
needs enough polish :)
2003-03-24 16:34:21 +00:00
mits 8cc7286ccc New translation added. 2003-03-24 15:33:37 +00:00
paca70 f5cdd4d133 Corrected typo 2003-03-24 13:15:48 +00:00
moodler b2d0ca3b7c Removed some tabs :-) 2003-03-21 14:09:51 +00:00
moodler 000cc405ba Hack from Roberto Pinna (Bobo) to add sorting when viewing submissions
Might need some tidying up still but it's functional ..
2003-03-21 14:07:25 +00:00
moodler e384fb7b73 Can now count a search of users 2003-03-21 10:10:21 +00:00
moodler 49e16355c2 Improvements to display of users 2003-03-21 10:08:23 +00:00
moodler c750592ac4 Added a search form to the "edit users" admin page yay! 2003-03-21 09:42:42 +00:00
moodler 6a3461ad1c Links to admin page in header are now relative 2003-03-21 04:56:05 +00:00
moodler 746665838a More robustness on checking sequence variables 2003-03-21 04:53:08 +00:00
moodler f8430195d9 Small fix to avoid PHP warnings 2003-03-21 04:49:29 +00:00
moodler ef4145f6ae Changes to make regrading work properly if the quiz has changed
and also an exptended timelimit for when regrading is REALLLLY slow
fue to some other unknown reason (as yet)
2003-03-20 07:28:53 +00:00
mits f2cc50f192 New translation added. 2003-03-20 06:10:00 +00:00
moodler 4c0e951049 Updated credit for Slovak 2003-03-18 12:57:01 +00:00
moodler 0fdddefbaa Improved Portuguese (Brazil) version by Paula de Waal 2003-03-16 15:02:38 +00:00
moodler d4120c3d7c Added some more options for longtimenosee 2003-03-16 02:35:03 +00:00
paca70 509139373e Fixed incorrect comparison. Peter Paluch pointed this out. 2003-03-15 18:26:46 +00:00
moodler 78e72ed16b Didn't quite finish the last patch of user -> usernew 2003-03-15 09:15:44 +00:00
moodler e6829515b0 Bug fix from Ray Le Couteur ... alphanumeric check was checking old
username but not the new username
2003-03-15 08:26:00 +00:00
paca70 e582b65e30 Fixed logic error.
Now also first time users can be course creators.
2003-03-14 21:34:39 +00:00
gregb_cc a2631c99d9 This closes bug http://moodle.org/bugs/bug.php?op=show&bugid=310
assignment_get_unmailed_submissions now ensures that a student is still enrolled
2003-03-14 19:58:53 +00:00
moodler 01cf7d2ebc Added some people 2003-03-14 12:45:05 +00:00
moodler a4ef9df2d7 Initial version from Les Kopari - les_kopari@yahoo.com 2003-03-14 08:22:37 +00:00
moodler 9d5b689c8a Added vim commands at the bottom of the file to try it out 2003-03-14 07:55:22 +00:00
gregb_cc b9287b2fba Added a useful message, to make the cron output more helpful in diagnosing
"stuck" assignments.
2003-03-13 20:59:31 +00:00
mits d48f938420 New translation added. 2003-03-13 15:22:43 +00:00
mits ddde5a8c82 New translation added. 2003-03-13 14:17:21 +00:00
gregb_cc c0f728ba9e code formatting change: switched from alternative syntax to using {} 2003-03-12 21:40:47 +00:00
gregb_cc 6908193151 speed improvement in smilie_replace. It is now almost as fast (within 5-10%) of
the version that used global smilie definitions.
2003-03-12 21:37:05 +00:00
gregb_cc 617778f2d3 Added benchmark and test for replace_smilies 2003-03-12 20:36:55 +00:00
moodler 4c31e7cfba Removed main_frame 2003-03-12 08:37:42 +00:00
moodler d4be5253aa Making a consistent download link for uploaded resources (same as web page) 2003-03-12 08:02:05 +00:00
moodler 2d8cf6799a Whoops! Accidentally checked in a quick hack I did for someone. 2003-03-12 07:49:54 +00:00
moodler c9082a8c2f Integrated the default redirect message delay from Greg B 2003-03-12 07:44:29 +00:00
moodler f82c2d428a Modified Greg's work to:
- rename the main_frame variable to framename, because it
       - might have caused some confusion
       - none of the global variables have underscores
  - put the config in the config table, with a default of _top
2003-03-12 07:36:22 +00:00
gregb_cc 2ea9027bc4 Small cleanup of smilie replacement.
This change removes the smilie variable assignment from the global namespace.
This change retains the original user input as the alt text.
The main reason for this change is to make it possible for me to use my
make_class function on weblib.php (still need to do something about the defines
though).
2003-03-12 03:42:44 +00:00
gregb_cc 08b3606390 This is a first attempt to make moodle frame safe.
I've added the variable CFG->main_frame to config-dist.php, and replaced _top
targets with the variable in all the php files.  HTML files, like those in the
documentation, have not been modified, as they are not (yet) parsed.

The variable should probably get moved into the config table, and get some
documentation.

I've also included, but commented out, a slight change in weblib.php, which
would guarantee that messages would be seen before redirecting the user (unless
delay intentionally set to 0 when redirect is used).
2003-03-11 21:35:12 +00:00
moodler 754b76fe65 Whoops, paca70! You accidentally jumped a month forward in the date. :-)
We need to increment the version.php file slowly now until time catches up.
2003-03-11 06:04:28 +00:00
moodler 3ac1dedc35 Added some popup help for topic/week summaries 2003-03-11 05:57:00 +00:00
moodler 1e5a2bf584 You can now use Richtext editor to edit section texts, plus the page is a
bit more consistent now
2003-03-11 05:43:39 +00:00
mits 8f6dcdbaa4 no message 2003-03-11 04:24:32 +00:00
mits 5c34d1e3a4 New translation added. 2003-03-11 04:19:12 +00:00
moodler 8fb2f0fa1e Corrected typo 2003-03-10 14:05:10 +00:00
moodler ac234d0262 Tidied up and rearranged a little 2003-03-10 14:02:12 +00:00
moodler fe32b83bbf Improvements to explain about AcceptPathInfo 2003-03-10 13:59:06 +00:00
moodler 76a359ba93 Added something for Apache 2 (to make 'slasharguments' work)
<IfDefine APACHE2>
    AcceptPathInfo on
</IfDefine>
2003-03-10 13:39:56 +00:00
paca70 7563a073c3 rtf-editor had mixed up some files 2003-03-07 17:55:44 +00:00
villate d106f1d9ae Improved translation of "search forums". 2003-03-07 16:15:30 +00:00
moodler 9a9a2907c2 Add a target to the "made with moodle" link to avoid confusing students 2003-03-07 15:09:12 +00:00
paca70 c605097983 RitchText editor had mixed up all php code. 2003-03-07 07:04:54 +00:00
mits 25f3420857 New translation added. 2003-03-06 17:48:25 +00:00
paca70 5fcda72588 updates 2003-03-06 16:39:17 +00:00
moodler e00f0f9f51 Added missing styles and so fixed bug of display of generalbox 2003-03-06 08:54:28 +00:00
moodler 548daac7d9 Some fixes sent in by "Adriana Beal - Vydia Tecnologia" <adriana@vydia.com.br> 2003-03-06 02:01:05 +00:00
mits 19bbe230f6 Polished 2003-03-05 14:12:48 +00:00
mits 66ea5000db New translation added. 2003-03-05 13:11:05 +00:00
mits 706e019764 Polished 2003-03-05 13:10:37 +00:00
paca70 1b7f43a40a updates 2003-03-05 13:01:29 +00:00
mits 247612cfe7 New translation added. 2003-03-05 03:29:32 +00:00
mits 049100796f Polished 2003-03-05 02:06:49 +00:00
compuproggy b1ca03e9cf *** empty log message *** 2003-03-04 12:45:58 +00:00
compuproggy cdf198d345 New Translations 2003-03-04 12:30:47 +00:00
moodler 70e5e91e9e Remove some old save_sessions 2003-03-04 09:01:26 +00:00
mits 7470fb3782 New translation 2003-03-03 17:55:19 +00:00
mits d831f93c73 no message 2003-03-03 17:54:27 +00:00
mits 1862b9eb54 New translation added. 2003-03-03 17:53:40 +00:00
moodler 0d1a40f00a Updated versions only 2003-03-03 17:48:39 +00:00
moodler 31ce4b538c Fixed quotes on column 2003-03-03 17:46:53 +00:00
moodler df103e8212 Questions now have a defaultgrade column (which defaults to 1)
... this grade is used as the default grade when adding questions
to a quiz.

At the moment it's just so that some imported questions can have
different defaults, but a field should be added to all question
editing pages.
2003-03-03 17:43:13 +00:00
moodler c363d9d11f Added QUIZ_DEFAULT_SCORE ... later this will be a quiz option 2003-03-03 17:05:35 +00:00
moodler 9314930280 Slight rewording 2003-03-03 13:23:50 +00:00
moodler 43f2302fdf Started a Frequently Asked Questions page 2003-03-03 13:18:34 +00:00
mits c4eb7e254f New translation added. 2003-03-02 06:10:16 +00:00
mits cd4b225bd0 no message 2003-03-02 01:13:47 +00:00
mits f84148d015 *** empty log message *** 2003-03-02 01:12:11 +00:00
mits d57d61e3a7 New translation added. 2003-03-02 01:10:16 +00:00
mits b365072d7c New translation added. 2003-03-01 16:54:36 +00:00
mits 687f38368e no message 2003-03-01 16:54:06 +00:00
paca70 9eee5e0559 Updates 2003-03-01 16:45:45 +00:00
mits 44ac5310a8 New translation added. 2003-03-01 14:10:43 +00:00
moodler 068e57cebc Courses are forced to have unique shortnames (see bug 299) 2003-03-01 12:52:04 +00:00
moodler b4b7572b9a new strings 2003-03-01 05:16:20 +00:00
moodler 14bdb2387a Sort question list by question type 2003-03-01 05:11:44 +00:00
moodler 02986c8002 Can now specify a number of random match questions to create automatically
during import.
2003-03-01 05:08:03 +00:00
villate 7169069bd5 Initial translation. 2003-02-27 19:27:06 +00:00
moodler 45930f2db5 Add support for Taiwan Chinese 2003-02-27 12:15:00 +00:00
moodler 3e7542449b Removed save_session() - no longer necessary 2003-02-27 02:49:18 +00:00
moodler 7a361c8b55 Removed save_session() - no longer needed. 2003-02-27 02:46:37 +00:00
moodler 55271c3047 Removed save_session() - no longer needed 2003-02-27 02:43:34 +00:00
moodler 08c17336a7 Fixed $USER and $SESSION to be pointers to the real $_SESSION
variables, so there's no longer a need for save_session  (thanks,Petri)
2003-02-27 02:38:55 +00:00
paca70 4e94d2608b updates 2003-02-26 19:18:56 +00:00
moodler ff20ee79f6 Use caching if necessary, so that teachers can't lock themselves out
accidentally during the current session.
2003-02-26 05:58:44 +00:00
moodler d92a53d182 No need for ismainteacher() ... it's enough to check that the user is
a teacher in a course, and a creator.
2003-02-26 05:55:31 +00:00
moodler c0f271aa5c Cleanups for course creator. 2003-02-26 04:18:46 +00:00
villate 12faa2684e Fixes the name of the "eachuserforum" type. 2003-02-25 17:39:06 +00:00
villate f8b8aa347b Initial translation. 2003-02-25 17:30:18 +00:00
villate 111f984300 Fixes an HTML syntas error. 2003-02-25 17:07:57 +00:00
villate ab202116b9 Initial translation. 2003-02-25 17:06:37 +00:00
moodler f02ca41cca Removed space from end of file 2003-02-25 17:04:40 +00:00
moodler 06334957fa Complete translation into Slovak! From Pavol Jackulik. 2003-02-25 16:54:07 +00:00
villate 66d323459e Translate "post" as "mensagem", "isolated knowledge" as "aprendizagem
individual" and "connected knowledge" as "aprendizagem colectiva".
2003-02-25 16:52:20 +00:00
villate 7dd3b70b10 A few changes in the translation 2003-02-25 16:08:58 +00:00
moodler 610b9de6f7 Draft-only version from Les 2003-02-25 12:43:56 +00:00
paca70 d7466bdecb Redirect teachers to course after coursecreation. 2003-02-25 10:45:37 +00:00
paca70 44996d00f9 Fixed some typos 2003-02-25 10:31:59 +00:00
paca70 38620c460b One strange 'o' jumped in.. 2003-02-25 07:24:48 +00:00
moodler 5b337cdf3b No need for course creators to have a link to the admin page. 2003-02-25 04:22:57 +00:00
moodler 38972a40a4 Some English spelling/grammar fixes. 2003-02-25 04:03:49 +00:00
moodler 8b2fc31ce0 Fix link in admin links 2003-02-25 03:57:14 +00:00
moodler 2fdb54b819 Fixed bug in table creation - (it was creating a null table!) 2003-02-25 03:53:50 +00:00
moodler 0ca1825cab Tidied up some of Petri's code :-/ 2003-02-25 03:46:06 +00:00
paca70 ea81ca5f6d README updates 2003-02-24 21:09:53 +00:00
paca70 6c891932c0 Some updates 2003-02-24 20:06:53 +00:00
paca70 9f9f92c6df Updates to Finnish translation and some correction to English one. 2003-02-24 19:00:39 +00:00
paca70 1924074c76 Added support for nonadmin course creation.
Course creators are managed by /admin/creator.php , same way that admins.
Or if authetication module have 'auth_iscreator'-function (right now only ldap-module have) ,
users are added to creators at login time.
2003-02-24 18:48:55 +00:00
moodler 38b68c5d6f More detail, clearer description 2003-02-24 10:45:49 +00:00
moodler 86bce68fa8 New table for Postgres 2003-02-24 10:42:07 +00:00
moodler 95dbc030a8 First version of code to implement new "Random Matching" type
of questions.  These use 2 or more short answer questions at
random to construct a questions where you have to match
answers to questions.  Only lightly tested so far.

Quiz questions can now be edited with Richtext editor.

Sundry little fixes along the way.
2003-02-24 10:37:56 +00:00
moodler 2b051f1c8e Changes to modify_database() so it works with string input 2003-02-24 09:36:15 +00:00
moodler ee0e5d57e2 Two new functions for randomizing arrays 2003-02-24 09:34:10 +00:00
moodler 663f70777a Restored Davide Suraci info 2003-02-21 09:19:22 +00:00
moodler 8f8e4f01b0 Updates and fixes, mostly from Paolo Lariccia. 2003-02-21 09:07:44 +00:00
paca70 652fd67246 Reverted to older version, those changes should never got to CVS. 2003-02-20 22:09:59 +00:00
paca70 f9a14cc720 Show creation option when available. 2003-02-20 21:55:14 +00:00
paca70 5f2c35db18 Added support for usercreation from Moodle to authentication module.
Works currently only with ldap-module (tested with e-directory), but
 other modules could be extended too by
adding following functions:

function auth_user_exists ($username) {
//returns true if given username  already exists on authetication database
}

function auth_user_create ($userobject,$plainpass) {
//create new user to authentication database
//in inactive state (if posible)
//returns true if user is created
}
function auth_user_activate ($username) {
//activate external user  after email-address is confirmed
//returns true if user is activated
}
2003-02-20 21:39:51 +00:00
moodler 47623d4f8f Portuguese, first version, contributed by Jaime Villate. 2003-02-19 11:12:22 +00:00
paca70 5443a18b8f Finnish installation instructions. 2003-02-18 22:52:55 +00:00
paca70 4c398dda96 updates
CV: ----------------------------------------------------------------------
2003-02-18 10:20:42 +00:00
paca70 79ba7581de Fixed some typos and making translation more consistent. 2003-02-18 08:41:49 +00:00
moodler 5a4d292bca Added changes to table_column from Petri Asikainen for Postgresql 7.3 2003-02-18 07:44:26 +00:00
moodler c2a96d6b32 Fixes for the use of LIMIT in SQL for Postgres 7.3 (from Petri Asikainen) 2003-02-18 03:16:07 +00:00
paca70 e10ed4f09f updates 2003-02-17 22:19:38 +00:00
moodler 14c7248d3c Select all 2003-02-17 18:14:06 +00:00
moodler a01b257195 Little changes 2003-02-17 18:13:41 +00:00
moodler dc1dc6e973 Added function to check everything on a page 2003-02-17 17:02:56 +00:00
paca70 035aa1848c updates 2003-02-17 13:35:55 +00:00
moodler 734d2c9887 Fixes to survey_get_responses() to make it work better with PostgreSQL
(from Petri Asikainen)
2003-02-17 08:35:51 +00:00
moodler 2f05b46ec9 Added language menus to top of login pages 2003-02-16 09:42:06 +00:00
moodler a59cbb7851 Update version 2003-02-16 09:25:02 +00:00
moodler 811c88b32f Fix short column 2003-02-16 09:24:25 +00:00
moodler 2a231ed650 Remove English word 'ago' 2003-02-16 09:22:52 +00:00
moodler c4e78a1b60 Tidy up the import screen 2003-02-16 08:03:55 +00:00
moodler 68fefdbe14 Change MC answers to letters a, b, c etc ... 2003-02-16 08:03:17 +00:00
moodler 49220fa70c Various quiz changes. Most importantly is the new framework for importing
quiz questions.   Importing works but is still being tested.
2003-02-16 07:08:57 +00:00
moodler 4270bba267 Fixed navigation link to login page 2003-02-15 02:58:34 +00:00
paca70 01a660a583 Updates 2003-02-12 10:27:21 +00:00
moodler 3f3960656d Fixed link to picture file in print_picture_file 2003-02-11 01:53:10 +00:00
moodler 434f33c00a Fixed license link 2003-02-11 01:35:31 +00:00
rkingdon 402eb657a6 peer graded assignment version 1.01 2003-02-06 21:43:57 +00:00
moodler 40f1246b14 Missing semicolon 2003-02-06 18:07:31 +00:00
moodler de2146b276 Note for something that needs to be fixed 2003-02-06 06:37:10 +00:00
moodler 73f8658c36 Provide the possibility that the format of a text is not defined properly 2003-02-05 12:41:59 +00:00
moodler bcdfe14e02 Whoops, fixed some obvious bugs when getting slash arguments 2003-02-05 10:52:55 +00:00
moodler eaa50dbc83 Removed some redundant code when looking for slash arguments (use me() function instead) 2003-02-05 10:48:13 +00:00
minkowski ac68f7ffc8 Completed Thai Translation 2003-02-04 04:35:17 +00:00
minkowski acf0f21ab1 rephrased quite a number of phrases 2003-02-04 04:12:30 +00:00
moodler ecc114ee3b Add better escaping for double quotes 2003-02-02 02:37:09 +00:00
rkingdon f879140423 peer graded assignment version 1.0 2003-02-01 22:04:27 +00:00
mits 08ffd31db1 New translation added. 2003-02-01 18:28:10 +00:00
rkingdon 49c4b1f779 Peer graded assignment - English Language file version 1.0 2003-02-01 17:53:41 +00:00
moodler 498d403283 Add some timing 2003-02-01 01:36:31 +00:00
paca70 56a4ed732a some updates 2003-01-31 11:05:43 +00:00
paca70 33ff2cca85 *** empty log message *** 2003-01-31 10:43:24 +00:00
moodler fced815cd7 Improved me() function 2003-01-30 15:52:38 +00:00
moodler db11e52dec Allow tags for embedded objects 2003-01-28 03:55:55 +00:00
moodler b35e8568ff Ignore all files and directories beginning with "." 2003-01-28 03:34:26 +00:00
moodler 7750f58e0c Explicitly set the character set 2003-01-28 03:06:52 +00:00
moodler f2e19ba41d Added some missing PHP variables to make it consistent with lib/htaccess 2003-01-28 03:06:20 +00:00
moodler d686bf500b Added some checks for PHP server variables - warnings are printed that
prevent installation until these are fixed.
2003-01-28 02:52:13 +00:00
moodler a09b86a693 Use On and Off instead of 0 and 1 2003-01-28 02:28:17 +00:00
moodler 0d3cbf4cca Changed some settings from "1" to "On" 2003-01-28 02:27:18 +00:00
moodler 1b27d92ad4 Old version of this file ... Ray will replace it shortly 2003-01-27 02:50:34 +00:00
moodler 89600ce15f Don't need this either 2003-01-26 16:59:39 +00:00
moodler 34afe40fb5 Removing English versions in the German lang pack 2003-01-26 16:58:55 +00:00
compuproggy c74a276913 *** empty log message *** 2003-01-26 12:22:09 +00:00
compuproggy a2da49f38b A better german version. Thx to a few modified translations of Michael Schneider 2003-01-26 12:08:01 +00:00
moodler 750ab759ed Slightly better robustness for notice() when there is no referer 2003-01-26 06:04:14 +00:00
compuproggy b49d73511b *** empty log message *** 2003-01-25 13:01:16 +00:00
moodler e79ddee2ad Smaller random number for smaller machines. :-) 2003-01-24 08:47:20 +00:00
moodler 03f06a1412 Remove the ampersand thing ... it was actually a Mozilla display bug. :-) 2003-01-24 08:41:18 +00:00
moodler 9223049919 Fixes to insert_record for inserting null values.
Also some unfinished changes to table_column ... not recommended for use right now
2003-01-24 07:51:55 +00:00
moodler 54d0590b47 Robustness fixes 2003-01-24 07:48:54 +00:00
moodler eb58acca4d New sessiontimeout config variable to set the timeout for sessions 2003-01-24 04:31:58 +00:00
moodler 7d8f674dea Implemented a safer version of stripslashes called stripslashes_safe.
This will only fix these three cases:

  \'
  \"
  \\

and leaves all other backslashes alone.  Should fix problems in forums
and forms where backslashes were sometimes disappearing from windows
paths like C:\temp - usually only in the richtext editor, but still.
2003-01-23 13:07:49 +00:00
moodler f3e48e6ef0 Solve this silly mpersand display problem 2003-01-23 05:03:27 +00:00
moodler 66fef9f99f If comment contains quotes then it can cause problems when
an assignment is uploaded.  Bug fixed by Ray Kingdon.
2003-01-23 04:23:05 +00:00
moodler 48d38fad63 Some robustness fixes 2003-01-23 02:50:38 +00:00
mits 878ece7eca New translation 2003-01-22 18:39:17 +00:00
mits 04222f70a3 no message 2003-01-22 18:38:19 +00:00
mits 5ca400f257 no message 2003-01-22 14:27:45 +00:00
mits 071df54ffd Modify strftime format for more natural Japanese way. 2003-01-22 14:26:35 +00:00
moodler dd98f2e261 Ignore the fonts folder 2003-01-22 12:03:22 +00:00
moodler 1042139455 Adding correct character set for Japanese.
These pages have to specify this stuff manually so that they work
even when not displayed within Moodle.

Nice job on the install translation, Mits!
2003-01-22 05:34:25 +00:00
moodler a42fcc51cb Removed all additional stuff for now 2003-01-22 04:15:29 +00:00
moodler 9f44d972c7 Add slashes to data pulled out of external source, just in case O'Brien logs in :-) 2003-01-22 01:55:54 +00:00
mits 5c71840819 New translation 2003-01-21 19:09:22 +00:00
moodler 7ba3fb64c9 More changes ... can't mess with the GPL. :-( 2003-01-21 16:13:23 +00:00
moodler cfe22ac921 Clean up 2003-01-21 13:22:05 +00:00
moodler eca6a3b781 Even better :-) 2003-01-21 12:57:10 +00:00
moodler 2d05c39303 Further rewording ... it's getting better I think. 2003-01-21 11:46:03 +00:00
moodler a43d392c69 Some info about this directory 2003-01-21 09:21:20 +00:00
moodler d60131c3c9 Changes to use fonts in language packs, and also to use a language
decoding function if necessary
2003-01-21 09:17:10 +00:00
moodler f6e653e06a Moved fonts into language pack so that other languages can have
proper displays in graphs
2003-01-21 07:27:01 +00:00
moodler bc43adf16d Slight changes to the wording of this new stuff 2003-01-21 04:52:17 +00:00
moodler b1e6dcb26c Rewritten for clarity 2003-01-21 03:08:37 +00:00
moodler ce9f2be2f9 Added new clause to Copyright about the use of Moodle logos. 2003-01-21 02:33:48 +00:00
moodler 86b32d51d9 Fixed a string 2003-01-20 15:55:41 +00:00
moodler 7d2e5b6595 Remove name on submit button 2003-01-20 15:43:09 +00:00
moodler 4e2767f8e0 Add times 2003-01-20 14:23:09 +00:00
moodler 17654e3845 Use $CFG->directorypermissions for new directories 2003-01-20 14:04:33 +00:00
moodler 63dddf351a Better control over directory permissions: $CFG->directorypermissions 2003-01-20 14:04:06 +00:00
moodler 2e6d42735f Added new configuration value $CFG->directorypermissions to set the
permissions for new directories created in dataroot
2003-01-20 14:03:11 +00:00
moodler 5a99c0de4d Fixes to make it work on safe mode servers, but also better control of
directory/file permissions.
2003-01-20 13:40:02 +00:00
moodler de5aabd2d2 Password had no default 2003-01-20 09:30:24 +00:00
moodler 0f61744597 Language editor uses current language (ie even the session language) 2003-01-20 09:28:38 +00:00
moodler 832ead4969 Fixed times 2003-01-20 09:23:06 +00:00
moodler 28e30091f0 Always. 2003-01-20 09:03:35 +00:00
moodler 25786a263a Throw away session language when logging in (use users language instead) 2003-01-20 09:00:36 +00:00
moodler caf7ccd44f Info 2003-01-20 08:51:50 +00:00
moodler 2fafa4bf31 Robustness fixes 2003-01-20 08:49:00 +00:00
moodler a53f918172 SOme more fixes - needs more 2003-01-20 08:40:41 +00:00
moodler b9fcddd16d FIxed some acutes 2003-01-20 08:38:30 +00:00
moodler 789a2500eb Slightly better formatting ... needs work still I think 2003-01-20 08:22:53 +00:00
moodler 3e9b5d5a90 Moved session lang setting into setup.php (works on all pages) 2003-01-20 08:09:25 +00:00
moodler 858156a995 Take session language into account when setting locale 2003-01-20 08:06:09 +00:00
moodler a38e24a544 Rearranged menu 2003-01-20 08:03:32 +00:00
moodler a5e3644bd2 Add setting of language to home page, and setting of new user accounts
to whatever the current language is.
2003-01-20 08:01:46 +00:00
moodler 0b949a6d0c Whoops, forgot a debug statement 2003-01-20 07:30:47 +00:00
moodler 1f3eb3191a More robustness on recover-password stuff 2003-01-20 07:16:23 +00:00
moodler 4028fcb159 Added Rodrigo 2003-01-20 07:13:25 +00:00
moodler 37208cd23a Some robustness 2003-01-20 07:13:02 +00:00
moodler dde4495df4 Update the version 2003-01-20 07:11:39 +00:00
moodler dc8791f367 Undoing recent change to insert_record() because of some problems 2003-01-20 07:10:14 +00:00
moodler 207190aa87 Make sure config array is always initialised before use 2003-01-20 06:43:44 +00:00
moodler c9d4e6da89 Remove old doclang variable 2003-01-19 12:37:56 +00:00
moodler 3db3acfb99 Instead of using doclang, use $SESSION->lang, and make it override other
language settings.  This should fix documentation display, but also will
be how setting registration languages and login languages works
2003-01-19 12:32:55 +00:00
mits 69ae05837c New translation 2003-01-19 12:00:06 +00:00
mits ecb1e78aaf no message 2003-01-19 11:26:28 +00:00
moodler a7e838796a Rogue tabs 2003-01-19 06:07:05 +00:00
moodler fe2874294c If we create a directory, then chmod it to protect the contents. 2003-01-19 05:54:08 +00:00
moodler 3c72e2f9c9 Some changes to insert_record to help Postgres 7.3 2003-01-19 05:46:49 +00:00
moodler e01b5c0e77 Small fix to make this script more usable on Multi-Byte languages like zh_hk 2003-01-19 05:25:31 +00:00
moodler b5fdd4c60a Updates 2003-01-19 05:05:45 +00:00
moodler 842b894b91 New translation Argentinian Spanish from Rodrigo Vigil 2003-01-19 04:57:25 +00:00
moodler 67c6f56f05 New updates for Spanish (esp. all-new help files) from Antonio Navarro 2003-01-19 03:42:29 +00:00
moodler 7fb92a3388 Changed Czech code 2003-01-19 01:23:53 +00:00
coolbit 59e6addbc9 add some new strings 2003-01-18 15:50:06 +00:00
moodler 2e43b5d987 Better notification and continue button is more useful 2003-01-18 14:24:40 +00:00
coolbit 319aa49306 update date formats 2003-01-18 14:20:22 +00:00
moodler 8f94fbcd4a Add slashes when printing correct Windows path to problems with backslashes 2003-01-18 14:05:52 +00:00
mits a9630e4f60 no message 2003-01-18 09:29:28 +00:00
mits ca791cb4a5 New translation added. 2003-01-18 09:26:55 +00:00
moodler cf194fc831 Latest updates - compatible with 1.0.8 2003-01-18 03:30:57 +00:00
moodler fdf5a1e2fb Changes to Course catagery editor to prevent duplicates 2003-01-17 02:03:42 +00:00
moodler 41b95af210 Strip slashes from short answers before comparing 2003-01-16 15:19:49 +00:00
moodler 536d3e22be Added Wales 2003-01-16 12:17:45 +00:00
moodler 722d4d1e14 Cleaned up the logic a bit 2003-01-16 11:57:34 +00:00
moodler d57bc55729 Updating the date 2003-01-16 04:06:23 +00:00
mits 83948780bc Update for New Date formatt. 2003-01-16 03:58:06 +00:00
moodler 2e41586e07 Added default date/time strings to all languages.
All European languages have now been changed to 24 hr time,
because AM and PM were not being displayed correctly.

Language editors should check these strings to see if there is
a more natural way to format these dates in their language.
2003-01-16 03:15:21 +00:00
moodler 7f43f576fc Updates from Hans de Zwart 2003-01-15 15:07:23 +00:00
moodler 7684f1efcc Minor fix with display of %% in language strings 2003-01-15 11:28:54 +00:00
moodler dcde9f020a Displayed time formats are now stored in lang files
(see the new strftime* strings) so they can be customised per language
2003-01-15 10:55:54 +00:00
moodler 9277dbd42d Bummer ... I introduced a new bug in 1.0.8.1 with pathinfo. Fixed. 2003-01-15 05:32:14 +00:00
moodler 1c418003d7 FIxed logic problem when checking has_default variable in the database
when inserting new data
2003-01-14 15:36:20 +00:00
moodler 7af6281f22 Don't bother working with empty course modules (can happen when an
module is uninstalled improperly)
2003-01-14 14:56:57 +00:00
moodler 2c104c0152 Fixed redirection when user not completed yet in some instances when
using external authentication
2003-01-14 14:54:45 +00:00
moodler ac0ac75240 Made this a bit clearer 2003-01-14 11:24:43 +00:00
moodler c078c29bb2 For assignments without a timemodified stamp, add one when graded 2003-01-14 03:01:10 +00:00
moodler dfcfb72876 Removing these files again 2003-01-14 01:47:27 +00:00
compuproggy a9a55d693e *** empty log message *** 2003-01-13 21:00:56 +00:00
moodler ab387834ab Development phase .. hold on to your hats! :-) 2003-01-13 15:26:57 +00:00
moodler 9ae687afb0 A little more robustness 2003-01-13 14:11:05 +00:00
moodler d98228e497 More checks to solve support requests before they happen. 2003-01-13 14:05:29 +00:00
moodler 13770d0c36 More fixes for robustness 2003-01-13 12:16:46 +00:00
moodler 11159c3c60 Fixed some PHP warnings 2003-01-13 12:14:47 +00:00
moodler 1063d08854 Add info that may help solve a bug on some old servers 2003-01-13 12:06:33 +00:00
moodler bcb5c5095e Fixed the default locale 2003-01-13 10:03:17 +00:00
moodler 94e3411897 Slightly more robust function 2003-01-13 02:42:57 +00:00
moodler 03c17ddfec Fix for dates (the last?) 2003-01-13 02:37:47 +00:00
moodler 3fb5b92095 RELEASE 1.0.8.1 2003-01-12 07:16:33 +00:00
moodler 29f18614e2 Updated version and release notes 2003-01-12 07:11:44 +00:00
moodler 6ed3da1da4 Cleaned up file argument processing a bit 2003-01-12 06:53:25 +00:00
moodler 1685298e60 Removed a line from config.php 2003-01-12 06:31:07 +00:00
moodler 105afdcb2e Daily changes 2003-01-12 03:35:58 +00:00
moodler 353439a354 Slight cleanup 2003-01-11 14:01:39 +00:00
moodler 6b72b9a911 A small standalone test program to test session support 2003-01-11 13:58:17 +00:00
moodler 704ac9fe76 Slightly clearer documentation 2003-01-11 05:29:49 +00:00
moodler bee00f48aa Closing sessions may fix some problems on WIndows/CGI systems ... 2003-01-11 03:03:54 +00:00
moodler 4738ab0d37 Daily changes 2003-01-10 13:47:48 +00:00
moodler f8c898243d Editing with Richtext wasn't working ... fixed now (typo) 2003-01-10 13:07:41 +00:00
moodler f978ad0acb Put in a check for the sessions directory 2003-01-10 07:33:26 +00:00
moodler d96b410816 More details about requirements 2003-01-10 07:22:34 +00:00
moodler 6c14c3948f PLease read the README.txt in this directory 2003-01-10 06:29:40 +00:00
moodler 61dcfc31e0 Updated version number 2003-01-10 05:50:34 +00:00
mits 5af670da9a no message 2003-01-10 05:44:51 +00:00
moodler 3db75c62fc Fix when making timestamps from web selector 2003-01-10 05:41:20 +00:00
moodler 39e018b338 Fix for display of date selector, and also for finding server name from
environment
2003-01-10 05:40:35 +00:00
mits a6602862fb Modified 2003-01-10 05:29:31 +00:00
moodler c897eac5e4 Some small robustness things, and a new style for quiz feedback text 2003-01-08 09:08:05 +00:00
moodler 1079c8a872 More robust when dealing with a plugin module that isn't readable 2003-01-08 09:07:07 +00:00
moodler 4e080c888a Missed something 2003-01-07 14:52:51 +00:00
moodler cd8ecdb0b9 Fixed typo 2003-01-07 14:48:06 +00:00
moodler af4542c29e Cleaned up, and improved the logic to avoid very rare case
when secret keys matched on two users
2003-01-07 14:46:12 +00:00
moodler 7dba8c384f Whoops forgot the date 2003-01-06 14:17:05 +00:00
moodler 8375fe4f88 More touch-ups 2003-01-06 14:15:45 +00:00
moodler 5cc1aff3db Robustness fixes 2003-01-06 14:01:56 +00:00
moodler ce78926df0 Small robustness fixes 2003-01-06 13:55:37 +00:00
moodler 8af3e37948 Slight increase in log field size 2003-01-06 13:40:05 +00:00
moodler 5be03da1e8 New file 2003-01-06 12:36:35 +00:00
moodler 0b963b9041 Tidying up old files 2003-01-06 12:36:08 +00:00
moodler 8d61f85e32 Update 2003-01-06 12:31:39 +00:00
moodler df8dd5f479 New strings from Fabricio 2003-01-06 12:29:52 +00:00
moodler 432809b1d6 Updating version to get ready for tonight 2003-01-06 09:29:06 +00:00
moodler 5674507b4d Slightly more rboust 2003-01-06 08:47:57 +00:00
moodler 58d6d79145 Default values 2003-01-06 08:44:03 +00:00
moodler 042a64f050 Missing file 2003-01-06 08:42:59 +00:00
moodler 72ae3a0eb4 Updates 2003-01-06 08:42:08 +00:00
moodler 20f47494ae Framed docs can now select a named anchor in a page 2003-01-06 08:23:36 +00:00
moodler bfe89310ce Link from admin page to docs 2003-01-06 08:23:13 +00:00
moodler 1b73ea5799 Link from themes page to themes docs 2003-01-06 08:22:49 +00:00
moodler c4028ac12b Garden theme by spiggy: http://phpgirl.com 2003-01-06 07:39:19 +00:00
moodler a657c48b96 A little fix to workaround what seems to be an ADOdb bug when using
database authentication
2003-01-06 05:37:26 +00:00
moodler 57b0a28bfa Latest versions from Sebastien 2003-01-06 03:28:44 +00:00
moodler f24a9b78eb String changes 2003-01-06 02:57:09 +00:00
moodler d9a9064e27 More rogue strings 2003-01-06 02:56:48 +00:00
moodler 3bd402300e Shot down some rebel strings 2003-01-06 02:43:50 +00:00
moodler 6a738db7b5 Added 4.3.0 bug compatibility 2003-01-06 01:44:49 +00:00
moodler 654eddf086 FIxed a missing quote, and fixed the highlight colour 2003-01-05 16:46:29 +00:00
moodler e2b5b53e46 READ ME ;-) 2003-01-05 16:34:34 +00:00
moodler 25a3810f01 Removing unnecessary English versions of these files (see README) 2003-01-05 16:33:52 +00:00
moodler 1ccee9fdc3 Updated 2003-01-05 16:15:25 +00:00
moodler d768dee320 Update versions 2003-01-05 14:23:30 +00:00
moodler b20f74c94a Rmove bad coursemodule error - not important enough to show 2003-01-05 14:20:33 +00:00
moodler b0e3a92523 Clean sweep through all the important changing all include(), include_once()
and require() to require_once()
2003-01-05 14:19:20 +00:00
moodler af60ea8a86 Fixed a link 2003-01-05 13:19:21 +00:00
moodler 8b3235f57f Fixes to use new mysql module with frame 2003-01-05 12:00:57 +00:00
moodler bdd2e029a0 Fixes dependency on standardlogo 2003-01-05 11:08:21 +00:00
moodler c07e87c6ee New standard white theme 2003-01-05 11:02:51 +00:00
moodler 6422da3570 Smaller image and links break out of frames 2003-01-05 10:23:49 +00:00
moodler 92a419a25c Make frame width a variable 2003-01-05 10:10:05 +00:00
moodler 5dc09fb6ee Cleaned things up somewhat and made it more generic 2003-01-05 09:53:30 +00:00
moodler 8bbba2486c Initial version of "Poweraid" theme from Bjarne Varoystrand aka Black Skorpio
with a few half-finished changes ... still needs work which I'm doing right now...
2003-01-05 07:23:04 +00:00
moodler f5789d86aa Updating to current info 2003-01-05 07:04:24 +00:00
moodler 7d0d7f4665 Initial version by Tom Murdock 2003-01-05 07:02:39 +00:00
moodler ed5e0c04ae More info 2003-01-05 06:52:55 +00:00
moodler f8b3c31f28 Update the version 2003-01-05 06:46:21 +00:00
moodler 607809b3ba OK a number of small changes here.
Firstly, I'm replacing all use of old-style global variables like
$HTTY_REFERER with their new-style equivalent $_SERVER["HTTP_REFERER"]
Also using $_POST instead $HTTP_POST_VARS  etc

Secondly, if gdversion == 0 (ie GD is not installed) then:

 - users are not even allowed to upload new images
 - graphs now just print a message instead of failing.

this allows Moodle to still be used even if GD is not present
2003-01-05 06:45:20 +00:00
moodler 3b7c1de95e Changes to improve robustness of uploads, and make things compatible
with PHP 4.3.0.  Also some translation fixes with upload strings.
2003-01-05 04:20:32 +00:00
moodler 8556ae8641 Language credits 2003-01-05 04:19:35 +00:00
moodler 087b81fc86 Updated Dutch strings. 2003-01-05 04:14:45 +00:00
paca70 da95fdd658 checkin for translation 2003-01-04 17:20:10 +00:00
paca70 fcbea507c4 Just checking in for translation. 2003-01-04 17:16:37 +00:00
paca70 0b9e04f07e more updates 2003-01-04 17:09:00 +00:00
moodler 70d4cf8267 Ah!! At last, the dreaded off-by-one date bug, squashed. 2003-01-03 16:58:37 +00:00
moodler 89885b582d Upgrade version for Beta Test version 2003-01-03 16:38:46 +00:00
moodler 17e6df458d Fixed display of headers while updating modules 2003-01-03 16:35:51 +00:00
moodler 1d2603b1e3 Make sure grades are always rounded 2003-01-03 16:05:44 +00:00
moodler a2fe7cc0dc Changed three fields to avoid SQL problems with PostgreSQL etc:
quiz_truefalse:  true->trueanswer  and false->falseanswer
quiz_questions:  type->qtype
2003-01-03 16:01:48 +00:00
moodler a3fb1c450a New function table_column() to add or alter a column in any database. 2003-01-03 15:31:30 +00:00
moodler d2d7c864de Mention language count 2003-01-03 14:39:13 +00:00
moodler 3cc9937d3c More stuff 2003-01-03 13:05:40 +00:00
moodler e53b0823ab More robust checking of returned $rs 2003-01-03 06:44:35 +00:00
moodler 8663bfdb08 Display months in local language for date_selector 2003-01-03 06:43:12 +00:00
moodler 15ac90653d Replaced &sect with &amp;sect to avoid some buggy browsers 2003-01-03 05:33:17 +00:00
moodler a86b60ddd9 Changed a link 2003-01-03 03:25:48 +00:00
moodler 3250c50889 Removed German help files 2003-01-03 03:03:19 +00:00
moodler 5f55de1007 New Dutch translation from Hans Zwart and Jacob Romeyn! 2003-01-03 02:54:50 +00:00
moodler 14217044a5 Some little fixes 2003-01-02 15:25:51 +00:00
moodler 5422d75fcb Hmmm database name causing some problems ... 2003-01-02 15:12:34 +00:00
moodler e1bf736ffa Fixed that damn www linking problem with words like wwwroot :-) 2003-01-02 14:54:33 +00:00
moodler 36b4f9852e buggy_referer is dead! Long live buggy_referer!
Should be fixed now.  As a bonus, I've removed all the uses of
HTTP_POST_VARS from all scripts.

All forms should use the new data_submitted() function to collect
form data (it does the match_referer thing internally now).

Much nicer.
2003-01-02 14:49:23 +00:00
moodler fb964e0c78 Some robustness fixes. 2003-01-02 13:08:20 +00:00
paca70 ba79f7429e Some updates, more to come. 2003-01-02 12:45:39 +00:00
moodler fa3ba0f6c1 Slightly more efficient way to open the database connections 2003-01-02 11:34:00 +00:00
moodler c030ab7078 More details... 2003-01-02 11:13:01 +00:00
moodler 7adcd58f82 Prepend database name to all table names to avoid ADOdb bug when there
is multiple database connections at once.
2003-01-02 11:09:03 +00:00
moodler 24cd45467f Site news forum defaults to the "Site news" string 2003-01-02 10:54:00 +00:00
moodler 9c2c5c5bd0 Use the name of the Site News forum on the front page ... instead of the
"Site News" string ...
2003-01-02 10:48:01 +00:00
moodler 51ba6ad642 Define forum type all the time 2003-01-02 10:46:52 +00:00
moodler 42a986b23a Looking like a beta 2003-01-02 10:38:08 +00:00
moodler 61e96406df Robustness fixes 2003-01-02 10:35:11 +00:00
moodler ac5d88ebe9 Ignore guest when checking imcomplete users 2003-01-02 10:32:51 +00:00
moodler 819df380a3 Initial version of Thai translation, by M Minkowski :-) 2003-01-02 07:55:40 +00:00
moodler 5b4fd9c20a Allow phpinfo() debugging to occur even if Moodle isn't configured yet
(to help with configuration problems!).
2003-01-02 07:37:28 +00:00
moodler 33e5f52c01 Removing english versions 2003-01-02 06:52:27 +00:00
moodler 6846ee2da5 Removing files 2003-01-02 06:51:56 +00:00
moodler a44d18e70e More consistency when printing editing stuff in section 2003-01-02 06:44:20 +00:00
compuproggy 6af88ac7a2 *** empty log message *** 2003-01-02 06:38:36 +00:00
moodler 106140f7d1 New frame mode for dox 2003-01-01 15:13:56 +00:00
moodler b79f41cd42 Robust fix 2003-01-01 15:13:21 +00:00
moodler e18b68b0b6 Updates. That's it for features now. :-) 2003-01-01 15:12:29 +00:00
moodler 8e6c87ccf3 Teachers can choose to allow review of quizzes, which means that students
are allowed to see past quizzes.  This only works once the quiz is completely
closed (to perhaps prevent easy cheating).
2003-01-01 14:47:11 +00:00
coolbit d78ab28640 no message 2003-01-01 13:41:08 +00:00
moodler 8ac3158791 Robustness fixes 2003-01-01 13:17:27 +00:00
moodler 0c106cd3ab Don't try to display docs files if they don't exist. 2003-01-01 12:03:15 +00:00
moodler fdb57a7473 Updated with more info 2003-01-01 11:53:39 +00:00
moodler 2f7566090f Necessary file for documentation to work! 2003-01-01 11:26:50 +00:00
coolbit cb573b2647 no message 2003-01-01 10:16:19 +00:00
moodler b6bae251a1 If prefix isn't defined in config.php then define it as "" to avoid
problems with upgraders who don't edit config.php
2003-01-01 09:29:05 +00:00
moodler 6fbf8d8fe8 Default debugging 2003-01-01 08:48:15 +00:00
moodler e29fa0c8e2 Add default prefix (for tables) of "" for upgraders 2003-01-01 08:33:22 +00:00
moodler 1c0200e074 More little robustness things 2003-01-01 08:21:19 +00:00
moodler db70b54b62 Better log_display fixes 2003-01-01 08:15:55 +00:00
moodler 14e4a496b4 Updates for log_display stuff 2003-01-01 08:08:44 +00:00
moodler 30d6173ed6 Fixes for Log display 2003-01-01 07:37:19 +00:00
moodler 7f7f2cca29 Robustness 2003-01-01 07:18:43 +00:00
moodler 13469b820d Introduce links to personal grade page 2003-01-01 07:03:23 +00:00
moodler 1df0ab5d8d Cleaned up a bit 2003-01-01 06:53:00 +00:00
moodler b0cef1ec45 Grade display for current user 2003-01-01 06:42:11 +00:00
moodler c2045f3436 Changes for robustness 2003-01-01 06:41:35 +00:00
moodler d2cded302b New strings for publishing results 2003-01-01 06:40:55 +00:00
moodler 346b1a2483 Tweaks 2003-01-01 06:40:31 +00:00
moodler f747744495 More robustness fixes 2003-01-01 06:34:54 +00:00
moodler 6d6c938999 New feature: choices can now be published (like polls) with names
or without.
2003-01-01 06:34:13 +00:00
moodler 366287b705 Old file 2003-01-01 05:39:30 +00:00
moodler a7514c09e6 More tweaks 2002-12-31 08:50:24 +00:00
moodler 50c4bd4145 More robustness, and some little bug fixes.
Also, database module now supports md5 passwords
2002-12-31 08:45:37 +00:00
moodler f53af9410c Better checks during membership checks 2002-12-31 07:16:52 +00:00
moodler 5eda92d0e2 Little robustness fixes 2002-12-30 15:47:54 +00:00
moodler 814ada432c Fixes to XLS routines that were causing some problems 2002-12-30 15:46:15 +00:00
moodler 86d6449306 Allow "." and "-" in usernames. 2002-12-30 15:38:10 +00:00
moodler 808a3baaf8 If a user has authenticated via external authentication, then FORCE them
to fill out the user profile form (is they can't do anything else until
this is done)
2002-12-30 15:30:05 +00:00
moodler 6dd38d4656 Allow STRIKE tag 2002-12-30 13:02:21 +00:00
moodler 149f85f035 Robustness fixes 2002-12-30 06:07:03 +00:00
moodler bdece65d72 More debugging 2002-12-30 05:31:54 +00:00
moodler 47f1da80d0 More little fixups for robustness 2002-12-30 05:13:43 +00:00
moodler c04c41c7d2 Many little fixes and cleanups for robustness 2002-12-30 05:10:01 +00:00
moodler b9b8ab696f Fixed p() and s() to deal with zero better 2002-12-30 03:39:42 +00:00
moodler 0ae5e5ea2d Fix default cursor 2002-12-30 03:38:59 +00:00
moodler b3fa6684ea Fixes to insert_record (from Petri) to explicitly use field default
values if we know them from ADOdb, to avoid some problems with PostgreSQL 7.2 onwards
2002-12-30 03:25:48 +00:00
moodler 4fd7ccc0fe New "debug" variable to turn debugging on and off 2002-12-30 03:24:07 +00:00
moodler 932e472fdc Daily changes 2002-12-29 17:41:18 +00:00
moodler 9c9f7d7790 Various little fixes to remove warnings (usually about empty variables)
when error_reporting is turned up to 15 or so ... more of these to come ...
2002-12-29 17:32:32 +00:00
moodler a900458749 It's now possible to choose a documentation language on the fly! 2002-12-29 16:28:41 +00:00
moodler 18496c590b New get_record_select function (for completeness) and a completely
revamped update_user_in_db() function
2002-12-29 16:28:09 +00:00
moodler cae7436602 Use session-specified language if possible 2002-12-29 16:26:44 +00:00
moodler b01597c807 Cleaned up files using new admin/lang.php 2002-12-29 16:23:48 +00:00
moodler d558a7b5d1 Cleaned up some strings without quotes 2002-12-29 16:15:41 +00:00
coolbit 8c05e98c41 remove them and wait for new translations 2002-12-29 15:33:39 +00:00
moodler 753db9ace7 Clearer info 2002-12-29 15:12:45 +00:00
moodler 3cae82fe52 Adding this back again to help brand-new installations and to keep
some old links alive.
2002-12-29 15:06:31 +00:00
moodler 235bb050c5 Better way to include initial intro.html 2002-12-29 14:43:49 +00:00
moodler 9bd2c8741c New function document_file() for fetching documentation from language
packs, and a few cleanups to reduce warnings
2002-12-29 14:41:03 +00:00
moodler f1dacb2ed0 Changes to how documentation works. A thin PHP interface now fetches
files from the language packs.  If a file isn't available in the current
language, then English is used.
2002-12-29 14:39:52 +00:00
moodler 4456254798 Added document files to English translation 2002-12-29 14:37:53 +00:00
mits ce0eedfc72 New translation added. 2002-12-29 09:13:19 +00:00
moodler 11e8f20ec4 Accidentally left debugging on 2002-12-29 04:18:09 +00:00
moodler 9d378732e4 More little fixes 2002-12-29 04:17:32 +00:00
moodler 5c63e0c4ee Some changes to remove warnings about empty variables and cleanup 2002-12-29 04:02:42 +00:00
compuproggy fa9ef12118 *** empty log message *** 2002-12-28 21:14:14 +00:00
moodler 92a4b0f180 Fixes to allow the GD detection to work on PHP 4.3.0 (with bundled GD) 2002-12-28 14:45:54 +00:00
moodler 57117c20d5 fixed user --> userid 2002-12-28 13:05:03 +00:00
moodler 05a6c03ed2 Er, unfinished code while upgrading log_display 2002-12-26 17:02:45 +00:00
coolbit 212f17dd08 new docs 2002-12-26 17:01:55 +00:00
moodler 8c8a471356 Added "source" mode in richtext editor 2002-12-26 16:27:44 +00:00
moodler 04fa59d015 Use HTML editor for editing HTML files 2002-12-26 16:26:55 +00:00
ahmed_nabil 5f7ed5ceb3 no message 2002-12-25 13:56:31 +00:00
set_lo f5ff25a482 spelling error vilkor substituted with villkor 2002-12-25 13:35:07 +00:00
set_lo 47149b438d action substituted with swedish aktion 2002-12-25 13:34:25 +00:00
ahmed_nabil d9843ab42d no message 2002-12-24 13:31:33 +00:00
moodler 4fe04be0bd Er... on the cookies I meant. 2002-12-24 10:08:24 +00:00
moodler 7185e073ed Use table prefixes on database too :-) 2002-12-24 10:07:45 +00:00
moodler c23f1c10ca Updates 2002-12-24 09:34:11 +00:00
moodler 29341af700 Updated release notes 2002-12-24 07:29:38 +00:00
moodler f7a5c8fafd Added new "Program" resource type, which allows Moodle to cooperate
with external web applications by passing info about the current
session to them.

Code contributed by Mark Kimes.
2002-12-24 07:01:03 +00:00
moodler 195ad21e96 New documentation for Moodle - new resource type called "Program" 2002-12-24 06:59:13 +00:00
moodler 7e5e076adf No need for forcetables hack any more. Moodle can now detect whether
it has already been installed in the current database (by looking
for all the main tables) and do the right thing.  It doesn't matter now
if there are other tables in the database or not.
2002-12-24 05:39:45 +00:00
moodler e494038ecb Forgot Turkish 2002-12-23 16:16:53 +00:00
moodler 1342d68a8a Tweak 2002-12-23 16:12:44 +00:00
moodler 67fcf6818a Tweak! 2002-12-23 16:10:06 +00:00
moodler d51fb96e98 More up-to-date-info 2002-12-23 16:07:38 +00:00
moodler abf90faf65 More details ... 2002-12-23 15:52:16 +00:00
moodler 97485d0726 More database tweaks and improved access to forum search engine 2002-12-23 15:33:40 +00:00
coolbit 7f8dcc6c02 no message 2002-12-23 15:08:55 +00:00
moodler 4e042a3ee9 Clearer directions. 2002-12-23 14:44:32 +00:00
moodler 99988d1a87 This version installs smoothly for me on PostgreSQL 2002-12-23 14:19:45 +00:00
moodler 31fefa636d More database tweaking ... looking pretty good with PostgreSQL now 2002-12-23 13:48:31 +00:00
moodler a3eea09cc9 More fixes for postgreSQL etc 2002-12-23 11:47:17 +00:00
moodler 6aeec7f8f8 Fixes for log display 2002-12-23 10:27:57 +00:00
moodler b6c38cec93 Slight fixes to headings 2002-12-23 10:18:51 +00:00
moodler ebc3bd2b24 Changes throughout Moodle to remove any reserved words from the
Moodle tables.

ie user -> userid in many tables, plus in user_students
   start -> starttime and end -> endtime

I've just done all this as carefully as I could ... I don't think
I missed anything but it's pretty intensive work and I'd be fooling myself
if I didn't think I'd missed a couple.

Note that this version should pretty much be able to bootstrap itself
using PostgreSQL now ... but this is untested
2002-12-23 09:39:26 +00:00
moodler 1f48942e7d Further SQL cleanups 2002-12-23 07:01:06 +00:00
mits b0cc830305 Modified 2002-12-23 06:50:50 +00:00
mits dcc4f0e83a New translation added. 2002-12-23 06:49:48 +00:00
moodler e323955db8 Changes to use new database stuff 2002-12-23 05:57:05 +00:00
moodler 1d881d926b More moving functions around and removal of hardcoded SQL 2002-12-23 03:07:01 +00:00
mits e99f76e01d Polished 2002-12-22 15:30:58 +00:00
moodler bdc23be0ff CHanges for new database table commands 2002-12-22 13:55:30 +00:00
moodler ba54c0b8ce New Swedish translation by Set Lonnert 2002-12-22 13:32:36 +00:00
moodler 9e12b88eb9 Fixed an error in survey.php in all languages ... colles18hort should be colles18short 2002-12-22 13:26:16 +00:00
moodler 19801b2b21 More little fixups for week 0 2002-12-22 06:45:09 +00:00
moodler 1523be781f Changes to get a more reliable insert ID for any table 2002-12-22 06:33:30 +00:00
moodler d26d7ed0c3 Changes to make things work again :-) 2002-12-22 06:15:44 +00:00
coolbit 62cdef7869 no message 2002-12-21 12:48:24 +00:00
coolbit 469c2cc7d1 no message 2002-12-21 11:39:27 +00:00
moodler 9fa49e22ab Many many changes lumped in here ... not finished yet either.
Basically all the Database functions are in lib/datalib.php
and the web functions are all in lib/weblib.php, so
moodlelib.php is much thinner than it was.

Data functions have been extended ... most old calls will
still work, but now many more SQL commands can be performed
using the datalib functions rather than using SQL.  I'm
currently moving through the whole tree replacing SQL
calls or at least concentrating them in one section of
mod/xxx/lib.php

Still working on forums, quizzes, surveys, resources.

The tree is currently not full working ... some things are
half-completed ... will resume tomorrow.
2002-12-20 14:44:14 +00:00
coolbit 03f13d2207 no message 2002-12-20 12:48:46 +00:00
moodler bdce039ca5 Slight updates such as removing old functions 2002-12-20 07:21:09 +00:00
mits 5a8415734f Polished 2002-12-19 15:54:41 +00:00
mits bfd5649fcc Polished 2002-12-18 14:19:58 +00:00
coolbit 663a621c51 Removed lots of "^M", hu!
Where do they come from?
2002-12-18 13:58:01 +00:00
moodler d5f48b1619 Preset the FULLME variable 2002-12-18 08:08:34 +00:00
mits e310476ae9 Polished 2002-12-18 06:34:40 +00:00
mits 45cbb10388 Polished 2002-12-18 03:08:09 +00:00
coolbit 84275343bd no message 2002-12-17 15:46:21 +00:00
carlesbellver 5736c5fcf4 *** empty log message *** 2002-12-17 13:21:50 +00:00
compuproggy 82fc646799 *** empty log message *** 2002-12-17 07:01:25 +00:00
moodler df28d6c5e6 Contains database functions split-off from moodlelib, just so you can see
what I'm doing ...

Some functions have been extended and cleaned up ...

I need to do more testing on it all before checking in all the other
changed files like moodlelib.php and setup.php
2002-12-17 04:41:18 +00:00
gregb_cc 8caf7e0430 Since the reimplementation of check_php_version will probably never be used, I
have removed it.
2002-12-17 03:04:07 +00:00
gregb_cc 709c0cb359 added in a commented out reimplementation of check_php_version, that will most
likely never be used.
2002-12-17 03:02:53 +00:00
ahmed_nabil fd66477c7d This files is updated after testing phase 1. and After final testing I will update this files again 2002-12-16 15:16:32 +00:00
mits 72af127890 Polished 2002-12-16 06:06:50 +00:00
moodler a4064f5755 Moved the view source button to solve problems with other languages
pushing it off the screen
2002-12-15 17:59:40 +00:00
mits af0aa10fc3 Polished 2002-12-15 17:09:02 +00:00
mits 3ac5d94015 New Translation 2002-12-15 15:31:23 +00:00
moodler 0b0260e7ba Fixes (they were causing errors) 2002-12-15 14:49:49 +00:00
moodler aaa872a9ed Minor editing ;-) 2002-12-15 10:53:36 +00:00
moodler 090e6d1959 Minor editing ;-) 2002-12-15 10:51:05 +00:00
moodler 852b18ff2b New files 2002-12-15 10:41:00 +00:00
moodler 1451da5eed Revised the text on these three pages.
These are ready to translate now.  If you have translated them
before, you may want to compare your translation because there
are some changes throughout.

Sorry if this causes any inconvenience - I try not to rewrite
the help files too much.
2002-12-15 10:31:33 +00:00
coolbit fdd417e212 New Chinese help files! 2002-12-15 10:13:28 +00:00
mits 342c546d99 Modified 2002-12-15 09:30:38 +00:00
mits 323af31737 Added 2002-12-15 09:23:13 +00:00
mits ab430cfd3d Polished 2002-12-15 08:49:15 +00:00
mits 5e22db9e23 Polished :^) 2002-12-15 07:58:08 +00:00
ahmed_nabil b75c36b802 This files is updated without testing. After testing I will update this files again 2002-12-15 06:56:36 +00:00
moodler 393cc5088b Improved course listing display when no courses 2002-12-15 06:00:58 +00:00
mits d2380ec365 Lastmodify updated 2002-12-15 05:00:24 +00:00
mits 035f8397db Polished 2002-12-15 04:58:47 +00:00
mits 33b4ba655f Polished :^) 2002-12-15 04:32:31 +00:00
moodler f6680cfa4a Put a space under the colon 2002-12-15 04:27:51 +00:00
moodler 4181fce9f9 Moved a colon (there's a joke about farts in there somewhere) 2002-12-15 04:26:44 +00:00
moodler fd790dfb55 Database and upgrade files for PostgreSQL 7 support! 2002-12-15 02:41:07 +00:00
moodler a3e175eea5 performance improvement when checking gd version 2002-12-15 02:40:25 +00:00
moodler ca3cf39ee1 Turn off time limits with big SQL commands ... some databases are really slow. 2002-12-14 18:33:37 +00:00
coolbit dee505a1c0 add new help files 2002-12-14 14:30:43 +00:00
coolbit 6d987a67cc some modify 2002-12-14 14:26:34 +00:00
coolbit fa949b2b5c New Chinese help files and update php files. 2002-12-14 09:04:05 +00:00
moodler 93f03cc436 Much cooler way to set the form focus after an error. Sent in by Greg Barnett. 2002-12-14 08:24:34 +00:00
moodler 778c28671a Added new configuration setting "country" to set a default country
for the site.  If this is set then user menus are pre-selected.
eg when signing up or filling out profile after external authentication.
2002-12-14 08:18:18 +00:00
moodler b2a2171f22 Shortened helprichtext phrase for better viewing of post forms on small
monitors
2002-12-14 07:36:19 +00:00
moodler e28a6c7378 Added LI tag (not cascading) 2002-12-13 17:01:16 +00:00
moodler 51e734b85f Some more information about buggy_referrer 2002-12-13 16:10:14 +00:00
coolbit ce3faff837 New Chinese help files! 2002-12-13 13:32:21 +00:00
mits 9c5b4e1587 Add New items. 2002-12-13 10:00:23 +00:00
moodler 8fc6971035 Updates 2002-12-13 09:57:12 +00:00
moodler 8c009049f4 Removed two old strings 2002-12-13 09:55:41 +00:00
moodler 50c5119d82 Notice up top 2002-12-13 09:37:13 +00:00
moodler e57e540ce1 Draft versions of these files ... please do not translate yet! :-) 2002-12-13 09:32:04 +00:00
moodler b0767657a6 New help files ... nothing written in them yet! 2002-12-13 09:09:19 +00:00
moodler 7be475f601 New consistent help buttons for textarea fields throughout all modules 2002-12-13 09:06:30 +00:00
moodler 2e9e77eba0 Tweaks for highlighting 2002-12-13 08:12:14 +00:00
mits 499ab3711e Changed softly :-) 2002-12-13 08:03:35 +00:00
moodler bfca4cffdc Different styles for content when week is highlighted 2002-12-13 07:37:47 +00:00
moodler 541b602d61 More tweaks ... added style for outlinecontent when highlighted (eg current week) 2002-12-13 07:37:13 +00:00
compuproggy 51b578bc6e *** empty log message *** 2002-12-13 06:42:25 +00:00
moodler 6176355393 WHoops ... I'd trashed the background 2002-12-13 04:56:10 +00:00
moodler d8c0083240 Fixed definition of standard styles 2002-12-13 04:54:29 +00:00
moodler 2e91475518 Fixed standard tags .... uses inheritance now 2002-12-13 04:51:56 +00:00
moodler 9984fe99e4 New style classes added to standard themes 2002-12-13 03:29:45 +00:00
moodler 45f21f94d7 config.php not required ... just in case themes move or something ... 2002-12-13 03:15:28 +00:00
moodler 8ab95b7186 Style hooks for print_simple_box 2002-12-13 03:14:49 +00:00
moodler 6daa3c2329 More hooks to hang styles from 2002-12-13 03:14:19 +00:00
moodler 02d35f5503 New themes under construction 2002-12-13 03:12:11 +00:00
moodler c2246cbb1e Some new names ... 2002-12-12 17:55:18 +00:00
mits 2590de4ff4 Polished :^) 2002-12-12 17:26:58 +00:00
mits f1f3b874ce Polished :^) 2002-12-12 14:18:37 +00:00
coolbit 7a6ce5df4c New Chinese help files! 2002-12-12 13:53:32 +00:00
moodler c21f835ac3 Don't even attempt to install the template module 2002-12-12 13:35:10 +00:00
coolbit 1d1b312890 Add space before and after a variable to display normally. 2002-12-12 13:18:22 +00:00
moodler 7f9b57040e Added all the missing help files etc 2002-12-12 13:10:25 +00:00
coolbit 59b888d7fb Change firstname to lastname in email for Chinese custom. 2002-12-12 13:00:40 +00:00
moodler 150e92dcf1 local = en_GB is causing my AM/PM to disappear! 2002-12-12 12:30:09 +00:00
mits 55181cf5a8 New items tralslated.
"highlights missing or empty strings" is great!!
2002-12-12 03:48:26 +00:00
moodler 06c0a76a1d Up to date with English 2002-12-12 03:33:40 +00:00
moodler e3305cc5d9 Better checks when comparing languages. Now highlights missing or
empty strings.  Quick check mode also flags strings when they exist
but are empty.  Larger form space to edit empty strings.
2002-12-12 03:33:12 +00:00
moodler f830b324cf Fixed two missing strings 2002-12-12 03:14:13 +00:00
moodler 31313bfb98 Fixed layout with multiplem categories 2002-12-12 02:58:05 +00:00
moodler 2f99e65049 Slight changes to auth_user_login ... don't accept blank username/passwords
and some minor logic changes
2002-12-12 02:37:35 +00:00
moodler 79e7f21a65 Fixed bad copyright message 2002-12-12 01:27:36 +00:00
mits ccddfeec89 Polished :^) 2002-12-11 19:57:43 +00:00
mits a23b08a360 Polished and add translation "Admin" related. 2002-12-11 19:06:45 +00:00
mits 91de0951af Date updated 2002-12-11 18:26:27 +00:00
mits a7c833d1dd Polished and translated new item "Assign admins". 2002-12-11 17:56:21 +00:00
mits be2946c27c Polished :^) 2002-12-11 17:27:21 +00:00
moodler c78a72fc5b Added a slash. Wow! 2002-12-11 16:30:53 +00:00
coolbit 836c3d0ed6 *** empty log message *** 2002-12-11 16:27:38 +00:00
moodler fbea810cf4 Updating the version for the development phase 2002-12-11 16:13:37 +00:00
coolbit fd6fbbeb0b *** empty log message *** 2002-12-11 16:02:59 +00:00
coolbit 45b1adcf20 *** empty log message *** 2002-12-11 15:46:55 +00:00
mits df6384e2b8 Polished 2002-12-11 15:23:56 +00:00
moodler d7facad81e Modifications from Greg Barnett at Crown College to add more admins.
See http://bugs.moodle.org/bug.php?op=show&bugid=202
2002-12-11 14:59:37 +00:00
ahmed_nabil cc2c8c6dc5 The last entry was translated 2002-12-11 13:50:14 +00:00
mits 5186f85951 Polished 2002-12-11 12:38:13 +00:00
coolbit e7a02c4c73 *** empty log message *** 2002-12-11 12:29:44 +00:00
mits 78774bae0d Polished 2002-12-11 12:24:44 +00:00
mits ae481044f7 Plished 2002-12-11 12:00:28 +00:00
mits a13975e028 Polished 2002-12-11 11:39:18 +00:00
moodler 21f34b5f67 Set the locale to ar_EG 2002-12-11 10:00:41 +00:00
moodler 795976b352 Added Ahmed Nabil as Arabic maintainer 2002-12-11 09:45:28 +00:00
moodler 7434d21a90 New Arabic translation by Ahmed Nabil <ana@harf.com> 2002-12-11 09:42:37 +00:00
mits af554bec95 Add lastmodify and URL(moodle.com -> Resources -> Languages) 2002-12-11 08:26:20 +00:00
mits fff61015b7 Polished 2002-12-11 08:14:05 +00:00
mits 379e2dcbae Polished 2002-12-11 08:06:21 +00:00
mits ad8aa0b9f3 Polished 2002-12-11 08:01:52 +00:00
mits 5f16e54d33 Add Local ja_JP and Polished. 2002-12-11 06:59:56 +00:00
mits 5d0a3181b0 Polished 2002-12-11 06:48:20 +00:00
moodler cf3f6bcc2c Removed makeclass stuff completely. It's now in contrib/crown_college 2002-12-11 06:31:59 +00:00
moodler eac7c90291 Names I'd forgotten 2002-12-11 06:19:50 +00:00
moodler 9e2265f707 Updated some names 2002-12-11 06:02:19 +00:00
moodler bb55809320 Another hint for the Windows users 2002-12-10 17:26:30 +00:00
mits f1d2a92c85 Save with Moodle. 2002-12-10 16:23:50 +00:00
mits 8c6cdfc613 Conflict solved 2002-12-10 16:05:22 +00:00
mits 266873247f "\r\n"(CRLF) removed 2002-12-10 15:46:43 +00:00
moodler 62c5a17de5 First version of Chinese! From Zhang Dexuan, cncoolbit@hotmail.com 2002-12-10 15:45:00 +00:00
moodler e6f10ec582 Theme not working for brand-new setup. 2002-12-10 13:37:37 +00:00
moodler 1355a93af2 Just fixing a wierd text-formatting problem. 2002-12-10 12:52:53 +00:00
mits 208307010c plished 2002-12-10 12:50:25 +00:00
moodler 9c645ce06c I was looking for bugs and reformatted as I went to make the layout
a little more consistent (with Moodle)
2002-12-10 12:08:57 +00:00
moodler 53a290ba03 Changed locale, because it was causing ADOdb to crash!! 2002-12-10 11:49:20 +00:00
moodler 673ada543a Fixed a typo - 'that' -> 'than' 2002-12-10 10:58:34 +00:00
moodler 2db0a31b69 Added locale 2002-12-10 09:59:22 +00:00
moodler 0fa6f59fbd New Turkish translation from M. Cuneyt Birkok, http://birkok.net ! 2002-12-10 09:57:59 +00:00
moodler 31861304ec Changed styles.css to styles.php ... 2002-12-10 09:50:18 +00:00
mits 913dbeb760 polished 2002-12-10 09:19:21 +00:00
mits adfd802f27 Polished 2002-12-10 08:14:56 +00:00
moodler 6ec3aaaf84 Mention all the languages 2002-12-10 07:54:10 +00:00
moodler f5f08e24c1 Fixed a typo rad -> read 2002-12-10 06:39:56 +00:00
moodler 454259a62f More links etc 2002-12-10 06:28:33 +00:00
moodler 8736d429d4 Documentation improvements for CVS and developing in general 2002-12-10 06:17:31 +00:00
compuproggy 0c8106d326 *** empty log message *** 2002-12-10 06:16:42 +00:00
moodler 8a6cafc806 Release of 1.0.7 2002-12-10 03:58:07 +00:00
moodler d34189e123 Added styles for forum posts 2002-12-10 02:48:05 +00:00
mits c6f0c3a455 polished 2002-12-09 21:06:27 +00:00
mits 8e664e00b9 Polished 2002-12-09 20:50:44 +00:00
moodler c6d09f2157 More information 2002-12-09 17:27:21 +00:00
moodler 4ba1e2d42a Increment 2002-12-09 17:08:56 +00:00
moodler bf1969570e Fixed blue a little 2002-12-09 16:21:02 +00:00
moodler 8120317e2e Changes for new styles and scheme 2002-12-09 16:10:57 +00:00
moodler e545445874 More fixes for course formats 2002-12-09 14:07:52 +00:00
moodler da00d31744 Latest Japanese files from Mits. This is now a COMPLETE TRANSLATION!
Well done, Mits.   That's LOTS of work.
2002-12-09 13:53:41 +00:00
moodler 2338465770 Tweak to etxt in box 2002-12-09 13:48:31 +00:00
moodler 920bb7ab2f Fix typo 2002-12-09 13:45:44 +00:00
moodler 1d43ffdeab Font size tweaks 2002-12-09 13:40:18 +00:00
moodler 7541bc3e87 More styles 2002-12-09 13:36:55 +00:00
moodler 21ba1d796b testing wrong thing 2002-12-09 12:12:42 +00:00
moodler 469e5eb18e More style and layout tweaking 2002-12-09 12:09:33 +00:00
moodler 4499b2e273 Slight alteration of colouring on printed posts 2002-12-09 10:49:44 +00:00
moodler 69d1973c07 New string readytosend 2002-12-09 10:48:59 +00:00
moodler 42fddf0237 Finish off topics display 2002-12-09 09:03:15 +00:00
moodler fb23e3cbb9 Slight changes 2002-12-09 08:53:49 +00:00
moodler 9307692fdf Add a javascript confirmation when submitting a quiz attempt 2002-12-09 08:20:19 +00:00
moodler 776dc2709f Allow print_all_courses to have width 2002-12-09 07:52:47 +00:00
moodler d9fd5e8b86 Allow course listing to have specified width 2002-12-09 07:51:31 +00:00
moodler 041b1712c6 Slightly adjust column width 2002-12-09 07:48:12 +00:00
moodler b27f9a32bc Slight changes 2002-12-09 07:45:45 +00:00
moodler 24a34da28c Updated version 2002-12-09 07:36:48 +00:00
moodler 5e367a2d56 Various little tweaks to improve the display of course home
pages and front page ... still have some work to do though
2002-12-09 07:35:40 +00:00
moodler 7a4c13797a Default with showrecent ON 2002-12-09 06:35:14 +00:00
moodler 64a92277da Fixed US spelling 2002-12-09 03:25:48 +00:00
moodler 1e6700a749 Restored "locale" string 2002-12-09 03:10:44 +00:00
moodler 651ba4e63c Latest changes in French, from Sebastien Nam?che 2002-12-09 03:00:54 +00:00
moodler 4be38f8bb2 CHanges from Antonio Navarro 2002-12-09 02:39:19 +00:00
moodler 2e4b204b26 Changes to make makeClassFromFile() in makeclass.php work better 2002-12-09 02:12:37 +00:00
moodler 1ed2b03af3 Fixed some names 2002-12-08 17:32:11 +00:00
moodler 339bb5599f New code to use locale information from language packs if necessary 2002-12-08 17:26:21 +00:00
moodler a8b7b66158 Use language string for "changes saved" 2002-12-08 17:21:10 +00:00
moodler 2893d91e46 Fixed name 2002-12-08 17:16:58 +00:00
moodler df0594edee Added locale codes to all languages 2002-12-08 17:01:13 +00:00
moodler 517f323637 US flavor of English to keep the yanks happy. ;-) 2002-12-08 16:49:49 +00:00
moodler 520283b4e4 Added Mitsuhiro's credit for Japanese 2002-12-08 11:28:32 +00:00
moodler 15a2a4e555 Updates for 1.0.7 and better-looking throughout 2002-12-08 03:45:03 +00:00
moodler 261be01672 More changes from Mits. 2002-12-07 16:19:58 +00:00
moodler 6ab29e19a4 Going back to simpler version numbers! 2002-12-07 08:53:07 +00:00
moodler 86400f05f5 Small changes to help display of Japanese and on Netscape 2002-12-07 08:44:21 +00:00
moodler 467aaec630 Small changes to tables to make them display better with Japanese 2002-12-07 08:39:24 +00:00
moodler a8a71844e4 If the database doesn't work then just die before anything else 2002-12-07 07:27:58 +00:00
moodler 657423c8f3 get rid of short_open_tags 2002-12-07 07:27:18 +00:00
moodler 95ea4a41ad Some info about forcetables 2002-12-07 07:19:28 +00:00
moodler 2348daf12c Updated the dox 2002-12-07 04:37:21 +00:00
moodler ec2e229a0f General purpose function to produce a class based on a library
of simple functions.  Can be used to provide a class interface
to Moodle functions.

Thanks to Greg Barnett!
2002-12-07 04:31:23 +00:00
moodler d72788c346 Added php mime type 2002-12-07 04:24:22 +00:00
moodler 81ef6a5ee5 Removed the "zero" value altogether 2002-12-07 04:20:35 +00:00
moodler ff4f23fdcc Better checking of existing value, in case it's not in the list 2002-12-07 04:00:05 +00:00
moodler 0fa2146388 More changes from Mits! 2002-12-06 12:22:59 +00:00
moodler 3e8ff7019f Fixed up CVS Id tag 2002-12-06 11:36:20 +00:00
moodler 2ccb36740b Wrapper file to make moodlelib.php functions accessible as a class
called moodlelib.  Based on idea from Greg Barnett:
http://moodle.com/mod/forum/discuss.php?d=356
2002-12-06 11:23:42 +00:00
moodler a7ce613296 First version of Japanese translation by Mitsuhiro Yoshida !
Still missing quiz.php, survey.php, auth.php and the help files

Helpers wanted!
2002-12-05 13:50:01 +00:00
moodler 035cdbff1a Improved removal of leading zeroes, but with some efficiency lost 2002-12-02 01:35:18 +00:00
moodler bea7a51e3c Slight change to get rid of leading zeroes in dates 2002-12-02 01:13:14 +00:00
moodler 8ea300947d These includes are actually required 2002-12-02 01:12:06 +00:00
moodler 666122b94b Upgraded ADOdb to 2.50 because it fixes some bugs with PHP 4.3.0 2002-11-30 13:23:39 +00:00
moodler 8da0e0e031 IMS/SCORM 2002-11-30 12:04:33 +00:00
moodler 3ad6393067 Revised 2002-11-30 12:00:47 +00:00
moodler 17820bd5bd New version of Italian translation - compatible with 1.0.6.3 2002-11-29 15:17:59 +00:00
moodler 39246b72f8 Some colour difference for my courses .... I'm not sure about it ... 2002-11-29 14:22:34 +00:00
moodler 85098089d1 Some improvements to the layout of courses when there are categories
and they are on the front page
2002-11-29 14:17:36 +00:00
moodler 3475d55ee7 Slight fix 2002-11-29 05:12:01 +00:00
moodler c1e735bb28 Added credit for Indonesian - Arfan Hidayat 2002-11-29 05:02:59 +00:00
moodler a08fe5809a Complete new Indonesian translation!
Thanks to Arfan Hidayat, http://www.kursusmaya.com, ivanh@telkom.net!
2002-11-29 04:58:27 +00:00
moodler b419cb6e28 Update version 2002-11-28 14:39:26 +00:00
moodler 3086f3f6cf With external authentication, the change password button on the user
page now does the same thing as the one on the login page.  It takes you
to the specified URL is it exists, and just doesn't appear if there is no URL
2002-11-28 12:31:46 +00:00
moodler 048ccc473a Highlight matches in post subject and discussion name too 2002-11-28 09:10:22 +00:00
moodler 88e729beed Add searching of subjects as well as messages 2002-11-28 09:04:04 +00:00
moodler d391e3b1ee First quick version of help on CVS 2002-11-28 03:05:24 +00:00
moodler 6cc0361107 Fixed heading 2002-11-28 02:53:25 +00:00
moodler c655755d92 Updates 2002-11-28 02:47:50 +00:00
moodler 64efda84b5 Fixes to increase the number of options available to limit assignment
upload size, and also to limit the list based on PHP limits
2002-11-28 02:41:56 +00:00
moodler f42cf95f3c Added missing </BODY> and </HTML> tags 2002-11-27 13:11:02 +00:00
carlesbellver 5c36a37c9f *** empty log message *** 2002-11-26 10:10:04 +00:00
moodler 0581a9f7c8 More info about database user 2002-11-26 03:19:15 +00:00
moodler b275ff65cb Additions and clean ups 2002-11-26 03:07:49 +00:00
moodler 71d552f677 Fix display of grades when there aren't any grades 2002-11-26 02:36:16 +00:00
moodler 83173d563c For the case when there are forums using ratings, but no ratings, and
the teacher is looking at grades, don't try and loop on an empty array
2002-11-26 02:29:54 +00:00
moodler fc05fccb64 Strip slashes from filenames 2002-11-26 02:11:05 +00:00
compuproggy 33651b3d3e *** empty log message *** 2002-11-25 06:45:08 +00:00
moodler 4d35cddd8a More fixes 2002-11-24 15:59:58 +00:00
moodler 2f0c25fc75 More tweaks 2002-11-24 15:44:59 +00:00
moodler 982d256d95 Yet more details 2002-11-24 15:40:07 +00:00
moodler 66fe2bb262 Updated versionm, ready for 1.0.6.4 2002-11-24 15:30:01 +00:00
moodler e746ec3416 More tweaks 2002-11-24 15:22:28 +00:00
moodler d40c314a0a More fixes 2002-11-24 15:20:29 +00:00
moodler 56b21759e5 More details 2002-11-24 15:16:49 +00:00
moodler 9ae472a374 New message about users being automatically unenrolled 2002-11-22 17:28:55 +00:00
moodler 7f1717c61e ALL LANGUAGE EDITORS PLEASE NOTICE THIS CHECKIN
I've changed htmlentities to htmlspecialchars in this file, to fix
bugs with editing multibyte languages (ie Japanese).  Please be
cautious and let me know if this causes any problems when editing
your language (it shouldn't, but I don't want to spoil your day!)
2002-11-22 17:27:56 +00:00
moodler 708964056e Update for kicks 2002-11-22 10:00:50 +00:00
moodler bcd6e7184f Hide password and unenrolment buttons from guest users 2002-11-22 09:59:31 +00:00
moodler 92710226a5 Tidy up some of the dox 2002-11-22 09:38:15 +00:00
moodler 466558e349 Changes to allow admin to control the "forgot password" function
and a bug fix for set_config
2002-11-22 08:43:35 +00:00
compuproggy caa963b03b Suche noch Lernwillige und Tutoren f?r http://www.selaction.de
Auch Mithelfer sind gerne gesehen wie ?bersetzer oder Moderatoren.
2002-11-22 07:39:08 +00:00
compuproggy 0cf3883167 Suche noch Lernwillige und Tutoren f?r http://www.selaction.de 2002-11-22 07:37:26 +00:00
paca70 ef62651f02 Fixed some typos 2002-11-21 18:40:33 +00:00
moodler b335cae1d3 Updated version 2002-11-21 16:59:41 +00:00
moodler cff8ba5a98 Moodle CVS is exactly 1 year old. :-) 2002-11-21 16:58:29 +00:00
moodler c351cf2799 For long courses reduce the text printed on x axis 2002-11-21 16:19:19 +00:00
moodler d751ddcb5d Reduce errorlevel reporting 2002-11-21 16:07:58 +00:00
moodler 372ce3d10c COnverted it to DOS format to make it easier for Windows users 2002-11-21 16:00:18 +00:00
moodler ad40c8a23c Updates 2002-11-21 15:30:53 +00:00
moodler 3b9a79f977 Fixes to allow graphs to be translated 2002-11-21 14:57:10 +00:00
moodler 89b5432563 Allow admin user to always get in, no matter what the authentication method 2002-11-21 12:39:33 +00:00
paca70 fd6a7ee524 New files for translation 2002-11-21 12:17:15 +00:00
moodler 6ae24de0e1 No longer need the getuserinfo parameter 2002-11-21 11:28:46 +00:00
moodler 7c58aee6c7 Added full configuration to LDAP (ie transferrable fields etc) 2002-11-21 11:27:44 +00:00
moodler 7ff671df29 Bug fix for dbtype menu 2002-11-21 11:12:55 +00:00
moodler b3f9585bcb Daily changes 2002-11-21 10:33:24 +00:00
moodler 02accd9c6a Fixed a bug from reusing newsubmission variable 2002-11-21 10:26:54 +00:00
moodler f10ed36d8d Error checking on image writes 2002-11-21 10:23:10 +00:00
moodler b913b369e8 Small bugfix with uploading new user images 2002-11-21 10:17:08 +00:00
paca70 f74dcc5e08 some updates 2002-11-21 08:26:27 +00:00
moodler 009b59336b Updated version (authentication tweaks) 2002-11-21 07:53:35 +00:00
moodler 34daec9b3b Tweaks to authentication system. Database method now allows other
fields to be specified so that things like email, names etc can be
pulled in from external database when new Moodle accounts are created
2002-11-21 07:37:21 +00:00
moodler 780db23080 Slight improvements to file security (scan for more bad characters) 2002-11-21 02:51:50 +00:00
moodler 6e07f68039 Fixed background colours of recent activity and news 2002-11-20 15:24:34 +00:00
moodler 1e77d2035c Update version slightly 2002-11-20 15:17:03 +00:00
moodler d26c7f1740 Forgot a comma 2002-11-20 15:16:03 +00:00
moodler bb90c4e867 Added guestloginbutton as default 2002-11-20 15:04:21 +00:00
moodler 277d2d9f3e Make sure guestloginbutton is set to 1 as a default 2002-11-20 15:03:06 +00:00
moodler 3790f3a151 New string for general form errors 2002-11-20 15:01:59 +00:00
moodler 15e4b2ecd9 User pictures no longer are links on main view page 2002-11-20 14:58:24 +00:00
moodler a406cdec66 Made the user profile a little more robust.
Uploaded images are now saved even if the rest of the form
has errors.

If errors are found in the form then a message is printed up
the top to make it clearer that they need to fix something.
2002-11-20 14:52:32 +00:00
moodler bd4707bf29 Er.. aligned center works better ;-) 2002-11-20 09:41:02 +00:00
moodler 68e1b65291 Fixed alignment on category boxes in some circumstances 2002-11-20 07:18:55 +00:00
moodler b66265fe0b Spacing 2002-11-19 16:16:37 +00:00
moodler bdbf373097 New version before release 2002-11-19 16:15:51 +00:00
moodler 8afe23aa9a New features and fixes 2002-11-19 16:14:47 +00:00
moodler 4ef1e78349 New files (not translated yet) 2002-11-19 15:54:12 +00:00
moodler 3c1cb3178b Checking in new updates from Fabricio 2002-11-19 15:52:25 +00:00
moodler b03b72770b Daily changes 2002-11-19 15:07:40 +00:00
moodler 076b229292 Changed it to DOS format to help Windows users 2002-11-19 14:35:07 +00:00
moodler 62c13a2f3e Changed all references of %e to %d to fix strftime on Windows 2002-11-19 14:27:57 +00:00
moodler 60459ef768 Added Authentication to admin_links 2002-11-19 09:55:54 +00:00
moodler 8297c9a012 More fixes 2002-11-19 09:09:11 +00:00
moodler 2827f134cf Fixed some strings 2002-11-19 09:06:42 +00:00
moodler 35a48c9ae4 A significant new system for authentication configuration that
exposes the wide array of authentication possibilities.

Authentication now has it's own page separate from other variables.

Most of this work was done by Petri Asikainen <paca@sci.fi>, who started
these changes off.

I've done some cleanups and additions which is why I'm checking it in.

It's all working pretty well at the moment but could use some testing.

Thanks, Petri!  :-)
2002-11-19 08:51:33 +00:00
moodler dfe952f2ea Small change to allow the same user (by email) be deleted more than
once.  Also some security in making deleted usernames very hard to guess.
2002-11-18 12:21:27 +00:00
compuproggy e1e499e02c An alle English-Deutsch ?bersetzer, wer hilf mit? -
To all english german translators, who wants to help me?
2002-11-18 07:00:24 +00:00
compuproggy 9127aca8cd *** empty log message *** 2002-11-18 06:57:57 +00:00
moodler 2b8d022c20 Fixed the O's 2002-11-18 01:57:32 +00:00
moodler e3234db924 Added Norwegian 2002-11-18 01:56:09 +00:00
moodler dbd019866f Removed an empty file 2002-11-18 01:42:26 +00:00
moodler c49de76319 Complete Norwegian translation by Joran Sorbo! joran.sorbo@teleweb.no 2002-11-18 01:41:20 +00:00
moodler e1fb2ab5e8 New imap type (imaptls) solved problems with TLS capable servers (eg Courier) 2002-11-17 15:11:35 +00:00
moodler da978ae4c7 Minor formatting 2002-11-17 11:03:59 +00:00
moodler b9b2750adb Added info about $CFG->buggy_referer 2002-11-17 11:00:55 +00:00
moodler 303077fdb5 Updated version for those using CVS etc 2002-11-17 10:46:02 +00:00
moodler 60f18531c8 A default format for format_text() and a workaround embedded
for sites with the buggy referer problem :

  define $CFG->buggy_referer = true in the config.php to activate it
2002-11-17 10:45:34 +00:00
moodler 123d2ebbc5 Now displays instructions for any authentication method 2002-11-17 10:07:01 +00:00
moodler 817c698e8f Slight updates 2002-11-17 09:57:34 +00:00
moodler 704da28e4d Remove { error, and move things around 2002-11-17 02:51:36 +00:00
moodler 23cbf014c0 When someone logs out, cler all sessions and send them to home page 2002-11-16 14:24:49 +00:00
moodler bf09e379a4 Some docs added 2002-11-16 04:26:54 +00:00
moodler 98bc913c2c Slight fixes with defaults etc 2002-11-16 03:56:00 +00:00
moodler df3988ea8b Separated code for IMAP into IMAP, POP3 and NNTP 2002-11-16 03:49:32 +00:00
moodler 3829c7bdd0 Added es_mx from Claudio ... :-) 2002-11-15 16:59:15 +00:00
moodler bb56980c83 Small tidy up of names 2002-11-15 12:49:21 +00:00
moodler d5b94ef46c Nothing missing, just needs testing and debugging 2002-11-15 09:13:31 +00:00
moodler d17bdf2b37 More options and faster (use IPs always) 2002-11-15 08:59:30 +00:00
moodler d1b4e17267 More authentication possibilities 2002-11-15 08:42:40 +00:00
moodler dce48fc85a First version of code to authenticate against external database.
This NOT TESTED yet, and has parameters hardcoded ... it will of
course be using Petri's config interface later when that's ready.
2002-11-15 08:25:24 +00:00
carlesbellver b2649432db *** empty log message *** 2002-11-15 07:21:56 +00:00
moodler 085bd98e7e Add option that allows students to resubmit after being graded 2002-11-15 03:32:30 +00:00
moodler 0431bd7c73 Extend the range of allowable timezones up to 13 hours ... (NZ Daylight savings) 2002-11-15 02:46:48 +00:00
moodler cc94d11b83 Some updates 2002-11-14 13:33:19 +00:00
moodler d483bcd35d Typo in variable 2002-11-14 11:48:01 +00:00
moodler 98c4eae3ac Set the character set of email to be the same as the default language 2002-11-14 11:45:14 +00:00
carlesbellver db5b2eaa17 *** empty log message *** 2002-11-14 07:59:31 +00:00
moodler 661890114b Re-rolling 1.0.6.3 2002-11-14 06:34:15 +00:00
moodler a15803d3d8 Argh ... fix for Netscape fix - was causing problems on other browsers 2002-11-14 06:22:13 +00:00
compuproggy 2f2e3a49a3 *** empty log message *** 2002-11-14 06:01:26 +00:00
moodler 82af8447ed Updated link for Antonio 2002-11-14 04:14:32 +00:00
moodler 5f29b7e9c5 Mention the fix for very large classes 2002-11-14 03:59:44 +00:00
moodler f8ef7d66a2 Getting ready for 1.0.6.3 release today 2002-11-14 03:14:10 +00:00
moodler cfc12f2d97 Changes from Antonio to bring it up to date with 1.0.6.2! 2002-11-14 02:43:01 +00:00
moodler a6fcdf98af Update course cache when creating new standard forums! 2002-11-14 02:33:48 +00:00
moodler 7e72f66016 Catalan translation by Carles Bellver (with the help of Merc? Renau,
Clara Andr?s and Jordi Adell).
2002-11-13 15:23:29 +00:00
moodler 21d7e306b1 Spanish (Spain) provided by Antonio Navarro (based on es_mx) 2002-11-13 13:49:30 +00:00
moodler 4a16445a3a Returning to previous version 2002-11-13 13:30:45 +00:00
moodler 34e46e5787 Small script to force tables to be created even if the database already
contains tables ... useful for sharing with other applications.
2002-11-13 12:09:18 +00:00
moodler fcf8e83671 WHoops bad typo ... made everyone a guest! 2002-11-13 06:26:36 +00:00
moodler 910d1731af Guest language ALWAYS the same as the current site language 2002-11-13 02:11:50 +00:00
moodler 9769da67ab Improvements in appearance for Netscape browsers 2002-11-12 17:20:36 +00:00
moodler 81b635c360 Improvements to formatting on old Netscape browsers 2002-11-12 17:20:04 +00:00
paca70 e0dfdf25f8 More updates 2002-11-12 14:19:24 +00:00
compuproggy 342f96b5a3 *** empty log message *** 2002-11-12 13:28:22 +00:00
compuproggy 54262b876f *** empty log message *** 2002-11-12 13:21:25 +00:00
paca70 05da6502ba added support for list users from ldap. 2002-11-12 12:10:08 +00:00
paca70 0aea12d689 Some updates 2002-11-12 06:00:09 +00:00
moodler ff446576af Small fix just in case numfiles isn't set ... it will still try to display
files if timemodified is set ... workaround for possible bug
2002-11-12 05:05:21 +00:00
moodler c75f5b4348 Small tweak to specify specifically number of files in an update 2002-11-12 04:59:28 +00:00
moodler b68de3e4d9 Updated version number 2002-11-12 04:29:49 +00:00
moodler 13beeacbcd New course option to enable/disable display of "recent activity" 2002-11-12 04:26:16 +00:00
moodler cbb0fee071 For very large classes don't even try to show all the participants 2002-11-12 03:02:51 +00:00
moodler 553064412d Better looking headings with right-to-left languages 2002-11-12 02:19:44 +00:00
compuproggy 469a4e8568 *** empty log message *** 2002-11-11 12:27:58 +00:00
moodler 3b5bf411db Updates 2002-11-11 08:35:09 +00:00
moodler 48e4f8bc3a Missing file 2002-11-11 08:32:31 +00:00
moodler 0aa65a3935 Slight update to release notes for clarity 2002-11-11 08:28:39 +00:00
moodler 3635d82ff3 Updated version for final release of 1.0.6.2 2002-11-11 08:25:41 +00:00
moodler 7304b852cd Slightly more info in error message 2002-11-11 08:25:05 +00:00
moodler 07358d40a4 30 per page 2002-11-11 08:03:54 +00:00
moodler ad81212ec3 Rearranged code so some output is printed before tackling the big table 2002-11-11 07:58:11 +00:00
compuproggy 8f1370c603 *** empty log message *** 2002-11-10 21:48:28 +00:00
moodler 7c0f298426 Update course cache when modules are moved up or down 2002-11-10 14:45:11 +00:00
moodler 76d6be7020 Put a menu on the documentation 2002-11-10 14:05:52 +00:00
moodler e34461f5ea Use #defines for resource types ... just esthetics 2002-11-10 14:03:25 +00:00
moodler cdc27f74a3 Added navmenu for journal edit page 2002-11-10 11:44:58 +00:00
moodler f7e4436690 Fixed front page display of modules 2002-11-10 11:14:06 +00:00
moodler 26d037e63a New info, ready for 1.0.6.2 release 2002-11-10 11:10:19 +00:00
moodler 2ee50b1a5d Added paging now, so this page is now usable with many users 2002-11-10 11:00:57 +00:00
moodler 723974203f New string 2002-11-10 10:40:02 +00:00
moodler 584f0a10ed Starting to speed up this page 2002-11-10 10:19:06 +00:00
moodler 7bee16d404 More sensible varible names 2002-11-10 08:55:39 +00:00
moodler c408b0c49b print_section now uses cached course modinfo to lessen load in database 2002-11-10 08:55:11 +00:00
moodler dfc9ba9bbe Added navmenu in more places 2002-11-10 08:43:44 +00:00
moodler 3e50a13968 Fix to break out of frames 2002-11-10 08:08:23 +00:00
moodler 4359e8f715 Typo in navmenu 2002-11-10 07:59:01 +00:00
moodler f0207959ab Bring back button to home page, update versions etc 2002-11-10 07:57:11 +00:00
moodler b1ae5fb0a8 Added menu stuff to other themes 2002-11-10 07:44:01 +00:00
moodler d897cae419 Changes to enable jumping between activity modules, using a new menu in
the upper-right corner.   Caution: Not well tested at this stage.
2002-11-10 07:37:15 +00:00
moodler 14272cdc38 Latest from Gilberto 2002-11-09 08:35:06 +00:00
moodler 4fdb415494 New version date 2002-11-09 06:52:30 +00:00
moodler f39d5f4576 Use course setting for "student" 2002-11-09 06:29:21 +00:00
moodler b309c289db WHoops typo 2002-11-09 06:24:21 +00:00
moodler f762c448ef FINALLY! Surveys are now translatable! :-) 2002-11-09 06:22:57 +00:00
moodler 8dfc9d0f19 Using LOCALE defines, not strings 2002-11-08 01:33:04 +00:00
moodler cdb56e3dc5 Modified files from Fabricio 2002-11-07 12:05:17 +00:00
moodler f426a62eff Header "login" link now breaks out of possible frame 2002-11-07 11:18:18 +00:00
moodler 8552044d4d Update for course format changes etc 2002-11-07 09:34:51 +00:00
moodler 9a22359743 Fixes to course display, tidy up of some code (could do with more)
and mainly - addition of section 0 display.
2002-11-07 09:30:41 +00:00
compuproggy 8f577101f4 *** empty log message *** 2002-11-07 08:53:53 +00:00
moodler 9fc3aa87b4 Tweaks 2002-11-07 03:01:53 +00:00
moodler 6f3ba7c93d Make a $homepage flag for use in footers 2002-11-06 15:46:12 +00:00
moodler 405ea757e6 Fixed some more missing strings 2002-11-06 09:13:19 +00:00
moodler 941dd21efb Fixes and simplification 2002-11-06 08:54:28 +00:00
moodler 4242a73f37 Bug fix on record counting 2002-11-06 08:44:44 +00:00
moodler aa96df8fef New version and release notes for 1.0.6.1 2002-11-06 08:30:33 +00:00
moodler f9f48383e3 New string 2002-11-06 08:24:54 +00:00
moodler 22710216f2 Add link to module editing ... back to module type list 2002-11-06 08:24:29 +00:00
moodler b7b4287462 Added new type of assignment - offline.
This type of assignment doesn't require anything of the student online,
it just tells them about an assignment and the teacher can provide
feedback and grades.  Useful for offline activities, and also for the
teacher to add manual columns to the grades page
2002-11-06 08:12:06 +00:00
moodler 65ccdd8cc8 When using loginas to be a student, you can now return to being
yourself using a link in the footer.  Improvements to footer display
2002-11-06 07:54:44 +00:00
moodler 7cbfca14c7 Added string for search results 2002-11-06 07:40:56 +00:00
moodler 46217d06b5 Language fixes 2002-11-06 07:40:36 +00:00
moodler 5ebe27e22c Fixed notices a bit 2002-11-05 16:47:30 +00:00
moodler cb909d74ca Fixes to prevent teachers using loginas to enter other courses as that student 2002-11-05 16:38:02 +00:00
moodler 34fdf5b933 Minor wording changes 2002-11-05 07:06:36 +00:00
moodler 3ea810dab0 Added Spanish 2002-11-05 07:04:44 +00:00
compuproggy 4249e34fbf *** empty log message *** 2002-11-05 06:34:57 +00:00
moodler 9f58537a53 Added SMTP authentication for email delivery 2002-11-05 06:06:18 +00:00
moodler 54e90f2d97 Checking in for Holger 2002-11-03 14:35:37 +00:00
moodler 9368247eb6 Simple help about assignment types 2002-11-03 09:34:17 +00:00
moodler 5331c4645b Changes from Fabricio Valadares 2002-11-02 17:34:35 +00:00
moodler 55dace4186 Updates from Claudio 2002-11-01 02:53:50 +00:00
moodler ad6c33dcaa New guest language is same as site 2002-11-01 01:11:46 +00:00
compuproggy 6f4db0e365 *** empty log message *** 2002-10-31 05:52:11 +00:00
paca70 32385d38a1 Initial Finnish translation 2002-10-30 19:20:48 +00:00
moodler b176f8e4cb Updated name of thislanguage 2002-10-30 02:40:46 +00:00
moodler 8b303d1d15 Updated version a little 2002-10-30 02:19:23 +00:00
moodler effdbf913f A very early Arabic translation 2002-10-30 02:09:19 +00:00
moodler b7808b3d97 Spanish translation (Mexican flavour) from Gilberto Rodr?guez et al 2002-10-30 02:00:40 +00:00
moodler ebaf37b55d Checking in CHanges to be part of a 1.0.6 rebuild to include the last
few days of minor changes (documentation etc)
2002-10-29 16:47:16 +00:00
moodler 7209909ec9 On second thoughts, don't apply locale to numbers because it may
affect some calculations.   Just strings and times.
2002-10-29 15:33:09 +00:00
moodler fa0c7d6d91 Use the locale to set everything (eg string conversions, comparisons,
money numbers etc instead of just the time)
2002-10-29 15:25:22 +00:00
moodler 024172be96 Fixed links back to top 2002-10-29 15:02:09 +00:00
moodler 27c82ede5e added documentation 2002-10-29 14:57:12 +00:00
moodler e149249bd2 Improvements to documentation formatting, content etc 2002-10-29 14:48:58 +00:00
moodler 533e975551 Added session.auto_start (off) ... having it turned on will break Moodle
on some versions of PHP
2002-10-29 12:30:31 +00:00
compuproggy 95152d474a *** empty log message *** 2002-10-29 06:24:12 +00:00
moodler 53f2259aa9 Added short_open_tag 2002-10-29 04:04:08 +00:00
moodler a5d34d51cb Removed UPGRADING.txt (replaced by doc/upgrade.html) and updated README.txt
to make it a bit clearer about where all the docs are.
2002-10-29 03:52:10 +00:00
moodler d6cd6ec4f6 New upgrading page (replaces the old UPGRADING.txt) 2002-10-29 03:47:43 +00:00
compuproggy 3129b66906 *** empty log message *** 2002-10-28 13:24:25 +00:00
compuproggy cb87603810 *** empty log message *** 2002-10-28 12:12:16 +00:00
moodler 41f2f344ab Show date in red if assignment date has passed 2002-10-28 02:25:18 +00:00
moodler f59d8272e8 Use translated strings for all upload feedback 2002-10-28 02:24:38 +00:00
moodler 660c20a6ba Added some new strings 2002-10-28 02:24:01 +00:00
moodler 52ab14dd82 Fixed "uploaded assignment" (uploadsuccess) string 2002-10-28 01:30:00 +00:00
compuproggy 519c5a76cd *** empty log message *** 2002-10-27 15:04:30 +00:00
moodler 627de17eda Typo (Survey mentioned twice) 2002-10-27 03:10:10 +00:00
moodler 4a3e5f7e25 Missing a bracket ) 2002-10-26 14:36:01 +00:00
moodler 97f3bedc10 I mean it!! This is 1.0.6!!!! 2002-10-26 06:16:33 +00:00
moodler 3a50203f34 Fixed small bug that was displaying fractions with too many decimal places
(eg 0.9999 instead of just 1)
2002-10-26 06:11:43 +00:00
moodler e386617506 OK, this is 1.0.6 2002-10-26 05:50:09 +00:00
moodler 06a609e91e One more thing - I' moved the RELEASE.html into the other documentation
to make it easier to find later on.
2002-10-26 05:37:31 +00:00
moodler 736458f308 Moving ../RELEASE.html to here 2002-10-26 05:32:26 +00:00
moodler 5946a43ee9 TIME TO CUT THE CORD, GENTLEMEN. THIS IS 1.0.6. 2002-10-26 05:26:06 +00:00
moodler cb62c00ad2 Fixed minor bug after creating default category. 2002-10-26 05:17:53 +00:00
moodler 960a79887b Updated version numbers in preparation for 1.0.6 release 2002-10-26 04:37:56 +00:00
moodler 67f0b4ccb0 Better formatting for the link 2002-10-26 03:37:06 +00:00
moodler a8afb411a0 OK, this should be better ... 2002-10-26 03:33:07 +00:00
moodler c585fa1707 A first try at a new shortening algorithm ... checking in to do some
tests on various servers
2002-10-26 03:21:41 +00:00
moodler 211ee674b3 Changed type of quiz_answers.feedback to TEXT (255 chars was a bit cramped) 2002-10-26 03:13:54 +00:00
moodler 0ee8d9203e Added some commented-out code that MIGHT help people with string slash problems. 2002-10-26 02:31:49 +00:00
moodler 2138dcf29d Added quiz max grade in column title, for reference 2002-10-25 15:34:05 +00:00
moodler 153cc356cb Added TARGET=_blank to links in HTML email ... apparently these links
were causing problems in Hotmail.  Normally I'd say "Good!", but ...  :-)
2002-10-25 15:27:12 +00:00
moodler 86c5e69a36 Remove "news" and "social" forums from learning forums. 2002-10-25 14:46:42 +00:00
moodler 690b1941fc About time 2002-10-25 09:14:16 +00:00
moodler e6874d9ff6 Brand-new news and social forums are now also assigned course modules and
put in section 0 of the course.
2002-10-25 09:10:40 +00:00
moodler 95e143f4cc Ugh type in string module name 2002-10-25 08:54:29 +00:00
moodler 7beb45d8a0 Upgrading all news and social forums (except those in social courses)
so that they are course modules in an (invisible) section, which means
they are now editable and parameters, names etc can be changed.
2002-10-25 08:47:53 +00:00
moodler bd823371c9 Making it clear not to overwrite old files 2002-10-25 08:42:06 +00:00
moodler e11c24bc0e Added translation for Attempt quiz now 2002-10-25 08:15:03 +00:00
moodler 256d0b7b47 Slight change to configlocale ... added examples 2002-10-25 08:01:48 +00:00
moodler 6c506ca744 Disallow people posting in forums where they arent allowed to post! 8-. 2002-10-25 07:22:59 +00:00
moodler 87a2fa0338 Tweaks 2002-10-25 07:17:23 +00:00
moodler f690562f81 Tweaks to mail formats so that unnecessary information (replies, etc)
is not printed.
2002-10-25 06:50:40 +00:00
moodler 3260de6780 Tweaks to forum formatting 2002-10-25 05:58:39 +00:00
compuproggy 4a91f52161 *** empty log message *** 2002-10-25 05:46:33 +00:00
moodler 1ea355a851 Latest updates from Fabricio 2002-10-25 03:20:59 +00:00
moodler ed4ed0939b Weekdays are now calculated using userdate, so that
- they are relative to the user
  - they should take advantage of locales etc
2002-10-25 02:11:58 +00:00
moodler 2be8b28f3d Changes to improve usability when the admin folder has been renamed,
and also a change in checking for the admin user, just in case an
old session is hanging around
2002-10-25 02:02:02 +00:00
moodler 255f2cc06e All the variables were missing! 2002-10-24 13:41:52 +00:00
moodler 4313922f65 Fix for category box display on IE 2002-10-24 12:49:53 +00:00
moodler e7b7951c0a The BR in print_post was to fix the case when embedded images are used.
However it added too much space.  I'll find a way to fix the embedded
images problem later, during the styles changeover, as it's pretty
rare.
2002-10-24 07:09:29 +00:00
moodler 23877f9407 never upgraded choice tables to six choices! 2002-10-24 03:43:37 +00:00
moodler 6673b085a9 Updated with some new features 2002-10-24 03:11:57 +00:00
moodler 3d27c2c201 Added a new debugging command so that I can see the config variables 2002-10-24 02:42:26 +00:00
moodler f6b502d246 more readable 2002-10-23 14:38:24 +00:00
moodler eb8eb6abc5 Rearranged to alphabetical order 2002-10-23 14:33:23 +00:00
moodler cef08a3a99 Forgot to mention the new LDAP functions! My deep apologies, Petri,
1.0.5 was too long ago - I forgot your plug-in was developed since then!
2002-10-23 14:30:38 +00:00
moodler e870c78bfc WHoops ... just undoing the last checkin which was premature ... 2002-10-23 12:13:47 +00:00
moodler 72c578ca4d Mail now contains Moodle version 2002-10-23 12:12:01 +00:00
moodler cc3b8c75de After saving new question, sanity checks are made to make sure the
fractional grades are correct.

Icons now have tooltips and are also a shortcut to editing page.
2002-10-23 12:10:38 +00:00
compuproggy cbb8979fa9 *** empty log message *** 2002-10-23 07:27:02 +00:00
moodler e7311a0a56 Changed name of upgrade_moodle function to main_upgrade (for consistency) 2002-10-23 04:10:10 +00:00
moodler 3bd87406ba Latest version of Italian from Davide Suraci. 2002-10-23 02:00:16 +00:00
moodler e4814d7f63 cvs update -dP
not

cvs update -d
2002-10-22 13:17:04 +00:00
compuproggy 6fad164f96 *** empty log message *** 2002-10-22 12:36:02 +00:00
moodler f6f0e53de0 Updated information for 1.0.6 Beta 1 2002-10-22 11:21:54 +00:00
moodler ffc5a2c03a More concise feedback on grading, and more efficiency (only update
attempt grades that have changed)
2002-10-22 10:56:48 +00:00
moodler cd63d77e08 Added help pages to quiz module.
A few little cleanups, such as trim() on shortanswers
2002-10-22 10:38:00 +00:00
moodler 377f3c9ee4 new function print_heading_with_help() to print a heading with a helpbutton 2002-10-22 09:54:36 +00:00
moodler f31edeeb88 Display tweaks to table of attempts 2002-10-22 07:03:36 +00:00
moodler e331eb06fd Teacher can now regrade (recalculate grades) of all quiz attempts
(in case the quiz changed somehow)
2002-10-22 06:52:23 +00:00
compuproggy 5ecb135644 *** empty log message *** 2002-10-22 05:37:42 +00:00
moodler 6d86b5dc16 Teacher can now view student attempts 2002-10-22 04:25:58 +00:00
moodler ff99ff634e German should be Deutsche 2002-10-22 02:48:05 +00:00
moodler ede685a73e Fixed name/date variables (don't translate variables!) 2002-10-22 02:34:41 +00:00
moodler 66197f51cc Removed unnecessary mentions of sel@ction 2002-10-22 02:30:36 +00:00
moodler e1c91df09b Can now delete questions. It checks that the question doesn't belong to
any quizzes first (if it's in a published category then it checks all quizzes
on the server).
2002-10-21 15:00:51 +00:00
moodler 34a4dfee10 Added log_display entries for quiz 2002-10-21 14:57:34 +00:00
moodler 2383cadbab Display tweaks 2002-10-21 13:13:33 +00:00
moodler 38f03e5a5c Round $bestgrade when storing it to avoid insert_record problems 2002-10-21 13:02:14 +00:00
moodler 20a3006529 Print intro as HTML 2002-10-21 12:49:28 +00:00
moodler 466a69bc42 Bugfix on calculating correct answers for multichoice questions 2002-10-21 12:48:13 +00:00
moodler e909c8d090 Some error checking 2002-10-21 12:39:46 +00:00
moodler 305ce2b33c Convert intro text to HTML 2002-10-21 11:41:36 +00:00
moodler 840aaba179 Added some more allowed HTML tags 2002-10-21 09:16:06 +00:00
moodler 2a3cda192e Allow teachers to look at ratings for anyone 2002-10-21 08:44:56 +00:00
moodler f166d2e295 Fixed up rating retrieval ... now gets them all seperate 2002-10-21 08:36:15 +00:00
moodler 36df40d60e Fix in forum_grades 2002-10-21 08:32:37 +00:00
moodler 4db9d14dad Don't show column grade when there's nothing to show 2002-10-21 08:19:15 +00:00
moodler caadf00909 Rearranged functions to match other modules, and added forum_grades() 2002-10-21 08:10:24 +00:00
compuproggy fa452aa6f0 *** empty log message *** 2002-10-21 08:06:42 +00:00
compuproggy 15657235ef *** empty log message *** 2002-10-21 08:02:03 +00:00
compuproggy 2ad604fe3c *** empty log message *** 2002-10-21 07:58:18 +00:00
compuproggy 8e44daa729 *** empty log message *** 2002-10-21 07:45:48 +00:00
moodler 912c058651 Grades are not always numbers, so take care in XLS writing 2002-10-21 06:55:01 +00:00
moodler be025399d8 Table header aligns to top 2002-10-21 06:51:56 +00:00
moodler 629e937352 Added journal_grades() so journals show up in the Grades page 2002-10-21 06:42:58 +00:00
moodler 09a4ce320c Changes to toolbar to position color pickers better, and
reintroduce the "select all" button.  Unfortnately, I had
to remove the "About richtext" button to make room
2002-10-21 05:42:37 +00:00
moodler 4168490e17 Added paragraphs to allowed HTML tags 2002-10-21 04:12:54 +00:00
moodler 7bcb78cee3 Modified language so that it speaks to students as well as teachers 2002-10-21 03:23:45 +00:00
moodler 51cc244d12 Added quizzes 2002-10-21 03:04:05 +00:00
moodler e5dfd0f31f Improvements to help, and addition of new "Activity modules" help
for teachers adding new modules.
2002-10-21 03:00:40 +00:00
moodler 2ee53d15ff Some more clues for new admins ... 2002-10-20 18:06:04 +00:00
compuproggy f38aa1ef23 *** empty log message *** 2002-10-20 18:02:40 +00:00
moodler f1edd1922f Updated versions 2002-10-20 17:50:20 +00:00
moodler 3bf89042f5 Whoops, forgot to check in these new icons 2002-10-20 17:42:28 +00:00
moodler b55a466b60 Fixes for display of public categories 2002-10-20 17:41:24 +00:00
moodler c74a0ca5c2 Category editing in quizzes is now supported. Some other little
cleanups along the way ...
2002-10-20 17:15:39 +00:00
moodler f9a9499a62 Guests can no longer see or attempt quizzes 2002-10-20 10:13:04 +00:00
moodler 60f49825a5 New and fixed strings 2002-10-20 10:12:36 +00:00
moodler 16c0beb00b Strip slashes from print_simple_box (just in case) 2002-10-20 10:12:12 +00:00
moodler 4b9b2f0fe4 Fixed display of "done" assignments 2002-10-20 05:35:48 +00:00
moodler 8db3eaddb2 Now shows correct answers, plus some small bug fixes 2002-10-20 05:35:25 +00:00
moodler c1d5710174 Cleaned up format a little, plus added better error checking of server
variables so that at least people will get feedback if they are missing
2002-10-19 04:58:14 +00:00
compuproggy 9b21d119c0 *** empty log message *** 2002-10-18 19:19:35 +00:00
compuproggy 7b1593f040 *** empty log message *** 2002-10-18 17:20:10 +00:00
moodler 7e67441553 Added stuff about the text editing 2002-10-18 17:17:32 +00:00
moodler 0be05df068 Find URLs at the beginning of lines ... 2002-10-18 17:05:17 +00:00
moodler 958aafe2b4 Quiz attempts are now timed. This is done by starting the quiz_attempts
record upon showing the quiz, and completing it upon submit.

Two new fields in quiz_attempts... should be upgrade friendly.
(Old attempts will show up as being of duration zero)


Also some small fixes here and there.
2002-10-18 16:05:21 +00:00
moodler 9f7fd360dd Some tidy ups 2002-10-18 16:02:12 +00:00
moodler aef47af493 Added RTE etc 2002-10-18 16:01:35 +00:00
moodler 291febf79c Improved the documentation (it has some live feedback on the state
of the Richtext functionality)
2002-10-18 11:27:14 +00:00
moodler 18a322490d Cleanup 2002-10-18 09:40:35 +00:00
moodler cf094bd4b4 Better help with text formats 2002-10-18 09:38:58 +00:00
moodler 02a72a36f1 Improved the help page 2002-10-18 09:35:20 +00:00
moodler 2166bb5d7a Language changes and help documentation additions to clearer explain richtext, html and moodle auto-format 2002-10-18 09:29:44 +00:00
moodler d2e186ed71 Revised string for formattext to make more sense 2002-10-18 09:09:54 +00:00
moodler 3fe3851d57 OK, I've rationalised the text formatting now. Basically, both Moodle and
HTML text allow the same range of HTML tags (so it doesn't matter is you
switch from one to the other).

<IMG> and <A> are now ALLOWED in Moodle text.  However, the clean_text
function now checks for and removes any embedded javascript triggers
to avoid cross-site scripting attacks that way.

clean_text() should be called on ANY text that comes in from students.
2002-10-18 09:09:19 +00:00
moodler a0bac19d81 Whoops ... typo. 2002-10-18 09:00:09 +00:00
moodler 57243ffe02 Also set default language on new user created by external authentication 2002-10-18 08:52:33 +00:00
moodler 177e50ed98 New users created by admin also now default to site language 2002-10-18 08:48:44 +00:00
moodler 369622db97 Default language for users is now the same as the site language. 2002-10-18 08:46:12 +00:00
moodler 08beb3327b Allow <IMG> tags in Moodle format text. Not having it can really mess
up smileys etc if the text has been edited at any stage using the
richtext editor.

I realise it's possible for students to really mess up forums display
etc if they wanted to include a huge picture ... I'm not sure if there
are any cross-site scripting attacks possible with images in there.

But there is also now the HTML format for most things, which is editable
using an ordinary form, so this problem is currently already exposed.

I think it's OK as long as can find a filter to strip all javascript
out of ANY format text in Moodle.
2002-10-18 06:05:56 +00:00
moodler e757af1662 Fixed the setting of answers for true-false questions 2002-10-18 05:41:24 +00:00
moodler f9ef3d77d1 Just some better formatting and info 2002-10-18 00:18:26 +00:00
moodler 11a3c89a8f Made transparent 2002-10-17 23:49:02 +00:00
moodler b0e999e646 Changes related to new module 'resource' 2002-10-17 15:32:52 +00:00
moodler 92674bf8bb Changes due to new module 'resource' 2002-10-17 15:14:54 +00:00
moodler 3a5a667386 Changes due to new resource module 2002-10-17 15:10:59 +00:00
moodler 242ee0175f Resulting from module name change 2002-10-17 15:07:22 +00:00
moodler 6c3e8758c6 Changed reading.php to resource.php 2002-10-17 15:03:20 +00:00
moodler 3d58a8b50b Moved from reading module 2002-10-17 14:32:55 +00:00
moodler 4282d7dde2 Changed string neverread to neverseen 2002-10-17 14:28:12 +00:00
moodler 2a439ba7f6 ***NOTE NOTE NOTE **********************************************************
THIS IS A BIG CHANGE!

I've renamed the "reading" module to "resource".

This meant changing quite a few references throughout Moodle.

The automatic upgrade process should work OK (it worked OK on my
development server) and there shouldn't be any problems.

BUT PLEASE PROCEED WITH CAUTION AND KEEP BACKUPS OF EVERYTHING
UNTIL I HAVE A FEW MORE TESTS!   If you upgrade please let me know.

One thing that will break are any hard-coded links within forum messages.

What I will be doing to fix this on my apache server is to add this to
httpd.conf:

Redirect /mod/reading/ http://moodle.com/mod/resource/

Sorry about any inconvenience, but it's better this is done sooner than later.
2002-10-17 14:03:59 +00:00
moodler e1ac42728d Added a 'change password' button 2002-10-17 12:25:25 +00:00
moodler 269eed6448 Changed headers so that it works seamlessly when called from user page. 2002-10-17 12:21:55 +00:00
moodler 952489e16c The grades page now supports downloading of grade data! :-) 2002-10-17 10:34:11 +00:00
moodler 417e6821bd Removed some blank lines that were causing output 2002-10-17 10:33:13 +00:00
moodler 6e770b179c Grr added transparency back again ... 2002-10-17 08:32:29 +00:00
moodler da19305885 Re-adding to overcome CVS strangeness (and my own indecision!) 2002-10-17 08:30:41 +00:00
moodler 9809249838 Better grade reports 2002-10-17 08:28:18 +00:00
moodler e34d323730 Some new strings 2002-10-17 07:58:50 +00:00
moodler 858deff0b4 Now includes maximum grades 2002-10-17 07:55:54 +00:00
moodler d0ac6bc236 Added new grading functions to work with course/grades.php 2002-10-17 07:23:51 +00:00
moodler 3486b7bee5 Added a new grading tool for teachers to see all grades on one page.
Grades are collected from each module using the module_grades function in
each mod/*/lib.php.
2002-10-17 07:23:12 +00:00
moodler 19c4f55c43 Feedback fixes 2002-10-16 15:52:29 +00:00
moodler 5f652ac38e Alt text on moodle logo 2002-10-16 15:48:22 +00:00
compuproggy c5e900c8aa *** empty log message *** 2002-10-16 10:42:35 +00:00
compuproggy 90892fd130 *** empty log message *** 2002-10-16 10:24:09 +00:00
moodler a8a372ccf7 Various fixes and additions. It now does quiz feedback pretty well
(though it doesn't show correct answers yet).
2002-10-16 09:35:04 +00:00
compuproggy 735715779b *** empty log message *** 2002-10-16 09:31:14 +00:00
compuproggy d6aa0e227e *** empty log message *** 2002-10-16 08:48:11 +00:00
moodler 18de986eb1 Actually, let's include journals that have no feedback yet as well. 2002-10-16 07:18:07 +00:00
moodler 8bff8ad835 When a teacher is giving feedback, entries that have been modified since
the last time a teacher has given feedback are highlighted.
2002-10-16 07:15:36 +00:00
moodler b425749fc3 Teacher can now use the richtext editor to edit the assignment text 2002-10-16 05:31:56 +00:00
moodler 7ce20f09cb Changes related to module editing buttons 2002-10-16 04:53:44 +00:00
moodler df2898fe3b Don't show htmleditor preference if it's disabled by admin 2002-10-16 04:52:57 +00:00
moodler 09aebc9468 Cleaned up some buttons ... 2002-10-16 04:51:55 +00:00
moodler 92a3c884f5 Small bugfixes ... (yawn) 2002-10-15 17:32:50 +00:00
moodler 7520988bb3 Fixes for grades 2002-10-15 17:13:11 +00:00
moodler 0a7994a0ba Just updated the number 2002-10-15 16:49:32 +00:00
moodler ab9d6d1e0e Some additions 2002-10-15 16:48:44 +00:00
moodler 55c2620784 Got rid of the wimpy icons in the top-right corner of pages and put some
manly buttons there.  ;-)   I think this will be much clearer for novices,
as well as being a bigger target for experts!
2002-10-15 16:47:43 +00:00
moodler 6b069ecef1 Bit of a clean up of the edit interface ... 2002-10-15 16:45:39 +00:00
moodler 49dcdd1800 Added timeopen and timeclose (instead of days) and did a few cleanups 2002-10-15 16:22:18 +00:00
moodler d197118510 Admin script to brutally delete every file and directory from the
Moodle data directory.  Will be useful for those on hosting servers
without root access.
2002-10-15 16:04:38 +00:00
moodler 8d94f5a08e OK, it seems reliable enough now for alpha testing.
If you have existing quizzes, delete them all, then
drop all the quiz tables and delete the quiz line from
the modules table.

Things to do still:

  - add/edit/remove categories
  - display question feedback on submissions ...
  - record the time they started the quiz, as well as the completion.
  - place time limits between attempts
  - add full specification of quiz open time and quiz close time
2002-10-15 12:54:11 +00:00
moodler 2a2c9725bb Can now create and re-edit all three types of questions.
Still working on grading ...
2002-10-15 10:04:28 +00:00
moodler 2834cce0d9 New strings 2002-10-15 05:31:03 +00:00
moodler 31e7516eb5 Forms now done, more or less 2002-10-15 05:29:57 +00:00
moodler d0030cf051 A little more explicit about PHP requirements 2002-10-15 03:48:04 +00:00
moodler 109613b290 Fix to clear the modform variable just in case there's one
from one module that later affects another module.
2002-10-14 16:06:19 +00:00
moodler ff80e012b0 Miscellaneous little changes from today ... 2002-10-14 16:00:55 +00:00
moodler edecd16dd2 New strings 2002-10-14 15:58:07 +00:00
moodler 10b9291c92 Checking in what I got so far .... Not working yet but I'm going to bed. 2002-10-14 15:57:33 +00:00
moodler 7bd1aa1d64 Quiz generation is working now. Just need question and category editors. 2002-10-14 12:21:18 +00:00
moodler 6a952ce7a0 Many new additions - code not quite usable yet, but getting close 2002-10-14 09:07:13 +00:00
moodler 2eaa2e2861 New strings 2002-10-14 09:04:33 +00:00
moodler 579ddad5ef Added a basic report and some clean-ups 2002-10-13 13:51:56 +00:00
moodler 5c0ee23cc3 Now uses real current language (may not be the same as $CFG->lang) 2002-10-13 10:06:01 +00:00
moodler a5e1f35c66 Just to show that something is happening!
At this stage this module:

  - prints quizzes,
  - accepts answers (for multiple attempts) and grades them,
  - stores the grades.

Really, it's usable as long as you don't mind using the database manually. :)

Next up is quiz reports, then I'll tackle quiz creation.
2002-10-13 07:17:48 +00:00
moodler 5a84640bd1 Tweaks to use new javascript-printing function etc 2002-10-12 15:01:17 +00:00
moodler 3df49694a9 New function to print richtext javascript 2002-10-12 15:00:34 +00:00
moodler 901f9f74e1 First version of German (Deutsch) translation, by Holger.Schadeck@webdesign-forum.de
Great!
2002-10-12 14:33:01 +00:00
moodler e1947876ec Moved the object code out into a function print_textarea 2002-10-12 07:23:16 +00:00
moodler aed0b713fe new string 2002-10-12 06:27:24 +00:00
moodler b2a5ee1822 Added richtext to Journal entries. 2002-10-12 06:20:56 +00:00
moodler 87aa027831 Some notes about the other new stuff. 2002-10-12 05:47:05 +00:00
moodler a5a5a129b7 Added help buttons about the richtext editor (when active) 2002-10-12 05:43:00 +00:00
moodler 66dc0c39d0 Help file for the new richtext HTML editor 2002-10-12 05:39:00 +00:00
moodler 1a072208ce Smilies are now replaced even in HTML text, and small fixes 2002-10-12 05:09:49 +00:00
moodler 75096957ca Keep this one here :-) for the interface 2002-10-12 04:19:51 +00:00
moodler d86cdde20b A bit of info 2002-10-12 04:13:39 +00:00
moodler 0c074a4f2e No longer needed ... replaced by "angry.gif" ... 2002-10-12 04:12:26 +00:00
moodler 2ec69fce6a Added a function useful for debugging Javascript problems 2002-10-12 04:09:51 +00:00
moodler 1581d9b1d8 Swapped clown icon for surprise in the layout ... looks better that way 2002-10-12 04:06:26 +00:00
moodler 696f751f7a Swapped clown for surprise - looks better that way 2002-10-12 04:04:59 +00:00
moodler c828070ac9 Deleted these icons because I'm not using them. The editor now uses
the standard Moodle icons instead.
2002-10-12 04:03:23 +00:00
moodler cd68ebfaef This page now uses the Moodle standard icons for consistency 2002-10-12 03:55:50 +00:00
moodler 84f98bc8a9 Removed references to btnPost because I don't use it 2002-10-12 03:54:56 +00:00
moodler c9dda99059 Modified text_to_html to use the new smilies, which for efficiency are
now defined in a global array, and use str_replace instead of ereg ...
2002-10-12 03:53:40 +00:00
moodler d2aad0a838 Modified this help file to describe the new smilies 2002-10-12 03:51:29 +00:00
moodler c0f4f066c2 Modified all smilies and added some new ones. 2002-10-12 03:50:45 +00:00
moodler 113bb2a26b Better placing of standard links etc when there are lots of images and
other funny formatting in HTML posts
2002-10-11 05:20:23 +00:00
moodler a9ff3d4cdf New strings to do with language direction 2002-10-11 02:32:05 +00:00
moodler 541117b6cb Changes to support choice of language direction (so that languages
like Arabic, Hebrew etc will work)
2002-10-11 02:31:37 +00:00
moodler 4b9318947c Added a new string to make it very clear how to upload assignments 2002-10-11 01:58:24 +00:00
moodler 213e8cc67d Better default options, and hiding of moodle-text help when htmlediting is operational 2002-10-10 09:27:49 +00:00
moodler c4a4cae062 Added another translator for Finnish 2002-10-10 07:29:44 +00:00
moodler da061bb457 Added option to choose HTML editor 2002-10-10 07:29:09 +00:00
moodler 73bb08357c Initial attempt at adding html text editor features to these forms. 2002-10-10 07:27:57 +00:00
moodler d2fce839b6 Updated the version (database table addition user->htmleditor) 2002-10-10 07:27:07 +00:00
moodler 0095d5cd3c Additions to cope with richtext editor being used in some forms. 2002-10-10 07:26:10 +00:00
moodler fa7d70c8c1 Added new strings 2002-10-10 07:24:59 +00:00
moodler de909d238d Adding a beta version of Rich Text Editor, for embedding into Moodle
forms (forums, readings, journals etc).  Works only on IE 5.5 and later.

Slightly customised for a slimmer toolbar.
2002-10-10 07:21:32 +00:00
moodler bc0750aaae Arg .. so much for quick hacks ... this code is so messy it's
a hassle to hack ... going back to the way it was originally, with
just a more informative error message instead.
2002-10-09 14:20:24 +00:00
moodler 0bdce31166 Changes to avoid cryptic errors 2002-10-09 14:08:33 +00:00
paca70 b54cd88f34 More corrections, documentation is coming. 2002-10-08 15:51:27 +00:00
moodler b1f2587a65 Latest changes for Italian version, by Davide Suraci 2002-10-08 02:09:43 +00:00
paca70 80f4bff33e Initial version 2002-10-07 17:17:33 +00:00
paca70 2cfd9e4dc9 Some corrections 2002-10-06 18:41:38 +00:00
paca70 66ea86f3b8 Initial version 2002-10-06 18:24:14 +00:00
moodler f3632647e7 Empty file 2002-10-06 17:31:46 +00:00
moodler 8e7ad7283b New words 2002-10-06 17:20:54 +00:00
moodler f8e4809a03 New function print_file_picture for printing a picture from the
files area, or optionally from a URL
2002-10-06 17:20:32 +00:00
moodler 14d8c0b409 Further work done. It currently can print the quiz form (including images!)
but can't mark them yet.  I've been constructing quizzes manually in the
database and it's helping to refine the database structure.  Don't count
on anything stable in the quiz module for a few days yet ...
2002-10-06 17:06:54 +00:00
moodler 55c0c75c03 A start on the page that actually prints the questions and stores the answers 2002-10-06 03:24:56 +00:00
moodler 36658798dc More or less working now 2002-10-06 03:23:34 +00:00
moodler 3a506ca299 Added some more functions 2002-10-06 03:23:16 +00:00
moodler 765814def3 Changed includes of module libraries to use full pathnames constructed
from $CFG->dirroot, rather than relative.  This is because the relative
path could sometime be a different case to the full path (on Windows)
causing include_once not to work.
2002-10-06 03:05:22 +00:00
moodler f01826ee39 Moved module upgrading functions out into database-specific files 2002-10-05 17:21:39 +00:00
moodler c0d6bcc508 Moved upgrade functions into db/mysql.sql 2002-10-05 17:20:24 +00:00
moodler 31f0900c61 Moved upgrade_moodle functions out to database-specific files, because
the SQL is not compatible (nor is it possible to make it so).
2002-10-05 17:09:31 +00:00
moodler e858f9da96 create_new_user() can now import other fields from an external source
if the function for it has been defined.  (Petri's code with additions by me)
2002-10-05 16:49:42 +00:00
paca70 2a86e7a1a5 More corrections 2002-10-04 13:07:16 +00:00
moodler 730fd187c8 Skeleton version of the quiz module. It won't break an installation,
but it doesn't do anything yet.
2002-10-04 02:59:05 +00:00
moodler 518d37151d Use main version of "maximum grade" string 2002-10-04 02:55:27 +00:00
moodler b2a82ad65c Make names into a list 2002-10-04 02:54:53 +00:00
paca70 7d3e684292 and some more.... 2002-10-03 17:10:50 +00:00
paca70 75ebf527c9 Some fixs more. 2002-10-03 17:04:15 +00:00
paca70 a08db54a84 Translated new strings and fixed some old ones. 2002-10-03 16:54:58 +00:00
paca70 68605943ae Corrected some comments. 2002-10-03 15:55:45 +00:00
paca70 fcad13730e Initial version of ldap authentication module. It have no config-interface yet. (But it's coming)
It contains also experimental auth_get_userinfo() function, what is not used by moodle yet.
If you like to try it, create following $CFG variables to /config.php or directly to config-table and activate
ldap authentication from admin-configuration page.

$CFG->ldap_bind_dn      	"If your like to use bind-user to search users, specify it here. Someting like 'cn=ldapuser,ou=public,o=org'"
$CFG->ldap_bind_pw      	"Password for bind-user."
$CFG->ldap_contexts    		"List of contexts where users are located.
				  Separate different contexts with ';'. Something like 'ou=users,o=org; ou=other,o=org'"
$CFG->ldap_host_url      	"Specify LDAP host in URL-form like 'ldap://ldap.myorg.com/' or 'ldaps//ldap.myorg.com/' ";
$CFG->ldap_search_sub   	"Put value <> 0 if  you like to search users from subcontexts.";
$CFG->ldap_user_attribute 	"What attribute is used to name/search users. Usually 'cn'. ";

More configuration optios are coming. This version is tested against Novell E-Directory without SSL and it works fine.
2002-10-03 13:45:19 +00:00
moodler abf59b15bd Fixed definition of forum->open 2002-10-03 11:17:51 +00:00
moodler 70c476a79e Fixes bug 112
Changes to expand "open" option in forums.  Now have a choice between
three options:  new discussions and new replies, new replies only and
no new discussions or new replies.

Three new options in lang/forum.php and I changed "allowdiscussions".
2002-10-03 11:15:50 +00:00
moodler 7d95ed97c7 User's name in footer is now a link 2002-10-03 11:11:53 +00:00
moodler 8dbed6be60 format_time() now supports language strings for day(s)/hour(s)/min(s)/sec(s)
String lookups are cached in user/index.php for efficiency
2002-10-03 04:04:59 +00:00
moodler 05d09aa1f9 Just making this more relevant for the CVS update junkies :-) 2002-10-03 03:55:03 +00:00
moodler a168bd029f Expanded the description and included sample commands 2002-10-03 03:35:53 +00:00
moodler 7b5baeb7de "Activities" wasn't being taken from language files 2002-10-03 02:57:36 +00:00
paca70 4b76aa52d0 Minor update to test that update rights are working. 2002-10-02 19:37:35 +00:00
moodler 5251893741 Fixes for accented characters 2002-10-02 16:23:12 +00:00
moodler 5c958cabcc Updated a word 2002-10-02 15:55:22 +00:00
moodler 168fe1427a New version number for development 2002-10-02 14:43:04 +00:00
moodler 3eb4b24fed Added 'thischarset' = "iso-8859-1", for completeness 2002-10-02 14:20:30 +00:00
moodler 59857bd7a8 Checked in initial Italian version by Davide Suraci, with help from others 2002-10-02 13:50:36 +00:00
moodler 3763e302ff Added Sebastien Nameche 2002-10-02 10:59:04 +00:00
moodler 0cb8bf3bcd Locale box is a bit bigger, since locale strings can be bigger :-) 2002-10-02 10:35:43 +00:00
moodler 3a178d04d1 Removed configcharset, but kept thischarset 2002-10-02 10:34:31 +00:00
moodler 4bfa92e714 Added new header to all pages to set the current charset, to help browsers 2002-10-02 10:33:05 +00:00
moodler 53e61ab906 Updates to the French translation, by M. Sebastien Nam?che 2002-10-02 09:37:29 +00:00
moodler 0ebe961a18 A change to test the ACLs 2002-10-02 08:23:49 +00:00
moodler a1122760d0 Changes 2002-10-02 07:59:22 +00:00
moodler 39df7c9774 Fixed links to be relative. This prevents errors on the offchance that
the current URL != $CFG->wwwroot/login
2002-10-02 07:08:56 +00:00
moodler 2e60a1ace3 Made these images transparent 2002-10-02 05:10:10 +00:00
moodler b4ab71a6db Fixed links in navigation 2002-10-02 02:24:19 +00:00
moodler 7fbd6b1c0b Don't use getenv anywhere - not necessary and breaks PHP under ISAPI 2002-10-02 02:05:29 +00:00
martin e99af4408f CHANGES UP TO 1.0.5 2002-09-27 15:14:04 +00:00
martin cc300ceb39 Mentioned newly allowed tags 2002-09-27 15:03:28 +00:00
martin 8dcea3963a Added a few more allowed HTML tags in plain text files. <dl> <h1><h2><h3> <hr> 2002-09-27 14:48:25 +00:00
martin dfb6e4ac3e Tweaks to page titles to make them more consistent 2002-09-27 14:26:02 +00:00
martin 0d399dc585 Aaaahhh I remember now why this was in here, because in future there might
be course-level themes and user-level themes.

Putting it back as before ... :-)
2002-09-27 14:19:59 +00:00
martin cd1c4d2321 Removed theme chooser from here ... moving it to admin folder 2002-09-27 14:18:06 +00:00
martin 555bdfc813 Fixed a little link to login page 2002-09-27 13:44:52 +00:00
martin d51c583d3c Updated version for 1.0.5 release 2002-09-27 13:40:17 +00:00
martin ebf2e54dd6 Mentioned the icon bug 2002-09-27 13:39:59 +00:00
martin 5ea4745d18 Updated version and release 2002-09-27 06:20:20 +00:00
martin 077f9a67d0 Add manage database link to home page admin links if necessary 2002-09-27 06:19:49 +00:00
martin 34a0cda676 Put version info on admin page 2002-09-27 06:19:18 +00:00
martin b35f948b97 Nicer way to find out the major changes since the last version.
RELEASES.html shows the changes, and these are displayed during
an upgrade.
2002-09-27 06:13:59 +00:00
martin 2802ac6ec7 Tweaks and formatting 2002-09-27 05:25:46 +00:00
martin 2a691b9439 Hoepfully made the upgrade process clearer. 2002-09-27 05:12:02 +00:00
martin 91ac0405fa A little extra error checking. 2002-09-27 04:53:27 +00:00
martin 3ef909ca58 Removed encoding setting because i suspect it may be messing with SMTP mail 2002-09-27 01:35:25 +00:00
martin b362b85e99 Better format for text version of emails 2002-09-26 16:02:13 +00:00
martin 004db95014 Changed some instances of include() to include_once() 2002-09-26 14:41:59 +00:00
martin f1f901c3ea After upgrading version, stay on admin page rather than going to home
page, just in case there is more to do.
2002-09-26 13:05:18 +00:00
martin 9450cef212 Updated version and release 2002-09-26 11:44:06 +00:00
martin f25f1e1b66 Little bug that caused the guest icon to display even when guest was turned
off (if the password was null)
2002-09-26 11:10:20 +00:00
martin 57f3a4a564 the more things change, the less they stay the same 2002-09-26 07:27:01 +00:00
martin 41e1986cdc Update the version 2002-09-26 07:25:47 +00:00
martin 8f1cba2858 The login page now shows different instructions depending on the
authentication mechanism.
2002-09-26 07:13:14 +00:00
martin faebaf0f40 First implementation of new authentication system, which can now use
pluggable modules in the 'auth' directory.

Everything is done through authentication_user_login in lib/moodlelib.php

As well as the old default "email" confirmation, I added a new type of
confirmation "none", which basically does no confirmation at all.
2002-09-26 07:03:22 +00:00
martin ab998e5d07 Check for USER->email in require_login. With external authentication
schemes it's possible that the email field could be empty, so this
will force users to update it (and the rest of their profile) any
time they log into a course.
2002-09-26 03:51:31 +00:00
martin 43dc944611 Make $a bold so it's easier to see 2002-09-26 03:36:16 +00:00
martin ef5e5d87dc New help file for language editing 2002-09-26 03:20:15 +00:00
martin 4c2bcc7a1b Much better. No slashes needed AT ALL now, not even for $a variables.
Also provided a help button at the top.
2002-09-26 03:16:40 +00:00
martin 9d389960e6 Patches from Petri 2002-09-26 02:19:53 +00:00
martin d7ea4a225d Info about lib/htaccess 2002-09-25 16:38:09 +00:00
martin 96dad0de43 Added DirectoryIndex stuff 2002-09-25 16:33:54 +00:00
martin 7104dfc9ef Added new postgres7 schema, developed by Felipe Rodrigues da Silva <felipe@pontoexe.com>. Thanks Felipe!
I've personally not tested this yet so PostgrSQL user feedback is encouraged!
2002-09-25 15:16:21 +00:00
martin b839163528 Don't redirect too early 2002-09-25 14:40:28 +00:00
martin d66ee54d8d Add some comments 2002-09-25 13:37:12 +00:00
martin 04ad372d93 Improved explanations for how to use this file 2002-09-25 12:33:21 +00:00
martin 632d640751 It's possible $USER->lang may not be defined. If so, use $CFG->lang. 2002-09-25 11:06:27 +00:00
martin 4c701e6f54 Set fromdiscussion here just in case it's not set elsewhere 2002-09-25 08:17:35 +00:00
martin 38ff0e9f1f ALL CHANGES UP TO MOODLE 1.0.5 BETA 1 2002-09-25 07:42:39 +00:00
martin 9ec9ff5dc5 Unfinished files 2002-09-25 07:41:23 +00:00
martin 89e71738b5 updated version numbers for beta 1 release 2002-09-25 07:40:07 +00:00
martin 9806ae9403 README contains author etc 2002-09-25 07:38:23 +00:00
martin d68c814679 Added README with author 2002-09-25 07:37:31 +00:00
martin d0b12add53 Author stored in README 2002-09-25 07:35:58 +00:00
martin cb011cfd0a In compare mode you can now EDIT language files directly. This should
make language development much easier.

Based on code sent to me by Petri Asikainen
2002-09-25 07:33:04 +00:00
martin f74a4a79f2 Cough typo 2002-09-25 07:31:19 +00:00
martin 6321ab8df6 Edited using language editor 2002-09-25 07:30:16 +00:00
martin 3f5331eb19 New string 2002-09-25 07:19:32 +00:00
martin 49f5bb0527 Fix for ICQ display (they've changed their URLs) 2002-09-24 12:45:06 +00:00
martin ed4567d69d Hide password during registration 2002-09-24 09:20:43 +00:00
martin 74ed07ac86 Prevent guests even seeing the edit button 2002-09-24 09:06:17 +00:00
martin 3182314d5c Prevent guests from submitting choices or assignments 2002-09-24 09:02:34 +00:00
martin 17b365f829 Updated Sebastien's address to seb@gaia.anet.fr 2002-09-24 08:54:44 +00:00
martin 3d98b29d51 Make sure site security is added when logging in via change password 2002-09-24 01:28:19 +00:00
martin 83e9a09e34 Newly formatted header.html files in themes ... still works the same
just might be easier to edit now.  index.php uses new set_config function
2002-09-23 15:42:22 +00:00
martin 8cea3a3974 Special "navigation" for home page - "home" value sets off different header
in themes
2002-09-23 15:41:06 +00:00
martin a28af1fe74 New set_config() and better use of $CFG->version 2002-09-23 15:40:16 +00:00
martin b3ac9d9b85 New standardlogo theme ... like standard but with a logo 2002-09-23 15:38:22 +00:00
martin fd8dfb5a88 Sample logo 2002-09-23 15:37:08 +00:00
martin 1e22462d01 Fixed up default-sized tables again 2002-09-23 07:02:26 +00:00
martin 7fd6bb7cf6 Whoops teacher checking was back to front 2002-09-23 06:49:30 +00:00
martin 380871ace1 Personal mentions 2002-09-23 04:04:31 +00:00
martin a46b910e00 Change to name of language 2002-09-23 02:11:08 +00:00
martin 43afb07b98 Updated name of language 2002-09-23 02:08:40 +00:00
martin 3e8540f4fe Added Portuguese (Brazilian) by Fabricio Valadares, Thanks! 2002-09-23 02:04:44 +00:00
martin 2b6277bc51 Updated credits 2002-09-23 01:47:34 +00:00
martin affb83a226 Saner format for editing profile 2002-09-22 16:24:38 +00:00
martin 1fdaab8d76 Bolder title 2002-09-22 16:19:45 +00:00
martin a58977a2a0 Forgot country display change 2002-09-22 16:17:11 +00:00
martin adcb3ac53d Better country sorting on user index in a course 2002-09-22 16:16:13 +00:00
martin 7c3cf7f3ef Better way of sorting countries 2002-09-22 16:12:49 +00:00
martin 096dc19f3b Fixes to country sorting 2002-09-22 16:03:01 +00:00
martin 8538258121 Better handling of country sorting 2002-09-22 15:57:23 +00:00
martin 66c95f3224 Don't delete a user if already deleted (reloading page, say) 2002-09-22 14:42:32 +00:00
martin 6968fd6656 Updated version 2002-09-22 14:39:09 +00:00
martin 45aa6d563c Fixes to unenrolling students, and unenrol_student() and remove_teacher()
now remove forum_subscriptions correctly
2002-09-22 14:33:21 +00:00
martin 274f62e6d5 Fixes to table widths 2002-09-22 14:11:45 +00:00
martin b4ead712f2 Arrghh ... foget to remove the debugging thing 2002-09-22 14:07:15 +00:00
martin d578afc883 Major cleanup of user administration and display, including sortable listings,
confirmation on deletions, removing deleted user from all student lists,
teacher lists and subscription lists and freeing up their username and
email to be used again.
2002-09-22 14:06:38 +00:00
martin 7684ce4b32 Changes (getting close to 1.0.5 now) 2002-09-22 06:49:38 +00:00
martin 1d3ff0711f Updated module template with module_print_recent_activity() 2002-09-22 06:47:11 +00:00
martin 3446205d44 Added assignments under "Recent Activity" 2002-09-22 06:41:56 +00:00
martin 88491cacba When redirecting to admin page go direct to index.php just in case
DirectoryIndex hasn't been fixed yet.
2002-09-22 05:33:54 +00:00
martin bbe3efd8e1 Some comments to indicate standard and other functions 2002-09-22 04:29:18 +00:00
martin 66ea15f3cc Reaaranged the functions into standard and other 2002-09-22 04:27:45 +00:00
martin 7bca79576f Fixed stupidity 2002-09-22 03:58:41 +00:00
martin a30cfe1685 Error in the SQL - fixed now 2002-09-22 03:57:56 +00:00
martin 54634efcba New function to show new surveys in recent activity box 2002-09-22 03:51:28 +00:00
martin a2b71b6d71 Whoops typo - left in some old stuff 2002-09-22 03:17:29 +00:00
martin 03af47eee3 SHow number of journal entries in the teacher link to report 2002-09-22 03:16:40 +00:00
martin 3bf90da5f6 Use log URL for link to journal 2002-09-22 03:13:10 +00:00
martin 01a086c3dd Support for new deleted field in user table 2002-09-22 03:11:05 +00:00
martin ae2e0dddad Changes to not include deleted users in some things 2002-09-22 03:05:39 +00:00
martin bb09fb1157 Changes to enable DELETION of user accounts. Accounts aren't actually
deleted, they are just marked with a deleteion flag that prevents them
from logging in, or from being listed anywhere.
2002-09-22 03:01:17 +00:00
martin 3869a2ac3d Changes to print_recent_activity in course/lib.php. It is now more
modular (at slight cost to performance) and every modules can now
have a module_print_recent_activity() function.  This function
takes a list of logs, searches for things to display and does so.

So far I've done forum and journal functions
2002-09-21 17:11:08 +00:00
martin 20aa2257dc Allow 1-minute delay (mostly good for testing) 2002-09-21 08:44:08 +00:00
martin 93e0f85d6c Need more room for language variable (eg pt_br) 2002-09-21 08:42:05 +00:00
martin a16c2180d0 Make sure user language works OK (it does now) 2002-09-21 08:40:27 +00:00
martin 562bbe9074 Make mail format explicitly 8bit 2002-09-21 08:39:54 +00:00
martin a5a4cd60cb Make sure mailouts are in the user's chosen language 2002-09-21 07:46:30 +00:00
martin 5319c6adf6 Make sure mailouts are in the chosen language of each user 2002-09-21 07:42:54 +00:00
martin bcf7ee7a97 Initial (incomplete) version of French translation by Sebastien Nameche <snameche@virtual-net.fr>
Good start!  Thanks, Sebastien.
2002-09-21 07:27:07 +00:00
martin 94cfe58b19 Initial version of Finnish translation, as done by Petri Asikainen <paca@sci.fi>
Thanks, Petri!
2002-09-21 07:22:23 +00:00
martin 1774e33325 Added single quotes around all the keys ... even though PHP works
without them, it will flag errors when errorlevel is turned up, and
I suspect this slows it all down a bit.
2002-09-21 07:18:16 +00:00
martin 13fb5ec074 Added my email address 2002-09-21 07:07:44 +00:00
martin effbcca27c Don't need to log in to see site-level course 2002-09-21 07:03:54 +00:00
martin b92ea9450c More options for longtimenosee 2002-09-21 06:45:26 +00:00
martin c69ce08b49 Don't print pictures at all for very large lists 2002-09-21 06:39:28 +00:00
martin 25fa226dac Make more room in list 2002-09-21 06:30:32 +00:00
martin 32b4b9746a more refinements to sorting display 2002-09-21 06:27:00 +00:00
martin 3f63219688 Fixed typo from testing 2002-09-21 06:13:42 +00:00
martin e6b9ee042d Much better look for user index 2002-09-21 06:12:54 +00:00
martin dccd16712a Slight additions to print_table 2002-09-21 05:43:46 +00:00
martin c07daf5bbc Added lang for users 2002-09-21 05:43:21 +00:00
martin 6b281f1fec Better display of users in shortened form, for testing 2002-09-21 05:42:16 +00:00
martin 7a702c34ea Tweak 2002-09-20 15:42:16 +00:00
martin 6abee98964 First go at an abbreviated user listing 2002-09-20 15:40:20 +00:00
martin 1e4d8ed1d2 Put sitename on debugging info (helpful when comparing two sites) 2002-09-19 14:59:47 +00:00
martin 08056730fa Improved interface for course/teachers.php ... instead of typing numbers
into a box there is now a menu for each user.   Much better!
2002-09-19 14:51:49 +00:00
martin ae7aafeb53 Got rid of errorlevel configuration - more trouble than it's worth!
Hardcoded it into setup.php now - people who are that keen can change
it there.
2002-09-19 14:07:24 +00:00
martin 1be8717562 Updated for new configuration page 2002-09-19 14:06:28 +00:00
martin 4d0dde9159 Some consistency in headers on editing forms 2002-09-19 13:55:40 +00:00
martin 74944b734d Most of the configuration variables have been moved out of the config.php
file and into a database, where they can be edited using a new admin form
called "Configure variables".
2002-09-19 12:01:55 +00:00
martin e80e60a6b2 Slight fix to error page to include site name properly 2002-09-17 14:56:18 +00:00
martin 76dbe04f4a Login link on home page 2002-09-16 13:03:31 +00:00
martin 7ff602b225 eminder about saving themes in upgrades etc 2002-09-16 07:11:31 +00:00
martin a9858957e1 Typo 2002-09-16 07:08:33 +00:00
martin 7185779262 Fixed name in popup javascript window 2002-09-16 07:03:33 +00:00
martin af90e74e59 Sample .htaccess file 2002-09-16 06:33:53 +00:00
martin 37e9df195f Fixed Id 2002-09-16 03:23:10 +00:00
martin c94e1535f8 Type on phpinfo 2002-09-16 03:20:55 +00:00
martin 7b5271354b Mentioned there's no need to use a trailing slash on the wwwroot 2002-09-15 06:09:44 +00:00
martin a7b9e8bc9f Fixes to point directly to index.php wherever it was assumed. This wasn't
a problem on most servers, but was causing some problems on IIS servers
2002-09-15 06:06:32 +00:00
martin 1a72314d0f Can now specify current language on a per-user basis 2002-09-14 03:43:24 +00:00
martin c46df33643 New help file for editing html 2002-09-13 10:22:06 +00:00
martin 73761dc9be Added a new reading type "html text". It's similar to "plain text"
except none of the auto-formatting is done, and all HTML code is
accepted.
2002-09-13 10:21:03 +00:00
martin ddd9a8969b SUrprise icon is a bit wider than 16 pixels 2002-09-12 17:08:32 +00:00
martin 7ef459ebed Fixed bug with category links on front page 2002-09-12 02:42:22 +00:00
martin e31309ed79 One more little buglet when confirming an email (added security site value) 2002-09-11 14:02:30 +00:00
martin 91d5dbf3eb CHANGES UP TO 1.0.4 (really, I mean it this time :-) ) 2002-09-11 05:11:13 +00:00
martin 122cffc938 Include guest user in list of users 2002-09-11 02:26:56 +00:00
martin 0c6561819b Changes to course display on front page when there is more than one category 2002-09-10 13:47:56 +00:00
martin 4ea0fc0f1a Removed some debugging stuff 2002-09-10 13:24:24 +00:00
martin a789fb73f4 More security for email confirmation process ... a 15-character random
"secret" key is stored the user record on account creation, sent via
email and checked again during confirmation.
2002-09-10 12:54:01 +00:00
martin ceb7ea7550 CHANGES UP TO 1.0.4 2002-09-10 03:44:09 +00:00
martin 99b5e56207 Whoops, left attachment field out of the database schema (affected
new installations of 1.0.2 and later)
2002-09-10 02:13:44 +00:00
martin 45c58cb7ad CHANGES (this is 1.0.4 unless anything comes up very soon) 2002-09-09 15:52:07 +00:00
martin 8e652a3660 Tweak to modify interface a bit (changed header and made courses a link) 2002-09-09 15:50:55 +00:00
martin db95b60308 CHANGES 2002-09-09 12:38:29 +00:00
martin 0a26320532 Tweaks to category display 2002-09-09 12:37:34 +00:00
martin ba2e5d7347 Categories upgrade. Admin can now create/edit/delete categories, and
these are diesplayed wherever courses are listed
2002-09-09 11:48:11 +00:00
martin 7aa0bb8886 Layout fixes ... much better now 2002-09-09 11:42:27 +00:00
martin d6935726ed Changed maximum number of weeks/topics up to 52 2002-09-09 11:31:48 +00:00
martin 782e7594ec Rearrange code ... accidentally placed table->head in the loop 2002-09-09 10:38:14 +00:00
martin e5c2a9e441 Whoops ... last conversion actully tampered with comment formatting
... I've fixed that now.
2002-09-09 06:23:39 +00:00
martin bc44a3a0ad Converted all the DOS format text files to UNIX format, for consistency
with the rest of Moodle and also to prevent possible mangling of
files in case they are FTP'd individually to a server.
2002-09-09 06:17:11 +00:00
martin 503eced327 Added height and width to smiley icons, to make emails look
better in circumstances where external images are blocked
(eg some webmail programs like squirrelmail).
2002-09-08 16:13:10 +00:00
martin 8f66d49a77 Added an "unsubscribe" link to emails 2002-09-08 16:04:51 +00:00
martin 28e1e8b912 Fixed a bug. When replying to an email copy, you would be forwarded
to the login screen to login first.  However, this was being saved
as the place to go back to after replying.

I added a check for this so now it behaves as you'd expect.
2002-09-08 15:39:44 +00:00
martin cdf6a3ca28 Text window a bit bigger 2002-09-08 09:47:10 +00:00
martin cd3fccff00 Choices now support up to 6 choices. Backward compatible to 2-choice format. 2002-09-08 09:42:07 +00:00
martin 2415d953f0 Tip over 'Edit profile' is the user's name 2002-09-08 09:41:17 +00:00
martin d037d3a28a Help for choices 2002-09-08 09:22:31 +00:00
martin 59a7100ccf Clarified the "participants" link ... 2002-09-08 05:29:00 +00:00
martin 2c26c98575 Link at bottom now goes to site home, not this page 2002-09-08 05:23:47 +00:00
martin 09442e5067 Added documentation to the teachers page. 2002-09-08 05:15:52 +00:00
martin 5b54db6ee4 Improved print_table() a bit (can now specify column widths) 2002-09-08 05:15:37 +00:00
martin c2bc0a4573 Need this file to go with the previous changes! 2002-09-08 03:34:45 +00:00
martin 40a1d986f9 Changes to improve display of teachers 2002-09-08 03:34:12 +00:00
martin b4d7002e66 Changes to allow much better control over what "teachers" are called
in a course.  Firstly, the course settings page now allows the teachers
to specify the word they want to use in place of "teachers" and "students"
as well as "teacher" and "student".  Secondly, a new teacher admin tool
allows any teacher to modify the order and displayed role of teachers
in that course.  This affects the display on the course listings, the
participants page and so on.
2002-09-08 03:24:38 +00:00
martin 774ab66002 Improvements to the language checker. As well as checking for missing
strings, you can now see the current language compared side-by-side
with English.
2002-09-07 14:57:33 +00:00
martin 7fb8331432 Add a link if a "manage database" directory exists 2002-09-07 14:56:19 +00:00
martin fa8e1a34ec Slight update to README 2002-09-07 05:01:55 +00:00
martin 601212b8d2 Added a README that explains the process 2002-09-07 03:54:10 +00:00
martin a48bf3ecd4 Added a template for new modules that contains the bare necessities. 2002-09-07 03:31:36 +00:00
martin 12bace2439 Checking in the current release number for CVS users 2002-09-06 15:17:44 +00:00
martin d21fef3a02 Don't try and print the last access date if it doesn't exist 2002-09-06 15:10:36 +00:00
martin c646b70d66 Added a new $release variable that shows the user-friendly version number 2002-09-06 14:06:48 +00:00
martin 7c6addde73 Cleaned up a bit 2002-09-06 14:05:43 +00:00
martin 09ba0c8a32 Fixed bug in password checking for new admin user ... 2002-09-05 17:31:08 +00:00
martin c5e66fc9da Updated the info to mention that the upgrading only works if you
are logged in as the *administrator* and visit the site home page.
2002-09-05 12:29:26 +00:00
martin 19505e1333 CHANGES UP TO 1.0.3.1 2002-09-05 12:25:08 +00:00
martin 19967d6c3d Updated version 2002-09-05 12:24:15 +00:00
martin 55b8ac3107 Better error message when invalid arguments are supplied. 2002-09-05 11:56:20 +00:00
martin e2d8972553 BUG FIX! - fixes error that could allow ANY file on the system to be read! 2002-09-05 11:53:17 +00:00
martin 45f21575aa Whoops ... little bug that stopped loginas from working ... need to
create $USER->site ...
2002-09-05 11:28:06 +00:00
martin f5e88127d8 Updated version number 2002-09-05 02:29:54 +00:00
martin f6ab73667e CHANGES UP TO MOODLE 1.0.3 2002-09-05 02:28:50 +00:00
martin e98e09150e New error when the admin user is (still) set to the default "admin". 2002-09-05 02:17:33 +00:00
martin 403bb50d7b BUG FIX: In the last version I introduced a new security feature
(keeping the site URL stored in the USER session object) but forgot
to add this to the brand new admin user - causing it to fail.

Fixed.
2002-09-05 02:04:00 +00:00
martin 97ea24e307 Updated README .. pages dir no longer exists - now "help" and "docs" 2002-09-04 13:38:38 +00:00
martin a3cbb7539d Using different logo file to avoid caching problems on changeover 2002-09-04 09:39:03 +00:00
martin a0376793c2 Sorted out moodle logos 2002-09-04 09:38:22 +00:00
martin 1903dd11d8 Tweaked the new icon 2002-09-04 06:32:50 +00:00
martin ef9955b081 Better handling of user-entered URLs (add http:// if missing) 2002-09-04 05:07:17 +00:00
martin 5e391d346d New logo that should work on more themes 2002-09-03 16:58:49 +00:00
martin 90ebcad978 Switched these around and edited a little 2002-09-03 15:16:20 +00:00
martin 31410e9a16 Added a new administration page that can check the current language
pack against the English language pack.  It prints any missing strings
or files.  This should help language pack developers.
2002-09-03 14:29:39 +00:00
martin cf38360f58 Language fixes, added english strings etc 2002-09-03 13:11:40 +00:00
martin 42389890d5 More efficient use of database in userday as well, plus the day graph now
always shows the whole current day
2002-09-02 16:35:41 +00:00
martin f08cc8bbfe usercourse bar --> line graph for better display when lots of data 2002-09-02 16:03:33 +00:00
martin e45e8d26da Alternate method of calculating usercourse logs .... is it faster? 2002-09-02 15:53:19 +00:00
martin 5be2f47cf4 Added Content-disposition header to help some browsers suggest the right
filename when saving pictures and files.
2002-09-02 09:06:43 +00:00
martin 0eae8049a0 Fixed over-zealous removal of returns from text ... 2002-09-02 07:41:39 +00:00
martin cffbaff2dc Print the user's stated city/country as well 2002-09-02 07:18:13 +00:00
2783 changed files with 204109 additions and 34782 deletions
+2225 -4338
View File
File diff suppressed because it is too large Load Diff
+51 -32
View File
@@ -1,32 +1,51 @@
README $Id$
------
Here is a basic outline of the installation process,
which normally takes me only a few minutes:
1) Move the Moodle files into your web directory.
2) Create an empty directory somewhere to store
uploaded files (NOT accessible via the web).
This directory must be writeable by the web server
process.
3) Create a single database for Moodle to store all
it's tables in.
4) Copy the file config-dist.php to config.php, and
edit it with all your own settings.
5) Visit your new home page with a web browser. Moodle
will lead you through the rest of the setup,
creating an admin account and so on.
6) Set up a cron task to call the file admin/cron.php
every five minutes or so.
For more details, I highly recommend you read the
full installation documentation, which is stored
in the "doc" directory or found at http://moodle.com/doc/.
Cheers!
Martin Dougiamas
README $Id$
------
If you are installing the first time, then you
should read the installation guide which is
part of the Moodle documentation (along with
information about upgrading etc):
http://moodle.com/doc/
There is a copy of all this documentation as part of
this Moodle distribution. You can access your local
copy of the installation guide here:
lang/en/docs/install.html
Once Moodle is installed on your machine, then
you can also access a local copy of all this
documentation (localised to your language) at:
http://yourmoodlesite.com/doc/
For the impatient, here is a basic outline of the
installation process, which normally takes me only
a few minutes:
1) Move the Moodle files into your web directory.
2) Create an empty directory somewhere to store
uploaded files (NOT accessible via the web).
This directory must be writeable by the web server
process.
3) Create a single database for Moodle to store all
it's tables in (or choose an existing database).
4) Copy the file config-dist.php to config.php, and
edit it with all your own settings.
5) Visit your new home page with a web browser. Moodle
will lead you through the rest of the setup,
creating an admin account and so on.
6) Set up a cron task to call the file admin/cron.php
every five minutes or so.
Cheers!
Martin Dougiamas
-42
View File
@@ -1,42 +0,0 @@
UPGRADING $Id$
---------
As Moodle grows, there are changes to the code and
sometimes changes to the database structures.
Moodle is able to upgrade its own databases, using
information in files called version.php. There is
one of these for the main tables (in this directory)
and one for each module.
When upgrading from any previous version of Moodle,
all you normally will need to do is this:
1) Make a backup of your current Moodle installation
in the unlikely case that something goes wrong and
you need to restore the older version.
2a) If you are using CVS, just go the root directory
and type "cvs update -d" (or whatever the equivalent
is on your non-Unix server).
OR
2b) Remove the current installation, and then unpack
the new tar or zip file in the same location.
Make sure you copy the config.php file from your
old installion to the new installation (or make a
new one by editing config-dist.php).
3) Visit the home page of your installation. Moodle
will automatically detect the new version and perform
any database upgrades that might be necessary.
If all goes well (no error messages) then you can just
go on using Moodle normally.
If you have problems with this procedure, let me know.
Cheers,
Martin
+156
View File
@@ -0,0 +1,156 @@
<?PHP // $Id$
// Admin-only script to assign administrative rights to users
require_once("../config.php");
define("MAX_USERS_PER_PAGE", 50);
optional_variable($add, "");
optional_variable($remove, "");
optional_variable($search, "");
if (! $site = get_site()) {
redirect("$CFG->wwwroot/$CFG->admin/index.php");
}
require_login();
if (!isadmin()) {
error("You must be an administrator to use this page.");
}
$primaryadmin = get_admin();
/// If you want any administrator to have the ability to assign admin
/// rights, then comment out the following if statement
if ($primaryadmin->id != $USER->id) {
error("You must be the primary administrator to use this page.");
}
/// assign all of the configurable language strings
$stringstoload = array (
"assignadmins",
"administration",
"existingadmins",
"noexistingadmins",
"potentialadmins",
"nopotentialadmins",
"addadmin",
"removeadmin",
"search",
"searchagain",
"toomanytoshow",
"users",
"searchresults"
);
foreach ($stringstoload as $stringtoload){
$strstringtoload = "str" . $stringtoload;
$$strstringtoload = get_string($stringtoload);
}
if ($search) {
$searchstring = $strsearchagain;
} else {
$searchstring = $strsearch;
}
print_header("$site->shortname: $strassignadmins",
"$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> <a href=\"users.php\">$strusers</a> -> $strassignadmins", "");
/// Add an admin if one is specified
if (!empty($_GET['add'])) {
if (! add_admin($add)) {
error("Could not add that admin!");
}
}
/// Remove an admin if one is specified.
if (!empty($_GET['remove'])) {
if (! remove_admin($remove)) {
error("Could not remove that admin!");
}
}
/// Print a help notice about this page
if (empty($add) and empty($remove) and empty($search)) {
print_simple_box("<center>".get_string("adminhelpassignadmins")."</center>", "center", "50%");
}
/// Get all existing admins
$admins = get_admins();
/// Print the lists of existing and potential admins
echo "<table cellpadding=2 cellspacing=10 align=center>";
echo "<tr><th width=50%>$strexistingadmins</th><th width=50%>$strpotentialadmins</th></tr>";
echo "<tr><td width=50% nowrap valign=top>";
/// First, show existing admins
if (! $admins) {
echo "<p align=center>$strnoexistingadmins</p>";
$adminlist = "";
} else {
$adminarray = array();
foreach ($admins as $admin) {
$adminarray[] = $admin->id;
echo "<p align=right>$admin->firstname $admin->lastname,
$admin->email &nbsp;&nbsp; ";
if ($primaryadmin->id == $admin->id){
print_spacer(10, 9, false);
} else {
echo "<a href=\"{$_SERVER['PHP_SELF']}?remove=$admin->id\"
title=\"$strremoveadmin\"><img src=\"../pix/t/right.gif\"
border=0></A>";
}
echo "</p>";
}
$adminlist = implode(",",$adminarray);
unset($adminarray);
}
echo "<td width=50% nowrap valign=top>";
/// Print list of potential admins
$usercount = get_users(false, $search, true, $adminlist);
if ($usercount == 0) {
echo "<p align=center>$strnopotentialadmins</p>";
} else if ($usercount > MAX_USERS_PER_PAGE) {
echo "<p align=center>$strtoomanytoshow ($usercount) </p>";
} else {
if ($search) {
echo "<p align=center>($strsearchresults : $search)</p>";
}
if (!$users = get_users(true, $search, true, $adminlist)) {
error("Could not get users!");
}
foreach ($users as $user) {
echo "<p align=left><a href=\"{$_SERVER['PHP_SELF']}?add=$user->id\"".
"title=\"$straddadmin\"><img src=\"../pix/t/left.gif\"".
"border=0></a>&nbsp;&nbsp;$user->firstname $user->lastname, $user->email";
}
}
if ($search or $usercount > MAX_USERS_PER_PAGE) {
echo "<form action={$_SERVER['PHP_SELF']} method=post>";
echo "<input type=text name=search size=20>";
echo "<input type=submit value=\"$searchstring\">";
echo "</form>";
}
echo "</tr></table>";
print_footer();
?>
+175
View File
@@ -0,0 +1,175 @@
<?PHP // $Id$
// config.php - allows admin to edit all configuration variables
include("../config.php");
require_login();
if (!$site = get_site()) {
redirect("index.php");
}
if (!isadmin()) {
error("Only the admin can use this page");
}
/// If data submitted, then process and store.
if ($config = data_submitted()) {
$config = (array)$config;
validate_form($config, $err);
if (count($err) == 0) {
print_header();
foreach ($config as $name => $value) {
if (! set_config($name, $value)) {
notify("Problem saving config $name as $value");
}
}
redirect("auth.php", get_string("changessaved"), 1);
exit;
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
}
}
}
/// Otherwise fill and print the form.
if (empty($config)) {
$config = $CFG;
}
$modules = get_list_of_plugins("auth");
foreach ($modules as $module) {
$options[$module] = get_string("auth_$module"."title", "auth");
}
asort($options);
if (isset($_GET['auth'])) {
$auth = $_GET['auth'];
} else {
$auth = $config->auth;
}
require_once("$CFG->dirroot/auth/$auth/lib.php"); //just to make sure that current authentication functions are loaded
if (! isset($config->guestloginbutton)) {
$config->guestloginbutton = 1;
}
if (! isset($config->auth_instructions)) {
$config->auth_instructions = "";
}
if (! isset($config->changepassword)) {
$config->changepassword = "";
}
$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "department", "address", "city", "country", "description", "idnumber", "lang");
foreach ($user_fields as $user_field) {
$user_field = "auth_user_$user_field";
if (! isset($config->$user_field)) {
$config->$user_field = "";
}
}
if (empty($focus)) {
$focus = "";
}
$guestoptions[0] = get_string("hide");
$guestoptions[1] = get_string("show");
$createoptions[0] = get_string("no");
$createoptions[1] = get_string("yes");
$stradministration = get_string("administration");
$strauthentication = get_string("authentication");
$strauthenticationoptions = get_string("authenticationoptions","auth");
$strsettings = get_string("settings");
$strusers = get_string("users");
print_header("$site->shortname: $strauthenticationoptions", "$site->fullname",
"<A HREF=\"index.php\">$stradministration</A> -> <a href=\"users.php\">$strusers</a> -> $strauthenticationoptions", "$focus");
echo "<CENTER><P><B>";
echo "<form TARGET=\"{$CFG->framename}\" NAME=\"authmenu\" method=\"post\" action=\"auth.php\">";
print_string("chooseauthmethod","auth");
choose_from_menu ($options, "auth", $auth, "","top.location='auth.php?auth='+document.authmenu.auth.options[document.authmenu.auth.selectedIndex].value", "");
echo "</B></P></CENTER>";
print_simple_box_start("center", "100%", "$THEME->cellheading");
print_heading($options[$auth]);
print_simple_box_start("center", "60%", "$THEME->cellcontent");
print_string("auth_$auth"."description", "auth");
print_simple_box_end();
echo "<hr>";
print_heading($strsettings);
echo "<table border=\"0\" width=\"100%\" cellpadding=\"4\">";
require_once("$CFG->dirroot/auth/$auth/config.html");
if ($auth != "email" and $auth != "none" and $auth != "manual") {
echo "<tr valign=\"top\">";
echo "<td align=right nowrap><p>";
print_string("changepassword", "auth");
echo ":</p></td>";
echo "<td>";
echo "<input type=\"text\" name=\"changepassword\" size=40 value=\"$config->changepassword\">";
echo "</td>";
echo "<td>";
print_string("changepasswordhelp","auth");
echo "</td></tr>";
}
echo "<tr valign=\"top\">";
echo "<td align=right nowrap><p>";
print_string("guestloginbutton", "auth");
echo ":</p></td>";
echo "<td>";
choose_from_menu($guestoptions, "guestloginbutton", $config->guestloginbutton, "");
echo "</td>";
echo "<td>";
print_string("showguestlogin","auth");
echo "</td></tr>";
if (function_exists('auth_user_create')){
echo "<tr valign=\"top\">";
echo "<td align=right nowrap><p>";
print_string("auth_user_create", "auth");
echo ":</p></td>";
echo "<td>";
choose_from_menu($createoptions, "auth_user_create", $config->auth_user_create, "");
echo "</td>";
echo "<td>";
print_string("auth_user_creation","auth");
echo "</td></tr>";
}
echo "</table><center><p><input type=\"submit\" value=\"";
print_string("savechanges");
echo "\"></p></center></form>";
print_simple_box_end();
print_footer();
exit;
/// Functions /////////////////////////////////////////////////////////////////
function validate_form(&$form, &$err) {
// if (empty($form->fullname))
// $err["fullname"] = get_string("missingsitename");
return;
}
?>
+325
View File
@@ -0,0 +1,325 @@
<form method="post" action="config.php" name="form">
<table cellpadding=9 cellspacing=0 >
<tr valign=top>
<td align=right><p>lang:</td>
<td>
<?php choose_from_menu (get_list_of_languages(), "lang", $config->lang, "", "", ""); ?>
</td>
<td>
<?php print_string("configlang") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>langdir:</td>
<td>
<?php
unset($options);
$options["LTR"] = get_string("langltr");
$options["RTL"] = get_string("langrtl");
choose_from_menu ($options, "langdir", $config->langdir, "", "", "");
?>
</td>
<td>
<?php print_string("configlangdir") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>langmenu:</td>
<td>
<?php
unset($options);
$options[0] = get_string("no");
$options[1] = get_string("yes");
choose_from_menu ($options, "langmenu", $config->langmenu, "", "", "");
?>
</td>
<td>
<?php print_string("configlangmenu") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>langlist:</td>
<td>
<input name=langlist type=text size=40 value="<?php p($config->langlist) ?>">
</td>
<td>
<?php print_string("configlanglist") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>locale:</td>
<td>
<input name=locale type=text size=10 value="<?php p($config->locale) ?>">
</td>
<td>
<?php print_string("configlocale") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>country:</td>
<td><?php choose_from_menu ($COUNTRIES, "country", $config->country, get_string("selectacountry"), "") ?>
</td>
<td>
<?php print_string("configcountry") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>smtphosts:</td>
<td>
<input name=smtphosts type=text size=30 value="<?php p($config->smtphosts)?>">
</td>
<td>
<?php print_string("configsmtphosts") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>smtpuser:</td>
<td>
<input name=smtpuser type=text size=10 value="<?php p($config->smtpuser)?>">
</td>
<td rowspan=2>
<?php print_string("configsmtpuser") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>smtppass:</td>
<td>
<input name=smtppass type=text size=10 value="<?php p($config->smtppass)?>">
</td>
</TR>
<tr valign=top>
<td align=right><p>gdversion:</td>
<td>
<?php
unset($options);
$options[0] = get_string("gdnot");
$options[1] = get_string("gd1");
$options[2] = get_string("gd2");
$installed = check_gd_version();
choose_from_menu ($options, "gdversion", $installed, "", "", "");
?>
</td>
<td>
<?php print_string("configgdversion") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>htmleditor:</td>
<td>
<?php
unset($options);
$options[0] = get_string("allownot");
$options[1] = get_string("allow");
choose_from_menu ($options, "htmleditor", $config->htmleditor, "", "", "");
?>
</td>
<td>
<?php print_string("confightmleditor") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>maxeditingtime:</td>
<td>
<?php
unset($options);
$options[3600] = get_string("numminutes", "", 60);
$options[2700] = get_string("numminutes", "", 45);
$options[1800] = get_string("numminutes", "", 30);
$options[900] = get_string("numminutes", "", 15);
$options[300] = get_string("numminutes", "", 5);
$options[60] = get_string("numminutes", "", 1);
choose_from_menu ($options, "maxeditingtime", $config->maxeditingtime, "", "", "");
?>
</td>
<td>
<?php print_string("configmaxeditingtime") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>longtimenosee:</td>
<td>
<?php
unset($options);
$options[1000] = get_string("numdays", "", 1000);
$options[365] = get_string("numdays", "", 365);
$options[180] = get_string("numdays", "", 180);
$options[150] = get_string("numdays", "", 150);
$options[120] = get_string("numdays", "", 120);
$options[90] = get_string("numdays", "", 90);
$options[60] = get_string("numdays", "", 60);
$options[30] = get_string("numdays", "", 30);
$options[21] = get_string("numdays", "", 21);
$options[14] = get_string("numdays", "", 14);
$options[7] = get_string("numdays", "", 7);
choose_from_menu ($options, "longtimenosee", $config->longtimenosee, "", "", "");
?>
</td>
<td>
<?php print_string("configlongtimenosee") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>loglifetime:</td>
<td>
<?php
unset($options);
$options[0] = get_string("neverdeletelogs");
$options[1000] = get_string("numdays", "", 1000);
$options[365] = get_string("numdays", "", 365);
$options[180] = get_string("numdays", "", 180);
$options[150] = get_string("numdays", "", 150);
$options[120] = get_string("numdays", "", 120);
$options[90] = get_string("numdays", "", 90);
$options[60] = get_string("numdays", "", 60);
$options[30] = get_string("numdays", "", 30);
choose_from_menu ($options, "loglifetime", $config->loglifetime, "", "", "");
?>
</td>
<td>
<?php print_string("configloglifetime") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>sessiontimeout:</td>
<td>
<?php
unset($options);
$options[14400] = get_string("numhours", "", 4);
$options[10800] = get_string("numhours", "", 3);
$options[7200] = get_string("numhours", "", 2);
$options[5400] = get_string("numhours", "", "1.5");
$options[3600] = get_string("numminutes", "", 60);
$options[2700] = get_string("numminutes", "", 45);
$options[1800] = get_string("numminutes", "", 30);
$options[900] = get_string("numminutes", "", 15);
$options[300] = get_string("numminutes", "", 5);
choose_from_menu ($options, "sessiontimeout", $config->sessiontimeout, "", "", "");
?>
</td>
<td>
<?php print_string("configsessiontimeout") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>zip:</td>
<td>
<input name=zip type=text size=30 value="<?php p($config->zip) ?>">
</td>
<td>
<?php print_string("configzip") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>unzip:</td>
<td>
<input name=unzip type=text size=30 value="<?php p($config->unzip) ?>">
</td>
<td>
<?php print_string("configunzip") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>slasharguments:</td>
<td>
<?php unset($options);
$options[0] = "file.php?file=/pic.jpg";
$options[1] = "file.php/pic.jpg";
choose_from_menu ($options, "slasharguments", $config->slasharguments, "", "", "");
?>
</td>
<td>
<?php print_string("configslasharguments") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>proxyhost:</td>
<td>
<input name=proxyhost type=text size=30 value="<?php p($config->proxyhost) ?>">
</td>
<td rowspan=2>
<?php print_string("configproxyhost") ?>
</td>
</TR>
<tr valign=top>
<td align=right><p>proxyport:</td>
<td>
<input name=proxyport type=text size=5 value="<?php p($config->proxyport) ?>">
</td>
</tr>
<tr valign=top>
<td align=right><p>debug:</td>
<td>
<?php
unset($options);
$options[7] = get_string("no");
$options[15] = get_string("yes");
choose_from_menu ($options, "debug", $config->debug, "", "", "");
?>
</td>
<td>
<?php print_string("configdebug") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>framename:</td>
<td>
<?php
if (empty($config->framename)) {
$config->framename = "_top";
}
?>
<input name=framename type=text size=15 value="<?php p($config->framename)?>">
</td>
<td>
<?php print_string("configframename") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>secureforms:</td>
<td>
<?php
unset($options);
$options[0] = get_string("no");
$options[1] = get_string("yes");
choose_from_menu ($options, "secureforms", $config->secureforms, "", "", "");
?>
</td>
<td>
<?php print_string("configsecureforms") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>teacherassignteachers:</td>
<td>
<?php
unset($options);
$options[0] = get_string("no");
$options[1] = get_string("yes");
choose_from_menu ($options, "teacherassignteachers", $config->teacherassignteachers, "", "", "");
?>
</td>
<td>
<?php print_string("configteacherassignteachers") ?>
</td>
</tr>
<tr>
<td colspan=3 align=center>
<input type="submit" value="<?php print_string("savechanges") ?>"></td>
</tr>
</table>
</form>
+104
View File
@@ -0,0 +1,104 @@
<?PHP // $Id$
// config.php - allows admin to edit all configuration variables
require_once("../config.php");
require_once("../lib/countries.php");
if ($site = get_site()) { // If false then this is a new installation
require_login();
if (!isadmin()) {
error("Only the admin can use this page");
}
}
/// This is to overcome the "insecure forms paradox"
if (isset($secureforms) and $secureforms == 0) {
$match = "nomatch";
} else {
$match = "";
}
/// If data submitted, then process and store.
if ($config = data_submitted($match)) {
validate_form($config, $err);
if (count($err) == 0) {
print_header();
foreach ($config as $name => $value) {
unset($conf);
$conf->name = $name;
$conf->value = $value;
if ($current = get_record("config", "name", $name)) {
$conf->id = $current->id;
if (! update_record("config", $conf)) {
notify("Could not update $name to $value");
}
} else {
if (! insert_record("config", $conf)) {
notify("Error: could not add new variable $name !");
}
}
}
redirect("index.php", get_string("changessaved"), 1);
exit;
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
}
}
}
/// Otherwise fill and print the form.
if (empty($config)) {
$config = $CFG;
if (!$config->locale = get_field("config", "value", "name", "locale")) {
$config->locale = $CFG->lang;
}
}
if (empty($focus)) {
$focus = "";
}
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strconfigvariables = get_string("configvariables");
if ($site) {
print_header("$site->shortname: $strconfigvariables", $site->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strconfigvariables", $focus);
print_heading($strconfigvariables);
} else {
print_header();
print_heading($strconfigvariables);
print_simple_box(get_string("configintro"), "center", "50%");
echo "<br />";
}
print_simple_box_start("center", "", "$THEME->cellheading");
include("config.html");
print_simple_box_end();
if ($site) {
print_footer();
}
exit;
/// Functions /////////////////////////////////////////////////////////////////
function validate_form(&$form, &$err) {
// if (empty($form->fullname))
// $err["fullname"] = get_string("missingsitename");
return;
}
?>
+42
View File
@@ -0,0 +1,42 @@
<?PHP // $Id$
require_once("../config.php");
require_login();
if (!isadmin) {
error("Only admins can access this page");
}
if (!$site = get_site()) {
redirect("index.php");
}
$stradministration = get_string("administration");
$strconfiguration = get_string("configuration");
print_header("$site->shortname: $stradministration: $strconfiguration", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> $strconfiguration");
print_heading($strconfiguration);
$table->align = array ("right", "left");
$table->data[] = array("<b><a href=\"config.php\">".get_string("configvariables")."</a></b>",
get_string("adminhelpconfigvariables"));
$table->data[] = array("<b><a href=\"site.php\">".get_string("sitesettings")."</a></b>",
get_string("adminhelpsitesettings"));
$table->data[] = array("<b><a href=\"../theme/index.php\">".get_string("themes")."</a></b>",
get_string("adminhelpthemes"));
$table->data[] = array("<b><a href=\"lang.php\">".get_string("language")."</a></b>",
get_string("adminhelplanguage"));
$table->data[] = array("<b><a href=\"modules.php\">".get_string("managemodules")."</a></b>",
get_string("adminhelpmanagemodules"));
print_table($table);
print_footer($site);
?>
+154
View File
@@ -0,0 +1,154 @@
<?PHP // $Id$
// Admin only script to assign course creator rights to users
require_once("../config.php");
define("MAX_USERS_PER_PAGE", 50);
optional_variable($search, "");
optional_variable($add, "");
optional_variable($remove, "");
if (! $site = get_site()) {
redirect("$CFG->wwwroot/$CFG->admin/index.php");
}
require_login();
if (!isadmin()) {
error("You must be an administrator to use this page.");
}
$primaryadmin = get_admin();
/// If you want any administrator to have the ability to assign admin
/// rights, then comment out the following if statement
if ($primaryadmin->id != $USER->id) {
error("You must be the primary administrator to use this page.");
}
/// assign all of the configurable language strings
$stringstoload = array (
"assigncreators",
"administration",
"existingcreators",
"noexistingcreators",
"potentialcreators",
"nopotentialcreators",
"addcreator",
"removecreator",
"search",
"searchagain",
"users",
"toomanytoshow",
"searchresults"
);
foreach ($stringstoload as $stringtoload){
$strstringtoload = "str" . $stringtoload;
$$strstringtoload = get_string($stringtoload);
}
if ($search) {
$searchstring = $strsearchagain;
} else {
$searchstring = $strsearch;
}
print_header("$site->shortname: $strassigncreators",
"$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> <a href=\"users.php\">$strusers</a> ->
$strassigncreators", "");
/// Add a creator if one is specified
if (!empty($_GET['add'])) {
if (! add_creator($add)) {
error("Could not add that creator!");
}
}
/// Remove a creator if one is specified.
if (!empty($_GET['remove'])) {
if (! remove_creator($remove)) {
error("Could not remove that creator!");
}
}
/// Print a help notice about this page
if (empty($add) and empty($remove) and empty($search)) {
print_simple_box("<center>".get_string("adminhelpassigncreators")."</center>", "center", "50%");
}
/// Get all existing creators
$creators = get_creators();
/// Print the lists of existing and potential creators
echo "<table cellpadding=2 cellspacing=10 align=center>";
echo "<tr><th width=50%>$strexistingcreators</th><th width=50%>$strpotentialcreators</th></tr>";
echo "<tr><td width=50% nowrap valign=top>";
/// First, show existing creators
if (! $creators) {
echo "<p align=center>$strnoexistingcreators</a>";
$creatorlist = "";
} else {
$creatorarray = array();
foreach ($creators as $creator) {
$creatorarray[] = $creator->id;
echo "<p align=right>$creator->firstname $creator->lastname,
$creator->email &nbsp;&nbsp; ";
echo "<a href=\"{$_SERVER['PHP_SELF']}?remove=$creator->id\"
title=\"$strremovecreator\"><img src=\"../pix/t/right.gif\"
border=0></a>";
echo "</p>";
}
$creatorlist = implode(",",$creatorarray);
unset($creatorarray);
}
echo "<td width=50% nowrap valign=top>";
/// Print list of potential creators
$usercount = get_users(false, $search, true, $creatorlist);
if ($usercount == 0) {
echo "<p align=center>$strnopotentialcreators</p>";
} else if ($usercount > MAX_USERS_PER_PAGE) {
echo "<p align=center>$strtoomanytoshow ($usercount) </p>";
} else {
if ($search) {
echo "<p align=center>($strsearchresults : $search)</p>";
}
if (!$users = get_users(true, $search, true, $creatorlist)) {
error("Could not get users!");
}
foreach ($users as $user) {
echo "<p align=left><a href=\"{$_SERVER['PHP_SELF']}?add=$user->id\"".
"title=\"$straddcreator\"><img src=\"../pix/t/left.gif\"".
"border=0></a>&nbsp;&nbsp;$user->firstname $user->lastname, $user->email";
}
}
if ($search or $usercount > MAX_USERS_PER_PAGE) {
echo "<form action={$_SERVER['PHP_SELF']} method=post>";
echo "<input type=text name=search size=20>";
echo "<input type=submit value=\"$searchstring\">";
echo "</form>";
}
echo "</tr></table>";
print_footer();
?>
+65 -39
View File
@@ -1,25 +1,29 @@
<?PHP // $Id$
// This script looks through all the module directories for cron.php files
// and runs them. These files can contain cleanup functions, email functions
// or anything that needs to be run on a regular basis.
//
// This file is best run from cron on the host system (ie outside PHP).
// The script can either be invoked via the web server or via a standalone
// version of PHP compiled for CGI.
//
// eg wget -q -O /dev/null 'http://moodle.somewhere.edu/admin/cron.php'
// or php /web/moodle/admin/cron.php
/// This script looks through all the module directories for cron.php files
/// and runs them. These files can contain cleanup functions, email functions
/// or anything that needs to be run on a regular basis.
///
/// This file is best run from cron on the host system (ie outside PHP).
/// The script can either be invoked via the web server or via a standalone
/// version of PHP compiled for CGI.
///
/// eg wget -q -O /dev/null 'http://moodle.somewhere.edu/admin/cron.php'
/// or php /web/moodle/admin/cron.php
require("../config.php");
$FULLME = "cron";
echo "<PRE>\n";
$starttime = microtime();
require_once("../config.php");
echo "<pre>\n";
$timenow = time();
// Run all cron jobs for each module
/// Run all cron jobs for each module
if ($mods = get_records_sql("SELECT * FROM modules WHERE cron > 0 AND (($timenow - lastcron) > cron)")) {
if ($mods = get_records_select("modules", "cron > 0 AND (($timenow - lastcron) > cron)")) {
foreach ($mods as $mod) {
$libfile = "$CFG->dirroot/mod/$mod->name/lib.php";
if (file_exists($libfile)) {
@@ -36,42 +40,64 @@
}
}
/// Run all core cron jobs, but not every time since they aren't too important.
/// These don't have a timer to reduce load, so we'll use a random number
/// to randomly choose the percentage of times we should run these jobs.
// Unenrol users who haven't logged in for $CFG->longtimenosee
srand ((double) microtime() * 10000000);
$random100 = rand(0,100);
if ($CFG->longtimenosee) { // value in days
$cutofftime = $timenow - ($CFG->longtimenosee * 3600 * 24);
if ($users = get_records_sql("SELECT u.* FROM user u, user_students s
WHERE lastaccess > '0' AND
lastaccess < '$cutofftime' AND
u.id = s.user GROUP BY u.id")) {
foreach ($users as $user) {
if (delete_records("user_students", "user", $user->id)) {
if ($random100 < 20) { // Approximately 20% of the time.
echo "Running clean-up tasks...\n";
// Delete other things ... this should be modular than it is right now:
delete_records("forum_subscriptions", "user", $user->id);
/// Unenrol users who haven't logged in for $CFG->longtimenosee
echo "Deleted student enrolment for $user->firstname $user->lastname ($user->id)\n";
if ($CFG->longtimenosee) { // value in days
$longtime = $timenow - ($CFG->longtimenosee * 3600 * 24);
if ($users = get_users_longtimenosee($longtime)) {
foreach ($users as $user) {
if (unenrol_student($user->id)) {
echo "Deleted student enrolment for $user->firstname $user->lastname ($user->id)\n";
}
}
}
}
}
// Delete users who haven't confirmed within seven days
$cutofftime = $timenow - (7 * 24 * 3600);
if ($users = get_records_sql("SELECT * FROM user
WHERE confirmed = '0' AND
firstaccess > '0' AND
firstaccess < '$cutofftime'")) {
foreach ($users as $user) {
if (delete_records("user", "id", $user->id)) {
echo "Deleted unconfirmed user for $user->firstname $user->lastname ($user->id)\n";
/// Delete users who haven't confirmed within seven days
$oneweek = $timenow - (7 * 24 * 3600);
if ($users = get_users_unconfirmed($oneweek)) {
foreach ($users as $user) {
if (delete_records("user", "id", $user->id)) {
echo "Deleted unconfirmed user for $user->firstname $user->lastname ($user->id)\n";
}
}
}
/// Delete duplicate enrolments (don't know what causes these yet - expired sessions?)
if ($users = get_records_select("user_students", "userid > 0 GROUP BY course, userid ".
"HAVING count(*) > 1", "", "*,count(*)")) {
foreach ($users as $user) {
delete_records_select("user_students", "userid = '$user->userid' ".
"AND course = '$user->course' AND id <> '$user->id'");
}
}
/// Delete old logs to save space (this might need a timer to slow it down...)
if (!empty($CFG->loglifetime)) { // value in days
$loglifetime = $timenow - ($CFG->loglifetime * 3600 * 24);
delete_records_select("log", "time < '$loglifetime'");
}
}
echo "Cron script completed correctly\n";
$difftime = microtime_diff($starttime, microtime());
echo "Execution took ".$difftime." seconds\n";
?>
+63
View File
@@ -0,0 +1,63 @@
<?PHP //$Id$
// Deletes the moodledata directory, COMPLETELY!!
// BE VERY CAREFUL USING THIS!
require_once("../config.php");
require_login();
if (!isadmin()) {
error("You must be admin to use this script!");
}
$deletedir = $CFG->dataroot; // The directory to delete!
if (!$sure) {
notice_yesno ("Are you completely sure you want to delete everything inside the directory $deletedir ?", "delete.php?sure=yes", "index.php");
exit;
}
if (!$reallysure) {
notice_yesno ("Are you REALLY REALLY completely sure you want to delete everything inside the directory $deletedir (this includes all user images, and any other course files that have been created) ?", "delete.php?sure=yes&reallysure=yes", "index.php");
exit;
}
/// OK, here goes ...
delete_subdirectories($deletedir);
echo "<H1 align=center>Done!</H1>";
print_continue($CFG->wwwroot);
exit;
function delete_subdirectories($rootdir) {
$dir = opendir($rootdir);
while ($file = readdir($dir)) {
if ($file != "." and $file != "..") {
$fullfile = "$rootdir/$file";
if (filetype($fullfile) == "dir") {
delete_subdirectories($fullfile);
echo "Deleting $fullfile ... ";
if (rmdir($fullfile)) {
echo "Done.<BR>";
} else {
echo "FAILED.<BR>";
}
} else {
echo "Deleting $fullfile ... ";
if (unlink("$fullfile")) {
echo "Done.<BR>";
} else {
echo "FAILED.<BR>";
}
}
}
}
closedir($dir);
}
?>
+293 -60
View File
@@ -1,37 +1,128 @@
<?PHP // $Id$
require("../config.php");
/// Check that config.php exists
if (!file_exists("../config.php")) {
echo "<H2 align=center>You need to create a config.php.<BR>
See the <A HREF=\"http://moodle.com/doc/?frame=install.html\">installation instructions</A>.</H2>";
die;
}
require_once("../config.php");
/// Check that PHP is of a sufficient version
if (!check_php_version("4.1.0")) {
$version = phpversion();
print_heading("Sorry, Moodle requires PHP 4.1.0 or later (currently using version $version)");
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");
}
if (ini_get_bool('magic_quotes_runtime')) {
error("The PHP server variable 'magic_quotes_runtime' should be Off - $documentationlink");
}
if (!ini_get_bool('file_uploads')) {
error("The PHP server variable 'file_uploads' is not turned On - $documentationlink");
}
if (!ini_get_bool('short_open_tag')) {
error("The PHP server variable 'short_open_tag' is not turned On - $documentationlink");
}
/// 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") {
error("Moodle has not been configured yet. You need to to edit config.php first.");
}
// Check databases and modules and install as needed.
if (! $db->Metatables() ) {
if (!$agreelicence) {
/// Check settings in config.php
$dirroot = dirname(realpath("../config.php"));
if (!empty($dirroot) and $dirroot != $CFG->dirroot) {
error("Please fix your settings in config.php:
<P>You have:
<P>\$CFG->dirroot = \"".addslashes($CFG->dirroot)."\";
<P>but it should be:
<P>\$CFG->dirroot = \"".addslashes($dirroot)."\";",
"./");
}
/// Set some necessary variables during set-up to avoid PHP warnings later on this page
if (!isset($CFG->framename)) {
$CFG->framename = "_top";
}
if (!isset($CFG->release)) {
$CFG->release = "";
}
if (!isset($CFG->version)) {
$CFG->version = "";
}
/// Check if the main tables have been installed yet or not.
if (! $tables = $db->Metatables() ) { // No tables yet at all.
$maintables = false;
} else { // Check for missing main tables
$maintables = true;
$mtables = array("config", "course", "course_categories", "course_modules",
"course_sections", "log", "log_display", "modules",
"user", "user_admins", "user_students", "user_teachers");
foreach ($mtables as $mtable) {
if (!in_array($CFG->prefix.$mtable, $tables)) {
$maintables = false;
break;
}
}
}
if (! $maintables) {
if (empty($agreelicence)) {
$strlicense = get_string("license");
print_header($strlicense, $strlicense, $strlicense);
print_heading("<A HREF=\"http://moodle.com\">Moodle</A> - Modular Object-Oriented Dynamic Learning Environment");
print_header($strlicense, $strlicense, $strlicense, "", "", false, "&nbsp;", "&nbsp;");
print_heading("<A HREF=\"http://moodle.org\">Moodle</A> - Modular Object-Oriented Dynamic Learning Environment");
print_heading(get_string("copyrightnotice"));
print_simple_box_start("CENTER");
print_simple_box_start("center");
echo text_to_html(get_string("gpl"));
print_simple_box_end();
echo "<BR>";
echo "<br />";
notice_yesno(get_string("doyouagree"), "index.php?agreelicence=true",
"http://www.gnu.org/copyleft/gpl.html");
"http://moodle.org/doc/?frame=licence.html");
exit;
}
$strdatabasesetup = get_string("databasesetup");
$strdatabasesuccess = get_string("databasesuccess");
print_header($strdatabasesetup, $strdatabasesetup, $strdatabasesetup);
print_header($strdatabasesetup, $strdatabasesetup, $strdatabasesetup, "", "", false, "&nbsp;", "&nbsp;");
if (file_exists("$CFG->libdir/db/$CFG->dbtype.sql")) {
$db->debug = true;
set_time_limit(0); // To allow slow databases to complete the long SQL
if (modify_database("$CFG->libdir/db/$CFG->dbtype.sql")) {
$db->debug = false;
notify($strdatabasesuccess);
notify($strdatabasesuccess, "green");
} else {
$db->debug = false;
error("Error: Main databases NOT set up successfully");
@@ -43,25 +134,27 @@
die;
}
// Check version of Moodle code on disk compared with database
// and upgrade if possible.
/// Check version of Moodle code on disk compared with database
/// and upgrade if possible.
include_once("$CFG->dirroot/version.php"); # defines $version and upgrades
include_once("$CFG->dirroot/version.php"); # defines $version
include_once("$CFG->dirroot/lib/db/$CFG->dbtype.php"); # defines upgrades
if ($dversion = get_field("config", "value", "name", "version")) {
if ($version > $dversion) { // upgrade
$a->oldversion = $dversion;
if ($CFG->version) {
if ($version > $CFG->version) { // upgrade
$a->oldversion = $CFG->version;
$a->newversion = $version;
$strdatabasechecking = get_string("databasechecking", "", $a);
$strdatabasesuccess = get_string("databasesuccess");
print_header($strdatabaseupgrades, $strdatabaseupgrades, $strdatabaseupgrades);
notify($strdatabasechecking);
print_header($strdatabasechecking, $strdatabasechecking, $strdatabasechecking,
"", "", false, "&nbsp;", "&nbsp;");
print_heading($strdatabasechecking);
$db->debug=true;
if (upgrade_moodle($dversion)) {
if (main_upgrade($CFG->version)) {
$db->debug=false;
if (set_field("config", "value", "$version", "name", "version")) {
notify($strdatabasesuccess);
print_continue("$CFG->wwwroot");
if (set_config("version", $version)) {
notify($strdatabasesuccess, "green");
print_continue("index.php");
die;
} else {
notify("Upgrade failed! (Could not update version in config table)");
@@ -70,22 +163,22 @@
$db->debug=false;
notify("Upgrade failed! See /version.php");
}
} else if ($version < $dversion) {
} else if ($version < $CFG->version) {
notify("WARNING!!! The code you are using is OLDER than the version that made these databases!");
}
} else {
$dversion->name = "version";
$dversion->value = $version;
$strdatabaseupgrades = get_string("databaseupgrades");
print_header($strdatabaseupgrades, $strdatabaseupgrades, $strdatabaseupgrades);
if (insert_record("config", $dversion)) {
notify("You are currently using Moodle version $version");
$strcurrentversion = get_string("currentversion");
print_header($strcurrentversion, $strcurrentversion, $strcurrentversion,
"", "", false, "&nbsp;", "&nbsp;");
if (set_config("version", $version)) {
print_heading("You are currently using Moodle version $version (Release $release)");
print_continue("index.php");
die;
} else {
$db->debug=true;
if (upgrade_moodle(0)) {
if (main_upgrade(0)) {
print_continue("index.php");
} else {
error("A problem occurred inserting current version into databases");
@@ -94,20 +187,60 @@
}
}
/// Updated human-readable release version if necessary
// Find and check all modules and load them up or upgrade them if necessary
if ($release <> $CFG->release) { // Update the release version
$strcurrentrelease = get_string("currentrelease");
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, "&nbsp;", "&nbsp;");
print_heading("Moodle $release");
if (!set_config("release", $release)) {
notify("ERROR: Could not update release version in database!!");
}
print_continue("index.php");
print_simple_box_start("CENTER");
include("$CFG->dirroot/lang/en/docs/release.html");
print_simple_box_end();
print_continue("index.php");
exit;
}
/// 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
/// Find and check all modules and load them up or upgrade them if necessary
if (!$mods = get_list_of_plugins("mod") ) {
error("No modules installed!");
}
foreach ($mods as $mod) {
if ($mod == "NEWMODULE") { // Someone has unzipped the template, ignore it
continue;
}
$fullmod = "$CFG->dirroot/mod/$mod";
unset($module);
include_once("$fullmod/version.php"); # defines $module with version etc
if ( is_readable("$fullmod/version.php")) {
include_once("$fullmod/version.php"); # defines $module with version etc
} else {
notify("Module $mod: $fullmod/version.php was not readable");
continue;
}
if ( is_readable("$fullmod/db/$CFG->dbtype.php")) {
include_once("$fullmod/db/$CFG->dbtype.php"); # defines upgrading function
} else {
notify("Module $mod: $fullmod/db/$CFG->dbtype.php was not readable");
continue;
}
if (!isset($module)) {
continue;
@@ -119,7 +252,7 @@
if ($currmodule->version == $module->version) {
// do nothing
} else if ($currmodule->version < $module->version) {
notify("$module->name module needs upgrading");
print_heading("$module->name module needs upgrading");
$upgrade_function = $module->name."_upgrade";
if (function_exists($upgrade_function)) {
$db->debug=true;
@@ -130,7 +263,8 @@
if (! update_record("modules", $module)) {
error("Could not update $module->name record in modules table!");
}
notify(get_string("modulesuccess", "", $module->name));
notify(get_string("modulesuccess", "", $module->name), "green");
echo "<HR>";
} else {
$db->debug=false;
notify("Upgrading $module->name from $currmodule->version to $module->version FAILED!");
@@ -142,16 +276,19 @@
}
} else { // module not installed yet, so install it
if (!$updated_modules) {
if (empty($updated_modules)) {
$strmodulesetup = get_string("modulesetup");
print_header($strmodulesetup, $strmodulesetup, $strmodulesetup);
print_header($strmodulesetup, $strmodulesetup, $strmodulesetup, "", "", false, "&nbsp;", "&nbsp;");
}
print_heading($module->name);
$updated_modules = true;
$db->debug = true;
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)) {
notify(get_string("modulesuccess", "", $module->name));
notify(get_string("modulesuccess", "", $module->name), "green");
echo "<HR>";
} else {
error("$module->name module could not be added to the module list!");
}
@@ -161,43 +298,139 @@
}
}
if ($updated_modules) {
if (!empty($updated_modules)) {
print_continue("index.php");
die;
}
// Set up the overall site name etc.
if (! $site = get_site()) {
redirect("$CFG->wwwroot/admin/site.php");
}
if (!isadmin()) {
if (! record_exists_sql("SELECT * FROM user_admins")) { // No admin user yet
redirect("$CFG->wwwroot/admin/user.php");
/// Insert default values for any important configuration variables
include_once("$CFG->dirroot/lib/defaults.php");
foreach ($defaults as $name => $value) {
if (!isset($CFG->$name)) {
$CFG->$name = $value;
set_config($name, $value);
$configchange = true;
}
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/");
}
// At this point, the databases exist, and the user is an admin
/// If any new configurations were found then send to the config page to check
if (!empty($configchange)) {
redirect("config.php");
}
/// Set up the overall site name etc.
if (! $site = get_site()) {
redirect("site.php");
}
/// Set up the admin user
if (! record_exists("user_admins")) { // No admin user yet
redirect("user.php");
}
/// Check for valid admin user
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
/// At this point everything is set up and the user is an admin, so print menu
$stradministration = get_string("administration");
print_header("$site->fullname: $stradministration","$site->fullname: $stradministration", "$stradministration");
print_header("$site->shortname: $stradministration","$site->fullname", "$stradministration");
print_simple_box_start("center", "100%", "$THEME->cellcontent2", 20);
print_heading($stradministration);
$table->head = array (get_string("site"), get_string("courses"), get_string("users"));
$table->align = array ("CENTER", "CENTER", "CENTER");
$table->data[0][0] = "<P><A HREF=\"site.php\">".get_string("sitesettings")."</A></P>".
"<P><A HREF=\"../course/log.php?id=$site->id\">".get_string("sitelogs")."</A></P>".
"<P><A HREF=\"../theme/index.php\">".get_string("choosetheme")."</A></P>";
$table->data[0][1] = "<P><A HREF=\"../course/edit.php\">".get_string("addnewcourse")."</A></P>".
"<P><A HREF=\"../course/teacher.php\">".get_string("assignteachers")."</A></P>".
"<P><A HREF=\"../course/delete.php\">".get_string("deletecourse")."</A></P>";
$table->data[0][2] = "<P><A HREF=\"user.php?newuser=true\">".get_string("addnewuser")."</A></P>".
"<P><A HREF=\"user.php\">".get_string("edituser")."</A></P>";
$table->tablealign = "right";
$table->align = array ("right", "left");
$table->wrap = array ("nowrap", "nowrap");
$table->cellpadding = 4;
$table->cellspacing = 3;
$table->width = "40%";
$configdata = "<font size=+1>&nbsp;</font><a href=\"config.php\">".get_string("configvariables")."</a> - <font size=1>".
get_string("adminhelpconfigvariables")."</font><br />";
$configdata .= "<font size=+1>&nbsp;</font><a href=\"site.php\">".get_string("sitesettings")."</a> - <font size=1>".
get_string("adminhelpsitesettings")."</font><br />";
$configdata .= "<font size=+1>&nbsp;</font><a href=\"../theme/index.php\">".get_string("themes")."</a> - <font size=1>".
get_string("adminhelpthemes")."</font><br />";
$configdata .= "<font size=+1>&nbsp;</font><a href=\"lang.php\">".get_string("language")."</a> - <font size=1>".
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 />";
$table->data[] = array("<font size=+1><b><a href=\"configure.php\">".get_string("configuration")."</a></b>",
$configdata);
$userdata = "<font size=+1>&nbsp;</font><a href=\"auth.php\">".get_string("authentication")."</a> - <font size=1>".
get_string("adminhelpauthentication")."</font><br />";
if ($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual") {
$userdata .= "<font size=+1>&nbsp;</font><a href=\"$CFG->wwwroot/$CFG->admin/user.php?newuser=true\">".
get_string("addnewuser")."</a> - <font size=1>".
get_string("adminhelpaddnewuser")."</font><br />";
}
$userdata .= "<font size=+1>&nbsp;</font><a href=\"user.php\">".get_string("edituser")."</a> - <font size=1>".
get_string("adminhelpedituser")."</font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"admin.php\">".get_string("assignadmins")."</a> - <font size=1>".
get_string("adminhelpassignadmins")."</font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"creators.php\">".get_string("assigncreators")."</a> - <font size=1>".
get_string("adminhelpassigncreators")."</font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"../course/index.php?edit=on\">".get_string("assignteachers")."</a> - <font size=1>".
get_string("adminhelpassignteachers").
" <img src=\"../pix/t/user.gif\" height=11 width=11></font><br />";
$userdata .= "<font size=+1>&nbsp;</font><a href=\"../course/index.php?edit=off\">".get_string("assignstudents")."</a> - <font size=1>".
get_string("adminhelpassignstudents")."</font>";
$table->data[] = array("<font size=+1><b><a href=\"users.php\">".get_string("users")."</a></b>", $userdata);
$table->data[] = array("<font size=+1><b><a href=\"../course/index.php?edit=on\">".get_string("courses")."</a></b>",
"<font size=+1>&nbsp;</font>".get_string("adminhelpcourses"));
$table->data[] = array("<font size=+1><b><a href=\"../course/log.php?id=$site->id.php\">".get_string("logs")."</a></b>",
"<font size=+1>&nbsp;</font>".get_string("adminhelplogs"));
$table->data[] = array("<font size=+1><b><a href=\"../files/index.php?id=$site->id\">".get_string("sitefiles")."</a></b>",
"<font size=+1>&nbsp;</font>".get_string("adminhelpsitefiles"));
if (file_exists("$CFG->dirroot/admin/$CFG->dbtype")) {
$table->data[] = array("<font size=+1><b><a href=\"$CFG->dbtype/frame.php\">".get_string("managedatabase")."</a></b>",
"<font size=+1>&nbsp;</font>".get_string("adminhelpmanagedatabase"));
}
print_table($table);
//////////////////////////////////////////////////////////////////////////////////////////////////
//// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO REMOVE OR MODIFY THE COPYRIGHT NOTICE BELOW ////
$copyrighttext = "<a href=\"http://moodle.org/\">Moodle</a> ".
"<a href=\"../doc/?frame=release.html\">$CFG->release</a> ($CFG->version)<br />".
"Copyright &copy; 2000-2003 Martin Dougiamas<br />".
"<a href=\"../doc/?frame=licence.html\">GNU Public License</a>";
echo "<center><p><font size=1>$copyrighttext</font></p></center>";
//////////////////////////////////////////////////////////////////////////////////////////////////
echo "<table border=0 align=center width=100%><tr>";
echo "<td align=center width=33%>";
print_single_button("$CFG->wwwroot/doc", NULL, get_string("documentation"));
echo "</td>";
echo "<td align=center width=33%>";
print_single_button("phpinfo.php", NULL, get_string("phpinfo"));
echo "</td>";
echo "<td align=center width=33%>";
print_single_button("register.php", NULL, get_string("registration"));
echo "</td>";
echo "<tr></table>";
print_simple_box_end();
print_footer($site);
print_footer();
?>
+288
View File
@@ -0,0 +1,288 @@
<?PHP // $Id$
require_once("../config.php");
optional_variable($mode, "");
require_login();
if (!isadmin()) {
error("You need to be admin to edit this page");
}
if (! $site = get_site()) {
error("Site not defined!");
}
$stradministration = get_string("administration");
$strconfiguration = get_string("configuration");
$strlanguage = get_string("language");
$strcurrentlanguage = get_string("currentlanguage");
$strmissingstrings = get_string("missingstrings");
$strcomparelanguage = get_string("comparelanguage");
$strthislanguage = get_string("thislanguage");
switch ($mode) {
case "missing":
$navigation = "<A HREF=\"lang.php\">$strlanguage</A> -> $strmissingstrings";
$title = $strmissingstrings;
break;
case "compare":
$navigation = "<A HREF=\"lang.php\">$strlanguage</A> -> $strcomparelanguage";
$title = $strcomparelanguage;
break;
default:
$title = $strlanguage;
$navigation = $strlanguage;
break;
}
$currentlang = current_language();
print_header("$site->shortname: $title", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $navigation");
if (!$mode) {
print_heading("$strcurrentlanguage: $currentlang - ".get_string("thislanguage"));
print_heading("<a href=\"lang.php?mode=missing\">$strmissingstrings</a>");
print_heading("<a href=\"lang.php?mode=compare\">$strcomparelanguage</a>");
echo "<center><hr noshade size=1>";
$options["lang"] = $currentlang;
print_single_button("http://moodle.org/download/lang/", $options, get_string("latestlanguagepack"));
echo "</center>";
print_footer();
exit;
}
// Get a list of all the root files in the English directory
$langdir = "$CFG->dirroot/lang/$currentlang";
$enlangdir = "$CFG->dirroot/lang/en";
if (! $stringfiles = get_directory_list($enlangdir, "", false)) {
error("Could not find English language pack!");
}
foreach ($stringfiles as $key => $file) {
if ($file == "README" or $file == "help" or $file == "docs" or $file == "fonts") {
unset($stringfiles[$key]);
}
}
if ($mode == "missing") {
// For each file, check that a counterpart exists, then check all the strings
foreach ($stringfiles as $file) {
if (!file_exists("$langdir/$file")) {
echo "<P><FONT COLOR=red>".get_string("filemissing", "", "$langdir/$file")."</FONT></P>";
continue;
}
unset($string);
include("$enlangdir/$file");
$enstring = $string;
unset($string);
include("$langdir/$file");
$first = true;
foreach ($enstring as $key => $value) {
if (!isset($string[$key]) or $string[$key] == "") {
$value = htmlspecialchars($value);
$value = str_replace("$"."a", "\\$"."a", $value);
$value = str_replace("%%","%",$value);
if ($first) {
echo "</PRE><HR><P><B>".get_string("stringsnotset","","$langdir/$file")."</B></P><PRE>";
$first = false;
$somethingfound = true;
}
echo "$"."string['$key'] = \"$value\";<BR>";
}
}
}
if (! $files = get_directory_list("$CFG->dirroot/lang/en/help", "CVS")) {
error("Could not find English language help files!");
}
foreach ($files as $filekey => $file) { // check all the help files.
if (!file_exists("$langdir/help/$file")) {
echo "<P><FONT COLOR=red>".get_string("filemissing", "", "$langdir/help/$file")."</FONT></P>";
$somethingfound = true;
continue;
}
}
if (! $files = get_directory_list("$CFG->dirroot/lang/en/docs", "CVS")) {
error("Could not find English language docs files!");
}
foreach ($files as $filekey => $file) { // check all the docs files.
if (!file_exists("$langdir/docs/$file")) {
echo "<P><FONT COLOR=red>".get_string("filemissing", "", "$langdir/docs/$file")."</FONT></P>";
$somethingfound = true;
continue;
}
}
if (!empty($somethingfound)) {
print_continue("lang.php");
} else {
notice(get_string("languagegood"), "lang.php");
}
} else if ($mode == "compare") {
if (isset($_POST['file'])){ // Save a file
$newstrings = $_POST;
$file = $newstrings['file'];
unset($newstrings['file']);
if (lang_save_file($langdir, $file, $newstrings)) {
notify(get_string("changessaved")." ($langdir/$file)");
} else {
error("Could not save the file '$file'!", "lang.php?mode=compare");
}
}
print_heading($strcomparelanguage);
echo "<CENTER>";
helpbutton("langedit",$strcomparelanguage);
echo "</CENTER>";
foreach ($stringfiles as $file) {
print_heading("$file", "LEFT", 4);
if (!file_exists("$langdir/$file")) {
echo "<P><FONT COLOR=red>".get_string("filemissing", "", "$langdir/$file")."</FONT></P>";
continue;
}
error_reporting(0);
if ($f = fopen("$langdir/$file","r+")) {
$editable = true;
fclose($f);
} else {
$editable = false;
echo "<P><FONT SIZE=1>".get_string("makeeditable", "", "$langdir/$file")."</FONT></P>";
}
error_reporting(7);
unset($string);
include("$enlangdir/$file");
$enstring = $string;
ksort($enstring);
unset($string);
include("$langdir/$file");
if ($editable) {
echo "<FORM NAME=\"$file\" ACTION=\"lang.php\" METHOD=\"POST\">";
}
echo "<TABLE WIDTH=\"100%\" CELLPADDING=2 CELLSPACING=3 BORDER=0>";
foreach ($enstring as $key => $envalue) {
$envalue = nl2br(htmlspecialchars($envalue));
$envalue = preg_replace('/(\$a\-\&gt;[a-zA-Z0-9]*|\$a)/', '<b>$0</b>', $envalue); // Make variables bold.
$envalue = str_replace("%%","%",$envalue);
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>";
$value = $string[$key];
$value = str_replace("\r","",$value); // Bad character caused by Windows
$value = str_replace("\n\n\n\n\n\n","\n",$value); // Collapse runs of blank lines
$value = str_replace("\n\n\n\n\n","\n",$value);
$value = str_replace("\n\n\n\n","\n",$value);
$value = str_replace("\n\n\n","\n",$value);
$value = str_replace("\n\n\n","\n",$value);
$value = str_replace("\\","",$value); // Delete all slashes
$value = str_replace("%%","%",$value);
$value = htmlspecialchars($value);
$cellcolour = $value ? $THEME->cellcontent: $THEME->highlight;
if ($editable) {
echo "<TD WIDTH=40% BGCOLOR=\"$cellcolour\" VALIGN=TOP>";
if (isset($string[$key])) {
$valuelen = strlen($value);
} else {
$valuelen = strlen($envalue);
}
$cols=50;
if (strstr($value, "\r") or strstr($value, "\n") or $valuelen > $cols) {
$rows = ceil($valuelen / $cols);
echo "<TEXTAREA NAME=\"string-$key\" cols=\"$cols\" rows=\"$rows\">$value</TEXTAREA>";
} else {
if ($valuelen) {
$cols = $valuelen + 2;
}
echo "<INPUT TYPE=\"TEXT\" NAME=\"string-$key\" VALUE=\"$value\" SIZE=\"$cols\"></TD>";
}
echo "</TD>";
} else {
echo "<TD WIDTH=40% BGCOLOR=\"$cellcolour\" VALIGN=TOP>$value</TD>";
}
}
if ($editable) {
echo "<TR><TD COLSPAN=2>&nbsp;<TD>";
echo " <INPUT TYPE=\"hidden\" NAME=\"file\" VALUE=\"$file\">";
echo " <INPUT TYPE=\"hidden\" NAME=\"mode\" VALUE=\"compare\">";
echo " <INPUT TYPE=\"submit\" NAME=\"update\" VALUE=\"".get_string("savechanges").": $file\">";
echo "</TD></TR>";
}
echo "</TABLE>";
echo "</FORM>";
}
print_continue("lang.php");
}
print_footer();
//////////////////////////////////////////////////////////////////////
function lang_save_file($path, $file, $strings) {
// Thanks to Petri Asikainen for the original version of code
// used to save language files.
//
// $path is a full pathname to the file
// $file is the file to overwrite.
// $strings is an array of strings to write
global $CFG;
error_reporting(0);
if (!$f = fopen("$path/$file","w")) {
return false;
}
error_reporting(7);
fwrite($f, "<?PHP // \$Id\$ \n");
fwrite($f, " // $file - created with Moodle $CFG->release ($CFG->version)\n\n\n");
ksort($strings);
foreach ($strings as $key => $value) {
list($id, $stringname) = explode("-",$key);
if ($CFG->lang != "zh_hk" and $CFG->lang != "zh_tw") { // Some MB languages include backslash bytes
$value = str_replace("\\","",$value); // Delete all slashes
}
$value = str_replace("$"."a", "\\$"."a", $value); // Add slashes for $a
$value = str_replace("\"", "\\\\\\\"", $value); // Add slashes for "
$value = str_replace("%","%%",$value); // Escape % characters
if ($id == "string" and $value != ""){
fwrite($f,"\$string['$stringname'] = \"$value\";\n");
}
}
fwrite($f,"\n?>\n");
fclose($f);
return true;
}
?>
+56
View File
@@ -0,0 +1,56 @@
<?PHP // $Id$
// module.php - allows admin to edit all local configuration variables for a module
require_once("../config.php");
require_login();
if (!isadmin()) {
error("Only an admin can use this page");
}
if (!$site = get_site()) {
error("Site isn't defined!");
}
/// If data submitted, then process and store.
if ($config = data_submitted()) {
print_header();
foreach ($config as $name => $value) {
set_config($name, $value);
}
redirect("$CFG->wwwroot/$CFG->admin/modules.php", get_string("changessaved"), 1);
exit;
}
/// Otherwise print the form.
require_variable($module);
require_once("$CFG->dirroot/mod/$module/lib.php");
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strmanagemodules = get_string("managemodules");
$strmodulename = get_string("modulename", $module);
print_header("$site->shortname: $strconfigvariables", $site->fullname,
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> ".
"<a href=\"modules.php\">$strmanagemodules</a> -> $strmodulename", $focus);
print_heading($strmodulename);
print_simple_box("<center>".get_string("configwarning")."</center>", "center", "50%");
echo "<br />";
print_simple_box_start("center", "", "$THEME->cellheading");
include("$CFG->dirroot/mod/$module/config.html");
print_simple_box_end();
print_footer();
?>
+191
View File
@@ -0,0 +1,191 @@
<?PHP // $Id$
// Allows the admin to create, delete and rename course categories
require_once("../config.php");
require_once("../course/lib.php");
optional_variable($disable);
optional_variable($enable);
optional_variable($delete);
optional_variable($confirm);
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");
$strmanagemodules = get_string("managemodules");
$strdelete = get_string("delete");
$strhide = get_string("hide");
$strshow = get_string("show");
$strsettings = get_string("settings");
$stractivitymodule = get_string("activitymodule");
print_header("$site->shortname: $strmanagemodules", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strmanagemodules");
print_heading($strmanagemodules);
/// If data submitted, then process and store.
if (!empty($hide)) {
if (!$module = get_record("modules", "name", $hide)) {
error("Module doesn't exist!");
}
set_field("modules", "visible", "0", "id", $module->id); // Hide main module
set_field("course_modules", "visible", "0", "module", $module->id); // Hide all related activity modules
}
if (!empty($show)) {
if (!$module = get_record("modules", "name", $show)) {
error("Module doesn't exist!");
}
set_field("modules", "visible", "1", "id", $module->id); // Show main module
set_field("course_modules", "visible", "1", "module", $module->id); // Show all related activity modules
}
if (!empty($delete)) {
$strmodulename = get_string("modulename", "$delete");
if (empty($confirm)) {
notice_yesno(get_string("moduledeleteconfirm", "", $strmodulename),
"modules.php?delete=$delete&confirm=$delete",
"modules.php");
print_footer();
exit;
} else { // Delete everything!!
if ($delete == "forum") {
error("You can not delete the forum module!!");
}
if (!$module = get_record("modules", "name", $delete)) {
error("Module doesn't exist!");
}
// OK, first delete all the relevant instances from all course sections
if ($coursemods = get_records("course_modules", "module", $module->id)) {
foreach ($coursemods as $coursemod) {
if (! delete_mod_from_section($coursemod->id, $coursemod->section)) {
notify("Could not delete the $strmodulename with id = $coursemod->id from section $coursemod->section");
}
}
}
// Now delete all the course module records
if (!delete_records("course_modules", "module", $module->id)) {
notify("Error occurred while deleting all $strmodulename records in course_modules table");
}
// Then delete all the logs
if (!delete_records("log", "module", $module->name)) {
notify("Error occurred while deleting all $strmodulename records in log table");
}
// And log_display information
if (!delete_records("log_display", "module", $module->name)) {
notify("Error occurred while deleting all $strmodulename records in log_display table");
}
// And the module entry itself
if (!delete_records("modules", "name", $module->name)) {
notify("Error occurred while deleting the $strmodulename record from modules table");
}
// Then the tables themselves
if ($tables = $db->Metatables()) {
$prefix = $CFG->prefix.$module->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");
}
}
}
}
rebuild_course_cache(); // Because things have changed
$a->module = $strmodulename;
$a->directory = "$CFG->dirroot/mod/$delete";
notice(get_string("moduledeletefiles", "", $a), "modules.php");
}
}
/// Get and sort the existing modules
if (!$modules = get_records("modules")) {
error("No modules found!!"); // Should never happen
}
foreach ($modules as $module) {
$strmodulename = get_string("modulename", "$module->name");
$modulebyname[$strmodulename] = $module;
}
ksort($modulebyname);
/// Print the table of all modules
if (empty($THEME->custompix)) {
$pixpath = "../pix";
$modpixpath = "../mod";
} else {
$pixpath = "../theme/$CFG->theme/pix";
$modpixpath = "../theme/$CFG->theme/pix/mod";
}
$table->head = array ($stractivitymodule, "$strhide/$strshow", $strdelete, $strsettings);
$table->align = array ("LEFT", "CENTER", "CENTER", "CENTER");
$table->wrap = array ("NOWRAP", "", "","");
$table->size = array ("100%", "10", "10","12");
$table->width = "100";
foreach ($modulebyname as $modulename => $module) {
$icon = "<img src=\"$modpixpath/$module->name/icon.gif\" hspace=10 height=16 width=16 border=0>";
$delete = "<a href=\"modules.php?delete=$module->name\">$strdelete</a>";
if (file_exists("$CFG->dirroot/mod/$module->name/config.html")) {
$settings = "<a href=\"module.php?module=$module->name\">$strsettings</a>";
} else {
$settings = "";
}
if ($module->visible) {
$visible = "<a href=\"modules.php?hide=$module->name\" title=\"$strhide\">".
"<img src=\"$pixpath/i/hide.gif\" align=\"absmiddle\" height=16 width=16 border=0></a>";
$class = "";
} else {
$visible = "<a href=\"modules.php?show=$module->name\" title=\"$strshow\">".
"<img src=\"$pixpath/i/show.gif\" align=\"absmiddle\" height=16 width=16 border=0></a>";
$class = "class=\"dimmed_text\"";
}
if ($module->name == "forum") {
$delete = "";
$visible = "";
$class = "";
}
$table->data[] = array ("<p $class>$icon $modulename</p>", $visible, $delete, $settings);
}
print_table($table);
echo "<br /><br />";
print_footer();
?>
+34
View File
@@ -0,0 +1,34 @@
<?PHP // $Id$
// phpinfo.php - shows phpinfo for the current server
require_once("../config.php");
require_login();
if (!isadmin()) {
error("Only the admin can use this page");
}
if (isset($topframe)) {
$stradministration = get_string("administration");
$site = get_site();
print_header("$site->shortname: phpinfo", "$site->fullname",
"<a target=\"$CFG->framename\" href=\"index.php\">$stradministration</a> -> PHP info");
exit;
}
if (isset($bottomframe)) {
phpinfo();
exit;
}
?>
<head>
<title>PHP info</title>
</head>
<frameset rows="80,*">
<frame src="phpinfo.php?topframe=true">
<frame src="phpinfo.php?bottomframe=true">
</frameset>
+138
View File
@@ -0,0 +1,138 @@
<?PHP // $Id$
// register.php - allows admin to register their site on moodle.org
include("../config.php");
require_once("../lib/countries.php");
require_login();
if (!isadmin()) {
error("Only the admin can use this page");
}
if (!$site = get_site()) {
redirect("index.php");
}
if (!$admin = get_admin()) {
error("No admins");
}
if (!$admin->country and $CFG->country) {
$admin->country = $CFG->country;
}
if (!$admin->secret) { // secret field hasn't been set yet
$admin->secret = random_string(15);
if (!set_field("user", "secret", $admin->secret, "id", $admin->id)) {
error("Could not set admin's secret string!");
}
}
/// Print headings
$stradministration = get_string("administration");
$strregistration = get_string("registration");
$strregistrationinfo = get_string("registrationinfo");
print_header("$site->shortname: $strregistration", "$site->fullname",
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> $strregistration");
print_heading($strmanagemodules);
print_simple_box($strregistrationinfo, "center", "70%");
echo "<br />";
/// Print the form
print_simple_box_start("center", "", "$THEME->cellheading");
echo "<form name=\"form\" action=\"http://moodle.org/register/\" method=post>\n";
echo "<table cellpadding=9 border=0>\n";
echo "<tr valign=top>\n";
echo "<td align=right><p>Moodle URL:</td>\n";
echo "<td><p>$CFG->wwwroot</td>\n";
echo "<!-- The following hidden variables are to help prevent fake entries being sent. -->\n";
echo "<!-- Together they form a key. If any of these change between updates then the entry -->\n";
echo "<!-- is flagged as a new entry and will be manually checked by the list maintainer -->\n";
echo "<input type=\"hidden\" name=\"url\" value=\"$CFG->wwwroot\">\n";
echo "<input type=\"hidden\" name=\"secret\" value=\"$admin->secret\">\n";
echo "<input type=\"hidden\" name=\"host\" value=\"".$_SERVER["HTTP_HOST"]."\">\n";
echo "<input type=\"hidden\" name=\"lang\" value=\"".current_language()."\">\n";
echo "</td></tr>\n";
echo "<tr valign=top>\n";
echo "<td align=right><p>".get_string("currentversion").":</td>\n";
echo "<td><p>$CFG->release ($CFG->version)</td>\n";
echo "<input type=\"hidden\" name=\"version\" value=\"$CFG->version\">\n";
echo "<input type=\"hidden\" name=\"release\" value=\"$CFG->release\">\n";
echo "</td></tr>\n";
echo "<tr valign=top>\n";
echo "<td align=right><p>".get_string("fullsitename").":</td>\n";
echo "<td><p><input size=50 type=\"text\" name=\"sitename\" value=\"$site->fullname\"></td>\n";
echo "</tr>\n";
echo "<tr valign=top>\n";
echo "<td align=right><p>".get_string("country").":</td>\n";
echo "<td><p>";
choose_from_menu ($COUNTRIES, "country", $admin->country, get_string("selectacountry")."...", "", "");
echo "</td>\n";
echo "</tr>\n";
echo "<tr valign=top>\n";
echo "<td align=right><p><a href=\"http://moodle.org/sites\" title=\"See the current list of sites\" target=_blank>".get_string("publicdirectory")."</a>:</td>\n";
echo "<td><p>";
$options[0] = get_string("publicdirectory0");
$options[1] = get_string("publicdirectory1");
$options[2] = get_string("publicdirectory2");
choose_from_menu ($options, "public", "2", "", "", "");
unset($options);
echo "</td>\n";
echo "</tr>\n";
echo "<tr valign=top>\n";
echo "<td colspan=2><hr size=1 noshade>\n";
echo "</tr>\n";
echo "<tr valign=top>\n";
echo "<td align=right><p>".get_string("administrator").":</td>\n";
echo "<td><p><input size=50 type=\"text\" name=\"adminname\" value=\"$admin->firstname $admin->lastname\"></td>\n";
echo "</tr>\n";
echo "<tr valign=top>\n";
echo "<td align=right><p>".get_string("email").":</td>\n";
echo "<td><p><input size=50 type=\"text\" name=\"adminemail\" value=\"$admin->email\"></td>\n";
echo "</tr>\n";
echo "<tr valign=top>\n";
echo "<td align=right><p>".get_string("registrationemail")."</a>:</td>\n";
echo "<td><p>\n";
$options[0] = get_string("registrationno");
$options[1] = get_string("registrationyes");
choose_from_menu ($options, "mailme", "1", "", "", "");
unset($options);
echo "</td>\n";
echo "</tr>\n";
echo "<tr valign=top>\n";
echo "<td align=right>&nbsp;</td>\n";
echo "<td><p><input type=\"submit\" value=\"".get_string("registrationsend")."\"></td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</form>\n";
print_simple_box_end();
echo "<br />\n";
print_footer();
?>
+87 -29
View File
@@ -1,31 +1,56 @@
<FORM METHOD="post" action="site.php" NAME="form">
<TABLE cellpadding=9 cellspacing=0 >
<form method="post" action="site.php" name="form" <?php echo $onsubmit ?>>
<table cellpadding=9 cellspacing=0 >
<tr valign=top>
<td align=right><P><? print_string("fullsitename") ?>:</td>
<td><input type="text" name="fullname" size=50 value="<? p($form->fullname) ?>">
<? formerr($err["fullname"]) ?>
</td>
</tr>
<tr valign=top>
<td align=right><P><? print_string("shortsitename") ?>:</td>
<td><input type="text" name="shortname" size=50 value="<? p($form->shortname) ?>">
<? formerr($err["shortname"]) ?>
</td>
</tr>
<tr valign=top>
<td align=right><P><? print_string("frontpagedescription") ?>:</P><BR>
<? helpbutton("text", get_string("helptext")) ?>
</td>
<td><TEXTAREA NAME=summary COLS=50 ROWS=10 WRAP=virtual><? p($form->summary) ?></TEXTAREA>
<? formerr($err["summary"]) ?>
<td align=right><P><?php print_string("fullsitename") ?>:</td>
<td><input type="text" name="fullname" size=50 value="<?php p($form->fullname) ?>">
<?php if (isset($err["fullname"])) formerr($err["fullname"]); ?>
</td>
</tr>
<tr valign=top>
<td align=right><P><? print_string("frontpageformat") ?>:</td>
<td><?
<td align=right><P><?php print_string("shortsitename") ?>:</td>
<td><input type="text" name="shortname" size=50 value="<?php p($form->shortname) ?>">
<?php if (isset($err["shortname"])) formerr($err["shortname"]); ?>
</td>
</tr>
<tr valign=top>
<td align=right><P><?php print_string("frontpagedescription") ?>:</P><br />
<font size=1>
<?PHP
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
echo "<br />";
if ($usehtmleditor) {
helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
} else {
helpbutton("html", get_string("helphtml"), "moodle", true, true);
}
?>
<br />
</font>
</td>
<td><? print_textarea($usehtmleditor, 10, 50, 600, 400, "summary", $form->summary); ?></td>
</tr>
<tr valign=top>
<td align=right><P><?php print_string("frontpageformat") ?>:</td>
<td><?php
$options = array("0" => get_string("frontpagenews"),
"1" => get_string("frontpagecourselist"),
"2" => get_string("frontpagecategorynames"));
if (count_records("course") > 200) {
unset($options[1]);
if ($form->frontpage == 1) {
$form->frontpage = 2;
}
}
choose_from_menu ($options, "frontpage", "$form->frontpage", "");
?>
</td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("newsitemsnumber") ?>:</td>
<td><?php
$newsitem = get_string("newsitem");
$newsitems = get_string("newsitems");
$options = array("0" => get_string("showlistofcourses"),
$options = array("0" => "0 $newsitems",
"1" => "1 $newsitem",
"2" => "2 $newsitems",
"3" => "3 $newsitems",
@@ -37,16 +62,49 @@
"9" => "9 $newsitems",
"10" => "10 $newsitems");
choose_from_menu ($options, "newsitems", "$form->newsitems", "");
formerr($err["newsitems"]);
?>
</td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("wordforteacher") ?>:</td>
<td><input type="text" name="teacher" maxlength="100" size=25 value="<?php p($form->teacher) ?>">
(<?php print_string("wordforteachereg") ?>)
<?php if (isset($err["teacher"])) formerr($err["teacher"]); ?>
</td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("wordforteachers") ?>:</td>
<td><input type="text" name="teachers" maxlength="100" size=25 value="<?php p($form->teachers) ?>">
(<?php print_string("wordforteacherseg") ?>)
<?php if (isset($err["teachers"])) formerr($err["teachers"]); ?>
</td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("wordforstudent") ?>:</td>
<td><input type="text" name="student" maxlength="100" size=25 value="<?php p($form->student) ?>">
(<?php print_string("wordforstudenteg") ?>)
<?php if (isset($err["student"])) formerr($err["student"]); ?>
</td>
</tr>
<tr valign=top>
<td align=right><p><?php print_string("wordforstudents") ?>:</td>
<td><input type="text" name="students" maxlength="100" size=25 value="<?php p($form->students) ?>">
(<?php print_string("wordforstudentseg") ?>)
<?php if (isset($err["students"])) formerr($err["students"]); ?>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="<? print_string("savechanges") ?>"></td>
<td><input type="submit" value="<?php print_string("savechanges") ?>"></td>
</tr>
</TABLE>
<INPUT type="hidden" name="id" value="<?=$form->id ?>">
<INPUT type="hidden" name="category" value="<?=$form->category ?>">
<INPUT type="hidden" name="format" value="<?=$form->format ?>">
</FORM>
</table>
<input type="hidden" name="id" value="<?php p($form->id) ?>">
<input type="hidden" name="category" value="<?php p($form->category) ?>">
<input type="hidden" name="format" value="<?php p($form->format) ?>">
</form>
<?php
if ($usehtmleditor) {
print_richedit_javascript("form", "summary", "no");
}
?>
+63 -21
View File
@@ -1,74 +1,119 @@
<?PHP // $Id$
require("../config.php");
require_once("../config.php");
if ($site = get_site()) {
if (!isadmin()) {
error("You need to be admin to edit this page");
}
$site->format = "social"; // override
}
$site->format = "social"; // override
/// If data submitted, then process and store.
if (match_referer() && isset($HTTP_POST_VARS)) {
$form = (object)$HTTP_POST_VARS;
if ($form = data_submitted()) {
validate_form($form, $err);
if (count($err) == 0) {
set_config("frontpage", $form->frontpage);
$form->timemodified = time();
if ($form->id) {
if (update_record("course", $form)) {
redirect("$CFG->wwwroot/admin/index.php", "Changes saved");
redirect("$CFG->wwwroot/", get_string("changessaved"));
} else {
error("Serious Error! Could not update the site record! (id = $form->id)");
}
} else {
if ($newid = insert_record("course", $form)) {
$cat->name = "General";
$cat->name = get_string("miscellaneous");
if (insert_record("course_categories", $cat)) {
redirect("$CFG->wwwroot/admin/index.php", "Changes saved", "1");
redirect("$CFG->wwwroot/$CFG->admin/index.php", get_string("changessaved"), 1);
} else {
error("Serious Error! Could not set up the default categories!");
error("Serious Error! Could not set up a default course category!");
}
} else {
error("Serious Error! Could not set up the site!");
}
}
die;
die;
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
}
}
}
}
/// Otherwise fill and print the form.
if ($site && !$form) {
if ($site and empty($form)) {
$form = $site;
$firsttime = false;
} else {
$form->fullname = "";
$form->shortname = "";
$form->summary = "";
$form->newsitems = 3;
$form->id = "";
$form->category = 0;
$form->format = "social";
$form->newsitems = 0;
$form->teacher = get_string("defaultcourseteacher");
$form->teachers = get_string("defaultcourseteachers");
$form->student = get_string("defaultcoursestudent");
$form->students = get_string("defaultcoursestudents");
$firsttime = true;
}
if (isset($CFG->frontpage)) {
$form->frontpage = $CFG->frontpage;
} else {
if ($form->newsitems > 0) {
$form->frontpage = 0;
} else {
$form->frontpage = 1;
}
set_config("frontpage", $form->frontpage);
}
if (empty($focus)) {
$focus = "form.fullname";
}
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strsitesettings = get_string("sitesettings");
print_header("$site->fullname", "$site->fullname",
"<A HREF=\"$CFG->wwwroot/admin/\">$stradmin</A> -> $strsitesettings", "$focus");
if ($firsttime) {
print_header();
print_heading($strsitesettings);
print_simple_box(get_string("configintrosite"), "center", "50%");
echo "<br />";
} else {
print_header("$site->shortname: $strsitesettings", "$site->fullname",
"<a href=\"index.php\">$stradmin</a> -> ".
"<a href=\"configure.php\">$strconfiguration</a> -> $strsitesettings", "$focus");
print_heading($strsitesettings);
}
$defaultformat = FORMAT_HTML;
if ($usehtmleditor = can_use_richtext_editor()) {
$onsubmit = "onsubmit=\"copyrichtext(form.summary);\"";
} else {
$onsubmit = "";
}
print_simple_box_start("center", "", "$THEME->cellheading");
print_heading("Editing site settings");
include("site.html");
include("site.html");
print_simple_box_end();
print_footer();
if (!$firsttime) {
print_footer();
}
exit;
@@ -82,9 +127,6 @@ function validate_form(&$form, &$err) {
if (empty($form->shortname))
$err["shortname"] = get_string("missingshortsitename");
if (empty($form->summary))
$err["summary"] = get_string("missingsitedescription");
return;
}
+206 -34
View File
@@ -1,16 +1,32 @@
<?PHP // $Id$
require("../config.php");
require("../user/lib.php");
require("../lib/countries.php");
require_once("../config.php");
require_once("../user/lib.php");
require_once("../lib/countries.php");
if (! record_exists_sql("SELECT * FROM user_admins")) { // No admin user yet
$user->firstname = "Admin";
$user->lastname = "User";
$recordsperpage = 30;
optional_variable($newuser, "");
optional_variable($delete, "");
optional_variable($confirm, "");
optional_variable($sort, "name");
optional_variable($dir, "ASC");
optional_variable($page, 0);
optional_variable($search, "");
unset($user);
unset($admin);
unset($teacher);
if (! record_exists("user_admins")) { // No admin user yet
$user->firstname = get_string("admin");
$user->lastname = get_string("user");
$user->username = "admin";
$user->password = "";
$user->password = md5("admin");
$user->email = "root@localhost";
$user->confirmed = 1;
$user->lang = $CFG->lang;
$user->maildisplay = 1;
$user->timemodified = time();
@@ -18,7 +34,7 @@
error("SERIOUS ERROR: Could not create admin user record !!!");
}
$admin->user = $user->id;
$admin->userid = $user->id;
if (! insert_record("user_admins", $admin)) {
error("Could not make user $user->id an admin !!!");
@@ -32,7 +48,7 @@
error("Could not find site-level course");
}
$teacher->user = $user->id;
$teacher->userid = $user->id;
$teacher->course = $site->id;
$teacher->authority = 1;
if (! insert_record("user_teachers", $teacher)) {
@@ -41,11 +57,13 @@
$USER = $user;
$USER->loggedin = true;
$USER->site = $CFG->wwwroot;
$USER->admin = true;
$USER->teacher["$site->id"] = true;
save_session("USER");
$USER->newadminuser = true;
redirect("$CFG->wwwroot/user/edit.php?id=$user->id&course=$site->id");
exit;
} else {
if (! $site = get_site()) {
@@ -60,12 +78,12 @@
}
if ($newuser) { // Create a new user
$user->firstname = "";
$user->lastname = "";
$user->username = "changeme";
$user->password = "";
$user->email = "";
$user->lang = $CFG->lang;
$user->confirmed = 1;
$user->timemodified = time();
@@ -79,34 +97,188 @@
} else { // List all users for editing
if ($users = get_records_sql("SELECT * from user WHERE username <> 'guest' ORDER BY firstname")) {
$stredituser = get_string("edituser");
$stradministration = get_string("administration");
$stredit = get_string("edit");
$strdelete = get_string("delete");
$stredituser = get_string("edituser");
$stradministration = get_string("administration");
$strusers = get_string("users");
$stredit = get_string("edit");
$strdelete = get_string("delete");
$strdeletecheck = get_string("deletecheck");
$strsearch = get_string("search");
$strshowallusers = get_string("showallusers");
print_header("$site->fullname : $stredituser", $site->fullname,
"<A HREF=\"$CFG->wwwroot/admin\">$stradministration</A> -> $stredituser");
print_header("$site->shortname: $stredituser", $site->fullname,
"<a href=\"index.php\">$stradministration</a> -> <a href=\"users.php\">$strusers</a> -> $stredituser");
print_heading(get_string("chooseuser"));
$table->head = array (get_string("fullname"), get_string("email"), get_string("city"),
get_string("country"), " ");
$table->align = array ("LEFT", "LEFT", "CENTER", "CENTER", "CENTER", "CENTER");
foreach ($users as $user) {
$table->data[] = array ("<A HREF=\"../user/view.php?id=$user->id&course=$site->id\">$user->firstname $user->lastname</A>",
"$user->email",
"$user->city",
$COUNTRIES[$user->country],
"<A HREF=\"../user/edit.php?id=$user->id&course=$site->id\">$stredit</A>");
if ($delete) { // Delete a selected user, after confirmation
if (!$user = get_record("user", "id", "$delete")) {
error("No such user!");
}
print_table($table);
print_heading("<A HREF=\"user.php?newuser=true\">".get_string("addnewuser")."</A>");
} else {
error("No users found!");
$primaryadmin = get_admin();
if ($user->id == $primaryadmin->id) {
error("You are not allowed to delete the primary admin user!");
}
if ($confirm != md5($delete)) {
notice_yesno(get_string("deletecheckfull", "", "'$user->firstname $user->lastname'"),
"user.php?delete=$delete&confirm=".md5($delete), "user.php");
exit;
} else if (!$user->deleted) {
unset($updateuser);
$updateuser->id = $user->id;
$updateuser->deleted = "1";
$updateuser->username = "$user->email.".time(); // Remember it just in case
$updateuser->email = ""; // Clear this field to free it up
$updateuser->timemodified = time();
if (update_record("user", $updateuser)) {
unenrol_student($user->id); // From all courses
remove_teacher($user->id); // From all courses
remove_admin($user->id);
notify(get_string("deletedactivity", "", "$user->firstname $user->lastname"));
} else {
notify(get_string("deletednot", "", "$user->firstname $user->lastname"));
}
}
}
// Carry on with the user listing
$columns = array("name", "email", "city", "country", "lastaccess");
foreach ($columns as $column) {
$string[$column] = get_string("$column");
$columnsort = "$column";
if ($column == "lastaccess") {
$columndir = "DESC";
} else {
$columndir = "ASC";
}
if ($columnsort == $sort) {
$$column = $string[$column];
} else {
$$column = "<A HREF=\"user.php?sort=$columnsort&dir=$columndir&search=$search\">".$string[$column]."</A>";
}
}
if ($sort == "name") {
$sort = "firstname";
}
if (!$users = get_users_listing($sort, $dir, $page, $recordsperpage, $search)) {
if (!$users = get_users_listing($sort, $dir, 0, $recordsperpage)) {
error("No users found!");
} else {
notify(get_string("nousersmatching", "", $search));
$search = "";
}
}
$usercount = get_users(false);
if ($search) {
$usersearchcount = get_users(false, $search);
print_heading("$usersearchcount / $usercount ".get_string("users"));
$usercount = $usersearchcount;
} else {
print_heading("$usercount ".get_string("users"));
}
$a->start = $page;
$a->end = $page + $recordsperpage;
if ($a->end > $usercount) {
$a->end = $usercount;
}
echo "<TABLE align=center cellpadding=10><TR>";
echo "<TD>";
if ($page) {
$prevpage = $page - $recordsperpage;
if ($prevpage < 0) {
$prevpage = 0;
}
$options["dir"] = $dir;
$options["page"] = 0;
$options["sort"] = $sort;
$options["search"] = $search;
print_single_button("user.php", $options, " << ");
echo "</TD><TD>";
$options["page"] = $prevpage;
print_single_button("user.php", $options, " < ");
}
echo "</TD><TD>";
print_heading(get_string("displayingusers", "", $a));
echo "</TD><TD>";
$nextpage = $page + $recordsperpage;
if ($nextpage < $usercount) {
$options["dir"] = $dir;
$options["page"] = $nextpage;
$options["sort"] = $sort;
$options["search"] = $search;
print_single_button("user.php", $options, " > ");
echo "</TD><TD>";
$options["page"] = $usercount-$recordsperpage;
print_single_button("user.php", $options, " >> ");
}
echo "</TD></TR></TABLE>";
flush();
foreach ($users as $key => $user) {
if (!empty($user->country)) {
$users[$key]->country = $COUNTRIES[$user->country];
}
}
if ($sort == "country") { // Need to resort by full country name, not code
foreach ($users as $user) {
$susers[$user->id] = $user->country;
}
asort($susers);
foreach ($susers as $key => $value) {
$nusers[] = $users[$key];
}
$users = $nusers;
}
$table->head = array ($name, $email, $city, $country, $lastaccess, "", "");
$table->align = array ("LEFT", "LEFT", "LEFT", "LEFT", "LEFT", "CENTER", "CENTER");
$table->width = "95%";
foreach ($users as $user) {
if ($user->id == $USER->id or $user->username == "changeme") {
$deletebutton = "";
} else {
$deletebutton = "<A HREF=\"user.php?delete=$user->id\" TARGET=\"$strdeletecheck\">$strdelete</A>";
}
if ($user->lastaccess) {
$strlastaccess = format_time(time() - $user->lastaccess);
} else {
$strlastaccess = get_string("never");
}
$table->data[] = array ("<A HREF=\"../user/view.php?id=$user->id&course=$site->id\">$user->firstname $user->lastname</A>",
"$user->email",
"$user->city",
"$user->country",
$strlastaccess,
"<A HREF=\"../user/edit.php?id=$user->id&course=$site->id\">$stredit</A>",
$deletebutton);
}
echo "<TABLE align=center cellpadding=10><TR><TD>";
echo "<FORM ACTION=user.php METHOD=POST>";
echo "<INPUT TYPE=text NAME=search VALUE=\"$search\" SIZE=20>";
echo "<INPUT TYPE=submit VALUE=\"$strsearch\">";
if ($search) {
echo "<INPUT type=\"button\" onClick=\"document.location='user.php';\" value=\"$strshowallusers\">";
}
echo "</FORM>";
echo "</TD></TR></TABLE>";
print_table($table);
if ($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
print_heading("<A HREF=\"user.php?newuser=true\">".get_string("addnewuser")."</A>");
}
print_footer();
}
+49
View File
@@ -0,0 +1,49 @@
<?PHP // $Id$
require_once("../config.php");
require_login();
if (!isadmin) {
error("Only admins can access this page");
}
if (!$site = get_site()) {
redirect("index.php");
}
$stradministration = get_string("administration");
$strusers = get_string("users");
print_header("$site->shortname: $stradministration: $strusers", "$site->fullname",
"<a href=\"index.php\">$stradministration</a> -> $strusers");
print_heading($strusers);
$table->align = array ("right", "left");
$table->data[] = array("<b><a href=\"auth.php\">".get_string("authentication")."</a></b>",
get_string("adminhelpauthentication"));
if ($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
$table->data[] = array("<b><a href=\"$CFG->wwwroot/$CFG->admin/user.php?newuser=true\">".get_string("addnewuser")."</a></b>",
get_string("adminhelpaddnewuser"));
}
$table->data[] = array("<b><a href=\"user.php\">".get_string("edituser")."</a></b>",
get_string("adminhelpedituser"));
$table->data[] = array("<b><a href=\"admin.php\">".get_string("assignadmins")."</a></b>",
get_string("adminhelpassignadmins"));
$table->data[] = array("<b><a href=\"creators.php\">".get_string("assigncreators")."</a></b>",
get_string("adminhelpassigncreators"));
$table->data[] = array("<b><a href=\"../course/index.php?edit=on\">".get_string("assignteachers")."</a></b>",
get_string("adminhelpassignteachers")." <img src=\"../pix/t/user.gif\" height=11 width=11>");
$table->data[] = array("<b><a href=\"../course/index.php?edit=off\">".get_string("assignstudents")."</a></b>",
get_string("adminhelpassignstudents"));
print_table($table);
print_footer($site);
?>
+84
View File
@@ -0,0 +1,84 @@
This directory contains authentication modules.
Each of these modules describes a different way to
check that a user has provided a correct
- username, and
- password.
Even when external forms of authentication are being
used, Moodle still maintains the internal "user" table
with all the associated information about that user such
as name, email address and so on.
The active method is set by the admin on the Configuration page.
email - authentication by email (DEFAULT METHOD)
- user fills out form with email address
- email sent to user with link
- user clicks on link in email to confirm
- user account is created
- user can log in
none - no authentication at all .. very insecure!!
- user logs in using ANY username and password
- if the username doesn't already exist then
a new account is created
- when user tries to access a course they
are forced to set up their account details
manual - internal authentication only
- user logs in using username and password
- no way for user to make their own account
ldap - Uses an external LDAP server
- user logs in using username and password
- these are checked against an LDAP server
- if correct, user is logged in
- optionally, info is copied from the LDAP
database to the Moodle user database
(see the ldap/README for more details on config etc...)
imap - Uses an external IMAP server
- user logs in using username and password
- these are checked against an IMAP server
- if correct, user is logged in
- if the username doesn't already exist then
a new account is created
pop3 - Uses an external POP3 server
- user logs in using username and password
- these are checked against a POP3 server
- if correct, user is logged in
- if the username doesn't already exist then
a new account is created
nntp - Uses an external NNTP server
- user logs in using username and password
- these are checked against an NNTP server
- if correct, user is logged in
- if the username doesn't already exist then
a new account is created
db - Uses an external database to check username/password
- user logs in using username and password
- these are checked against an external database
- if correct, user is logged in
- if the username doesn't already exist then
a new Moodle account is created
+235
View File
@@ -0,0 +1,235 @@
<?PHP
if (!isset($config->auth_dbhost)) {
$config->auth_dbhost = "localhost";
}
if (!isset($config->auth_dbtype)) {
$config->auth_dbtype = "mysql";
}
if (!isset($config->auth_dbname)) {
$config->auth_dbname = "";
}
if (!isset($config->auth_dbuser)) {
$config->auth_dbuser = "";
}
if (!isset($config->auth_dbpass)) {
$config->auth_dbpass = "";
}
if (!isset($config->auth_dbtable)) {
$config->auth_dbtable = "";
}
if (!isset($config->auth_dbfielduser)) {
$config->auth_dbfielduser = "";
}
if (!isset($config->auth_dbfieldpass)) {
$config->auth_dbfieldpass = "";
}
if (!isset($config->auth_dbpasstype)) {
$config->auth_dbpasstype = "plaintext";
}
?>
<tr valign="top" BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbhost:</TD>
<TD>
<INPUT name=auth_dbhost TYPE=text SIZE=30 VALUE="<?=$config->auth_dbhost?>">
<? if (isset($err["auth_dbhost"])) formerr($err["auth_dbhost"]); ?>
</TD>
<TD>
<? print_string("auth_dbhost","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbtype:</TD>
<TD>
<? $dbtypes = array("access","ado_access", "ado", "ado_mssql", "borland_ibase", "csv", "db2", "fbsql", "firebird", "ibase", "informix72", "informix", "mssql", "mysql", "mysqlt", "oci805", "oci8", "oci8po", "odbc", "odbc_mssql", "odbc_oracle", "oracle", "postgres64", "postgres7", "postgres", "proxy", "sqlanywhere", "sybase", "vfp");
foreach ($dbtypes as $dbtype) {
$dboptions[$dbtype] = $dbtype;
}
choose_from_menu($dboptions, "auth_dbtype", $config->auth_dbtype, "");
?>
</TD>
<TD>
<? print_string("auth_dbtype","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbname:</TD>
<TD>
<INPUT name=auth_dbname TYPE=text SIZE=30 VALUE="<?=$config->auth_dbname?>">
<? if (isset($err["auth_dbname"]))formerr($err["auth_dbname"]); ?>
</TD>
<TD>
<? print_string("auth_dbname","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbuser:</TD>
<TD>
<INPUT name=auth_dbuser TYPE=text SIZE=30 VALUE="<?=$config->auth_dbuser?>">
<? if (isset($err["auth_dbuser"])) formerr($err["auth_dbuser"]); ?>
</TD>
<TD>
<? print_string("auth_dbuser","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbpass:</TD>
<TD>
<INPUT name="auth_dbpass" TYPE="text" SIZE="30" VALUE="<?=$config->auth_dbpass?>">
<? if (isset($err["auth_dbpass"])) formerr($err["auth_dbpass"]); ?>
</TD>
<TD>
<? print_string("auth_dbpass","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbtable:</TD>
<TD>
<INPUT name="auth_dbtable" TYPE="text" SIZE="30" VALUE="<?=$config->auth_dbtable?>">
<? if (isset($err["auth_dbtable"])) formerr($err["auth_dbtable"]); ?>
</TD>
<TD>
<? print_string("auth_dbtable","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbfielduser:</TD>
<TD>
<INPUT name="auth_dbfielduser" TYPE="text" SIZE="30" VALUE="<?=$config->auth_dbfielduser?>">
<? if (isset($err["auth_dbfielduser"])) formerr($err["auth_dbfielduser"]); ?>
</TD>
<TD>
<? print_string("auth_dbfielduser","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbfieldpass:</TD>
<TD>
<INPUT name="auth_dbfieldpass" TYPE="text" SIZE="30" VALUE="<?=$config->auth_dbfieldpass?>">
<? if (isset($err["auth_dbfieldpass"])) formerr($err["auth_dbfieldpass"]); ?>
</TD>
<TD>
<? print_string("auth_dbfieldpass","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_dbpasstype:</TD>
<TD>
<? $passtype["plaintext"] = get_string("plaintext", "auth");
$passtype["md5"] = get_string("md5", "auth");
choose_from_menu($passtype, "auth_dbpasstype", $config->auth_dbpasstype, "");
?>
</TD>
<TD>
<? print_string("auth_dbpasstype","auth") ?>
</TD>
</TR>
<TR>
<TD ALIGN=RIGHT><P><? print_string("firstname") ?>:</TD>
<TD>
<INPUT name="auth_user_firstname" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_firstname?>">
</TD>
<TD rowspan=12 VALIGN=CENTER>
<? print_string("auth_dbextrafields","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("lastname") ?>:</TD>
<TD>
<INPUT name="auth_user_lastname" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_lastname?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("email") ?>:</TD>
<TD>
<INPUT name="auth_user_email" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_email?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("phone") ?> 1:</TD>
<TD>
<INPUT name="auth_user_phone1" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_phone1?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("phone") ?> 2:</TD>
<TD>
<INPUT name="auth_user_phone2" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_phone2?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("department") ?>:</TD>
<TD>
<INPUT name="auth_user_department" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_department?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("address") ?>:</TD>
<TD>
<INPUT name="auth_user_address" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_address?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("city") ?>:</TD>
<TD>
<INPUT name="auth_user_city" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_city?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("country") ?>:</TD>
<TD>
<INPUT name="auth_user_country" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_country?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("description") ?>:</TD>
<TD>
<INPUT name="auth_user_description" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_description?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("idnumber") ?>:</TD>
<TD>
<INPUT name="auth_user_idnumber" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_idnumber?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("language") ?>:</TD>
<TD>
<INPUT name="auth_user_lang" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_lang?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("instructions", "auth") ?>:</TD>
<TD>
<TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><? p($config->auth_instructions) ?></TEXTAREA>
</TD>
<TD>
<? print_string("authinstructions","auth") ?>
<? helpbutton("text", get_string("helptext")) ?>
</TD>
</TR>
+75
View File
@@ -0,0 +1,75 @@
<?PHP // $Id$
// Authentication by looking up an external database table
function auth_user_login ($username, $password) {
// Returns true if the username and password work
// and false if they are wrong or don't exist.
global $CFG;
// This is a hack to workaround what seems to be a bug in ADOdb with accessing
// two databases of the same kind ... it seems to get confused when trying to access
// the first database again, after having accessed the second.
// The following hack will make the database explicit which keeps it happy
$CFG->prefix = "$CFG->dbname.$CFG->prefix";
// Connect to the external database
$authdb = &ADONewConnection($CFG->auth_dbtype);
$authdb->PConnect($CFG->auth_dbhost,$CFG->auth_dbuser,$CFG->auth_dbpass,$CFG->auth_dbname);
switch ($CFG->auth_dbpasstype) { // Re-format password accordingly
case "md5":
$password = md5($password);
break;
}
$rs = $authdb->Execute("SELECT * FROM $CFG->auth_dbtable
WHERE $CFG->auth_dbfielduser = '$username'
AND $CFG->auth_dbfieldpass = '$password' ");
if (!$rs) {
notify("Could not connect to the specified authentication database...");
return false;
}
if ( $rs->RecordCount() ) {
return true;
} else {
return false;
}
}
function auth_get_userinfo($username){
// Reads any other information for a user from external database,
// then returns it in an array
global $CFG;
$config = (array) $CFG;
ADOLoadCode($CFG->auth_dbtype);
$authdb = &ADONewConnection();
$authdb->PConnect($CFG->auth_dbhost,$CFG->auth_dbuser,$CFG->auth_dbpass,$CFG->auth_dbname);
$fields = array("firstname", "lastname", "email", "phone1", "phone2",
"department", "address", "city", "country", "description",
"idnumber", "lang");
$result = array();
foreach ($fields as $field) {
if ($config["auth_user_$field"]) {
if ($rs = $authdb->Execute("SELECT ".$config["auth_user_$field"]." FROM $CFG->auth_dbtable
WHERE $CFG->auth_dbfielduser = '$username'")) {
if ( $rs->RecordCount() == 1 ) {
$result["$field"] = $rs->fields[$config["auth_user_$field"]];
}
}
}
}
return $result;
}
?>
+1
View File
@@ -0,0 +1 @@
<!-- No config needed -->
+19
View File
@@ -0,0 +1,19 @@
<?PHP // $Id$
// Standard authentication function
function auth_user_login ($username, $password) {
// Returns true if the username and password work
// and false if they don't
global $CFG;
if (! $user = get_user_info_from_db("username", $username)) {
return false;
}
return ($user->password == md5($password));
}
?>
+58
View File
@@ -0,0 +1,58 @@
<?PHP
if (!isset($config->auth_imaphost)) {
$config->auth_imaphost = "127.0.0.1";
}
if (!isset($config->auth_imaptype)) {
$config->auth_imaptype = "imap";
}
if (!isset($config->auth_imapport)) {
$config->auth_imapport = "143";
}
?>
<tr valign="top" BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_imaphost:</TD>
<TD>
<INPUT name=auth_imaphost TYPE=text SIZE=30 VALUE="<?=$config->auth_imaphost?>">
<? if (isset($err["auth_imaphost"])) formerr($err["auth_imaphost"]); ?>
</TD>
<TD>
<? print_string("auth_imaphost","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_imaptype:</TD>
<TD>
<? $imaptypes = array("imap","imapssl", "imapcert", "imaptls");
foreach($imaptypes as $imaptype) {
$imapoptions[$imaptype] = $imaptype;
}
choose_from_menu($imapoptions, "auth_imaptype", $config->auth_imaptype, "");
?>
</TD>
<TD>
<? print_string("auth_imaptype","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_imapport:</TD>
<TD>
<INPUT name=auth_imapport TYPE=text SIZE=6 VALUE="<?=$config->auth_imapport?>">
<? if (isset($err["auth_imapport"])) formerr($err["auth_imapport"]); ?>
</TD>
<TD>
<? print_string("auth_imapport","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("instructions", "auth") ?>:</TD>
<TD>
<TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><? p($config->auth_instructions) ?></TEXTAREA>
</TD>
<TD>
<? print_string("authinstructions","auth") ?>
<? helpbutton("text", get_string("helptext")) ?>
</TD>
</TR>
+41
View File
@@ -0,0 +1,41 @@
<?PHP // $Id$
// Authentication by looking up an IMAP server
function auth_user_login ($username, $password) {
// Returns true if the username and password work
// and false if they are wrong or don't exist.
global $CFG;
switch ($CFG->auth_imaptype) {
case "imapssl":
$host = "{".$CFG->auth_imaphost.":$CFG->auth_imapport/imap/ssl}";
break;
case "imapcert":
$host = "{".$CFG->auth_imaphost.":$CFG->auth_imapport/imap/ssl/novalidate-cert}";
break;
case "imaptls":
$host = "{".$CFG->auth_imaphost.":$CFG->auth_imapport/imap/notls}";
break;
default:
$host = "{".$CFG->auth_imaphost.":$CFG->auth_imapport}";
}
error_reporting(0);
$connection = imap_open($host, $username, $password, OP_HALFOPEN);
error_reporting($CFG->debug);
if ($connection) {
imap_close($connection);
return true;
} else {
return false;
}
}
?>
+3
View File
@@ -0,0 +1,3 @@
LDAP-module README
Please read comments from lib.php
+216
View File
@@ -0,0 +1,216 @@
<?PHP
if (!isset($config->ldap_host_url)) {
$config->ldap_host_url = "";
}
if (!isset($config->ldap_contexts)) {
$config->ldap_contexts = "";
}
if (!isset($config->ldap_user_attribute)) {
$config->ldap_user_attribute = "";
}
if (!isset($config->ldap_search_sub)) {
$config->ldap_search_sub = "";
}
if (!isset($config->ldap_bind_dn)) {
$config->ldap_bind_dn = "";
}
if (!isset($config->ldap_bind_pw)) {
$config->ldap_bind_pw = "";
}
?>
<tr valign="top" BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_host_url:</TD>
<TD>
<INPUT name=ldap_host_url TYPE=text SIZE=30 VALUE="<?=$config->ldap_host_url?>">
<? if (isset($err["ldap_host_url"])) formerr($err["ldap_host_url"]); ?>
</TD>
<TD>
<? print_string("auth_ldap_host_url","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_contexts:</TD>
<TD>
<INPUT name=ldap_contexts TYPE=text SIZE=30 VALUE="<?=$config->ldap_contexts?>">
<? if (isset($err["ldap_contexts"])) formerr($err["ldap_contexts"]); ?>
</TD>
<TD>
<? print_string("auth_ldap_contexts","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_user_attribute:</TD>
<TD>
<INPUT name=ldap_user_attribute TYPE=text SIZE=30 VALUE="<?=$config->ldap_user_attribute?>">
<? if (isset($err["ldap_user_attribute"])) formerr($err["ldap_user_attribute"]); ?>
</TD>
<TD>
<? print_string("auth_ldap_user_attribute","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_search_sub:</TD>
<TD>
<INPUT name=ldap_search_sub TYPE=text SIZE=1 VALUE="<?=$config->ldap_search_sub?>">
<? if (isset($err["ldap_search_sub"])) formerr($err["ldap_search_sub"]); ?>
</TD>
<TD>
<? print_string("auth_ldap_search_sub","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_bind_dn:</TD>
<TD>
<INPUT name=ldap_bind_dn TYPE=text SIZE=30 VALUE="<?=$config->ldap_bind_dn?>">
<? if (isset($err["ldap_bind_dn"])) formerr($err["ldap_bind_dn"]); ?>
</TD><TD>
<? print_string("auth_ldap_bind_dn","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_bind_pw:</TD>
<TD>
<INPUT name=ldap_bind_pw TYPE=text SIZE=30 VALUE="<?=$config->ldap_bind_pw?>">
<? if (isset($err["ldap_bind_pw"])) formerr($err["ldap_bind_pw"]); ?>
</TD><TD>
<? print_string("auth_ldap_bind_pw","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_memberattribute:</TD>
<TD>
<INPUT name=ldap_memberattribute TYPE=text SIZE=30 VALUE="<?=$config->ldap_memberattribute?>">
<? if (isset($err["ldap_memberattribute"])) formerr($err["ldap_memberattribute"]); ?>
</TD><TD>
<? print_string("auth_ldap_memberattribute","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_creators:</TD>
<TD>
<INPUT name=ldap_creators TYPE=text SIZE=30 VALUE="<?=$config->ldap_creators?>">
<? if (isset($err["ldap_creators"])) formerr($err["ldap_creators"]); ?>
</TD><TD>
<? print_string("auth_ldap_creators","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>ldap_create_context:</TD>
<TD>
<INPUT name=ldap_create_context TYPE=text SIZE=30 VALUE="<?=$config->ldap_create_context?>">
<? if (isset($err["ldap_create_context"])) formerr($err["ldap_create_context"]); ?>
</TD><TD>
<? print_string("auth_ldap_create_context","auth") ?>
</TD>
</TR>
<TR>
<TD ALIGN=RIGHT><P><? print_string("firstname") ?>:</TD>
<TD>
<INPUT name="auth_user_firstname" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_firstname?>">
</TD>
<TD rowspan=12 VALIGN=CENTER>
<? print_string("auth_ldapextrafields","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("lastname") ?>:</TD>
<TD>
<INPUT name="auth_user_lastname" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_lastname?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("email") ?>:</TD>
<TD>
<INPUT name="auth_user_email" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_email?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("phone") ?> 1:</TD>
<TD>
<INPUT name="auth_user_phone1" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_phone1?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("phone") ?> 2:</TD>
<TD>
<INPUT name="auth_user_phone2" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_phone2?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("department") ?>:</TD>
<TD>
<INPUT name="auth_user_department" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_department?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("address") ?>:</TD>
<TD>
<INPUT name="auth_user_address" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_address?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("city") ?>:</TD>
<TD>
<INPUT name="auth_user_city" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_city?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("country") ?>:</TD>
<TD>
<INPUT name="auth_user_country" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_country?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("description") ?>:</TD>
<TD>
<INPUT name="auth_user_description" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_description?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("idnumber") ?>:</TD>
<TD>
<INPUT name="auth_user_idnumber" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_idnumber?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("language") ?>:</TD>
<TD>
<INPUT name="auth_user_lang" TYPE="text" SIZE="30" VALUE="<?=$config->auth_user_lang?>">
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("instructions", "auth") ?>:</TD>
<TD>
<TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><? p($config->auth_instructions) ?></TEXTAREA>
</TD>
<TD>
<? print_string("authinstructions","auth") ?>
<? helpbutton("text", get_string("helptext")) ?>
</TD>
</TR>
+369
View File
@@ -0,0 +1,369 @@
<?PHP // $Id$
//CHANGELOG:
//24.02.2003 Added support for coursecreators
//20.02.2003 Added support for user creation
//12.10.2002 Reformatted source for consistency
//03.10.2002 First version to CVS
//29.09.2002 Clean up and splitted code to functions v. 0.02
//29.09.2002 LDAP authentication functions v. 0.01
//Distributed under GPL (c)Petri Asikainen 2002-2003
/* README!
Module is quite complete and most functinality can be configured from
configinterfave /admin/auth.php. Some of latest additions/features need to
be configured by modifying source code.
If you plan to use user creation feature, look function auth_user_create
and modify it for your needs.
You have to change all hardcoded attribute values to fit your LDAP-server.
User-creation makes posible that your current
users can authenticate with existings usernames/password and new users can
create own accounts to LDAP-directory. I'm using this feature and new users
are created to LDAP different context, without rights to other system. When
user-creation feature is set like that, there's no known security issues.
I write ldap-module on Novell E-directory / Linux & Solaris ,
so all default values are for it.
Any feedback is wellcome,
Petri Asikainen paca@sci.fi
*/
function auth_user_login ($username, $password) {
/// Returns true if the username and password work
/// and false if they don't
global $CFG;
if (!$username or !$password) { // Don't allow blank usernames or passwords
return false;
}
$ldap_connection = auth_ldap_connect();
if ($ldap_connection) {
$ldap_user_dn = auth_ldap_find_userdn($ldap_connection, $username);
//if ldap_user_dn is empty, user does not exist
if(!$ldap_user_dn){
ldap_close($ldap_connection);
return false;
}
// Try to bind with current username and password
$ldap_login = @ldap_bind($ldap_connection, $ldap_user_dn, $password);
ldap_close($ldap_connection);
if ($ldap_login) {
return true;
}
} else {
@ldap_close($ldap_connection);
error("LDAP-module cannot connect to server: $CFG->ldap_host_url");
}
return false;
}
function auth_get_userinfo($username){
/// reads userinformation from ldap and return it in array()
global $CFG;
$config = (array)$CFG;
$attrmap = auth_ldap_attributes();
$ldap_connection=auth_ldap_connect();
$result = array();
$search_attribs = array();
foreach ($attrmap as $key=>$value) {
if (!in_array($value, $search_attribs)) {
array_push($search_attribs, $value);
}
}
$user_dn = auth_ldap_find_userdn($ldap_connection, $username);
if (! isset($CFG->ldap_objectclass)) {
$CFG->ldap_objectclass="objectClass=*";
}
$user_info_result = ldap_read($ldap_connection,$user_dn,$CFG->ldap_objectclass, $search_attribs);
if ($user_info_result) {
$user_entry = ldap_get_entries($ldap_connection, $user_info_result);
foreach ($attrmap as $key=>$value){
if(isset($user_entry[0][strtolower($value)][0])){
$result[$key]=$user_entry[0][strtolower($value)][0];
}
}
}
@ldap_close($ldap_connection);
return $result;
}
function auth_get_userlist () {
global $CFG;
return auth_ldap_get_userlist("($CFG->ldap_user_attribute=*)");
}
function auth_user_exists ($username) {
global $CFG;
//returns true if given usernname exist on ldap
$users = auth_ldap_get_userlist("($CFG->ldap_user_attribute=$username)");
return count($users);
}
function auth_user_create ($userobject,$plainpass) {
//create new user to ldap
//use auth_user_exists to prevent dublicate usernames
//return true if user is created, false on error
global $CFG;
$attrmap = auth_ldap_attributes();
$ldapconnect = auth_ldap_connect();
$ldapbind = auth_ldap_bind($ldapconnect);
$newuser = array();
foreach ($attrmap as $key=>$value){
if(isset($userobject->$key) ){
$newuser[$value]=utf8_encode($userobject->$key);
}
}
//Following sets all mandatory and other forced attribute values
//this should be moved to config inteface ASAP
$newuser['objectClass']= array("inetOrgPerson","organizationalPerson","person","top");
$newuser['uniqueId']= $userobject->username;
$newuser['logindisabled']="TRUE";
$newuser['userpassword']=$plainpass;
unset($newuser[country]);
$uadd = ldap_add($ldapconnect, $CFG->ldap_user_attribute."=$userobject->username,".$CFG->ldap_create_context, $newuser);
ldap_close($ldapconnect);
return $uadd;
}
function auth_user_activate ($username) {
//activate new ldap-user after email-address is confirmed
global $CFG;
$ldapconnect = auth_ldap_connect();
$ldapbind = auth_ldap_bind($ldapconnect);
$userdn = auth_ldap_find_userdn($ldapconnect, $username);
$newinfo['loginDisabled']="FALSE";
$result = ldap_modify($ldapconnect, $userdn, $newinfo);
ldap_close($ldapconnect);
return $result;
}
function auth_user_disable ($username) {
//activate new ldap-user after email-address is confirmed
global $CFG;
$ldapconnect = auth_ldap_connect();
$ldapbind = auth_ldap_bind($ldapconnect);
$userdn = auth_ldap_find_userdn($ldapconnect, $username);
$newinfo['loginDisabled']="TRUE";
$result = ldap_modify($ldapconnect, $userdn, $newinfo);
ldap_close($ldapconnect);
return $result;
}
function auth_iscreator($username=0) {
///if user is member of creator group return true
global $CFG, $USER;
$ldapconnect = auth_ldap_connect();
$ldapbind = auth_ldap_bind($ldapconnect);
if (! $username) {
$username=$USER->username;
}
if ((! $CFG->ldap_creators) OR (! $CFG->ldap_memberattribute)) {
return false;
} else {
$groups = explode(";",$CFG->ldap_creators);
}
//build filter
$filter = "(& ($CFG->ldap_user_attribute=$username)(|";
foreach ($groups as $group){
$filter .= "($CFG->ldap_memberattribute=$group)";
}
$filter .= "))";
//search
$result = auth_ldap_get_userlist($filter);
return count($result);
}
//PRIVATE FUNCTIONS starts
//private functions are named as auth_ldap*
function auth_ldap_connect(){
/// connects to ldap-server
global $CFG;
$result = ldap_connect($CFG->ldap_host_url);
if ($result) {
return $result;
} else {
error("LDAP-module cannot connect to server: $CFG->ldap_host_url");
return false;
}
}
function auth_ldap_bind($ldap_connection){
/// makes bind to ldap for searching users
/// uses ldap_bind_dn or anonymous bind
global $CFG;
if ($CFG->ldap_bind_dn){
//bind with search-user
if (!ldap_bind($ldap_connection, $CFG->ldap_bind_dn,$CFG->ldap_bind_pw)){
error("Error: could not bind ldap with ldap_bind_dn/pw");
return false;
}
} else {
//bind anonymously
if ( !ldap_bind($ldap_connection)){
error("Error: could not bind ldap anonymously");
return false;
}
}
return true;
}
function auth_ldap_find_userdn ($ldap_connection, $username){
/// return dn of username
/// like: cn=username,ou=suborg,o=org
/// or false if username not found
global $CFG;
//default return value
$ldap_user_dn = FALSE;
auth_ldap_bind($ldap_connection);
//get all contexts and look for first matching user
$ldap_contexts = explode(";",$CFG->ldap_contexts);
if (!empty($CFG->ldap_create_context)){
array_push($ldap_contexts, $CFG->ldap_create_context);
}
foreach ($ldap_contexts as $context) {
$context == trim($context);
if ($CFG->ldap_search_sub){
//use ldap_search to find first user from subtree
$ldap_result = ldap_search($ldap_connection, $context, "(".$CFG->ldap_user_attribute."=".$username.")",array($CFG->ldap_user_attribute));
} else {
//search only in this context
$ldap_result = ldap_list($ldap_connection, $context, "(".$CFG->ldap_user_attribute."=".$username.")",array($CFG->ldap_user_attribute));
}
$entry = ldap_first_entry($ldap_connection,$ldap_result);
if ($entry){
$ldap_user_dn = ldap_get_dn($ldap_connection, $entry);
break ;
}
}
return $ldap_user_dn;
}
function auth_ldap_attributes (){
//returns array containg attribute mappings between Moodle and ldap
global $CFG;
$config = (array)$CFG;
$fields = array("firstname", "lastname", "email", "phone1", "phone2",
"department", "address", "city", "country", "description",
"idnumber", "lang");
$moodleattributes = array();
foreach ($fields as $field) {
if ($config["auth_user_$field"]) {
$moodleattributes[$field] = $config["auth_user_$field"];
}
}
return $moodleattributes;
}
function auth_ldap_get_userlist($filter="*") {
/// returns all users from ldap servers
global $CFG;
$fresult = array();
$ldap_connection = auth_ldap_connect();
auth_ldap_bind($ldap_connection);
if (! isset($CFG->ldap_objectclass)) {
$CFG->ldap_objectclass="objectClass=*";
}
if ($filter=="*") {
$filter = "(&(".$CFG->ldap_user_attribute."=*)(".$CFG->ldap_objectclass."))";
}
$contexts = explode(";",$CFG->ldap_contexts);
if (!empty($CFG->ldap_create_context)){
array_push($contexts, $CFG->ldap_create_context);
}
foreach ($contexts as $context) {
if ($CFG->ldap_search_sub) {
//use ldap_search to find first user from subtree
$ldap_result = ldap_search($ldap_connection, $context,
$filter,
array($CFG->ldap_user_attribute));
} else {
//search only in this context
$ldap_result = ldap_list($ldap_connection, $context,
$filter,
array($CFG->ldap_user_attribute));
}
$users = ldap_get_entries($ldap_connection, $ldap_result);
//add found users to list
for ($i=0;$i<$users['count'];$i++) {
array_push($fresult, ($users[$i][$CFG->ldap_user_attribute][0]) );
}
}
return $fresult;
}
?>
+11
View File
@@ -0,0 +1,11 @@
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("instructions", "auth") ?>:</TD>
<TD>
<TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><? p($config->auth_instructions) ?></TEXTAREA>
</TD>
<TD>
<? print_string("authinstructions","auth") ?>
<? helpbutton("text", get_string("helptext")) ?>
</TD>
</TR>
+16
View File
@@ -0,0 +1,16 @@
<?PHP // $Id$
// manual method - Just does a simple check against the database
function auth_user_login ($username, $password) {
// Returns false if the username doesn't exist yet
// Returns true if the username and password work
if ($user = get_user_info_from_db("username", $username)) {
return ($user->password == md5($password));
}
return false;
}
?>
+41
View File
@@ -0,0 +1,41 @@
<?PHP
if (!isset($config->auth_nntphost)) {
$config->auth_nntphost = "127.0.0.1";
}
if (!isset($config->auth_nntpport)) {
$config->auth_nntpport = "119";
}
?>
<tr valign="top" BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_nntphost:</TD>
<TD>
<INPUT name="auth_nntphost" TYPE="text" SIZE=30 VALUE="<?=$config->auth_nntphost?>">
<? if (isset($err["auth_nntphost"])) formerr($err["auth_nntphost"]); ?>
</TD>
<TD>
<? print_string("auth_nntphost","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_nntpport:</TD>
<TD>
<INPUT name=auth_nntpport TYPE=text SIZE=6 VALUE="<?=$config->auth_nntpport?>">
<? if (isset($err["auth_nntpport"])) formerr($err["auth_nntpport"]); ?>
</TD>
<TD>
<? print_string("auth_nntpport","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("instructions", "auth") ?>:</TD>
<TD>
<TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><? p($config->auth_instructions) ?></TEXTAREA>
</TD>
<TD>
<? print_string("authinstructions","auth") ?>
<? helpbutton("text", get_string("helptext")) ?>
</TD>
</TR>
+27
View File
@@ -0,0 +1,27 @@
<?PHP // $Id$
// Authentication by looking up an NNTP server
function auth_user_login ($username, $password) {
// Returns true if the username and password work
// and false if they are wrong or don't exist.
global $CFG;
$host = "{".$CFG->auth_nntphost.":$CFG->auth_nntpport/nntp}";
error_reporting(0);
$connection = imap_open($host, $username, $password, OP_HALFOPEN);
error_reporting($CFG->debug);
if ($connection) {
imap_close($connection);
return true;
} else {
return false;
}
}
?>
+1
View File
@@ -0,0 +1 @@
<!-- No config needed -->
+17
View File
@@ -0,0 +1,17 @@
<?PHP // $Id$
// No authentication at all. This method approves everything!
function auth_user_login ($username, $password) {
// Returns true if the username doesn't exist yet
// Returns true if the username and password work
if (! $user = get_user_info_from_db("username", $username)) {
return true;
}
return ($user->password == md5($password));
}
?>
+58
View File
@@ -0,0 +1,58 @@
<?PHP
if (!isset($config->auth_pop3host)) {
$config->auth_pop3host = "127.0.0.1";
}
if (!isset($config->auth_pop3type)) {
$config->auth_pop3type = "pop3";
}
if (!isset($config->auth_pop3port)) {
$config->auth_pop3port = "110";
}
?>
<tr valign="top" BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_pop3host:</TD>
<TD>
<INPUT name=auth_pop3host TYPE=text SIZE=30 VALUE="<?=$config->auth_pop3host?>">
<? if (isset($err["auth_pop3host"])) formerr($err["auth_pop3host"]); ?>
</TD>
<TD>
<? print_string("auth_pop3host","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_pop3type:</TD>
<TD>
<? $pop3types = array("pop3","pop3cert");
foreach($pop3types as $pop3type) {
$pop3options[$pop3type] = $pop3type;
}
choose_from_menu($pop3options, "auth_pop3type", $config->auth_pop3type, "");
?>
</TD>
<TD>
<? print_string("auth_pop3type","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
<TD ALIGN=RIGHT><P>auth_pop3port:</TD>
<TD>
<INPUT name=auth_pop3port TYPE=text SIZE=6 VALUE="<?=$config->auth_pop3port?>">
<? if (isset($err["auth_pop3port"])) formerr($err["auth_pop3port"]); ?>
</TD>
<TD>
<? print_string("auth_pop3port","auth") ?>
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P><? print_string("instructions", "auth") ?>:</TD>
<TD>
<TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><? p($config->auth_instructions) ?></TEXTAREA>
</TD>
<TD>
<? print_string("authinstructions","auth") ?>
<? helpbutton("text", get_string("helptext")) ?>
</TD>
</TR>
+33
View File
@@ -0,0 +1,33 @@
<?PHP // $Id$
// Authentication by looking up a POP3 server
function auth_user_login ($username, $password) {
// Returns true if the username and password work
// and false if they are wrong or don't exist.
global $CFG;
switch ($CFG->auth_pop3type) {
case "pop3":
$host = "{".$CFG->auth_pop3host.":$CFG->auth_pop3port/pop3/notls}INBOX";
break;
case "pop3cert":
$host = "{".$CFG->auth_pop3host.":$CFG->auth_pop3port/pop3/ssl/novalidate-cert}INBOX";
break;
}
error_reporting(0);
$connection = imap_open($host, $username, $password, OP_HALFOPEN);
error_reporting($CFG->debug);
if ($connection) {
imap_close($connection);
return true;
} else {
return false;
}
}
?>
+33
View File
@@ -0,0 +1,33 @@
README $Id$
----------
This directory contains my try to create a backup/recover
admin option to moodle. I don't know when and how it'll be
finished, but I'going to try it, sure.
Some day, if this is fully functional, it could be integrated
into the main Moodle distribution (ask uncle Martin). :-)
Code here may not be tested - so there are no guarantees as
to the quality of the code in here, even if part of a stable
Moodle release.
Please, for any comment about this option, do it in Moodle
Developer Forum at:
http://moodle.org/mod/forum/view.php?id=55
(searching an "backup" topic)
or you can put tour comments in Moodel Bugs at:
http://moodle.org/bugs/bug.php?op=show&bugid=84.
All comments will be welcome. TIA.
To see the general status of the utility, take a look to
"STATUS.txt" in this directory.
And this is all, I start with it NOW.
Eloy (stronk7)
29-04-2003
+216
View File
@@ -0,0 +1,216 @@
STATUS $Id$
----------
This documment shows the current status of the backup/restore option.
Backup: WORKING. COMPLETED !!
Restore: WORKING. COMPLETED except logs.
========== ========== ========== ========== ========== ==========
Now I show the specific detailed status of every item in the process:
Backup Details:
===============
- Backup FrontEnd............................................DONE
- Check Security........................................DONE
- Select Info to Backup.(from mods).....................DONE
- Check (summary info)..................................DONE
- Check mods.......................................DONE
- Check logs.......................................DONE
- Check users......................................DONE
- Check User Files.................................DONE
- Check Course Files...............................DONE
- Launch Backup.........................................DONE
- Show progress.........................................DONE
- Determine Backup location.............................DONE
- Delete old entries at backup startup..................DONE
- From database....................................DONE
- From filesystem..................................DONE
- Backup Items:..............................................DONE
- Backup Info data......................................DONE
- Course................................................DONE
- Course Summary Data................................DONE
x course info.....................................DONE
x sections info...................................DONE
x mods info.......................................DONE
- User Accounts Info.................................DONE
x admins..........................................DONE
- All..........................................DONE
x course creators.................................DONE
- All..........................................DONE
x teachers........................................DONE
- Course.......................................DONE
- All..........................................DONE
x students........................................DONE
- Course.......................................DONE
- All..........................................DONE
- Logs...............................................DONE
- Scales.............................................DONE
- Categories and Questions.(STEP 1)..................DONE
+ categories......................................DONE
+ questions structure.............................DONE
- Mods Info..........................................DONE
x assignments.....................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files........................................DONE
x chats...........................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files.....(NOT EXISTS).......................DONE
x choices.........................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files.....(NOT EXISTS).......................DONE
x forums..........................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files........................................DONE
x journals........................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files.(NOT EXISTS)...........................DONE
x quizzes.(STEP 2)................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files.(ARE COURSE FILES !!!).................DONE
x resources.......................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files..(ARE COURSE FILES !!!)................DONE
x surveys.........................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files.....(NOT EXISTS).......................DONE
x workshops.......................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files........................................DONE
x user files to temp..............................DONE
x course files to temp............................DONE
- Compress the backup (zip)..................................DONE.
- XML File................................................DONE.
- moddata files...........................................DONE.
- Course Files............................................DONE.
- User Files..............................................DONE.
- Copy finished file to browseable dir.......................DONE
- Delete old entries at backup end...........................DONE
- From database...........................................DONE
- From filesystem.........................................DONE
- Browse backup files........................................DONE
- Download backup files......................................DONE
- Delete backup files........................................DONE
- Program automatic backups..................................NO EXISTS
Restore Details:
===============
- Delete old entries at restore start........................DONE
- From database...........................................DONE
- From filesystem.........................................DONE
- Restore FrontEnd...........................................DONE
- Check Security........................................DONE
- Select File to Restore................................DONE
- Uncompress the backup (unzip).........................DONE
- XML File..........................................DONE
- Course Files......................................DONE
- User Files........................................DONE
- Check file is a valid one.............................DONE
- Load info from file...................................DONE
- Load Backup Info......................................DONE
- Load Course Header....................................DONE
- Restore into feature..................................DONE
- New course (restore)...............................DONE
- Existing course (import)...........................DONE
- Select Info to Restore (depending from backup)........DONE
- Make decisions........................................DONE
- About existing users...............................DONE
- Launch Restore........................................DONE
- Show progress.........................................DONE
- Restore Items:.............................................DONE
- Course................................................DONE
- Course Summary Data................................DONE
- Course Table....................................DONE
- Sections Table..................................DONE
- Modules Table...................................DONE
- User Accounts Info.................................DONE
x teacheras. .....................................DONE
- None .......................................DONE
- Course.......................................DONE
- All..........................................DONE
x students........................................DONE
- None.........................................DONE
- Course.......................................DONE
- All..........................................DONE
x creators........................................DONE
- None.........................................DONE
- Course.......................................DONE
- All..........................................DONE
x admins..........................................DONE
- None.........................................DONE
- Course.......................................DONE
- All..........................................DONE
- Categories and Questions.(STEP 1)..................DONE
+ categories......................................DONE
+ questions structure.............................DONE
- Scales.............................................DONE
- Mods Info Prepare..................................DONE
x read modules zone...............................DONE
x separate every mod..............................DONE
x xmlize (to array) and serialize it..............DONE
x save to db (backup_ids).........................DONE
- Mods Info..........................................DONE
x assignments.....................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files........................................DONE
x chats...........................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files.(NOT EXISTS)...........................DONE
x choices.........................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files.(NOT EXISTS)...........................DONE
x forums..........................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files........................................DONE
x journals........................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files.(NOT EXISTS)...........................DONE
x quizzes.(STEP 2)................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files.(ARE COURSE FILES !!!).................DONE
x resources.......................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files.(ARE COURSE FILES !!!).................DONE
x surveys.........................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files.(NOT EXISTS)...........................DONE
x workshops.......................................DONE
+ course data..................................DONE
+ user data....................................DONE
+ files........................................DONE
- User files from temp.......................................DONE
- Course files from temp.....................................DONE
- Log entries................................................NO EXISTS
- Readjust instance in course_modules........................DONE
- Readjust modinfo in course (serialize).....................DONE
- Delete old entries at restore end. .......................DONE
- From database...........................................DONE
- From filesystem.........................................DONE
- Upload backup files........................................DONE
========== ========== ========== =========== =========== =========== ===
This is all. It's no a little thing !!! :-)
Eloy (stronk7)
29-04-2003
+103
View File
@@ -0,0 +1,103 @@
<?PHP //$Id$
//This script is used to configure and execute the backup proccess.
//Define some globals for all the script
require_once ("../config.php");
require_once ("lib.php");
require_once ("backuplib.php");
optional_variable($id); // course id
optional_variable($cancel);
optional_variable($launch);
require_login();
if (!empty($id)) {
if (!isteacheredit($id)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
} else {
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
//Check site
if (!$site = get_site()) {
error("Site not found!");
}
//Check necessary functions exists. Thanks to gregb@crowncollege.edu
backup_required_functions();
//Check backup_version
if ($id) {
$linkto = "backup.php?id=".$id;
} else {
$linkto = "backup.php";
}
upgrade_backup_db($linkto);
//Get strings
$strcoursebackup = get_string("coursebackup");
$stradministration = get_string("administration");
//If no course has been selected or cancel button pressed
if (!$id or $cancel) {
print_header("$site->shortname: $strcoursebackup", $site->fullname,
"<A HREF=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</A> -> $strcoursebackup");
if ($courses = get_courses()) {
print_heading(get_string("choosecourse"));
print_simple_box_start("CENTER");
foreach ($courses as $course) {
echo "<A HREF=\"backup.php?id=$course->id\">$course->fullname ($course->shortname)</A><BR>";
}
print_simple_box_end();
} else {
print_heading(get_string("nocoursesyet"));
print_continue("$CFG->wwwroot/$CFG->admin/index.php");
}
print_footer();
exit;
}
//Get and check course
if (! $course = get_record("course", "id", $id)) {
error("Course ID was incorrect (can't find it)");
}
//Print header
if (isadmin()) {
print_header("$site->shortname: $strcoursebackup", $site->fullname,
"<a href=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</a> ->
<a href=\"backup.php\">$strcoursebackup</a> -> $course->fullname ($course->shortname)");
} else {
print_header("$course->shortname: $strcoursebackup", $course->fullname,
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
$strcoursebackup");
}
//Print form
print_heading("$strcoursebackup: $course->fullname ($course->shortname)");
print_simple_box_start("center", "", "$THEME->cellheading");
//Adjust some php variables to the execution of this script
ini_set("max_execution_time","3000");
ini_set("memory_limit","56M");
//Call the form, depending the step we are
if (!$launch) {
include_once("backup_form.html");
} else if ($launch == "check") {
include_once("backup_check.html");
} else if ($launch == "execute") {
include_once("backup_execute.html");
}
print_simple_box_end();
//Print footer
print_footer();
?>
+221
View File
@@ -0,0 +1,221 @@
<?PHP //$Id$
//This page prints the backup todo list to see everything
//Check login
require_login();
if (!empty($course->id)) {
if (!isteacheredit($course->id)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
} else {
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
//Check site
if (!$site = get_site()) {
error("Site not found!");
}
//Checks for the required files/functions to backup every mod
//And check if there is data about it
$count = 0;
if ($allmods = get_records("modules") ) {
foreach ($allmods as $mod) {
$modname = $mod->name;
$modfile = "$CFG->dirroot/mod/$modname/backuplib.php";
$modbackup = $modname."_backup_mods";
$modcheckbackup = $modname."_check_backup_mods";
if (file_exists($modfile)) {
include_once($modfile);
if (function_exists($modbackup) and function_exists($modcheckbackup)) {
$var = "exists_".$modname;
$$var = true;
$count++;
}
}
//Check data
//Check module info
$var = "backup_".$modname;
if (!isset($$var)) {
$$var = 1;
}
//Check include user info
$var = "backup_user_info_".$modname;
if (!isset($$var)) {
$$var = 1;
}
}
}
//Check other parameters
if (!isset($backup_users)) {
$backup_users = 1;
}
if (!isset($backup_logs)) {
$backup_logs = 0;
}
if (!isset($backup_user_files)) {
$backup_user_files = 1;
}
if (!isset($backup_course_files)) {
$backup_course_files = 2;
}
if ($count == 0) {
notice("No backupable modules are installed!");
}
?>
<form name="form" method="post" <?=$onsubmit ?> action="<?=$ME ?>">
<table cellpadding=5>
<?
//Now print the Backup Name tr
echo "<tr>";
echo "<td align=\"right\"><P><B>";
echo get_string("name").":";
echo "</B></td><td>";
//Calculate the backup string
//Take off spaces in the filename !!
$backup_name = str_replace(" ","_",strtolower(get_string("backupfilename")));
//If non-translated, use "backup"
if (substr($backup_name,0,1) == "[") {
$backup_name = "backup";
}
//Calculate the format string
$backup_name_format = str_replace(" ","_",get_string("backupnameformat"));
//If non-translated, use "%Y%m%d-%H%M"
if (substr($backup_name_format,0,1) == "[") {
$backup_name_format = "%%Y%%m%%d-%%H%%M";
}
$backup_name .= str_replace(" ","_","-".strtolower($course->shortname)."-".userdate(time(),$backup_name_format,99,false).".zip");
echo $backup_name;
//Add as hidden name
echo "<input type=\"hidden\" name=\"backup_name\" value=\"".$backup_name."\">";
echo "</td></tr>";
//Calculate the backup unique code to allow simultaneus backups (to define
//the temp-directory name and records in backup temp tables
$backup_unique_code = time();
//Add as hidden name
echo "<input type=\"hidden\" name=\"backup_unique_code\" value=\"".$backup_unique_code."\">";
//Line
echo "<tr><td colspan=\"2\"><hr noshade size=\"1\"></td></tr>";
//Now print the To Do list
echo "<tr>";
echo "<td colspan=\"2\" align=\"center\"><P><B>";
echo get_string("backupdetails").":";
echo "</td></tr>";
//This is tha align to every ingo table
$table->align = array ("LEFT","RIGHT");
if ($allmods = get_records("modules") ) {
foreach ($allmods as $mod) {
$modname = $mod->name;
$modbackup = $modname."_backup_mods";
//If exists the lib & function
$var = "exists_".$modname;
if ($$var) {
//Add hidden fields
$var = "backup_".$modname;
echo "<input type=\"hidden\" name=\"".$var."\" value=\"".$$var."\">";
$var = "backup_user_info_".$modname;
echo "<input type=\"hidden\" name=\"".$var."\" value=\"".$$var."\">";
$var = "backup_".$modname;
//Only if selected
if ($$var == 1) {
//Print the full tr
echo "<tr>";
echo "<td colspan=\"2\"><P><B>";
//Print the mod name
echo "<li>".get_string("include")." ".get_string("modulenameplural",$modname)." ";
//Now look for user-data status
$backup_user_options[0] = get_string("withoutuserdata");
$backup_user_options[1] = get_string("withuserdata");
$var = "backup_user_info_".$modname;
//Print the user info
echo $backup_user_options[$$var]."<P>";
//Call the check function to show more info
$modcheckbackup = $modname."_check_backup_mods";
$table->data = $modcheckbackup($id,$$var,$backup_unique_code);
print_table($table);
echo "</td></tr>";
}
}
}
//Line
echo "<tr><td colspan=\"2\"><hr noshade size=\"1\"></td></tr>";
//Now print the Users tr
echo "<tr>";
echo "<td colspan=\"2\"><P><B>";
$user_options[0] = get_string("includeallusers");
$user_options[1] = get_string("includecourseusers");
///$user_options[2] = get_string("includeneededusers");--->NOT IMPLEMENTED
echo "<li>".$user_options[$backup_users]."<P>";
//Add as hidden name
echo "<input type=\"hidden\" name=\"backup_users\" value=\"".$backup_users."\">";
//Print info
$table->data = user_check_backup($id,$backup_unique_code,$backup_users);
print_table($table);
echo "</td></tr>";
//Now print the Logs tr conditionally
if ($backup_logs) {
echo "<tr>";
echo "<td colspan=\"2\"><P><B>";
echo "<li>".get_string("includelogentries")."<P>";
//Print info
$table->data = log_check_backup($id);
print_table($table);
echo "</td></tr>";
}
//Add as hidden name
echo "<input type=\"hidden\" name=\"backup_logs\" value=\"".$backup_logs."\">";
//Now print the User Files tr conditionally
if ($backup_user_files) {
echo "<tr>";
echo "<td colspan=\"2\"><P><B>";
echo "<li>".get_string("includeuserfiles")."<P>";
//Print info
$table->data = user_files_check_backup($id,$backup_unique_code);
print_table($table);
echo "</td></tr>";
}
//Add as hidden name
echo "<input type=\"hidden\" name=\"backup_user_files\" value=\"".$backup_user_files."\">";
//Now print the Course Files tr conditionally
if ($backup_course_files) {
echo "<tr>";
echo "<td colspan=\"2\"><P><B>";
echo "<li>".get_string("includecoursefiles")."<P>";
//Print info
$table->data = course_files_check_backup($id,$backup_unique_code);
print_table($table);
echo "</td></tr>";
}
//Add as hidden name
echo "<input type=\"hidden\" name=\"backup_course_files\" value=\"".$backup_course_files."\">";
}
?>
</table>
<BR>
<CENTER>
<input type="hidden" name=id value="<? p($id) ?>">
<input type="hidden" name=launch value="execute">
<input type="submit" value="<? print_string("continue") ?>">
<input type="submit" name=cancel value="<? print_string("cancel") ?>">
</CENTER>
</FORM>
+296
View File
@@ -0,0 +1,296 @@
<?PHP //$Id$
//This page prints the backup todo list to see everything
//Check login
require_login();
if (!empty($course->id)) {
if (!isteacheredit($course->id)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
} else {
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
//Check site
if (!$site = get_site()) {
error("Site not found!");
}
//Checks for the required files/functions to backup every mod
//And check if there is data about it
$count = 0;
if ($allmods = get_records("modules") ) {
foreach ($allmods as $mod) {
$modname = $mod->name;
$modfile = "$CFG->dirroot/mod/$modname/backuplib.php";
$modbackup = $modname."_backup_mods";
$modcheckbackup = $modname."_check_backup_mods";
if (file_exists($modfile)) {
include_once($modfile);
if (function_exists($modbackup) and function_exists($modcheckbackup)) {
$var = "exists_".$modname;
$$var = true;
$count++;
}
}
//Check data
//Check module info
$var = "backup_".$modname;
if (!isset($$var)) {
//Every undefined backup_XXXX isn't exported
$$var = 0;
}
//Now stores all the mods preferences into an array into preferences
$preferences->mods[$modname]->backup = $$var;
//Check include user info
$var = "backup_user_info_".$modname;
if (!isset($$var)) {
$$var = 1;
}
//Now stores all the mods preferences into an array into preferences
$preferences->mods[$modname]->userinfo = $$var;
//And the name of the mod
$preferences->mods[$modname]->name = $modname;
}
}
//Check other parameters
if (!isset($backup_users)) {
$backup_users = 1;
}
$preferences->backup_users = $backup_users;
if (!isset($backup_logs)) {
$backup_logs = 0;
}
$preferences->backup_logs = $backup_logs;
if (!isset($backup_user_files)) {
$backup_user_files = 1;
}
$preferences->backup_user_files = $backup_user_files;
if (!isset($backup_course_files)) {
$backup_course_files = 2;
}
$preferences->backup_course_files = $backup_course_files;
if (!isset($id)) {
error ("Course not specified");
}
$preferences->backup_course = $id;
if (!isset($backup_name)) {
error ("Backup name not specified");
}
$preferences->backup_name = $backup_name;
if (!isset($backup_unique_code)) {
error ("Backup unique code not specified");
}
$preferences->backup_unique_code = $backup_unique_code;
//Another Info
$preferences->moodle_version = $CFG->version;
$preferences->moodle_release = $CFG->release;
$preferences->backup_version = $CFG->backup_version;
$preferences->backup_release = $CFG->backup_release;
if ($count == 0) {
notice("No backupable modules are installed!");
}
//Start the main table
echo "<table cellpadding=5>";
//Now print the Backup Name tr
echo "<tr>";
echo "<td align=\"right\"><P><B>";
echo get_string("name").":";
echo "</B></td><td>";
echo $backup_name;
echo "</td></tr>";
//Start the main tr, where all the backup progress is done
echo "<tr>";
echo "<td colspan=\"2\">";
//Start the main ul
echo "<ul>";
//Check for temp and backup and backup_unique_code directory
//Create them as needed
echo "<li>".get_string("creatingtemporarystructures");
$status = check_and_create_backup_dir($backup_unique_code);
//Empty dir
if ($status) {
$status = clear_backup_dir($backup_unique_code);
}
//Delete old_entries from backup tables
echo "<li>".get_string("deletingolddata");
$status = backup_delete_old_data();
if (!$status) {
error ("An error has ocurred");
}
//Create the moodle.xml file
if ($status) {
echo "<li>".get_string("creatingxmlfile");
//Begin a new list to xml contents
echo "<ul>";
echo "<li>".get_string("writingheader");
//Obtain the xml file (create and open) and print prolog information
$backup_file = backup_open_xml($backup_unique_code);
echo "<li>".get_string("writinggeneralinfo");;
//Prints general info about backup to file
if ($backup_file) {
$status = backup_general_info($backup_file,$preferences);
}
echo "<li>".get_string("writingcoursedata");
//Start new ul (for course)
echo "<ul>";
echo "<li>".get_string("courseinfo");
//Prints course start (tag and general info)
if ($status) {
$status = backup_course_start($backup_file,$preferences);
}
echo "<li>".get_string("sections");
//Section info
if ($status) {
$status = backup_course_sections($backup_file,$preferences);
}
//End course contents (close ul)
echo "</ul>";
echo "<li>".get_string("writinguserinfo");
//User info
if ($status) {
$status = backup_user_info($backup_file,$preferences);
}
//If we have selected to backup quizzes, backup categories and
//questions structure (step 1). See notes on mod/quiz/backuplib.php
if ($status and $preferences->mods['quiz']->backup) {
echo "<li>".get_string("writingcategoriesandquestions");
$status = quiz_backup_question_categories($backup_file,$preferences);
}
//Print logs if selected
if ($status) {
if ($preferences->backup_logs) {
echo "<li>".get_string("writingloginfo");
$status = backup_log_info($backup_file,$preferences);
}
}
//Print scales info
if ($status) {
echo "<li>".get_string("writingscalesinfo");
$status = backup_scales_info($backup_file,$preferences);
}
//Module info, this unique function makes all the work!!
//db export and module fileis copy
if ($status) {
$mods_to_backup = false;
//Check if we have any mod to backup
foreach ($preferences->mods as $module) {
if ($module->backup) {
$mods_to_backup = true;
}
}
//If we have to backup some module
if ($mods_to_backup) {
echo "<li>".get_string("writingmoduleinfo");
//Start modules tag
$status = backup_modules_start ($backup_file,$preferences);
//Open ul for module list
echo "<ul>";
//Iterate over modules and call backup
foreach ($preferences->mods as $module) {
if ($module->backup and $status) {
echo "<li>".get_string("modulenameplural",$module->name);
$status = backup_module($backup_file,$preferences,$module->name);
}
}
//Close ul for module list
echo "</ul>";
//Close modules tag
$status = backup_modules_end ($backup_file,$preferences);
}
}
//Prints course end
if ($status) {
$status = backup_course_end($backup_file,$preferences);
}
//Close the xml file and xml data
if ($backup_file) {
backup_close_xml($backup_file);
}
//End xml contents (close ul)
echo "</ul>";
}
//Now, if selected, copy user files
if ($status) {
if ($preferences->backup_user_files) {
echo "<li>".get_string("copyinguserfiles");
$status = backup_copy_user_files ($preferences);
}
}
//Now, if selected, copy course files
if ($status) {
if ($preferences->backup_course_files) {
echo "<li>".get_string("copyingcoursefiles");
$status = backup_copy_course_files ($preferences);
}
}
//Now, zip all the backup directory contents
if ($status) {
echo "<li>".get_string("zippingbackup");
$status = backup_zip ($preferences);
}
//Now, copy the zip file to course directory
if ($status) {
echo "<li>".get_string("copyingzipfile");
$status = copy_zip_to_course_dir ($preferences);
}
//Now, clean temporary data (db and filesystem)
if ($status) {
echo "<li>".get_string("cleaningtempdata");
$status = clean_temp_data ($preferences);
}
//Ends th main ul
echo "</ul>";
//End the main tr, where all the backup is done
echo "</td></tr>";
//End the main table
echo "</table>";
if (!$status) {
error ("An error has ocurred");
}
//Print final message
print_simple_box(get_string("backupfinished"),"CENTER");
print_continue("$CFG->wwwroot/files/index.php?id=".$preferences->backup_course."&wdir=/backupdata");
?>
+156
View File
@@ -0,0 +1,156 @@
<?PHP //$Id$
//This page prints the backup form to select everything
//Check login
require_login();
if (!empty($course->id)) {
if (!isteacheredit($course->id)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
} else {
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
//Check site
if (!$site = get_site()) {
error("Site not found!");
}
//Checks for the required files/functions to backup every mod
//And check if there is data about it
$count = 0;
if ($allmods = get_records("modules") ) {
foreach ($allmods as $mod) {
$modname = $mod->name;
$modfile = "$CFG->dirroot/mod/$modname/backuplib.php";
$modbackup = $modname."_backup_mods";
$modcheckbackup = $modname."_check_backup_mods";
if (file_exists($modfile)) {
include_once($modfile);
if (function_exists($modbackup) and function_exists($modcheckbackup)) {
$var = "exists_".$modname;
$$var = true;
$count++;
}
}
//Check data
//Check module info
$var = "backup_".$modname;
if (!isset($$var)) {
$$var = 1;
}
//Check include user info
$var = "backup_user_info_".$modname;
if (!isset($$var)) {
$$var = 1;
}
}
}
//Check other parameters
if (!isset($backup_users)) {
$backup_users = 1;
}
if (!isset($backup_logs)) {
$backup_logs = 0;
}
if (!isset($backup_user_files)) {
$backup_user_files = 1;
}
if (!isset($backup_course_files)) {
$backup_course_files = 1;
}
if ($count == 0) {
notice("No backupable modules are installed!");
}
?>
<form name="form" method="post" <?=$onsubmit ?> action="<?=$ME ?>">
<table cellpadding=5>
<?
if ($allmods = get_records("modules") ) {
foreach ($allmods as $mod) {
$modname = $mod->name;
$modbackup = $modname."_backup_mods";
//If exists the lib & function
$var = "exists_".$modname;
if ($$var) {
//Print the full tr
echo "<tr>";
echo "<td align=\"right\"><P><B>";
echo get_string("include")." ". get_string("modulenameplural",$modname).":";
echo "</td><td>";
$backup_options[0] = get_string("no");
$backup_options[1] = get_string("yes");
$var = "backup_".$modname;
choose_from_menu($backup_options, $var, $$var, "");
$backup_user_options[0] = get_string("withoutuserdata");
$backup_user_options[1] = get_string("withuserdata");
$var = "backup_user_info_".$modname;
choose_from_menu($backup_user_options, $var, $$var, "");
echo "</td></tr>";
}
}
//Line
echo "<tr><td colspan=\"2\"><hr noshade size=\"1\"></td></tr>";
//Now print the Users tr
echo "<tr>";
echo "<td align=\"right\"><P><B>";
echo get_string("users").":";
echo "</td><td>";
$user_options[0] = get_string("all");
$user_options[1] = get_string("course");
//$user_options[2] = get_string("needed");-->NOT IMPLEMENTED
choose_from_menu($user_options, "backup_users", $backup_users, "");
echo "</td></tr>";
//Now print the Logs tr
echo "<tr>";
echo "<td align=\"right\"><P><B>";
echo get_string("logs").":";
echo "</td><td>";
$log_options[0] = get_string("no");
$log_options[1] = get_string("yes");
choose_from_menu($log_options, "backup_logs", $backup_logs, "");
echo "</td></tr>";
//Now print the User Files tr
echo "<tr>";
echo "<td align=\"right\"><P><B>";
echo get_string ("userfiles").":";
echo "</td><td>";
$user_file_options[0] = get_string("no");
$user_file_options[1] = get_string("yes");
choose_from_menu($user_file_options, "backup_user_files", $backup_user_files, "");
echo "</td></tr>";
//Now print the Course Files tr
echo "<tr>";
echo "<td align=\"right\"><P><B>";
echo get_string ("coursefiles").":";
echo "</td><td>";
$course_file_options[0] = get_string("no");
$course_file_options[1] = get_string("yes");
choose_from_menu($course_file_options, "backup_course_files", $backup_course_files, "");
echo "</td></tr>";
}
?>
</table>
<BR>
<CENTER>
<input type="hidden" name=id value="<? p($id) ?>">
<input type="hidden" name=launch value="check">
<input type="submit" value="<? print_string("continue") ?>">
<input type="submit" name=cancel value="<? print_string("cancel") ?>">
</CENTER>
</FORM>
+1006
View File
File diff suppressed because it is too large Load Diff
+78
View File
@@ -0,0 +1,78 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// backup/restore utility.
//
// 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 backup_upgrade($oldversion=0) {
global $CFG;
$result = true;
if ($oldversion < 2003050300 and $result) {
$result = execute_sql("CREATE TABLE `{$CFG->prefix}backup_ids` (
`backup_code` INT(12) UNSIGNED NOT NULL,
`table_name` VARCHAR(30) NOT NULL,
`old_id` INT(10) UNSIGNED NOT NULL,
`new_id` INT(10) UNSIGNED,
PRIMARY KEY (`backup_code`, `table_name`, `old_id`)
)
COMMENT = 'To store and convert ids in backup/restore'");
}
if ($oldversion < 2003050301 and $result) {
$result = execute_sql("ALTER TABLE `{$CFG->prefix}backup_ids`
ADD `info` VARCHAR(30)");
}
if ($oldversion < 2003050400 and $result) {
$result = execute_sql("ALTER TABLE `{$CFG->prefix}backup_ids`
MODIFY `info` VARCHAR(255)");
}
if ($oldversion < 2003050401 and $result) {
$result = execute_sql("CREATE TABLE `{$CFG->prefix}backup_files` (
`backup_code` INT( 10 ) UNSIGNED NOT NULL ,
`file_type` VARCHAR( 10 ) NOT NULL ,
`path` VARCHAR( 255 ) NOT NULL ,
`old_id` INT( 10 ) UNSIGNED,
`new_id` INT( 10 ) UNSIGNED,
PRIMARY KEY ( `backup_code` , `file_type` , `path` )
) COMMENT = 'To store and recode ids to user & course files.'");
}
if ($oldversion < 2003052000 and $result) {
$result = execute_sql("ALTER TABLE `{$CFG->prefix}backup_ids`
MODIFY `info` TEXT");
}
if ($oldversion < 2003061100 and $result) {
$result = execute_sql("ALTER TABLE `{$CFG->prefix}backup_ids`
MODIFY `info` MEDIUMTEXT");
}
if ($oldversion < 2003082600 and $result) {
print_simple_box("This is the first non-alpha release of the Backup/Restore module.<p>Thanks for upgrading!","center", "50%", "$THEME->cellheading", "20", "noticebox");
}
//Finally, return result
return $result;
}
?>
+27
View File
@@ -0,0 +1,27 @@
#
# Table structure for table `prefix_backup_files`
#
CREATE TABLE `prefix_backup_files` (
`backup_code` int(10) unsigned NOT NULL default '0',
`file_type` varchar(10) NOT NULL default '',
`path` varchar(255) NOT NULL default '',
`old_id` int(10) unsigned default NULL,
`new_id` int(10) unsigned default NULL,
PRIMARY KEY (`backup_code`,`file_type`,`path`)
) TYPE=MyISAM COMMENT='To store and recode ids to user and course files.';
# --------------------------------------------------------
#
# Table structure for table `prefix_backup_ids`
#
CREATE TABLE `prefix_backup_ids` (
`backup_code` int(12) unsigned NOT NULL default '0',
`table_name` varchar(30) NOT NULL default '',
`old_id` int(10) unsigned NOT NULL default '0',
`new_id` int(10) unsigned default NULL,
`info` mediumtext,
PRIMARY KEY (`backup_code`,`table_name`,`old_id`)
) TYPE=MyISAM COMMENT='To store and convert ids in backup/restore';
+34
View File
@@ -0,0 +1,34 @@
<?PHP //$Id$
//
// This file keeps track of upgrades to Moodle's
// backup/restore utility.
//
// 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
//
function backup_upgrade($oldversion=0) {
global $CFG;
$result = true;
return $result;
}
?>
+37
View File
@@ -0,0 +1,37 @@
# THIS FILE IS UNTESTED!!!
# PLEASE HELP TEST/FIX IT AND CONTACT MARTIN OR ELOY!
#
# Table structure for table prefix_backup_files
#
CREATE TABLE prefix_backup_files (
backup_code integer NOT NULL default '0',
file_type varchar(10) NOT NULL default '',
path varchar(255) NOT NULL default '',
old_id integer default NULL,
new_id integer default NULL,
PRIMARY KEY (backup_code, file_type, path)
);
# --------------------------------------------------------
CREATE INDEX prefix_backup_codetypepath_idx ON prefix_backup_files (backup_code,file_type,path);
#
# Table structure for table prefix_backup_ids
#
CREATE TABLE prefix_backup_ids (
prefix_backup_codenameid_idx PRIMARY KEY,
backup_code int(12) unsigned NOT NULL default '0',
table_name varchar(30) NOT NULL default '',
old_id int(10) unsigned NOT NULL default '0',
new_id int(10) unsigned default NULL,
info mediumtext,
PRIMARY KEY (backup_code, table_name, old_id)
);
CREATE INDEX prefix_backup_codenameid_idx ON prefix_backup_ids (backup_code,table_name,old_id);
+501
View File
@@ -0,0 +1,501 @@
<?PHP //$Id$
//This file contains all the general function needed (file manipulation...)
//not directly part of the backup/restore utility
//Delete old data in backup tables (if exists)
//Two days seems to be apropiate
function backup_delete_old_data() {
global $CFG;
//Change this if you want !!
$days = 2;
//End change this
$seconds = $days * 24 * 60 * 60;
$delete_from = time()-$seconds;
//Now delete from tables
$status = execute_sql("DELETE FROM {$CFG->prefix}backup_ids
WHERE backup_code < '$delete_from'",false);
if ($status) {
$status = execute_sql("DELETE FROM {$CFG->prefix}backup_files
WHERE backup_code < '$delete_from'",false);
}
//Now, delete old directory (if exists)
if ($status) {
$status = backup_delete_old_dirs($delete_from);
}
return($status);
}
//Function to delete dirs/files into temp/backup directory
//older than $delete_from
function backup_delete_old_dirs($delete_from) {
global $CFG;
$status = true;
$list = get_directory_list($CFG->dataroot."/temp/backup", "", false);
foreach ($list as $file) {
$file_path = $CFG->dataroot."/temp/backup/".$file;
$moddate = filemtime($file_path);
if ($status && $moddate < $delete_from) {
//If directory, recurse
if (is_dir($file_path)) {
$status = delete_dir_contents($file_path);
//There is nothing, delete the directory itself
if ($status) {
$status = rmdir($file_path);
}
//If file
} else {
unlink("$file_path");
}
}
}
return $status;
}
//Function to check if a directory exists
//and, optionally, create it
function check_dir_exists($dir,$create=false) {
global $CFG;
$status = true;
if(!is_dir($dir)) {
if (!$create) {
$status = false;
} else {
umask(0000);
$status = mkdir ($dir,$CFG->directorypermissions);
}
}
return $status;
}
//Function to check and create the needed dir to
//save all the backup
function check_and_create_backup_dir($backup_unique_code) {
global $CFG;
$status = check_dir_exists($CFG->dataroot."/temp",true);
if ($status) {
$status = check_dir_exists($CFG->dataroot."/temp/backup",true);
}
if ($status) {
$status = check_dir_exists($CFG->dataroot."/temp/backup/".$backup_unique_code,true);
}
return $status;
}
//Function to delete all the directory contents recursively
//it supports a excluded dit too
//Copied from the web !!
function delete_dir_contents ($dir,$excludeddir="") {
$slash = "/";
// Create arrays to store files and directories
$dir_files = array();
$dir_subdirs = array();
// Make sure we can delete it
chmod($dir, 0777);
if ((($handle = opendir($dir))) == FALSE) {
// The directory could not be opened
return false;
}
// Loop through all directory entries, and construct two temporary arrays containing files and sub directories
while($entry = readdir($handle)) {
if (is_dir($dir. $slash .$entry) && $entry != ".." && $entry != "." && $entry != $excludeddir) {
$dir_subdirs[] = $dir. $slash .$entry;
}
else if ($entry != ".." && $entry != "." && $entry != $excludeddir) {
$dir_files[] = $dir. $slash .$entry;
}
}
// Delete all files in the curent directory return false and halt if a file cannot be removed
for($i=0; $i<count($dir_files); $i++) {
chmod($dir_files[$i], 0777);
if (((unlink($dir_files[$i]))) == FALSE) {
return false;
}
}
// Empty sub directories and then remove the directory
for($i=0; $i<count($dir_subdirs); $i++) {
chmod($dir_subdirs[$i], 0777);
if (delete_dir_contents($dir_subdirs[$i]) == FALSE) {
return false;
}
else {
if (rmdir($dir_subdirs[$i]) == FALSE) {
return false;
}
}
}
// Close directory
closedir($handle);
// Success, every thing is gone return true
return true;
}
//Function to clear (empty) the contents of the backup_dir
function clear_backup_dir($backup_unique_code) {
global $CFG;
$rootdir = $CFG->dataroot."/temp/backup/".$backup_unique_code;
//Delete recursively
$status = delete_dir_contents($rootdir);
return $status;
}
//Returns the module type of a course_module's id in a course
function get_module_type ($courseid,$moduleid) {
global $CFG;
$results = get_records_sql ("SELECT cm.id, m.name
FROM {$CFG->prefix}course_modules cm,
{$CFG->prefix}modules m
WHERE cm.course = '$courseid' AND
cm.id = '$moduleid' AND
m.id = cm.module");
if ($results) {
$name = $results[$moduleid]->name;
} else {
$name = false;
}
return $name;
}
//This function return the names of all directories under a give directory
//Not recursive
function list_directories ($rootdir) {
$dir = opendir($rootdir);
while ($file=readdir($dir)) {
if ($file=="." || $file=="..") {
continue;
}
if (is_dir($rootdir."/".$file)) {
$results[$file] = $file;
}
}
closedir($dir);
return $results;
}
//This function return the names of all directories and files under a give directory
//Not recursive
function list_directories_and_files ($rootdir) {
$dir = opendir($rootdir);
while ($file=readdir($dir)) {
if ($file=="." || $file=="..") {
continue;
}
$results[$file] = $file;
}
closedir($dir);
return $results;
}
//This function clean data from backup tables and
//delete all temp files used
function clean_temp_data ($preferences) {
global $CFG;
$status = true;
//true->do it, false->don't do it. To debug if necessary.
if (true) {
//Now delete from tables
$status = execute_sql("DELETE FROM {$CFG->prefix}backup_ids
WHERE backup_code = '$preferences->backup_unique_code'",false);
if ($status) {
$status = execute_sql("DELETE FROM {$CFG->prefix}backup_files
WHERE backup_code = '$preferences->backup_unique_code'",false);
}
//Now, delete temp directory (if exists)
$file_path = $CFG->dataroot."/temp/backup/".$preferences->backup_unique_code;
if (is_dir($file_path)) {
$status = delete_dir_contents($file_path);
//There is nothing, delete the directory itself
if ($status) {
$status = rmdir($file_path);
}
}
}
return $status;
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//This functions are used to copy any file or directory ($from_file)
//to a new file or directory ($to_file). It works recursively and
//mantains file perms.
//I've copied it from: http://www.php.net/manual/en/function.copy.php
//Little modifications done
function backup_copy_file ($from_file,$to_file) {
if (is_file($from_file)) {
//echo "<br>Copying ".$from_file." to ".$to_file; //Debug
$perms=fileperms($from_file);
return copy($from_file,$to_file) && chmod($to_file,$perms);
}
else if (is_dir($from_file)) {
return backup_copy_dir($from_file,$to_file);
}
else{
//echo "<br>Error: not file or dir ".$from_file; //Debug
return false;
}
}
function backup_copy_dir($from_file,$to_file) {
global $CFG;
if (!is_dir($to_file)) {
//echo "<br>Creating ".$to_file; //Debug
$status = mkdir($to_file,$CFG->directorypermissions);
}
$dir = opendir($from_file);
while ($file=readdir($dir)) {
if ($file=="." || $file=="..") {
continue;
}
$status = backup_copy_file ("$from_file/$file","$to_file/$file");
}
closedir($dir);
return $status;
}
///Ends copy file/dirs functions
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function upgrade_backup_db($continueto) {
/// This function upgrades the backup tables, if necessary
/// It's called from admin/index.php, also backup.php and restore.php
global $CFG, $db;
require_once ("$CFG->dirroot/backup/version.php"); // Get code versions
if (empty($CFG->backup_version)) { // Backup has never been installed.
$strdatabaseupgrades = get_string("databaseupgrades");
print_header($strdatabaseupgrades, $strdatabaseupgrades, $strdatabaseupgrades,
"", "", false, "&nbsp;", "&nbsp;");
$db->debug=true;
if (modify_database("$CFG->dirroot/backup/db/$CFG->dbtype.sql")) {
$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));
print_continue($continueto);
exit;
} else {
error("Upgrade of backup system failed! (Could not update version in config table)");
}
} else {
error("Backup tables could NOT be set up successfully!");
}
}
if ($backup_version > $CFG->backup_version) { // Upgrade tables
$strdatabaseupgrades = get_string("databaseupgrades");
print_header($strdatabaseupgrades, $strdatabaseupgrades, $strdatabaseupgrades);
require_once ("$CFG->dirroot/backup/db/$CFG->dbtype.php");
$db->debug=true;
if (backup_upgrade($CFG->backup_version)) {
$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));
print_continue($continueto);
exit;
} else {
error("Upgrade of backup system failed! (Could not update version in config table)");
}
} else {
$db->debug=false;
error("Upgrade failed! See backup/version.php");
}
} else if ($backup_version < $CFG->backup_version) {
notify("WARNING!!! The code you are using is OLDER than the version that made these databases!");
}
}
//This function is used to insert records in the backup_ids table
//If the info field is greater than max_db_storage, then its info
//is saved to filesystem
function backup_putid ($backup_unique_code, $table, $old_id, $new_id, $info="") {
global $CFG;
$max_db_storage = 128; //Max bytes to save to db, else save to file
//MUST BE LOWER THAN 256 (VARCHAR LIMIT)
$status = true;
//First delete to avoid PK duplicates
$status = backup_delid($backup_unique_code, $table, $old_id);
//Now, serialize info
$info_ser = serialize($info);
//Now, if the size of $info_ser > $max_db_storage, save it to filesystem and
//insert a "infile" in the info field
if (strlen($info_ser) > $max_db_storage) {
//Calculate filename (in current_backup_dir, $backup_unique_code_$table_$old_id.info)
$filename = $CFG->dataroot."/temp/backup/".$backup_unique_code."/".$backup_unique_code."_".$table."_".$old_id.".info";
//Save data to file
$status = backup_data2file($filename,$info_ser);
//Set info_to save
$info_to_save = "infile";
} else {
//Saving to db, addslashes
$info_to_save = addslashes($info_ser);
}
//Now, insert the record
if ($status) {
$status = execute_sql("INSERT INTO {$CFG->prefix}backup_ids
(backup_code, table_name, old_id, new_id, info)
VALUES
($backup_unique_code, '$table', '$old_id', '$new_id', '$info_to_save')",false);
}
return $status;
}
//This function is used to delete recods from the backup_ids table
//If the info field is "infile" then the file is deleted too
function backup_delid ($backup_unique_code, $table, $old_id) {
global $CFG;
$status = true;
$status = execute_sql("DELETE FROM {$CFG->prefix}backup_ids
WHERE backup_code = $backup_unique_code AND
table_name = '$table' AND
old_id = '$old_id'",false);
return $status;
}
//This function is used to get a record from the backup_ids table
//If the info field is "infile" then its info
//is read from filesystem
function backup_getid ($backup_unique_code, $table, $old_id) {
global $CFG;
$status = true;
$status2 = true;
$status = get_record ("backup_ids","backup_code",$backup_unique_code,
"table_name",$table,
"old_id", $old_id);
//If info field = "infile", get file contents
if ($status->info == "infile") {
$filename = $CFG->dataroot."/temp/backup/".$backup_unique_code."/".$backup_unique_code."_".$table."_".$old_id.".info";
//Read data from file
$status2 = backup_file2data($filename,$info);
if ($status2) {
//unserialize data
$status->info = unserialize($info);
} else {
$status = false;
}
} else {
//Only if status (record exists)
if ($status) {
////First strip slashes
$temp = stripslashes($status->info);
//Now unserialize
$status->info = unserialize($temp);
}
}
return $status;
}
//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));
}
//This function is used to check that every necessary function to
//backup/restore exists in the current php installation. Thanks to
//gregb@crowncollege.edu by the idea.
function backup_required_functions() {
if(!function_exists('utf8_encode')) {
error('You need to add XML support to your PHP installation');
}
}
//This function send n white characters to the browser and flush the
//output buffer. Used to avoid browser timeouts and to show the progress.
function backup_flush($n=0,$time=false) {
if ($time) {
$ti = strftime("%X",time());
} else {
$ti = "";
}
echo str_repeat(" ", $n) . $ti . "\n";
flush();
}
//This function creates the filename and write data to it
//returning status as result
function backup_data2file ($file,&$data) {
$status = true;
$status2 = true;
$f = fopen($file,"w");
$status = fwrite($f,$data);
$status2 = fclose($f);
return ($status && $status2);
}
//This function read the filename and read data from it
function backup_file2data ($file,&$data) {
$status = true;
$status2 = true;
$f = fopen($file,"r");
$data = fread ($f,filesize($file));
$status2 = fclose($f);
return ($status && $status2);
}
?>
+112
View File
@@ -0,0 +1,112 @@
<?PHP //$Id$
//This script is used to configure and execute the restore proccess.
//Define some globals for all the script
//Units used
require_once ("../config.php");
require_once ("../lib/xmlize.php");
require_once ("../course/lib.php");
require_once ("lib.php");
require_once ("restorelib.php");
//Optional
optional_variable($id);
optional_variable($file);
optional_variable($cancel);
optional_variable($launch);
//Check login
require_login();
if (!empty($id)) {
if (!isteacheredit($id)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
} else {
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
//Check site
if (!$site = get_site()) {
error("Site not found!");
}
//Check necessary functions exists. Thanks to gregb@crowncollege.edu
backup_required_functions();
//Check backup_version
if ($file) {
$linkto = "restore.php?id=".$id."&file=".$file;
} else {
$linkto = "restore.php";
}
upgrade_backup_db($linkto);
//Get strings
$strcourserestore = get_string("courserestore");
$stradministration = get_string("administration");
//If no file has been selected from the FileManager, inform and end
if (!$file) {
print_header("$site->shortname: $strcourserestore", $site->fullname,
"<A HREF=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</A> -> $strcourserestore");
print_heading(get_string("nofilesselected"));
print_continue("$CFG->wwwroot/$CFG->admin/index.php");
print_footer();
exit;
}
//If cancel has been selected, inform and end
if ($cancel) {
print_header("$site->shortname: $strcourserestore", $site->fullname,
"<A HREF=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</A> -> $strcourserestore");
print_heading(get_string("restorecancelled"));
print_continue("$CFG->wwwroot/$CFG->admin/index.php");
print_footer();
exit;
}
//We are here, so me have a file.
//Get and check course
if (! $course = get_record("course", "id", $id)) {
error("Course ID was incorrect (can't find it)");
}
//Print header
if (isadmin()) {
print_header("$site->shortname: $strcourserestore", $site->fullname,
"<a href=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</a> ->
$strcourserestore -> ".basename($file));
} else {
print_header("$course->shortname: $strcourserestore", $course->fullname,
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
$strcourserestore");
}
//Print form
print_heading("$strcourserestore: ".basename($file));
print_simple_box_start("center", "", "$THEME->cellheading");
//Adjust some php variables to the execution of this script
ini_set("max_execution_time","3000");
ini_set("memory_limit","56M");
//Call the form, depending the step we are
if (!$launch) {
include_once("restore_precheck.html");
} else if ($launch == "form") {
include_once("restore_form.html");
} else if ($launch == "check") {
include_once("restore_check.html");
} else if ($launch == "execute") {
include_once("restore_execute.html");
}
print_simple_box_end();
//Print footer
print_footer();
?>
+203
View File
@@ -0,0 +1,203 @@
<?PHP //$Id$
//This page receive all the restore_form data. Then, if existing course
//has been selected, shows a list of courses to select one.
//It cheks that the parammeter from restore_form are coherent.
//It puts all the restore info in the session.
//Finally, it calls restore_execute to do the hard work
//Get objects from session
if ($SESSION) {
$info = $SESSION->info;
$course_header = $SESSION->course_header;
$restore = $SESSION->restore;
}
//If restore session info exists, but we are posting parameters
//manually, this has prioriry
if ($restore and isset($restore_restoreto)) {
unset($restore);
}
//Check required objects from session
//info
require_variable($info);
//course_header
require_variable($course_header);
//If the restore object doesn't exist, we are going
//to check every variable individually and create it
if (!$restore) {
//Check that we have all we need
//backup_unique_code
require_variable($backup_unique_code);
//file
require_variable($file);
//Checks for the required restoremod parameters
if ($allmods = get_records("modules")) {
foreach ($allmods as $mod) {
$modname = $mod->name;
$var = "restore_".$modname;
require_variable($$var);
$var = "restore_user_info_".$modname;
require_variable($$var);
}
}
//restoreto
require_variable($restore_restoreto);
//restore_users
require_variable($restore_users);
//restore_logs
require_variable($restore_logs);
//restore_user_files
require_variable($restore_user_files);
//restore_course_files
require_variable($restore_course_files);
//restore_course_files
require_variable($restore_course_files);
//Check we've selected a course
if (!isset($course_id)) {
$course_id = 0;
}
//We are here, having all we need !!
//Create the restore object and put it in the session
$restore->backup_unique_code = $backup_unique_code;
$restore->file = $file;
if ($allmods = get_records("modules")) {
foreach ($allmods as $mod) {
$modname = $mod->name;
$var = "restore_".$modname;
$restore->mods[$modname]->restore=$$var;
$var = "restore_user_info_".$modname;
$restore->mods[$modname]->userinfo=$$var;
}
}
$restore->restoreto=$restore_restoreto;
$restore->users=$restore_users;
$restore->logs=$restore_logs;
$restore->user_files=$restore_user_files;
$restore->course_files=$restore_course_files;
$restore->course_id=$course_id;
} else {
//We have the object, so check if we have a new course_id
//passed as parammeter
if ($course_id) {
$restore->course_id=$course_id;
}
}
//We have the object with data, put it in the session
$SESSION->restore = $restore;
//From here to the wnd of the script, only use the $restore object
//Check login
require_login();
//Check admin
if (!empty($id)) {
if (!isteacheredit($id)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
} else {
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
//Check site
if (!$site = get_site()) {
error("Site not found!");
}
//Depending the selected restoreto:
// If user is a teacher (and nor admin):
// 0-Current course, deleting: Put $restore->course_id and $restore->deleting (true), create the restore object
// 1-Current course, adding: Put $restore->course_id and $restore->deleting (false), create the restore object
// If the uses is an admin:
// 0-Existing course, deleting: Select the destination course and launch the check again, then
// put $restore->course_id and $restore->deleting (true), create the restore object.
// 1-Existing course, adding: Select the destination course and launch the check again, then
// put $restore->course_id and $restore->deleting (false), create the restore object.
// 2-New course: Create the restore object and launch the execute.
//If the user is a teacher and not an admin
if (isteacher($id) and !isadmin()) {
$restore->course_id = $id;
if ($restore->restoreto == 0) {
$restore->deleting = true;
} else {
$restore->deleting = false;
}
}
//If the user is an admin
if (isadmin()) {
//Set restore->deleting as needed
if ($restore->restoreto == 0) {
$restore->deleting = true;
} else {
$restore->deleting = false;
}
}
//Now, select the course if needed
if (($restore->restoreto == 0 or $restore->restoreto == 1) and ($restore->course_id == 0) and (isadmin())) {
if ($courses = get_courses()) {
print_heading(get_string("choosecourse"));
print_simple_box_start("CENTER");
foreach ($courses as $course) {
echo "<A HREF=\"restore.php?course_id=$course->id&launch=check&id=$id&file=$file\">$course->fullname ($course->shortname)</A><BR>";
}
print_simple_box_end();
} else {
print_heading(get_string("nocoursesyet"));
print_continue("$CFG->wwwroot/$CFG->admin/index.php");
}
//Checks everything and execute restore
} else if ((($restore->restoreto == 0 or $restore->restoreto == 1) and ($restore->course_id != 0)) or ($restore->restoreto == 2)) {
$show_continue_button = true;
//Check if we've selected any mod's user info and restore->users
//is set to none. Change it to course and inform.
if ($restore->users == 2) {
$changed = false;
$mods = $restore->mods;
foreach ($mods as $mod) {
if ($mod->userinfo) {
$changed = true;
}
}
if ($changed) {
echo get_string ("noteuserschangednonetocourse");
echo "<hr noshade size=\"1\">";
$restore->users = 1;
}
}
//Save the restore session object
$SESSION->restore = $restore;
if ($show_continue_button) {
//Print the continue button to execute the restore NOW !!!!
//All is prepared !!!
echo "<CENTER>";
$hidden["launch"] = "execute";
$hidden["file"] = $file;
$hidden["id"] = $id;
print_single_button("restore.php", $hidden, get_string("restorecoursenow"),"post");
echo "</CENTER>";
} else {
//Show error
error ("Something was wrong checking restore preferences");
}
//If we are here. Something must be wrong. Debug !!!
} else {
print_object($restore);
print_object($info);
print_object($course_header);
error ("Something must be wrong");
}
?>
+300
View File
@@ -0,0 +1,300 @@
<?PHP //$Id$
//This page receives the required info and executes the restore
//with the parameters suplied. Whe finished, delete temporary
//data from backup_tables and temp directory
//Get objects from session
if ($SESSION) {
$info = $SESSION->info;
$course_header = $SESSION->course_header;
$restore = $SESSION->restore;
}
//Check login
require_login();
//Check admin
if (!empty($id)) {
if (!isteacheredit($id)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
} else {
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
//Check site
if (!$site = get_site()) {
error("Site not found!");
}
//Checks for the required files/functions to restore every module
//and include them
if ($allmods = get_records("modules") ) {
foreach ($allmods as $mod) {
$modname = $mod->name;
$modfile = "$CFG->dirroot/mod/$modname/restorelib.php";
//If file exists and we have selected to restore that type of module
if ((file_exists($modfile)) and ($restore->mods[$modname]->restore)) {
include_once($modfile);
}
}
}
//Start the main table
echo "<table cellpadding=5>";
echo "<tr><td>";
//Start the main ul
echo "<ul>";
//Init status
$status = true;
//Localtion of the xml file
$xml_file = $CFG->dataroot."/temp/backup/".$restore->backup_unique_code."/moodle.xml";
//If we've selected to restore into new course
//create it (course)
//Saving conversion id variables into backup_tables
if ($restore->restoreto == 2) {
echo "<li>".get_string("creatingnewcourse");
if (!$status = restore_create_new_course($restore,$course_header)) {
notify("Error while creating the new empty course.");
}
//Print course fullname and shortname and category
if ($status) {
echo "<ul>";
echo "<li>".$course_header->course_fullname." (".$course_header->course_shortname.")";
echo "<li>".get_string("category").": ".$course_header->category->name;
echo "</ul>";
//Put the destination course_id
$restore->course_id = $course_header->course_id;
}
} else {
$course = get_record("course","id",$restore->course_id);
if ($course) {
echo "<li>".get_string("usingexistingcourse");
echo "<ul>";
echo "<li>".get_string("from").": ".$course_header->course_fullname." (".$course_header->course_shortname.")";
echo "<li>".get_string("to").": ".$course->fullname." (".$course->shortname.")";
if (($restore->deleting)) {
echo "<li>".get_string("deletingexistingcoursedata");
} else {
echo "<li>".get_string("addingdatatoexisting");
}
echo "</ul>";
//If we have selected to restore deleting, we do it now.
if ($restore->deleting) {
echo "<li>".get_string("deletingolddata");
$status = remove_course_contents($restore->course_id,false) and
delete_dir_contents($CFG->dataroot."/".$restore->course_id,"backupdata");
if ($status) {
//Now , this situation is equivalent to the "restore to new course" one (we
//have a course record and nothing more), so define it as "to new course"
$restore->restoreto = 2;
} else {
notify("An error occurred while deleting some of the course contents.");
}
}
} else {
notify("Error opening existing course.");
$status = false;
}
}
//Now create the course_sections and their associated course_modules
if ($status) {
//Into new course
if ($restore->restoreto == 2) {
echo "<li>".get_string("creatingsections");
if (!$status = restore_create_sections($restore,$xml_file)) {
notify("Error creating sections in the existing course.");
}
//Into existing course
} else if ($restore->restoreto == 0 or $restore->restoreto == 1) {
echo "<li>".get_string("checkingsections");
if (!$status = restore_create_sections($restore,$xml_file)) {
notify("Error creating sections in the existing course.");
}
//Error
} else {
notify("Neither a new course or an existing one was specified.");
$status = false;
}
}
//Now create users as needed
if ($status and ($restore->users == 0 or $restore->users == 1)) {
echo "<li>".get_string("creatingusers")."<br>";
if (!$status = restore_create_users($restore,$xml_file)) {
notify("Could not restore users.");
}
//Now print info about the work done
if ($status) {
$recs = get_records_sql("select old_id, new_id from {$CFG->prefix}backup_ids
where backup_code = '$restore->backup_unique_code' and
table_name = 'user'");
//We've records
if ($recs) {
$new_count = 0;
$exists_count = 0;
$student_count = 0;
$teacher_count = 0;
$coursecreator_count = 0;
$admin_count = 0;
$other_count = 0;
$counter = 0;
//Iterate, filling counters
foreach ($recs as $rec) {
//Get full record, using backup_getids
$record = backup_getid($restore->backup_unique_code,"user",$rec->old_id);
if (strpos($record->info,"new") !== false) {
$new_count++;
}
if (strpos($record->info,"exists") !== false) {
$exists_count++;
}
if (strpos($record->info,"student")) {
$student_count++;
} else if (strpos($record->info,"teacher")) {
$teacher_count++;
} else if (strpos($record->info,"admin")) {
$admin_count++;
} else if (strpos($record->info,"coursecreator")) {
$coursecreator_count++;
} else if ($record->info == "new" or $record->info == "exists") {
$other_count++;
}
//Do some output
$counter++;
if ($counter % 10 == 0) {
echo ".";
if ($counter % 200 == 0) {
echo "<br>";
}
backup_flush(300);
}
}
//Now print information gathered
echo " (".get_string("new").": ".$new_count.", ".get_string("existing").": ".$exists_count.")";
echo "<ul>";
echo "<li>".get_string("students").": ".$student_count;
echo "<li>".get_string("teachers").": ".$teacher_count;
echo "<li>".get_string("coursecreators").": ".$coursecreator_count;
echo "<li>".get_string("administrators").": ".$admin_count;
echo "<li>".get_string("other").": ".$other_count;
echo "</ul>";
} else {
notify("Something is wrong - no users were found!");
$status = false;
}
}
}
//Now create categories and questions as needed (STEP1)
if ($status and ($restore->mods['quiz']->restore)) {
echo "<li>".get_string("creatingcategoriesandquestions")."<br>";
if (!$status = restore_create_questions($restore,$xml_file)) {
notify("Could not restore categories and questions!");
}
}
//Now create user_files as needed
if ($status and ($restore->user_files)) {
echo "<li>".get_string("copyinguserfiles")."<br>";
if (!$status = restore_user_files($restore)) {
notify("Could not restore user files!");
}
//If all is ok (and we have a counter)
if ($status and ($status !== true)) {
//Inform about user dirs created from backup
echo "<ul>";
echo "<li>".get_string("userzones").": ".$status;
echo "</ul>";
}
}
//Now create course files as needed
if ($status and ($restore->course_files)) {
echo "<li>".get_string("copyingcoursefiles")."<br>";
if (!$status = restore_course_files($restore)) {
notify("Could not restore course files!");
}
//If all is ok (and we have a counter)
if ($status and ($status !== true)) {
//Inform about user dirs created from backup
echo "<ul>";
echo "<li>".get_string("filesfolders").": ".$status;
echo "</ul>";
}
}
//Now create scales as needed
if ($status) {
echo "<li>".get_string("creatingscales");
if (!$status = restore_create_scales($restore,$xml_file)) {
notify("Could not restore custom scales!");
}
}
//Now create course modules as needed
if ($status) {
echo "<li>".get_string("creatingcoursemodules");
if (!$status = restore_create_modules($restore,$xml_file)) {
notify("Could not restore modules!");
}
}
//Now create log entries as needed
if ($status and ($restore->logs)) {
echo "<li>".get_string("creatinglogentries")."<b> (not implemented!!)</b>";
}
//Now, if all is OK, adjust the instance field in course_modules !!
if ($status) {
echo "<li>".get_string("checkinginstances");
if (!$status = restore_check_instances($restore)) {
notify("Could not adjust instances in course_modules!");
}
}
//Now if all is OK, update:
// - course modinfo field
// - categories table
if ($status) {
echo "<li>".get_string("checkingcourse");
//modinfo field
rebuild_course_cache($restore->course_id);
//categories table
$course = get_record("course","id",$restore->course_id);
fix_course_sortorder($course->category);
}
//Cleanup temps (files and db)
if ($status) {
echo "<li>".get_string("cleaningtempdata");
if (!$status = clean_temp_data ($restore)) {
notify("Could not clean up temporary data from files and database");
}
}
//End the main ul
echo "</ul>";
//End the main table
echo "</tr></td>";
echo "</table>";
if (!$status) {
error ("An error has occurred and the restore could not be completed!");
}
//Print final message
print_simple_box(get_string("restorefinished"),"CENTER");
print_continue("$CFG->wwwroot/course/view.php?id=".$restore->course_id);
?>
+244
View File
@@ -0,0 +1,244 @@
<?PHP //$Id$
//This page prints the restore form to select everything yo want
//to restore. Form is dinamically buid, depending of "info" object
//that contains the backup contents and depending of every mod
//capabilities.
//Get objects from session
$info = $SESSION->info;
$course_header = $SESSION->course_header;
//Check that we have all we need
//backup_unique_code
require_variable($backup_unique_code);
//file
require_variable($file);
//info
require_variable($info);
//course_header
require_variable($course_header);
//Check login
require_login();
//Check admin
if (!empty($id)) {
if (!isteacheredit($id)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
} else {
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
//Check site
if (!$site = get_site()) {
error("Site not found!");
}
//Checks for the required files/functions to restore every mod
$count = 0;
if ($allmods = get_records("modules") ) {
foreach ($allmods as $mod) {
$modname = $mod->name;
$modfile = "$CFG->dirroot/mod/$modname/restorelib.php";
$modrestore = $modname."_restore_mods";
if (file_exists($modfile)) {
include_once($modfile);
if (function_exists($modrestore)) {
$var = "exists_".$modname;
$$var = true;
$count++;
}
}
//Check data
//Check module info
$var = "restore_".$modname;
if (!isset($$var)) {
$$var = 1;
}
//Check include user info
$var = "restore_user_info_".$modname;
if (!isset($$var)) {
$$var = 1;
}
}
}
//Check other parameters
if (!isset($restore_users)) {
$restore_users = 1;
}
if (!isset($restore_logs)) {
$restore_logs = 1;
}
if (!isset($restore_user_files)) {
$restore_user_files = 1;
}
if (!isset($restore_course_files)) {
$restore_course_files = 1;
}
if (!isset($restore_restoreto)) {
if (isteacheredit($id) and !isadmin()) {
$restore_restoreto = 1;
}
if (isadmin()) {
$restore_restoreto = 2;
}
}
if ($count == 0) {
notice("No restorable modules are installed!");
}
?>
<form name="form" method="post" <?=$onsubmit ?> action="<?=$ME ?>">
<table cellpadding=5>
<?
//First, course destination
//Print the full tr
echo "<tr>";
echo "<td align=\"right\"><P><b>";
echo get_string("restoreto").":</b>";
echo "</td><td>";
if (isteacheredit($id) and !isadmin()) {
$restore_restoreto_options[0] = get_string("currentcoursedeleting");
$restore_restoreto_options[1] = get_string("currentcourseadding");
}
if (isadmin()) {
$restore_restoreto_options[0] = get_string("existingcoursedeleting");
$restore_restoreto_options[1] = get_string("existingcourseadding");
$restore_restoreto_options[2] = get_string("newcourse");
}
choose_from_menu($restore_restoreto_options, "restore_restoreto", $restore_restoreto, "");
echo "</td></tr>";
//Line
echo "<tr><td colspan=\"2\"><hr noshade size=\"1\"></td></tr>";
//Now, check modules and info and show posibilities
if ($allmods = get_records("modules") ) {
foreach ($allmods as $mod) {
$modname = $mod->name;
$modrestore = $modname."_restore_mods";
//If exists the lib & function
$exist = "exists_".$modname;
$restore_var = "restore_".$modname;
$user_info_var = "restore_user_info_".$modname;
if ($$exist) {
//Now check that we have that module info in the backup file
if ($info->mods[$modname]->backup == "true") {
//Print the full tr
echo "<tr>";
echo "<td align=\"right\"><P><B>";
echo get_string("include")." ". get_string("modulenameplural",$modname).":";
echo "</td><td>";
$restore_options[0] = get_string("no");
$restore_options[1] = get_string("yes");
choose_from_menu($restore_options, $restore_var, $$restore_var, "");
//If backup contains user data, then show menu, else fix it to
//without user data
if ($info->mods[$modname]->userinfo == "true") {
$restore_user_options[0] = get_string("withoutuserdata");
$restore_user_options[1] = get_string("withuserdata");
choose_from_menu($restore_user_options, $user_info_var, $$user_info_var, "");
} else {
//Module haven't userdata
echo get_string("withoutuserdata");
echo "<input type=\"hidden\" name=\"$user_info_var\" value=\"0\">";
}
echo "</td></tr>";
} else {
//Module isn't restorable
echo "<input type=\"hidden\" name=\"$restore_var\" value=\"0\">";
echo "<input type=\"hidden\" name=\"$user_info_var\" value=\"0\">";
}
} else {
//Module isn't restorable
echo "<input type=\"hidden\" name=\"$restore_var\" value=\"0\">";
echo "<input type=\"hidden\" name=\"$user_info_var\" value=\"0\">";
}
}
//Line
echo "<tr><td colspan=\"2\"><hr noshade size=\"1\"></td></tr>";
//Now print the Users tr
echo "<tr>";
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");
}
$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
echo "<tr>";
echo "<td align=\"right\"><P><B>";
echo get_string("logs").":";
echo "</td><td>";
//If logs are in the backup file, show menu, else fixed to no
if ($info->backup_logs == "true") {
$log_options[0] = get_string("no");
$log_options[1] = get_string("yes");
choose_from_menu($log_options, "restore_logs", $restore_logs, "");
} else {
echo get_string("no");
echo "<input type=\"hidden\" name=\"restore_logs\" value=\"0\">";
}
echo "</td></tr>";
//Now print the User Files tr
echo "<tr>";
echo "<td align=\"right\"><P><B>";
echo get_string ("userfiles").":";
echo "</td><td>";
//If user files are in the backup file, show menu, else fixed to no
if ($info->backup_user_files == "true") {
$user_file_options[0] = get_string("no");
$user_file_options[1] = get_string("yes");
choose_from_menu($user_file_options, "restore_user_files", $restore_user_files, "");
} else {
echo get_string("no");
echo "<input type=\"hidden\" name=\"restore_user_files\" value=\"0\">";
}
echo "</td></tr>";
//Now print the Course Files tr
echo "<tr>";
echo "<td align=\"right\"><P><B>";
echo get_string ("coursefiles").":";
echo "</td><td>";
//If course files are in the backup file, show menu, else fixed to no
if ($info->backup_course_files == "true") {
$course_file_options[0] = get_string("no");
$course_file_options[1] = get_string("yes");
choose_from_menu($course_file_options, "restore_course_files", $restore_course_files, "");
} else {
echo get_string("no");
echo "<input type=\"hidden\" name=\"restore_course_files\" value=\"0\">";
}
echo "</td></tr>";
echo "<input type=\"hidden\" name=\"backup_unique_code\" value=\"$backup_unique_code\">";
echo "<input type=\"hidden\" name=\"file\" value=\"$file\">";
}
?>
</table>
<BR>
<CENTER>
<input type="hidden" name=id value="<? p($id) ?>">
<input type="hidden" name=launch value="check">
<input type="submit" value="<? print_string("continue") ?>">
<input type="submit" name=cancel value="<? print_string("cancel") ?>">
</CENTER>
</FORM>
+138
View File
@@ -0,0 +1,138 @@
<?PHP // $Id$
//This page copies th zip to the temp directory,
//unzip it, check that it is a valid backup file
//inform about its contents and fill all the necesary
//variables to continue with the restore.
//Checks we have the file variable
if (!isset($file)) {
error ("File not specified");
}
//Check login
require_login();
//Check admin
if (!empty($id)) {
if (!isteacheredit($id)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
} else {
if (!isadmin()) {
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
}
//Check site
if (!$site = get_site()) {
error("Site not found!");
}
//Prepend dataroot to variable to have the absolute path
$file = $CFG->dataroot."/".$file;
//Start the main table
echo "<table cellpadding=5>";
echo "<tr><td>";
//Start the mail ul
echo "<ul>";
//Check the file exists
if (!is_file($file)) {
error ("File not exists ($file)");
}
//Check the file name ends with .zip
if (!substr($file,-4) == ".zip") {
error ("File has an incorrect extension");
}
//Now calculate the unique_code for this restore
$backup_unique_code = time();
//Now check and create the backup dir (if it doesn't exist)
$status = check_and_create_backup_dir($backup_unique_code);
//Empty dir
if ($status) {
echo "<li>".get_string("creatingtemporarystructures");
$status = clear_backup_dir($backup_unique_code);
}
//Now delete old data and directories under dataroot/temp/backup
if ($status) {
echo "<li>".get_string("deletingolddata");
$status = backup_delete_old_data();
}
//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));
}
//Now unzip the file
if ($status) {
echo "<li>".get_string("unzippingbackup");
$status = restore_unzip ($CFG->dataroot."/temp/backup/".$backup_unique_code."/".basename($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);
}
$info = "";
$course_header = "";
//Now read the info tag (all)
if ($status) {
echo "<li>".get_string("readinginfofrombackup");
//Reading info from file
$info = restore_read_xml_info ($xml_file);
//Reading course_header from file
$course_header = restore_read_xml_course_header ($xml_file);
}
//End the main ul
echo "</ul>";
//End the main table
echo "</tr></td>";
echo "</table>";
//Now we print in other table, the backup and the course it contains info
if ($info and $course_header and $status) {
//First, the course info
$status = restore_print_course_header($course_header);
//Now, the backup info
if ($status) {
$status = restore_print_info($info);
}
}
//Save course header and info into php session
if ($status) {
$SESSION->info = $info;
$SESSION->course_header = $course_header;
}
//Finally, a little form to continue
//with some hidden fields
if ($status) {
echo "<br><CENTER>";
$hidden["backup_unique_code"] = $backup_unique_code;
$hidden["launch"] = "form";
$hidden["file"] = $file;
$hidden["id"] = $id;
print_single_button("restore.php", $hidden, get_string("continue"),"post");
echo "</CENTER>";
}
if (!$status) {
error ("An error has ocurred");
}
?>
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
<?PHP //$Id$
// This file defines the current version of the
// backup/restore code that is being used. This can be
// compared against the values stored in the
// database (backup_version) to determine whether upgrades should
// be performed (see db/backup_*.php)
$backup_version = 2003082800; // The current version is a date (YYYYMMDDXX)
$backup_release = "1.1"; // User-friendly version number
+141 -130
View File
@@ -1,130 +1,141 @@
<?PHP // $Id$
///////////////////////////////////////////////////////////////////////////
//
// Moodle configuration file
//
// This file should be located in the top-level directory.
//
///////////////////////////////////////////////////////////////////////////
//
// NOTICE OF COPYRIGHT
//
// Moodle - Modular Object-Oriented Dynamic Learning Environment
// http://moodle.com
//
// Copyright (C) 2001 Martin Dougiamas http://dougiamas.com
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details:
//
// http://www.gnu.org/copyleft/gpl.html
//
////////////////////////////////////////////////////////////////////////////
//
// Site configuration variables are all stored in the CFG object.
// First, you need to configure the database where all Moodle data
// will be stored. This database must already have been created
// and a username/password created to access it. See doc/INSTALL.
$CFG->dbtype = "mysql"; // eg mysql (postgres7, oracle, access etc coming soon)
$CFG->dbhost = "localhost"; // eg localhost
$CFG->dbname = "moodle"; // eg moodle
$CFG->dbuser = "username";
$CFG->dbpass = "password";
// Next you need to tell Moodle where it is located.
// Specify the full URL that moodle has been installed in:
$CFG->wwwroot = "http://example.com/moodle";
// and now the full OS directory path to this same location:
$CFG->dirroot = "/web/moodle";
// Now you need a place where Moodle can save uploaded files. This directory
// should be writeable by the web server user (usually 'nobody' or 'apache'),
// but it should not be accessible directly via the web.
$CFG->dataroot = "/home/moodledata";
// Choose a sitewide language - this will affect text, buttons etc
// See lib/languages.php for a full list of standard language codes.
$CFG->lang = "en"; // Currently the only option
// Choose a sitewide locale - this will affect the display of dates
// You need to have this locale data installed on your operating
// system. If you don't know what to choose try using the same
// string as the language.
$CFG->locale = "en";
// Give the full names of local SMTP servers that Moodle should use to
// send mail (eg "mail.a.com" or "mail.a.com;mail.b.com").
// If this is left empty (eg "") then Moodle will attempt to use PHP mail.
$CFG->smtphosts = "";
// There is no way, currently, for PHP to automatically tell whether the
// graphic library GD is version 1.* or 2.*. Specify here (either 1 or 2).
$CFG->gdversion = 1;
// If students haven't logged in for a very long time, then they are
// automatically unsubscribed from courses. This parameter specifies
// that time limit, in DAYS.
$CFG->longtimenosee = 100;
// These programs are used by the file management code to zip and unzip
// uploaded files. This only works on Unix systems right now.
$CFG->zip = "/usr/bin/zip";
$CFG->unzip = "/usr/bin/unzip";
// Files (images, uploads etc) are provided via a script which
// is called like this example: file.php/1/myfiles/mymusic.mp3
// Using this form of argument allows files to be more easily
// cached in web browsers, proxy servers etc, but they don't
// work in all PHP servers. If you have trouble viewing
// uploaded files or images, then set the following to false
$CFG->slasharguments = true;
// If this server needs to use a proxy computer (eg a firewall)
// to access the Internet, then provide the proxy details here.
// This will only affect a few minor features such as the ability
// to see user locations plotted on a graph.
// Otherwise, leave these blank
$CFG->proxyhost = "";
$CFG->proxyport = "";
// You should not need to change anything else. To continue setting up
// Moodle, use your web browser to go to the moodle/admin web page.
///////////////////////////////////////////////////////////////////////////
$CFG->libdir = "$CFG->dirroot/lib";
require("$CFG->libdir/setup.php"); // Sets up all libraries, sessions etc
?>
<?PHP // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// Moodle configuration file //
// //
// This file should be renamed "config.php" in the top-level directory //
// //
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 2001-2003 Martin Dougiamas http://dougiamas.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
unset($CFG); // Ignore this line
//=========================================================================
// 1. DATABASE SETUP
//=========================================================================
// First, you need to configure the database where all Moodle data //
// will be stored. This database must already have been created //
// and a username/password created to access it. //
// //
// mysql - the prefix is optional, but useful when installing //
// into databases that already contain tables. //
//
// postgres7 - the prefix is REQUIRED, regardless of whether the //
// database already contains tables. //
$CFG->dbtype = 'mysql'; // mysql or postgres7 (for now)
$CFG->dbhost = 'localhost'; // eg localhost or db.isp.com
$CFG->dbname = 'moodle'; // database name, eg moodle
$CFG->dbuser = 'username'; // your database username
$CFG->dbpass = 'password'; // your database password
$CFG->dbpersist = true; // Use persistent database connection?
// (should be 'true' for 99% of sites)
$CFG->prefix = 'mdl_'; // Prefix to use for all table names
//=========================================================================
// 2. WEB SITE LOCATION
//=========================================================================
// Now you need to tell Moodle where it is located. Specify the full
// web address to where moodle has been installed. If your web site
// is accessible via multiple URLs then choose the most natural one
// that your students would use. Do not include a trailing slash.
$CFG->wwwroot = 'http://example.com/moodle';
//=========================================================================
// 3. SERVER FILES LOCATION
//=========================================================================
// Next, specify the full OS directory path to this same location
// Make sure the upper/lower case is correct. Some examples:
//
// $CFG->dirroot = 'C:\FoxServ\www\moodle'; // Windows
// $CFG->dirroot = '/var/www/html/moodle'; // Redhat Linux
$CFG->dirroot = '/var/www/html/moodle';
//=========================================================================
// 4. DATA FILES LOCATION
//=========================================================================
// Now you need a place where Moodle can save uploaded files. This
// directory should be readable AND WRITEABLE by the web server user
// (usually 'nobody' or 'apache'), but it should not be accessible
// directly via the web.
//
// - On hosting systems you might need to make sure that your "group" has
// no permissions at all, but that "others" have full permissions.
//
// - On Windows systems you might specify something like 'C:\moodledata'
$CFG->dataroot = '/home/moodledata';
//=========================================================================
// 5. DATA FILES PERMISSIONS
//=========================================================================
// The following parameter sets the permissions of new directories
// created by Moodle within the data directory. The format is in
// octal format (as used by the Unix utility chmod, for example).
// The default is usually OK, but you may want to change it to 0750
// if you are concerned about world-access to the files (you will need
// to make sure the web server process (eg Apache) can access the files.
// NOTE: the prefixed 0 is important, and don't use quotes.
$CFG->directorypermissions = 0777;
//=========================================================================
// 6. DIRECTORY LOCATION (most people can just ignore this setting)
//=========================================================================
// A very few webhosts use /admin as a special URL for you to access a
// control panel or something. Unfortunately this conflicts with the
// standard location for the Moodle admin pages. You can fix this by
// renaming the admin directory in your installation, and putting that
// new name here. eg "moodleadmin". This will fix admin links in Moodle.
$CFG->admin = 'admin';
//=========================================================================
// ALL DONE! To continue installation, visit your main page with a browser
//=========================================================================
if (! @include_once("$CFG->dirroot/lib/setup.php")) { // Do not edit
if ($CFG->dirroot == dirname(__FILE__)) {
echo "<p>Could not find this file: $CFG->dirroot/lib/setup.php</p>";
echo "<p>Are you sure all your files have been uploaded?</p>";
} else {
echo "<p>Error detected in config.php</p>";
echo "<p>Error in: \$CFG->dirroot = '$CFG->dirroot';</p>";
echo "<p>Try this: \$CFG->dirroot = '".dirname(__FILE__)."';</p>";
}
die;
}
// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,
// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.
?>
+384
View File
@@ -0,0 +1,384 @@
<?PHP // $Id$
// Displays the top level category or all courses
// In editing mode, allows the admin to edit a category,
// and rearrange courses
require_once("../config.php");
require_once("lib.php");
require_variable($id); // Category id
optional_variable($page, "0"); // which page to show
optional_variable($perpage, "20"); // how many per page
if (!$site = get_site()) {
error("Site isn't defined!");
}
if (!$category = get_record("course_categories", "id", $id)) {
error("Category not known!");
}
if (iscreator()) {
if (isset($_GET['edit'])) {
if ($edit == "on") {
$USER->editing = true;
} else if ($edit == "off") {
$USER->editing = false;
}
}
$navbaritem = update_category_button($category->id);
$creatorediting = !empty($USER->editing);
$adminediting = (isadmin() and $creatorediting);
} else {
$navbaritem = print_course_search("", true, "navbar");
$adminediting = false;
}
if (isadmin()) {
/// Rename the category if requested
if (!empty($_POST['rename'])) {
$category->name = $_POST['rename'];
if (! set_field("course_categories", "name", $category->name, "id", $category->id)) {
notify("An error occurred while renaming the category");
}
}
/// Resort the category if requested
if (!empty($_GET['resort'])) {
fix_course_sortorder($category->id, "fullname ASC");
}
}
/// Print headings
$numcategories = count_records("course_categories");
$stradministration = get_string("administration");
$strcategories = get_string("categories");
$strcategory = get_string("category");
$strcourses = get_string("courses");
if ($creatorediting) {
if ($adminediting) {
print_header("$site->shortname: $category->name", "$site->fullname",
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> ".
"<a href=\"index.php\">$strcategories</a> -> $category->name",
"", "", true, $navbaritem);
} else {
print_header("$site->shortname: $category->name", "$site->fullname",
"<a href=\"index.php\">$strcourses</a> -> $category->name", "", "", true, $navbaritem);
}
} else {
print_header("$site->shortname: $category->name", "$site->fullname",
"<a href=\"index.php\">$strcourses</a> -> $category->name", "", "", true, $navbaritem);
}
/// Print the category selector
$displaylist = array();
$parentlist = array();
make_categories_list($displaylist, $parentlist, "");
echo "<table align=center><tr><td>";
popup_form("category.php?id=", $displaylist, "switchcategory", "$category->id", "", "", "", false);
echo "</td></tr></table><br />";
/// Editing functions
if ($adminediting) {
/// Move a specified course to a new category
if (isset($moveto) and $data = data_submitted()) { // Some courses are being moved
if (! $destcategory = get_record("course_categories", "id", $data->moveto)) {
error("Error finding the category");
}
unset($data->moveto);
unset($data->id);
if ($data) {
foreach ($data as $code => $junk) {
$courseid = substr($code, 1);
if (! $course = get_record("course", "id", $courseid)) {
notify("Error finding course $courseid");
} else {
if (!set_field("course", "category", $destcategory->id, "id", $course->id)) {
notify("An error occurred - course not moved!");
}
fix_course_sortorder($destcategory->id);
fix_course_sortorder($category->id);
$category = get_record("course_categories", "id", $category->id);
}
}
}
}
/// Hide or show a course
if (isset($hide) or isset($show)) {
if (isset($hide)) {
$course = get_record("course", "id", $hide);
$visible = 0;
} else {
$course = get_record("course", "id", $show);
$visible = 1;
}
if ($course) {
if (! set_field("course", "visible", $visible, "id", $course->id)) {
notify("Could not update that course!");
}
}
}
/// Move a course up or down
if (isset($moveup) or isset($movedown)) {
$movecourse = NULL;
$swapcourse = NULL;
$courses = get_courses($category->id);
if (isset($moveup)) {
if ($movecourse = get_record("course", "id", $moveup)) {
foreach ($courses as $course) {
if ($course->id == $movecourse->id) {
break;
}
$swapcourse = $course;
}
}
}
if (isset($movedown)) {
if ($movecourse = get_record("course", "id", $movedown)) {
$choosenext = false;
foreach ($courses as $course) {
if ($choosenext) {
$swapcourse = $course;
break;
}
if ($course->id == $movecourse->id) {
$choosenext = true;
}
}
}
}
if ($swapcourse and $movecourse) { // Renumber everything for robustness
$count=0;
foreach ($courses as $course) {
$count++;
if ($course->id == $swapcourse->id) {
$course = $movecourse;
} else if ($course->id == $movecourse->id) {
$course = $swapcourse;
}
if (! set_field("course", "sortorder", $count, "id", $course->id)) {
notify("Could not update that course!");
}
}
}
}
fix_course_sortorder($category->id);
} // End of editing stuff
/// Print out all the sub-categories
if ($subcategories = get_records("course_categories", "parent", $category->id)) {
echo "<table align=\"center\" border=0 cellspacing=2 cellpadding=4 class=\"generalbox\">";
echo "<tr><th>".get_string("subcategories")."</th></tr>";
echo "<tr><td nowrap>";
foreach ($subcategories as $subcategory) {
echo "<a href=\"category.php?id=$subcategory->id\">$subcategory->name</a><br />";
}
echo "</td></tr></table>";
echo "<br />";
}
/// Print out all the courses
if (!$courses = get_courses_page($category->id, "c.sortorder ASC", "c.*", $totalcount, $page*$perpage, $perpage)) {
print_heading(get_string("nocoursesyet"));
} else {
print_paging_bar($totalcount, $page, $perpage, "category.php?id=$category->id&perpage=$perpage&");
$strcourses = get_string("courses");
$strselect = get_string("select");
$stredit = get_string("edit");
$strdelete = get_string("delete");
$strbackup = get_string("backup");
$strrestore = get_string("restore");
$strmoveup = get_string("moveup");
$strmovedown = get_string("movedown");
$strupdate = get_string("update");
$strhide = get_string("hide");
$strshow = get_string("show");
$strassignteachers = get_string("assignteachers");
$strallowguests = get_string("allowguests");
$strrequireskey = get_string("requireskey");
if (empty($THEME->custompix)) {
$pixpath = "$CFG->wwwroot/pix";
} else {
$pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
}
echo "<form name=\"movecourses\" action=\"category.php\" method=\"post\">";
echo "<table align=\"center\" border=0 cellspacing=2 cellpadding=4 class=\"generalbox\"><tr>";
echo "<th>$strcourses</th>";
if ($creatorediting) {
echo "<th>$stredit</th>";
if ($adminediting) {
echo "<th>$strselect</th>";
}
} else {
echo "<th>&nbsp;</th>";
}
echo "</tr>";
$numcourses = count($courses);
$count = 0;
$abletomovecourses = false; // for now
foreach ($courses as $course) {
$count++;
$up = ($count == 1) ? false : true;
$down = ($count == $numcourses) ? false : true;
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
echo "<tr>";
echo "<td><a $linkcss href=\"view.php?id=$course->id\">$course->fullname</a></td>";
if ($creatorediting) {
if ($adminediting) {
echo "<td>";
echo "<a title=\"$strassignteachers\" href=\"$CFG->wwwroot/course/teacher.php?id=$course->id\"><img".
" src=\"$pixpath/t/user.gif\" height=11 width=11 border=0></a> ";
echo "<a title=\"$strdelete\" href=\"delete.php?id=$course->id\"><img".
" src=\"$pixpath/t/delete.gif\" height=11 width=11 border=0></a> ";
if (!empty($course->visible)) {
echo "<a title=\"$strhide\" href=\"category.php?id=$category->id&hide=$course->id\"><img".
" src=\"$pixpath/t/hide.gif\" height=11 width=11 border=0></a> ";
} else {
echo "<a title=\"$strshow\" href=\"category.php?id=$category->id&show=$course->id\"><img".
" src=\"$pixpath/t/show.gif\" height=11 width=11 border=0></a> ";
}
echo "<a title=\"$strbackup\" href=\"../backup/backup.php?id=$course->id\"><img".
" src=\"$pixpath/t/backup.gif\" height=11 width=11 border=0></a> ";
//Only showed if "backupdata" dir exists
if (is_dir("$CFG->dataroot/$course->id/backupdata")) {
echo "<a title=\"$strrestore\" href=\"../files/index.php?id=$course->id&wdir=/backupdata\"><img".
" src=\"$pixpath/t/restore.gif\" height=11 width=11 border=0></a> ";
} else {
echo "<img src=\"$CFG->wwwroot/pix/spacer.gif\" height=11 width=11 border=0></a> ";
}
if ($up) {
echo "<a title=\"$strmoveup\" href=\"category.php?id=$category->id&moveup=$course->id\"><img".
" src=\"$pixpath/t/up.gif\" height=11 width=11 border=0></a> ";
} else {
echo "<img src=\"$CFG->wwwroot/pix/spacer.gif\" height=11 width=11 border=0></a> ";
}
if ($down) {
echo "<a title=\"$strmovedown\" href=\"category.php?id=$category->id&movedown=$course->id\"><img".
" src=\"$pixpath/t/down.gif\" height=11 width=11 border=0></a> ";
} else {
echo "<img src=\"$CFG->wwwroot/pix/spacer.gif\" height=11 width=11 border=0></a> ";
}
echo "</td>";
echo "<td align=\"center\">";
echo "<input type=\"checkbox\" name=\"c$course->id\">";
$abletomovecourses = true;
} else if (isteacheredit($course->id)) {
echo "<td>";
echo "<a title=\"$strassignteachers\" href=\"$CFG->wwwroot/course/teacher.php?id=$course->id\"><img".
" src=\"$pixpath/t/user.gif\" height=11 width=11 border=0></a> ";
}
echo "</td>";
} else {
echo "<td>";
if ($course->summary) {
link_to_popup_window ("/course/info.php?id=$course->id", "courseinfo",
"<img alt=\"info\" height=16 width=16 border=0 src=\"$pixpath/i/info.gif\">",
400, 500, $strsummary);
echo "&nbsp;";
}
if ($course->guest ) {
echo "<a href=\"view.php?id=$course->id\"><img title=\"$strallowguests\" alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/user.gif\"></a>&nbsp;";
}
if ($course->password) {
echo "<a href=\"view.php?id=$course->id\"><img title=\"$strrequireskey\" alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/key.gif\"></a>";
}
echo "</td>";
}
echo "</tr>";
}
if ($abletomovecourses) {
echo "<tr><td colspan=3 align=right>";
echo "<br />";
unset($displaylist[$category->id]);
choose_from_menu ($displaylist, "moveto", "", get_string("moveselectedcoursesto"), "javascript:document.movecourses.submit()");
echo "<input type=\"hidden\" name=\"id\" value=\"$category->id\">";
echo "</td></tr>";
}
echo "</table>";
echo "</form>";
echo "<br />";
}
echo "<center>";
if (isadmin() and $numcourses > 1) { /// Print button to re-sort courses by name
unset($options);
$options["id"] = $category->id;
$options["resort"] = "name";
print_single_button("category.php", $options, get_string("resortcoursesbyname"), "get");
}
if (iscreator()) { /// Print button to create a new course
unset($options);
$options["category"] = $category->id;
print_single_button("edit.php", $options, get_string("addnewcourse"), "get");
echo "<br />";
}
if (isadmin()) { /// Print form to rename the category
$strrename= get_string("rename");
echo "<form name=\"renameform\" action=\"category.php\" method=\"post\">";
echo "<input type=\"hidden\" name=\"id\" value=\"$category->id\">";
echo "<input type=\"text\" size=30 name=\"rename\" value=\"$category->name\">";
echo "<input type=\"submit\" value=\"$strrename\">";
echo "</form>";
echo "<br />";
}
echo "</center>";
print_footer();
?>
+24 -86
View File
@@ -1,9 +1,9 @@
<?PHP // $Id$
// Admin-only code to delete a course utterly
require("../config.php");
require_once("../config.php");
optional_variable($id); // course id
require_variable($id); // course id
optional_variable($delete); // delete confirmation
require_login();
@@ -18,40 +18,28 @@
$strdeletecourse = get_string("deletecourse");
$stradministration = get_string("administration");
if (!$id) {
print_header("$site->fullname : $strdeletecourse", $site->fullname,
"<A HREF=\"$CFG->wwwroot/admin\">$stradministration</A> -> $strdeletecourse");
if ($courses = get_records_sql("SELECT * from course WHERE category > 0 ORDER BY fullname")) {
print_heading(get_string("choosecourse"));
print_simple_box_start("CENTER");
foreach ($courses as $course) {
echo "<A HREF=\"delete.php?id=$course->id\">$course->fullname</A><BR>";
}
print_simple_box_end();
} else {
print_heading(get_string("nocoursesyet"));
print_continue("$CFG->wwwroot/admin/");
}
print_footer();
exit;
}
$strcategories = get_string("categories");
if (! $course = get_record("course", "id", $id)) {
error("Course ID was incorrect (can't find it)");
}
$category = get_record("course_categories", "id", $course->category);
if (! $delete) {
$strdeletecheck = get_string("deletecheck", "", $course->shortname);
$strdeletecoursecheck = get_string("deletecoursecheck");
print_header("$site->fullname : $strdeletecheck", $site->fullname,
"<A HREF=\"$CFG->wwwroot/admin\">$stradministration</A> ->
<A HREF=\"delete.php\">$strdeletecourse</A> -> $strdeletecheck");
notice_yesno("$strdeletecoursecheck<BR><BR>$course->fullname",
print_header("$site->shortname: $strdeletecheck", $site->fullname,
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> ".
"<a href=\"index.php\">$strcategories</a> -> ".
"<a href=\"category.php?id=$course->category\">$category->name</a> -> ".
"$strdeletecheck");
notice_yesno("$strdeletecoursecheck<BR><BR>$course->fullname ($course->shortname)",
"delete.php?id=$course->id&delete=".md5($course->timemodified),
"delete.php");
"category.php?id=$course->category");
exit;
}
@@ -62,75 +50,25 @@
// OK checks done, delete the course now.
$strdeletingcourse = get_string("deletingcourse", "", $course->shortname);
print_header("$site->fullname : $strdeletingcourse", $site->fullname,
"<A HREF=\"$CFG->wwwroot/admin\">$stradministration</A> ->
<A HREF=\"delete.php\">$strdeletecourse</A> -> $strdeletingcourse");
print_header("$site->shortname: $strdeletingcourse", $site->fullname,
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> ".
"<a href=\"index.php\">$strcategories</a> -> ".
"<a href=\"category.php?id=$course->category\">$category->name</a> -> ".
"$strdeletingcourse");
print_heading($strdeletingcourse);
$strdeleted = get_string("deleted");
// First delete every instance of every module
if ($allmods = get_records_sql("SELECT * FROM modules") ) {
foreach ($allmods as $mod) {
$modname = $mod->name;
$modfile = "../mod/$modname/lib.php";
$moddelete = $modname."_delete_instance";
$count=0;
if (file_exists($modfile)) {
include_once($modfile);
if (function_exists($moddelete)) {
if ($instances = get_records($modname, "course", $course->id)) {
foreach ($instances as $instance) {
if ($moddelete($instance->id)) {
$count++;
} else {
notify("Could not delete $modname instance $instance->id ($instance->name)");
}
}
}
} else {
notify("Function $moddelete() doesn't exist!");
}
}
notify("$strdeleted $count instances of $modname");
}
} else {
error("No modules are installed!");
}
// Delete any user stuff
if (delete_records("user_students", "course", $course->id)) {
notify("$strdeleted student enrolments");
if (!remove_course_contents($course->id)) {
notify("An error occurred while deleting some of the course contents.");
}
if (delete_records("user_teachers", "course", $course->id)) {
notify("$strdeleted teachers");
}
// Delete logs
if (delete_records("log", "course", $course->id)) {
notify("$strdeleted logs");
}
// Delete any course stuff
if (delete_records("course_sections", "course", $course->id)) {
notify("$strdeleted course sections");
}
if (delete_records("course_modules", "course", $course->id)) {
notify("$strdeleted course modules");
}
if (delete_records("course", "id", $course->id)) {
notify("$strdeleted the main course record");
if (!delete_records("course", "id", $course->id)) {
notify("An error occurred while deleting the main course record.");
}
print_heading( get_string("deletedcourse", "", $course->shortname) );
print_continue("delete.php");
print_continue("category.php?id=$course->category");
print_footer();
+71 -26
View File
@@ -1,36 +1,58 @@
<FORM METHOD="post" action="edit.php" NAME="form">
<table cellpadding=9 cellspacing=0 >
<tr valign=top>
<td><P><? print_string("category") ?>:</td>
<td><?
$displaylist = array();
$parentlist = array();
make_categories_list($displaylist, $parentlist);
choose_from_menu($displaylist, "category", "$form->category", "");
helpbutton("coursecategory", get_string("category"));
?>
</td>
</tr>
<tr valign=top>
<td><P><? print_string("fullname") ?>:</td>
<td><input type="text" name="fullname" size=50 value="<? p($form->fullname) ?>">
<td><input type="text" name="fullname" maxlength="254" size=50 value="<? p($form->fullname) ?>">
<? helpbutton("coursefullname", get_string("fullname")) ?>
<? formerr($err["fullname"]) ?>
<? if (isset($err["fullname"])) formerr($err["fullname"]); ?>
</td>
</tr>
<tr valign=top>
<td><P><? print_string("shortname") ?>:</td>
<td><input type="text" name="shortname" size=10 value="<? p($form->shortname) ?>">
<td><input type="text" name="shortname" maxlength="15" size="10" value="<? p($form->shortname) ?>">
<? helpbutton("courseshortname", get_string("shortname")) ?>
<? formerr($err["shortname"]) ?>
<? if (isset($err["shortname"])) formerr($err["shortname"]); ?>
</td>
</tr>
<tr valign=top>
<td><P><? print_string("summary") ?>:</td>
<td><TEXTAREA NAME=summary COLS=50 ROWS=10 WRAP=virtual><? p($form->summary) ?></TEXTAREA>
<? helpbutton("text", get_string("helptext")) ?>
<? formerr($err["summary"]) ?>
<? if (isset($err["summary"])) formerr($err["summary"]); ?>
</td>
</tr>
<tr valign=top>
<td><P><? print_string("availability") ?>:</td>
<td><?
unset($choices);
$choices["0"] = get_string("courseavailablenot");
$choices["1"] = get_string("courseavailable");
choose_from_menu ($choices, "visible", $form->visible, "");
helpbutton("courseavailability", get_string("availability")); ?>
</td>
</tr>
<tr valign=top>
<td><P><? print_string("enrolmentkey") ?>:</td>
<td><input type="text" name="password" size=25 value="<? p($form->password) ?>">
<? helpbutton("enrolmentkey", get_string("enrolmentkey")) ?>
<? formerr($err["password"]) ?>
<? if (isset($err["password"])) formerr($err["password"]); ?>
</td>
</tr>
<tr valign=top>
<td><P><? print_string("opentoguests") ?>:</td>
<td><?
unset($choices);
$choices["0"] = get_string("guestsno");
$choices["1"] = get_string("guestsyes");
$choices["2"] = get_string("guestskey");
@@ -38,21 +60,11 @@
helpbutton("guestaccess", get_string("opentoguests")); ?>
</td>
</tr>
<tr valign=top>
<td><P><? print_string("category") ?>:</td>
<td><?
choose_from_menu ($form->categories, "category", "$form->category", "");
helpbutton("coursecategory", get_string("category"));
formerr($err["category"]);
?>
</td>
</tr>
<tr valign=top>
<td><P><? print_string("format") ?>:</td>
<td><?
choose_from_menu ($form->courseformats, "format", "$form->format", "");
helpbutton("courseformats", get_string("courseformats"));
formerr($err["format"]);
?>
</td>
</tr>
@@ -75,7 +87,6 @@
"10" => "10 $newsitems");
choose_from_menu ($options, "newsitems", "$form->newsitems", "");
helpbutton("coursenewsitems", get_string("newsitemsnumber"));
formerr($err["newsitems"]);
?>
</td>
</tr>
@@ -84,35 +95,69 @@
<td><?
print_date_selector("startday", "startmonth", "startyear", $form->startdate);
helpbutton("coursestartdate", get_string("startdate"));
formerr($err["startdate"]);
?></td>
</tr>
<tr valign=top>
<td><P><? print_string("numberweeks") ?>:</td>
<td><?
for ($i=1; $i<=20; $i++) {
for ($i=1; $i<=52; $i++) {
$sectionmenu[$i] = "$i";
}
choose_from_menu ($sectionmenu, "numsections", "$form->numsections");
choose_from_menu ($sectionmenu, "numsections", "$form->numsections", "");
helpbutton("coursenumsections", get_string("numberweeks"));
formerr($err["numsections"]);
?></td>
</tr>
<tr valign=top>
<td><P><? print_string("showrecent") ?>:</td>
<td><?
unset($choices);
$choices["0"] = get_string("no");
$choices["1"] = get_string("yes");
choose_from_menu ($choices, "showrecent", $form->showrecent, "");
helpbutton("courserecent", get_string("recentactivity")); ?>
</td>
</tr>
<tr valign=top>
<td><P><? print_string("showgrades") ?>:</td>
<td><?
unset($choices);
$choices["0"] = get_string("no");
$choices["1"] = get_string("yes");
choose_from_menu ($choices, "showgrades", $form->showgrades, "");
helpbutton("coursegrades", get_string("grades")); ?>
</td>
</tr>
<tr valign=top>
<td><P><? print_string("wordforteacher") ?>:</td>
<td><input type="text" name="teacher" size=25 value="<? p($form->teacher) ?>">
(<? print_string("wordforteachereg") ?>) <? formerr($err["teacher"]) ?>
<td><input type="text" name="teacher" maxlength="100" size=25 value="<? p($form->teacher) ?>">
(<? print_string("wordforteachereg") ?>)
<? if (isset($err["teacher"])) formerr($err["teacher"]); ?>
</td>
</tr>
<tr valign=top>
<td><P><? print_string("wordforteachers") ?>:</td>
<td><input type="text" name="teachers" maxlength="100" size=25 value="<? p($form->teachers) ?>">
(<? print_string("wordforteacherseg") ?>)
<? if (isset($err["teachers"])) formerr($err["teachers"]); ?>
</td>
</tr>
<tr valign=top>
<td><P><? print_string("wordforstudent") ?>:</td>
<td><input type="text" name="student" size=25 value="<? p($form->student) ?>">
(<? print_string("wordforstudenteg") ?>) <? formerr($err["student"]) ?>
<td><input type="text" name="student" maxlength="100" size=25 value="<? p($form->student) ?>">
(<? print_string("wordforstudenteg") ?>)
<? if (isset($err["student"])) formerr($err["student"]); ?>
</td>
</tr>
<tr valign=top>
<td><P><? print_string("wordforstudents") ?>:</td>
<td><input type="text" name="students" maxlength="100" size=25 value="<? p($form->students) ?>">
(<? print_string("wordforstudentseg") ?>)
<? if (isset($err["students"])) formerr($err["students"]); ?>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="<? print_string("savechanges") ?>"></td>
</TABLE>
<INPUT type="hidden" name="id" value="<?=$course->id ?>">
<INPUT type="hidden" name="id" value="<?=$form->id ?>">
</FORM>
+90 -31
View File
@@ -1,39 +1,41 @@
<?PHP // $Id$
// Edit course settings
require("../config.php");
require("lib.php");
require_once("../config.php");
require_once("lib.php");
optional_variable($id, 0); // course id
optional_variable($category, 0); // category id
require_login();
if ($id) {
if (! $course = get_record("course", "id", $id)) {
error("Course ID was incorrect");
}
require_login($course->id);
if (!isteacher($course->id)) {
error("Only teachers can edit the course!");
if (!isteacheredit($course->id)) {
error("You do not currently have editing privileges!");
}
} else { // Admin is creating a new course
require_login();
if (!isadmin()) {
error("Only administrators can use this page");
if (!iscreator()) {
error("You do not currently have course creation privileges!");
}
$course = NULL;
}
if (! $site = get_site()) {
redirect("$CFG->wwwroot/admin/");
redirect("$CFG->wwwroot/$CFG->admin/index.php");
}
/// If data submitted, then process and store.
if (match_referer() && isset($HTTP_POST_VARS)) {
$form = (object)$HTTP_POST_VARS;
if ($form = data_submitted()) {
$form->startdate = make_timestamp($form->startyear, $form->startmonth, $form->startday);
@@ -43,9 +45,10 @@
$form->timemodified = time();
if ($course) {
if (!empty($course)) {
if (update_record("course", $form)) {
add_to_log($course->id, "course", "update", "edit.php?id=$id", "");
fix_course_sortorder($form->category);
redirect("view.php?id=$course->id", get_string("changessaved"));
} else {
error("Serious Error! Could not update the course record! (id = $form->id)");
@@ -53,14 +56,36 @@
} else {
$form->timecreated = time();
if ($newid = insert_record("course", $form)) { // Set up new course
$section->course = $newid; // Create a default section.
if ($newcourseid = insert_record("course", $form)) { // Set up new course
$section = NULL;
$section->course = $newcourseid; // Create a default section.
$section->section = 0;
$section->timemodified = time();
$section->id = insert_record("course_sections", $section);
add_to_log($newid, "course", "new", "view.php?id=$newid", "");
redirect("teacher.php?id=$newid", get_string("changessaved"));
fix_course_sortorder($form->category);
add_to_log($newcourseid, "course", "new", "view.php?id=$newcourseid", "");
if (isadmin()) { // Redirect admin to add teachers
redirect("teacher.php?id=$newcourseid", get_string("changessaved"));
} else { // Add current teacher and send to course
$newteacher = NULL;
$newteacher->userid = $USER->id;
$newteacher->course = $newcourseid;
$newteacher->authority = 1; // First teacher is the main teacher
$newteacher->editall = 1; // Course creator can edit their own course
if (!$newteacher->id = insert_record("user_teachers", $newteacher)) {
error("Could not add you to this new course!");
}
$USER->teacher[$newcourseid] = true;
$USER->teacheredit[$newcourseid] = true;
redirect("view.php?id=$newcourseid", get_string("changessaved"));
}
} else {
error("Serious Error! Could not create the new course!");
}
@@ -76,24 +101,43 @@
/// Otherwise fill and print the form.
if (!$form) {
if ($course) {
if (empty($form)) {
if (!empty($course)) {
$form = $course;
} else {
$form->startdate = time() + 3600 * 24;
$form->fullname = get_string("defaultcoursefullname");
$form->shortname = get_string("defaultcourseshortname");
$form->teacher = get_string("defaultcourseteacher");
$form->student = get_string("defaultcoursestudent");
$form->summary = get_string("defaultcoursesummary");
$form->format = "weeks";
$form->password = "";
$form->guest = 0;
$form->numsections = 10;
$form->newsitems = 5;
$form->category = 1;
$form->showrecent = 1;
$form->category = $category;
$form->id = "";
$form->visible = 1;
if (current_language() == $CFG->lang) {
$form->teacher = $site->teacher;
$form->teachers = $site->teachers;
$form->student = $site->student;
$form->students = $site->students;
} else {
$form->teacher = get_string("defaultcourseteacher");
$form->teachers = get_string("defaultcourseteachers");
$form->student = get_string("defaultcoursestudent");
$form->students = get_string("defaultcoursestudents");
}
}
}
$form->categories = get_records_sql_menu("SELECT id,name FROM course_categories");
if (empty($focus)) {
$focus = "";
}
$form->categories = get_records_select_menu("course_categories", "", "name", "id,name");
$form->courseformats = array (
"weeks" => get_string("formatweeks"),
@@ -104,19 +148,20 @@
$streditcoursesettings = get_string("editcoursesettings");
$straddnewcourse = get_string("addnewcourse");
$stradministration = get_string("administration");
$strcategories = get_string("categories");
if (isset($course)) {
if (!empty($course)) {
print_header($streditcoursesettings, "$course->fullname",
"<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>
-> $streditcoursesettings", $focus);
} else {
print_header("$site->shortname : $straddnewcourse", "$site->fullname",
"<A HREF=\"$CFG->wwwroot/admin/\">$stradministration</A>
-> $straddnewcourse", $focus);
print_header("$site->shortname: $straddnewcourse", "$site->fullname",
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> ".
"<a href=\"index.php\">$strcategories</a> -> $straddnewcourse", $focus);
}
print_simple_box_start("center", "", "$THEME->cellheading");
print_heading($streditcoursesettings);
print_simple_box_start("center", "", "$THEME->cellheading");
include("edit.html");
print_simple_box_end();
@@ -134,6 +179,20 @@ function validate_form($course, &$form, &$err) {
if (empty($form->shortname))
$err["shortname"] = get_string("missingshortname");
if ($foundcourses = get_records("course", "shortname", $form->shortname)) {
if (!empty($course->id)) {
unset($foundcourses[$course->id]);
}
if (!empty($foundcourses)) {
foreach ($foundcourses as $foundcourse) {
$foundcoursenames[] = $foundcourse->fullname;
}
$foundcoursenamestring = addslashes(implode(',', $foundcoursenames));
$err["shortname"] = get_string("shortnametaken", "", $foundcoursenamestring);
}
}
if (empty($form->summary))
$err["summary"] = get_string("missingsummary");
+35 -11
View File
@@ -1,11 +1,35 @@
<BLOCKQUOTE>
<FORM name="form" method="post" action="editsection.php">
<P><B><? print_string("summaryof", "", "$sectionname $form->section") ?></B></P>
<TEXTAREA NAME=summary COLS=60 ROWS=4 WRAP=virtual><?=$form->summary ?></TEXTAREA>
<P>
<INPUT type="hidden" name=id value="<?=$form->id ?>">
<INPUT type="submit" value="<? print_string("savechanges") ?>">
<INPUT type="reset" value="<? print_string("revert") ?>">
</P>
</FORM>
</BLOCKQUOTE>
<center>
<form name="theform" method="post" <?php echo $onsubmit ?> action="editsection.php">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=top>
<p><b><?php print_string("summaryof", "", "$sectionname $form->section") ?></b></p>
</td>
<td align=top width=100>
&nbsp;
</td>
<td align=top>
<font size=-1>
<?php helpbutton("summaries", get_string("helpsummaries"), "moodle", true, true);
if ($usehtmleditor) {
helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
} else {
helpbutton("text", get_string("helptext"), "moodle", true, true);
}
?>
</font>
</td>
</tr></table>
<?php print_textarea($usehtmleditor, 4, 60, 660, 200, "summary", $form->summary); ?>
<p>
<input type="hidden" name=id value="<?php echo $form->id ?>">
<input type="submit" value="<?php print_string("savechanges") ?>">
<input type="reset" value="<?php print_string("revert") ?>">
</p>
</form>
</center>
<?php
if ($usehtmleditor) {
print_richedit_javascript("theform", "summary", "yes");
}
?>
+16 -8
View File
@@ -1,11 +1,13 @@
<?PHP // $Id$
// Edit the introduction of a section
require("../config.php");
require("lib.php");
require_once("../config.php");
require_once("lib.php");
require_variable($id); // Week ID
require_login();
if (! $section = get_record("course_sections", "id", $id)) {
error("Course section is incorrect");
}
@@ -14,8 +16,6 @@
error("Could not find the course!");
}
require_login($course->id);
if (!isteacher($course->id)) {
error("Only teachers can edit this!");
}
@@ -23,11 +23,11 @@
/// If data submitted, then process and store.
if (match_referer() && isset($HTTP_POST_VARS)) {
if ($form = data_submitted()) {
$timenow = time();
if (! set_field("course_sections", "summary", $summary, "id", $section->id)) {
if (! set_field("course_sections", "summary", $form->summary, "id", $section->id)) {
error("Could not update the summary!");
}
@@ -39,14 +39,22 @@
/// Otherwise fill and print the form.
if (! $form ) {
if (empty($form)) {
$form = $section;
}
if ($usehtmleditor = can_use_richtext_editor()) {
$onsubmit = "onsubmit=\"copyrichtext(theform.summary);\"";
} else {
$onsubmit = "";
}
$sectionname = get_string("name$course->format");
$stredit = get_string("edit", "", " $sectionname $section->section");
print_header($stredit, $stredit, "", "form.summary");
print_header("$course->shortname: $stredit", "$course->fullname",
"<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>
-> $stredit", "form.summary");
include("editsection.html");
+27 -24
View File
@@ -1,42 +1,45 @@
<CENTER>
<table cellpadding=20>
<tr valign=top>
<table cellpadding="20" align="center">
<tr valign="top">
<td>
<P ALIGN=CENTER>
<? if ($teacher) {
$teacher->fullname = "$teacher->firstname $teacher->lastname";
$teachername = "<A HREF=../user/view.php?id=$teacher->id&course=$site->id>$teacher->fullname</A>.";
<p align="center">
<?php
if ($teacher) {
$teachername = "<a href=\"../user/view.php?id=$teacher->id&course=$site->id\">".
"$teacher->firstname $teacher->lastname</a>.";
} else {
$teachername = get_string("yourteacher", "", strtolower($course->teacher));
}
print_string("enrolmentkeyfrom", "", $teachername);
?>
</P>
</p>
</td>
</tr>
<tr valign=top>
<td bgcolor="<?=$THEME->cellheading?>"> <CENTER><? formerr($errormsg) ?> </CENTER>
<tr valign=top>
<td class="generalbox" bgcolor="<?php p($THEME->cellheading)?>"><center><?php if (isset ($errormsg)) {formerr($errormsg);} ?></center>
<form name="form" method="post" action="enrol.php">
<table>
<tr>
<td width=50% align=right><P><? print_string("enrolmentkey") ?>:</P></td>
<td width=50% >
<input type="password" name="password" size=20 value="<? p($password) ?>" >
<input type="hidden" name="id" value="<? p($id) ?>" >
<tr>
<td width="50%" align="right"><p><?php print_string("enrolmentkey") ?>:</p></td>
<td width="50%">
<input type="password" name="password" size="20" value="<?php p($password) ?>" >
<input type="hidden" name="id" value="<?php p($id) ?>" >
</td>
<tr>
<td width=50%>&nbsp;</td>
<td width=50%>
<table cellpadding=1 cellspacing=0><tr>
<td><input type=submit value="<? print_string("login") ?>"></form></td>
<td><form action="<?=$CFG->wwwroot?>/" method=post>
<input type=submit value="<? print_string("cancel") ?>"></form></td>
</tr></table>
<tr>
<td width="50%">&nbsp;</td>
<td width="50%">
<table cellpadding="1" cellspacing="0" align="center">
<tr>
<td><input type="submit" value="<?php print_string("login") ?>">&nbsp;&nbsp;</form></td>
<td><form action="<?php p($CFG->wwwroot)?>/index.php" method=post>
<input type="submit" value="<?php print_string("cancel") ?>"></form></td>
</tr>
</table>
</td>
</table>
</td>
</tr>
</table>
+37 -26
View File
@@ -1,25 +1,27 @@
<?PHP // $Id$
// Asks for a course pass key, once only, and enrols that user
require("../config.php");
require("lib.php");
require_once("../config.php");
require_once("lib.php");
require_variable($id);
require_login();
require_variable($id);
if (! $course = get_record("course", "id", $id) ) {
error("That's an invalid course id");
}
if (match_referer() && isset($HTTP_POST_VARS)) { // form submitted
if ($form = data_submitted()) {
if ($password == $course->password) {
if ($form->password == $course->password) {
if (isguest()) {
add_to_log($course->id, "course", "guest", "view.php?id=$course->id", "$REMOTE_ADDR, $REMOTE_HOST");
add_to_log($course->id, "course", "guest", "view.php?id=$course->id", $_SERVER['REMOTE_ADDR']);
} else {
if (! enrol_student_in_course($USER->id, $course->id)) {
} else if (!record_exists("user_students", "userid", $USER->id, "course", $course->id)) {
if (! enrol_student($USER->id, $course->id)) {
error("An error occurred while trying to enrol you.");
}
@@ -38,12 +40,10 @@
}
$USER->student["$id"] = true;
save_session("USER");
if ($SESSION->wantsurl) {
$destination = $SESSION->wantsurl;
unset($SESSION->wantsurl);
save_session("SESSION");
} else {
$destination = "$CFG->wwwroot/course/view.php?id=$id";
}
@@ -55,42 +55,53 @@
}
}
$strloginto = get_string("loginto", "", $course->shortname);
$strcourses = get_string("courses");
if (! $site = get_site()) {
error("Could not find a site!");
}
if ($course->password == "") { // no password, so enrol
if (isguest()) {
add_to_log($course->id, "course", "guest", "view.php?id=$course->id", "$USER->id");
} else if (empty($confirm)) {
print_header($strloginto, $course->fullname, "<a href=\".\">$strcourses</a> -> $strloginto");
echo "<br />";
notice_yesno(get_string("enrolmentconfirmation"), "enrol.php?id=$course->id&confirm=1", $CFG->wwwroot);
print_footer();
exit;
} else {
if (! enrol_student_in_course($USER->id, $course->id)) {
if (! enrol_student($USER->id, $course->id)) {
error("An error occurred while trying to enrol you.");
}
add_to_log($course->id, "course", "enrol", "view.php?id=$course->id", "$USER->id");
}
$USER->student["$id"] = true;
save_session("USER");
$USER->student["$id"] = true;
if ($SESSION->wantsurl) {
$destination = $SESSION->wantsurl;
unset($SESSION->wantsurl);
save_session("SESSION");
} else {
$destination = "$CFG->wwwroot/course/view.php?id=$id";
if ($SESSION->wantsurl) {
$destination = $SESSION->wantsurl;
unset($SESSION->wantsurl);
} else {
$destination = "$CFG->wwwroot/course/view.php?id=$id";
}
redirect($destination);
}
redirect($destination);
}
$teacher = get_teacher($course->id);
if (!isset($password)) {
$password = "";
}
$strloginto = get_string("loginto", "", $course->shortname);
$strcourses = get_string("courses");
print_header($strloginto, $strloginto, "<A HREF=\".\">$strcourses</A> -> $strloginto", "form.password");
print_header($strloginto, $course->fullname, "<A HREF=\".\">$strcourses</A> -> $strloginto", "form.password");
print_course($course);
+80
View File
@@ -0,0 +1,80 @@
<?php // $Id$
// social.php - course format featuring social forum
// included from view.php
require_once("$CFG->dirroot/mod/forum/lib.php");
require_once("$CFG->dirroot/mod/resource/lib.php");
$leftwidth = 210;
?>
<table width="100%" border="0" cellspacing="5" cellpadding="5">
<tr>
<td width="<?php echo $leftwidth?>" valign="top">
<?php
$moddata[]="<a title=\"".get_string("listofallpeople")."\" href=\"../user/index.php?id=$course->id\">".get_string("participants")."</a>";
$modicon[]="<img src=\"$pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
$editmyprofile = "<a title=\"$USER->firstname $USER->lastname\" href=\"../user/edit.php?id=$USER->id&course=$course->id\">".
get_string("editmyprofile")."</A>";
if ($USER->description) {
$moddata[]= $editmyprofile;
} else {
$moddata[]= $editmyprofile." <blink>*</blink>";
}
$modicon[]="<img src=\"$pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
print_side_block(get_string("people"), "", $moddata, $modicon, "", $leftwidth);
/// Then, print all the available resources (Section 0)
print_section_block(get_string("activities"), $course, $sections[0],
$mods, $modnames, $modnamesused, true, "100%");
/// Print all the recent activity
// Print all the recent activity
if ($course->showrecent) {
print_side_block_start(get_string("recentactivity"), $leftwidth, "sideblockrecentactivity");
print_recent_activity($course);
print_side_block_end();
}
/// Print a form to search forums
$searchform = forum_print_search_form($course, "", true);
$searchform = "<div align=\"center\">$searchform</div>";
print_side_block(get_string("search","forum"), $searchform, "", "", "", $leftwidth);
/// Admin links and controls
print_course_admin_links($course);
/// My courses
print_courses_sideblock(0, "$leftwidth");
echo "</td>";
echo "<td width=\"*\" valign=\"top\">";
if ($social = forum_get_course_forum($course->id, "social")) {
if (forum_is_subscribed($USER->id, $social->id)) {
$subtext = get_string("unsubscribe", "forum");
} else {
$subtext = get_string("subscribe", "forum");
}
$headertext = "<table border=0 width=100% cellpadding=0 cellspacing=0><tr><td>".
get_string("socialheadline").
"</td><td align=right><font size=1>".
"<a href=\"../mod/forum/subscribe.php?id=$social->id\">$subtext</a></td>".
"</tr></table>";
print_heading_block($headertext);
echo "<img alt=\"\" height=7 src=\"../pix/spacer.gif\"><br>";
forum_print_latest_discussions($social->id, 10, "plain", "", false);
} else {
notify("Could not find or create a social forum here");
}
?>
</td>
</tr>
</table>
+312
View File
@@ -0,0 +1,312 @@
<?PHP // $Id$
// Display the whole course as "topics" made of of modules
// In fact, this is very similar to the "weeks" format, in that
// each "topic" is actually a week. The main difference is that
// the dates aren't printed - it's just an aesthetic thing for
// courses that aren't so rigidly defined by time.
// Included from "view.php"
require_once("$CFG->dirroot/mod/forum/lib.php");
if (isset($topic)) {
$displaysection = course_set_display($course->id, $topic);
} else {
if (isset($USER->display[$course->id])) { // for admins, mostly
$displaysection = $USER->display[$course->id];
} else {
$displaysection = course_set_display($course->id, 0);
}
}
if (isteacher($course->id) and isset($marker)) {
$course->marker = $marker;
if (! set_field("course", "marker", $marker, "id", $course->id)) {
error("Could not mark that topic for this course");
}
}
if ($course->newsitems) {
$news = forum_get_course_forum($course->id, "news");
}
$streditsummary = get_string("editsummary");
$stradd = get_string("add");
$stractivities = get_string("activities");
$strshowalltopics = get_string("showalltopics");
$strtopic = get_string("topic");
if (isediting($course->id)) {
$strstudents = moodle_strtolower($course->students);
$strtopichide = get_string("topichide", "", $strstudents);
$strtopicshow = get_string("topicshow", "", $strstudents);
$strmarkthistopic = get_string("markthistopic");
$strmarkedthistopic = get_string("markedthistopic");
$strmoveup = get_string("moveup");
$strmovedown = get_string("movedown");
}
/// Layout the whole page as three big columns.
echo "<table border=0 cellpadding=3 cellspacing=0 width=100%>";
/// The left column ...
echo "<tr valign=top><td valign=top width=180>";
/// Links to people
$moddata[]="<a title=\"".get_string("listofallpeople")."\" href=\"../user/index.php?id=$course->id\">".get_string("participants")."</a>";
$modicon[]="<img src=\"$pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
$editmyprofile = "<a title=\"$USER->firstname $USER->lastname\" href=\"../user/edit.php?id=$USER->id&course=$course->id\">".get_string("editmyprofile")."</a>";
if ($USER->description) {
$moddata[]= $editmyprofile;
} else {
$moddata[]= $editmyprofile." <blink>*</blink>";
}
$modicon[]="<img src=\"$pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
print_side_block(get_string("people"), "", $moddata, $modicon);
/// Links to all activity modules by type
$moddata = array();
$modicon = array();
if ($modnamesused) {
foreach ($modnamesused as $modname => $modfullname) {
$moddata[] = "<a href=\"../mod/$modname/index.php?id=$course->id\">".$modnamesplural[$modname]."</a>";
$modicon[] = "<img src=\"$modpixpath/$modname/icon.gif\" height=16 width=16 alt=\"\">";
}
}
print_side_block($stractivities, "", $moddata, $modicon);
/// Print a form to search forums
$searchform = forum_print_search_form($course, "", true);
$searchform = "<div align=\"center\">$searchform</div>";
print_side_block(get_string("search","forum"), $searchform);
/// Admin links and controls
print_course_admin_links($course);
/// My courses
print_courses_sideblock(0, "180");
/// Start main column
echo "</td><td width=\"*\">";
print_heading_block(get_string("topicoutline"), "100%", "outlineheadingblock");
print_spacer(8, 1, true);
echo "<table class=\"topicsoutline\" border=\"0\" cellpadding=\"8\" cellspacing=\"0\" width=\"100%\">";
/// If currently moving a file then show the current clipboard
if (ismoving($course->id)) {
$stractivityclipboard = get_string("activityclipboard", "", addslashes($USER->activitycopyname));
$strcancel= get_string("cancel");
echo "<tr>";
echo "<td colspan=3 valign=top bgcolor=\"$THEME->cellcontent\" class=\"topicoutlineclip\" width=\"100%\">";
echo "<p><font size=2>";
echo "$stractivityclipboard&nbsp;&nbsp;(<a href=\"mod.php?cancelcopy=true\">$strcancel</a>)";
echo "</font></p>";
echo "</td>";
echo "</tr>";
echo "<tr><td colspan=3><img src=\"../pix/spacer.gif\" width=1 height=1></td></tr>";
}
/// Print Section 0
$section = 0;
$thissection = $sections[$section];
if ($thissection->summary or $thissection->sequence or isediting($course->id)) {
echo "<tr>";
echo "<td nowrap bgcolor=\"$THEME->cellheading\" class=\"topicsoutlineside\" valign=top width=20>&nbsp;</td>";
echo "<td valign=top bgcolor=\"$THEME->cellcontent\" class=\"topicsoutlinecontent\" width=\"100%\">";
if (isediting($course->id)) {
$thissection->summary .= " <a title=\"$streditsummary\" ".
"href=\"editsection.php?id=$thissection->id\"><img src=\"$pixpath/t/edit.gif\" ".
"height=11 width=11 border=0 alt=\"$streditsummary\"></a></p>";
}
echo text_to_html($thissection->summary);
print_section($course, $thissection, $mods, $modnamesused);
if (isediting($course->id)) {
echo "<div align=right>";
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&amp;section=$section&add=",
$modnames, "section$section", "", "$stradd...", "mods", $stractivities);
echo "</div>";
}
echo "</td>";
echo "<td nowrap bgcolor=\"$THEME->cellheading\" class=\"topicsoutlineside\" valign=top align=center width=10>";
echo "&nbsp;</td></tr>";
echo "<tr><td colspan=3><img src=\"../pix/spacer.gif\" width=1 height=1></td></tr>";
}
/// Now all the normal modules by topic
/// Everything below uses "section" terminology - each "section" is a topic.
$timenow = time();
$section = 1;
$sectionmenu = array();
while ($section <= $course->numsections) {
if (!empty($displaysection) and $displaysection != $section) {
if (empty($sections[$section])) {
$strsummary = "";
} else {
$strsummary = " - ".strip_tags($sections[$section]->summary);
if (strlen($strsummary) < 57) {
$strsummary = " - $strsummary";
} else {
$strsummary = " - ".substr($strsummary, 0, 60)."...";
}
}
$sectionmenu["topic=$section"] = s("$section$strsummary");
$section++;
continue;
}
if (!empty($sections[$section])) {
$thissection = $sections[$section];
} else {
unset($thissection);
$thissection->course = $course->id; // Create a new section structure
$thissection->section = $section;
$thissection->summary = "";
$thissection->visible = 1;
if (!$thissection->id = insert_record("course_sections", $thissection)) {
notify("Error inserting new topic!");
}
}
$currenttopic = ($course->marker == $section);
if (!$thissection->visible) {
$colorsides = "bgcolor=\"$THEME->hidden\" class=\"topicsoutlinesidehidden\"";
$colormain = "bgcolor=\"$THEME->cellcontent\" class=\"topicsoutlinecontenthidden\"";
} else if ($currenttopic) {
$colorsides = "bgcolor=\"$THEME->cellheading2\" class=\"topicsoutlinesidehighlight\"";
$colormain = "bgcolor=\"$THEME->cellcontent\" class=\"topicsoutlinecontenthighlight\"";
} else {
$colorsides = "bgcolor=\"$THEME->cellheading\" class=\"topicsoutlineside\"";
$colormain = "bgcolor=\"$THEME->cellcontent\" class=\"topicsoutlinecontent\"";
}
echo "<tr>";
echo "<td nowrap $colorsides valign=top width=20>";
echo "<p align=center><font size=3><b>$section</b></font></p>";
echo "</td>";
if (!isteacher($course->id) and !$thissection->visible) { // Hidden for students
echo "<td valign=top align=center $colormain width=\"100%\">";
echo get_string("notavailable");
echo "</td>";
} else {
echo "<td valign=top $colormain width=\"100%\">";
if (isediting($course->id)) {
$thissection->summary .= " <a title=\"$streditsummary\" href=editsection.php?id=$thissection->id>".
"<img src=\"$pixpath/t/edit.gif\" border=0 height=11 width=11></a>";
}
echo text_to_html($thissection->summary);
print_section($course, $thissection, $mods, $modnamesused);
if (isediting($course->id)) {
echo "<div align=right>";
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&amp;section=$section&add=",
$modnames, "section$section", "", "$stradd...");
echo "</div>";
}
echo "</td>";
}
echo "<td nowrap $colorsides valign=top align=center width=10>";
echo "<font size=1>";
if ($displaysection == $section) { // Show the zoom boxes
echo "<a href=\"view.php?id=$course->id&topic=all\" title=\"$strshowalltopics\">".
"<img src=\"$pixpath/i/all.gif\" height=25 width=16 border=0></a><br />";
} else {
$strshowonlytopic = get_string("showonlytopic", "", $section);
echo "<a href=\"view.php?id=$course->id&topic=$section\" title=\"$strshowonlytopic\">".
"<img src=\"$pixpath/i/one.gif\" height=16 width=16 border=0></a><br />";
}
if (isediting($course->id)) {
if ($course->marker == $section) { // Show the "light globe" on/off
echo "<a href=\"view.php?id=$course->id&marker=0\" title=\"$strmarkedthistopic\">".
"<img src=\"$pixpath/i/marked.gif\" vspace=3 height=16 width=16 border=0></a><br />";
} else {
echo "<a href=\"view.php?id=$course->id&marker=$section\" title=\"$strmarkthistopic\">".
"<img src=\"$pixpath/i/marker.gif\" vspace=3 height=16 width=16 border=0></a><br />";
}
if ($thissection->visible) { // Show the hide/show eye
echo "<a href=\"view.php?id=$course->id&hide=$section\" title=\"$strtopichide\">".
"<img src=\"$pixpath/i/hide.gif\" vspace=3 height=16 width=16 border=0></a><br />";
} else {
echo "<a href=\"view.php?id=$course->id&show=$section\" title=\"$strtopicshow\">".
"<img src=\"$pixpath/i/show.gif\" vspace=3 height=16 width=16 border=0></a><br />";
}
if ($section > 1) { // Add a arrow to move section up
echo "<a href=\"view.php?id=$course->id&section=$section&move=-1\" title=\"$strmoveup\">".
"<img src=\"$pixpath/t/up.gif\" vspace=3 height=11 width=11 border=0></a><br />";
}
if ($section < $course->numsections) { // Add a arrow to move section down
echo "<a href=\"view.php?id=$course->id&section=$section&move=1\" title=\"$strmovedown\">".
"<img src=\"$pixpath/t/down.gif\" vspace=3 height=11 width=11 border=0></a><br />";
}
}
echo "</td>";
echo "</tr>";
echo "<tr><td colspan=3><img src=\"../pix/spacer.gif\" width=1 height=1></td></tr>";
$section++;
}
echo "</table>";
if (!empty($sectionmenu)) {
echo "<center>";
echo popup_form("$CFG->wwwroot/course/view.php?id=$course->id&", $sectionmenu,
"sectionmenu", "", get_string("jumpto"), "", "", true);
echo "</center>";
}
if ($news or $course->showrecent) {
echo "</td><td width=210>";
/// Print all the news items.
if ($news) {
print_side_block_start(get_string("latestnews"), 210, "sideblocklatestnews");
echo "<font size=\"-2\">";
forum_print_latest_discussions($news->id, $course->newsitems, "minimal", "", false);
echo "</font>";
print_side_block_end();
}
// Print all the recent activity
if ($course->showrecent) {
print_side_block_start(get_string("recentactivity"), 210, "sideblockrecentactivity");
print_recent_activity($course);
print_side_block_end();
}
print_spacer(1, 120, true);
}
echo "</td></tr></table>\n";
?>
+294
View File
@@ -0,0 +1,294 @@
<?PHP // $Id$
// Display the whole course as "weeks" made of of modules
// Included from "view.php"
require_once("$CFG->dirroot/mod/forum/lib.php");
if (isset($week)) {
$displaysection = course_set_display($course->id, $week);
} else {
if (isset($USER->display[$course->id])) {
$displaysection = $USER->display[$course->id];
} else {
$displaysection = course_set_display($course->id, 0);
}
}
if ($course->newsitems) {
$news = forum_get_course_forum($course->id, "news");
}
$streditsummary = get_string("editsummary");
$stradd = get_string("add");
$stractivities = get_string("activities");
$strshowallweeks = get_string("showallweeks");
$strweek = get_string("week");
if (isediting($course->id)) {
$strstudents = moodle_strtolower($course->students);
$strweekhide = get_string("weekhide", "", $strstudents);
$strweekshow = get_string("weekshow", "", $strstudents);
$strmoveup = get_string("moveup");
$strmovedown = get_string("movedown");
}
/// Layout the whole page as three big columns.
echo "<table border=0 cellpadding=3 cellspacing=0 width=100%>";
/// The left column ...
echo "<tr valign=top><td valign=top width=180>";
/// Links to people
$moddata[]="<a title=\"".get_string("listofallpeople")."\" href=\"../user/index.php?id=$course->id\">".get_string("participants")."</a>";
$modicon[]="<img src=\"$pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
$editmyprofile = "<a title=\"$USER->firstname $USER->lastname\" href=\"../user/edit.php?id=$USER->id&course=$course->id\">".get_string("editmyprofile")."</a>";
if ($USER->description) {
$moddata[]= $editmyprofile;
} else {
$moddata[]= $editmyprofile." <blink>*</blink>";
}
$modicon[]="<img src=\"$pixpath/i/user.gif\" height=16 width=16 alt=\"\">";
print_side_block(get_string("people"), "", $moddata, $modicon);
/// Then all the links to activities by type
$moddata = array();
$modicon = array();
if ($modnamesused) {
foreach ($modnamesused as $modname => $modfullname) {
$moddata[] = "<a href=\"../mod/$modname/index.php?id=$course->id\">".$modnamesplural[$modname]."</a>";
$modicon[] = "<img src=\"$modpixpath/$modname/icon.gif\" height=16 width=16 alt=\"\">";
}
}
print_side_block($stractivities, "", $moddata, $modicon);
/// Print a form to search forums
$searchform = forum_print_search_form($course, "", true);
$searchform = "<div align=\"center\">$searchform</div>";
print_side_block(get_string("search","forum"), $searchform);
/// Admin links and controls
print_course_admin_links($course);
/// My courses
print_courses_sideblock(0, "180");
/// Start main column
echo "</td><td width=\"*\">";
print_heading_block(get_string("weeklyoutline"), "100%", "outlineheadingblock");
print_spacer(8, 1, true);
echo "<table class=\"weeklyoutline\" border=\"0\" cellpadding=\"8\" cellspacing=\"0\" width=\"100%\">";
/// If currently moving a file then show the current clipboard
if (ismoving($course->id)) {
$stractivityclipboard = get_string("activityclipboard", "", addslashes($USER->activitycopyname));
$strcancel= get_string("cancel");
echo "<tr>";
echo "<td colspan=3 valign=top bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlineclip\" width=\"100%\">";
echo "<p><font size=2>";
echo "$stractivityclipboard&nbsp;&nbsp;(<a href=\"mod.php?cancelcopy=true\">$strcancel</a>)";
echo "</font></p>";
echo "</td>";
echo "</tr>";
echo "<tr><td colspan=3><img src=\"../pix/spacer.gif\" width=1 height=1></td></tr>";
}
/// Print Section 0 with general activities
$section = 0;
$thissection = $sections[$section];
if ($thissection->summary or $thissection->sequence or isediting($course->id)) {
echo "<tr>";
echo "<td nowrap bgcolor=\"$THEME->cellheading\" class=\"weeklyoutlineside\" valign=top width=20>&nbsp;</td>";
echo "<td valign=top bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlinecontent\" width=\"100%\">";
if (isediting($course->id)) {
$thissection->summary .= " <a title=\"$streditsummary\" ".
"href=\"editsection.php?id=$thissection->id\"><img height=11 width=11 src=\"$pixpath/t/edit.gif\" ".
"border=0 alt=\"$streditsummary\"></a></p>";
}
echo text_to_html($thissection->summary);
print_section($course, $thissection, $mods, $modnamesused);
if (isediting($course->id)) {
echo "<div align=right>";
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&amp;section=$section&add=",
$modnames, "section$section", "", "$stradd...", "mods", $stractivities);
echo "</div>";
}
echo "</td>";
echo "<td nowrap bgcolor=\"$THEME->cellheading\" class=\"weeklyoutlineside\" valign=top align=center width=10>";
echo "&nbsp;</td></tr>";
echo "<tr><td colspan=3><img src=\"../pix/spacer.gif\" width=1 height=1></td></tr>";
}
/// Now all the weekly sections
$timenow = time();
$weekdate = $course->startdate; // this should be 0:00 Monday of that week
$weekdate += 7200; // Add two hours to avoid possible DST problems
$section = 1;
$sectionmenu = array();
$weekofseconds = 604800;
$course->enddate = $course->startdate + ($weekofseconds * $course->numsections);
$strftimedateshort = " ".get_string("strftimedateshort");
while ($weekdate < $course->enddate) {
$nextweekdate = $weekdate + ($weekofseconds);
$weekday = userdate($weekdate, $strftimedateshort);
$endweekday = userdate($weekdate+518400, $strftimedateshort);
if (!empty($displaysection) and $displaysection != $section) { // Check this week is visible
$sectionmenu["week=$section"] = s("$strweek $section | $weekday - $endweekday");
$section++;
$weekdate = $nextweekdate;
continue;
}
if (!empty($sections[$section])) {
$thissection = $sections[$section];
} else {
unset($thissection);
$thissection->course = $course->id; // Create a new week structure
$thissection->section = $section;
$thissection->summary = "";
$thissection->visible = 1;
if (!$thissection->id = insert_record("course_sections", $thissection)) {
notify("Error inserting new week!");
}
}
$currentweek = (($weekdate <= $timenow) && ($timenow < $nextweekdate));
if (!$thissection->visible) {
$colorsides = "bgcolor=\"$THEME->hidden\" class=\"weeklyoutlinesidehidden\"";
$colormain = "bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlinecontenthidden\"";
} else if ($currentweek) {
$colorsides = "bgcolor=\"$THEME->cellheading2\" class=\"weeklyoutlinesidehighlight\"";
$colormain = "bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlinecontenthighlight\"";
} else {
$colorsides = "bgcolor=\"$THEME->cellheading\" class=\"weeklyoutlineside\"";
$colormain = "bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlinecontent\"";
}
echo "<tr>";
echo "<td nowrap $colorsides valign=top width=20>";
echo "<p align=center><font size=3><b>$section</b></font></p>";
echo "</td>";
echo "<td valign=top $colormain width=\"100%\">";
if (!isteacher($course->id) and !$thissection->visible) { // Hidden for students
echo "<p class=\"weeklydatetext\">$weekday - $endweekday ";
echo "(".get_string("notavailable").")";
echo "</p>";
echo "</td>";
} else {
echo "<p class=\"weeklydatetext\">$weekday - $endweekday</p>";
if (isediting($course->id)) {
$thissection->summary .= " <a title=\"$streditsummary\" href=\"editsection.php?id=$thissection->id\">".
"<img src=\"$pixpath/t/edit.gif\" height=11 width=11 border=0></a></p>";
}
echo text_to_html($thissection->summary);
print_section($course, $thissection, $mods, $modnamesused);
if (isediting($course->id)) {
echo "<div align=right>";
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&amp;section=$section&add=",
$modnames, "section$section", "", "$stradd...");
echo "</div>";
}
echo "</td>";
}
echo "<td nowrap $colorsides valign=top align=center width=10>";
echo "<font size=1>";
if ($displaysection == $section) {
echo "<a href=\"view.php?id=$course->id&week=all\" title=\"$strshowallweeks\">".
"<img src=\"$pixpath/i/all.gif\" height=25 width=16 border=0></a><br />";
} else {
$strshowonlyweek = get_string("showonlyweek", "", $section);
echo "<a href=\"view.php?id=$course->id&week=$section\" title=\"$strshowonlyweek\">".
"<img src=\"$pixpath/i/one.gif\" height=16 width=16 border=0></a><br />";
}
if (isediting($course->id)) {
if ($thissection->visible) { // Show the hide/show eye
echo "<a href=\"view.php?id=$course->id&hide=$section\" title=\"$strweekhide\">".
"<img src=\"$pixpath/i/hide.gif\" vspace=3 height=16 width=16 border=0></a><br />";
} else {
echo "<a href=\"view.php?id=$course->id&show=$section\" title=\"$strweekshow\">".
"<img src=\"$pixpath/i/show.gif\" vspace=3 height=16 width=16 border=0></a><br />";
}
if ($section > 1) { // Add a arrow to move section up
echo "<a href=\"view.php?id=$course->id&section=$section&move=-1\" title=\"$strmoveup\">".
"<img src=\"$pixpath/t/up.gif\" vspace=3 height=11 width=11 border=0></a><br />";
}
if ($section < $course->numsections) { // Add a arrow to move section down
echo "<a href=\"view.php?id=$course->id&section=$section&move=1\" title=\"$strmovedown\">".
"<img src=\"$pixpath/t/down.gif\" vspace=3 height=11 width=11 border=0></a><br />";
}
}
echo "</td>";
echo "</tr>";
echo "<tr><td colspan=3><img src=\"../pix/spacer.gif\" width=1 height=1></td></tr>";
$section++;
$weekdate = $nextweekdate;
}
echo "</table>";
if (!empty($sectionmenu)) {
echo "<center>";
echo popup_form("$CFG->wwwroot/course/view.php?id=$course->id&", $sectionmenu,
"sectionmenu", "", get_string("jumpto"), "", "", true);
echo "</center>";
}
if (!empty($news) or !empty($course->showrecent)) {
echo "</td><td width=210>";
// Print all the news items.
if (!empty($news)) {
print_side_block_start(get_string("latestnews"), 210, "sideblocklatestnews");
echo "<font size=\"-2\">";
forum_print_latest_discussions($news->id, $course->newsitems, "minimal", "", false);
echo "</font>";
print_side_block_end();
}
// Print all the recent activity
if (!empty($course->showrecent)) {
print_side_block_start(get_string("recentactivity"), 210, "sideblockrecentactivity");
print_recent_activity($course);
print_side_block_end();
}
print_spacer(1, 120, true);
}
echo "</td></tr></table>\n";
?>
+107
View File
@@ -0,0 +1,107 @@
<?PHP // $Id$
// Displays all grades for a student in a course
require_once("../config.php");
require_once("lib.php");
require_variable($id); // course id
if (! $course = get_record("course", "id", $id)) {
error("Course ID was incorrect");
}
require_login($course->id);
$strgrades = get_string("grades");
$strgrade = get_string("grade");
$strmax = get_string("maximumshort");
$stractivityreport = get_string("activityreport");
/// Get a list of all students
$columnhtml = array(); // Accumulate column html in this array.
$grades = array(); // Collect all grades in this array
$maxgrades = array(); // Collect all max grades in this array
$totalgrade = 0;
$totalmaxgrade = 0;
/// Collect modules data
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused);
/// Search through all the modules, pulling out grade data
$sections = get_all_sections($course->id); // Sort everything the same as the course
for ($i=0; $i<=$course->numsections; $i++) {
if (isset($sections[$i])) { // should always be true
$section = $sections[$i];
if (!empty($section->sequence)) {
$sectionmods = explode(",", $section->sequence);
foreach ($sectionmods as $sectionmod) {
$mod = $mods[$sectionmod];
if ($mod->visible) {
$instance = get_record("$mod->modname", "id", "$mod->instance");
$libfile = "$CFG->dirroot/mod/$mod->modname/lib.php";
if (file_exists($libfile)) {
require_once($libfile);
$gradefunction = $mod->modname."_grades";
if (function_exists($gradefunction)) { // Skip modules without grade function
if ($modgrades = $gradefunction($mod->instance)) {
$image = "<A HREF=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\"".
" TITLE=\"$mod->modfullname\">".
"<IMG BORDER=0 VALIGN=absmiddle SRC=\"../mod/$mod->modname/icon.gif\" ".
"HEIGHT=16 WIDTH=16 ALT=\"$mod->modfullname\"></A>";
$columnhtml[] = "$image ".
"<A HREF=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">".
"$instance->name".
"</A>";
if (empty($modgrades->grades[$USER->id])) {
$grades[] = "";
} else {
$grades[] = $modgrades->grades[$USER->id];
$totalgrade += (float)$modgrades->grades[$USER->id];
}
if (empty($modgrades->maxgrade)) {
$maxgrades[] = "";
} else {
$maxgrades[] = $modgrades->maxgrade;
$totalmaxgrade += $modgrades->maxgrade;
}
}
}
}
}
}
}
}
}
/// OK, we have all the data, now present it to the user
print_header("$course->shortname: $strgrades", "$course->fullname",
"<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>
-> $strgrades");
print_heading($strgrades);
$table->head = array( get_string("activity"), get_string("maximumgrade"), get_string("grade"));
$table->align = array("LEFT", "RIGHT", "RIGHT");
foreach ($grades as $key => $grade) {
$table->data[] = array($columnhtml[$key], $maxgrades[$key], $grade);
}
$table->data[] = array(get_string("total"), $totalmaxgrade, $totalgrade);
print_table($table);
print_continue("view.php?id=$course->id");
print_footer($course);
?>
+241
View File
@@ -0,0 +1,241 @@
<?PHP // $Id$
// Displays all grades for a course
require_once("../config.php");
require_once("lib.php");
require_once("../lib/psxlsgen.php");
require_variable($id); // course id
optional_variable($download, ""); // to download data
require_login();
if (! $course = get_record("course", "id", $id)) {
error("Course ID was incorrect");
}
if (!isteacher($course->id)) {
error("Only teachers can use this page!");
}
$strgrades = get_string("grades");
$strgrade = get_string("grade");
$strmax = get_string("maximumshort");
$stractivityreport = get_string("activityreport");
/// Get a list of all students
if (!$students = get_course_students($course->id, "u.lastname ASC")) {
print_header("$course->shortname: $strgrades", "$course->fullname",
"<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>
-> $strgrades");
print_heading(get_string("nostudentsyet"));
print_footer($course);
exit;
}
foreach ($students as $student) {
$grades[$student->id] = array(); // Collect all grades in this array
$gradeshtml[$student->id] = array(); // Collect all grades html formatted in this array
$totals[$student->id] = array(); // Collect all totals in this array
}
$columns = array(); // Accumulate column names in this array.
$columnhtml = array(); // Accumulate column html in this array.
/// Collect modules data
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused);
/// Search through all the modules, pulling out grade data
$sections = get_all_sections($course->id); // Sort everything the same as the course
for ($i=0; $i<=$course->numsections; $i++) {
if (isset($sections[$i])) { // should always be true
$section = $sections[$i];
if ($section->sequence) {
$sectionmods = explode(",", $section->sequence);
foreach ($sectionmods as $sectionmod) {
$mod = $mods[$sectionmod];
$instance = get_record("$mod->modname", "id", "$mod->instance");
$libfile = "$CFG->dirroot/mod/$mod->modname/lib.php";
if (file_exists($libfile)) {
require_once($libfile);
$gradefunction = $mod->modname."_grades";
if (function_exists($gradefunction)) { // Skip modules without grade function
if ($modgrades = $gradefunction($mod->instance)) {
if (!empty($modgrades->maxgrade)) {
if ($mod->visible) {
$maxgrade = "$strmax: $modgrades->maxgrade";
$maxgradehtml = "<BR>$strmax: $modgrades->maxgrade";
} else {
$maxgrade = "$strmax: $modgrades->maxgrade";
$maxgradehtml = "<BR><FONT class=\"dimmed_text\">$strmax: $modgrades->maxgrade</FONT>";
}
} else {
$maxgrade = "";
$maxgradehtml = "";
}
$image = "<A HREF=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\"".
" TITLE=\"$mod->modfullname\">".
"<IMG BORDER=0 VALIGN=absmiddle SRC=\"../mod/$mod->modname/icon.gif\" ".
"HEIGHT=16 WIDTH=16 ALT=\"$mod->modfullname\"></A>";
if ($mod->visible) {
$columnhtml[] = "$image ".
"<A HREF=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">".
"$instance->name".
"</A>$maxgradehtml";
} else {
$columnhtml[] = "$image ".
"<A CLASS=\"dimmed\" HREF=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">".
"$instance->name".
"</A>$maxgradehtml";
}
$columns[] = "$mod->modfullname: $instance->name - $maxgrade";
foreach ($students as $student) {
if (!empty($modgrades->grades[$student->id])) {
$grades[$student->id][] = $currentstudentgrade = $modgrades->grades[$student->id];
if ($mod->visible) {
$gradeshtml[$student->id][] = $modgrades->grades[$student->id];
} else {
$gradeshtml[$student->id][] = "<FONT class=\"dimmed_text\">".
$modgrades->grades[$student->id].
"</FONT>";
}
} else {
$grades[$student->id][] = $currentstudentgrade = "";
$gradeshtml[$student->id][] = "";
}
if (!empty($modgrades->maxgrade)) {
$totals[$student->id] = (float)($totals[$student->id]) + (float)($currentstudentgrade);
} else {
$totals[$student->id] = (float)($totals[$student->id]) + 0;
}
}
}
}
}
}
}
}
} // a new Moodle nesting record? ;-)
/// OK, we have all the data, now present it to the user
if ($download == "xls") {
$myxls = new PhpSimpleXlsGen();
$myxls->totalcol = count($columns) + 5;
/// Print names of all the fields
$myxls->ChangePos(0,0);
$myxls->InsertText(get_string("firstname"));
$myxls->InsertText(get_string("lastname"));
foreach ($columns as $column) {
$myxls->InsertText(strip_tags($column));
}
$myxls->InsertText(get_string("total"));
/// Print all the lines of data.
$i = 0;
foreach ($grades as $studentid => $studentgrades) {
$i++;
$student = $students[$studentid];
$myxls->ChangePos($i,0);
$myxls->InsertText($student->firstname);
$myxls->InsertText($student->lastname);
foreach ($studentgrades as $grade) {
$myxls->InsertText(strip_tags($grade));
}
$myxls->InsertNumber($totals[$student->id]);
}
$myxls->SendFileName("$course->shortname $strgrades");
exit;
} else if ($download == "txt") {
/// Print header to force download
header("Content-Type: application/download\n");
header("Content-Disposition: attachment; filename=\"$course->shortname $strgrades.txt\"");
/// Print names of all the fields
echo get_string("firstname")."\t".get_string("lastname");
foreach ($columns as $column) {
$column = strip_tags($column);
echo "\t$column";
}
echo "\t".get_string("total")."\n";
/// Print all the lines of data.
foreach ($grades as $studentid => $studentgrades) {
$student = $students[$studentid];
echo "$student->firstname\t$student->lastname";
foreach ($studentgrades as $grade) {
$grade = strip_tags($grade);
echo "\t$grade";
}
echo "\t".$totals[$student->id];
echo "\n";
}
exit;
} else { // Just print the web page
print_header("$course->shortname: $strgrades", "$course->fullname",
"<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A>
-> $strgrades");
print_heading($strgrades);
$table->head = array_merge(array ("", get_string("firstname"), get_string("lastname")), $columnhtml, get_string("total"));
$table->width = array(35, "");
$table->align = array("LEFT", "RIGHT", "LEFT");
foreach ($columns as $column) {
$table->width[] = "";
$table->align[] = "CENTER";
}
$table->width[] = "";
$table->align[] = "CENTER";
foreach ($students as $key => $student) {
$studentgrades = $gradeshtml[$student->id];
$picture = print_user_picture($student->id, $course->id, $student->picture, false, true);
$name = array ("$picture", "$student->firstname", "$student->lastname");
$total = array ($totals[$student->id]);
$table->data[] = array_merge($name, $studentgrades, $total);
}
print_table($table);
echo "<TABLE BORDER=0 ALIGN=CENTER><TR>";
echo "<TD>";
$options["id"] = "$course->id";
$options["download"] = "xls";
print_single_button("grades.php", $options, get_string("downloadexcel"));
echo "<TD>";
$options["download"] = "txt";
print_single_button("grades.php", $options, get_string("downloadtext"));
echo "</TABLE>";
print_footer($course);
}
?>
+368 -11
View File
@@ -1,23 +1,380 @@
<?PHP // $Id$
// Display list of all courses
// For most people, just lists the course categories
// Allows the admin to create, delete and rename course categories
require("../config.php");
require("lib.php");
require_once("../config.php");
require_once("lib.php");
$title = get_string("courses");
print_header($title, $title, $title, "");
if (!$site = get_site()) {
error("Site isn't defined!");
}
optional_variable($cat, 1);
if (isadmin()) {
if (isset($_GET['edit'])) {
if ($edit == "on") {
$USER->editing = true;
} else if ($edit == "off") {
$USER->editing = false;
}
}
}
echo "<TABLE WIDTH=80% ALIGN=CENTER><TR><TD>";
$adminediting = (isadmin() and !empty($USER->editing));
print_all_courses($cat);
echo "</TD></TR></TABLE>";
/// Unless it's an editing admin, just print the regular listing of courses/categories
if (!$adminediting) {
$countcategories = count_records("course_categories");
if ($countcategories > 1) {
$strcourses = get_string("courses");
print_header($strcourses, $strcourses, $strcourses, "", "", true, update_categories_button());
print_heading(get_string("categories"));
print_simple_box_start("center", "50%");
print_whole_category_list();
print_simple_box_end();
print_course_search();
} else {
$strfulllistofcourses = get_string("fulllistofcourses");
print_header("$site->shortname: $strfulllistofcourses", $strfulllistofcourses, $strfulllistofcourses);
print_courses(0, "80%");
}
if (iscreator()) { // Print link to create a new course
echo "<center><p>";
unset($options);
$option["category"] = $category->id;
print_single_button("edit.php", $options, get_string("addnewcourse"), "get");
echo "</p></center>";
}
print_footer();
exit;
}
/// From now on is all the admin functions
require_login();
if (!isadmin()) {
error("Only administrators can use this page!");
}
/// Print headings
$stradministration = get_string("administration");
$strcategories = get_string("categories");
$strcategory = get_string("category");
$strcourses = get_string("courses");
$stredit = get_string("edit");
$strdelete = get_string("delete");
$straction = get_string("action");
$straddnewcategory = get_string("addnewcategory");
print_header("$site->shortname: $strcategories", "$site->fullname",
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> $strcategories",
"addform.addcategory", "", true, update_categories_button());
print_heading($strcategories);
/// If data for a new category was submitted, then add it
if ($form = data_submitted()) {
if (!empty($form->addcategory)) {
unset($newcategory);
$newcategory->name = $form->addcategory;
$newcategory->sortorder = 999;
if (!insert_record("course_categories", $newcategory)) {
notify("Could not insert the new category '$newcategory->name'");
} else {
notify(get_string("categoryadded", "", $newcategory->name));
}
}
}
/// Delete a category if necessary
if (isset($delete)) {
if ($tempcat = get_record("course_categories", "id", $delete)) {
if (delete_records("course_categories", "id", $tempcat->id)) {
notify(get_string("categorydeleted", "", $tempcat->name));
}
if ($children = get_records("course_categories", "parent", $tempcat->id)) {
// Send the children to live with their grandparent
foreach ($children as $childcat) {
if (! set_field("course_categories", "parent", $tempcat->parent, "id", $childcat->id)) {
notify("Could not update a child category!");
}
}
}
}
}
/// Create a default category if necessary
if (!$categories = get_categories()) { /// No category yet!
// Try and make one
unset($tempcat);
$tempcat->name = get_string("miscellaneous");
if (!$tempcat->id = insert_record("course_categories", $tempcat)) {
error("Serious error: Could not create a default category!");
}
}
/// Move a category to a new parent if required
if (isset($move) and isset($moveto)) {
if ($tempcat = get_record("course_categories", "id", $move)) {
if ($tempcat->parent != $moveto) {
if (! set_field("course_categories", "parent", $moveto, "id", $tempcat->id)) {
notify("Could not update that category!");
}
}
}
}
/// Hide or show a category
if (isset($hide) or isset($show)) {
if (isset($hide)) {
$tempcat = get_record("course_categories", "id", $hide);
$visible = 0;
} else {
$tempcat = get_record("course_categories", "id", $show);
$visible = 1;
}
if ($tempcat) {
if (! set_field("course_categories", "visible", $visible, "id", $tempcat->id)) {
notify("Could not update that category!");
}
if (! set_field("course", "visible", $visible, "category", $tempcat->id)) {
notify("Could not hide/show any courses in this category !");
}
}
}
/// Move a category up or down
if (isset($moveup) or isset($movedown)) {
$swapcategory = NULL;
$movecategory = NULL;
if (isset($moveup)) {
if ($movecategory = get_record("course_categories", "id", $moveup)) {
$categories = get_categories("$movecategory->parent");
foreach ($categories as $category) {
if ($category->id == $movecategory->id) {
break;
}
$swapcategory = $category;
}
}
}
if (isset($movedown)) {
if ($movecategory = get_record("course_categories", "id", $movedown)) {
$categories = get_categories("$movecategory->parent");
$choosenext = false;
foreach ($categories as $category) {
if ($choosenext) {
$swapcategory = $category;
break;
}
if ($category->id == $movecategory->id) {
$choosenext = true;
}
}
}
}
if ($swapcategory and $movecategory) { // Renumber everything for robustness
$count=0;
foreach ($categories as $category) {
$count++;
if ($category->id == $swapcategory->id) {
$category = $movecategory;
} else if ($category->id == $movecategory->id) {
$category = $swapcategory;
}
if (! set_field("course_categories", "sortorder", $count, "id", $category->id)) {
notify("Could not update that category!");
}
}
}
}
/// Find the default category (the one with the lowest ID)
$categories = get_categories();
$default = 99999;
foreach ($categories as $category) {
fix_course_sortorder($category->id);
if ($category->id < $default) {
$default = $category->id;
}
}
/// Find any orphan courses that don't yet have a valid category and set to default
if ($courses = get_courses()) {
$foundorphans = false;
foreach ($courses as $course) {
if ($course->category and !isset($categories[$course->category])) {
set_field("course", "category", $default, "id", $course->id);
$foundorphans = true;
}
}
if ($foundorphans) {
fix_course_sortorder($default);
}
}
/// Print form for creating new categories
echo "<center>";
echo "<form name=\"addform\" action=\"index.php\" method=\"post\">";
echo "<input type=\"text\" size=30 name=\"addcategory\">";
echo "<input type=\"submit\" value=\"$straddnewcategory\">";
echo "</form>";
echo "</center>";
echo "<br />";
/// Print out the categories with all the knobs
$strcategories = get_string("categories");
$strcourses = get_string("courses");
$strmovecategoryto = get_string("movecategoryto");
$stredit = get_string("edit");
$displaylist = array();
$parentlist = array();
$displaylist[0] = get_string("top");
make_categories_list($displaylist, $parentlist, "");
echo "<table align=\"center\" border=0 cellspacing=2 cellpadding=5 class=\"generalbox\"><tr>";
echo "<th>$strcategories</th>";
echo "<th>$strcourses</th>";
echo "<th>$stredit</th>";
echo "<th>$strmovecategoryto</th>";
print_category_edit(NULL, $displaylist, $parentlist);
echo "</table>";
echo "<br />";
/// Print link to create a new course
echo "<center>";
unset($options);
$option["category"] = $category->id;
print_single_button("edit.php", $options, get_string("addnewcourse"), "get");
echo "<br />";
echo "</center>";
print_footer();
function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $up=false, $down=false) {
/// Recursive function to print all the categories ready for editing
global $THEME, $CFG;
static $str = '';
static $pixpath = '';
if (empty($str)) {
$str->delete = get_string("delete");
$str->moveup = get_string("moveup");
$str->movedown = get_string("movedown");
$str->edit = get_string("editthiscategory");
$str->hide = get_string("hide");
$str->show = get_string("show");
}
if (empty($pixpath)) {
if (empty($THEME->custompix)) {
$pixpath = "$CFG->wwwroot/pix";
} else {
$pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
}
}
if ($category) {
echo "<tr><td align=\"left\" nowrap=\"nowrap\" bgcolor=\"$THEME->cellcontent\">";
echo "<p>";
for ($i=0; $i<$depth;$i++) {
echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
}
$linkcss = $category->visible ? "" : " class=\"dimmed\" ";
echo "<a $linkcss title=\"$str->edit\" href=\"category.php?id=$category->id&edit=on\">$category->name</a>";
echo "</p>";
echo "</td>";
echo "<td align=\"right\">$category->coursecount</td>";
echo "<td nowrap=\"nowrap\">"; /// Print little icons
echo "<a title=\"$str->delete\" href=\"index.php?delete=$category->id\"><img".
" src=\"$pixpath/t/delete.gif\" height=11 width=11 border=0></a> ";
if (!empty($category->visible)) {
echo "<a title=\"$str->hide\" href=\"index.php?hide=$category->id\"><img".
" src=\"$pixpath/t/hide.gif\" height=11 width=11 border=0></a> ";
} else {
echo "<a title=\"$str->show\" href=\"index.php?show=$category->id\"><img".
" src=\"$pixpath/t/show.gif\" height=11 width=11 border=0></a> ";
}
if ($up) {
echo "<a title=\"$str->moveup\" href=\"index.php?moveup=$category->id\"><img".
" src=\"$pixpath/t/up.gif\" height=11 width=11 border=0></a> ";
}
if ($down) {
echo "<a title=\"$str->movedown\" href=\"index.php?movedown=$category->id\"><img".
" src=\"$pixpath/t/down.gif\" height=11 width=11 border=0></a> ";
}
echo "</td>";
echo "<td align=\"left\" width=\"0\">";
$tempdisplaylist = $displaylist;
unset($tempdisplaylist[$category->id]);
foreach ($parentslist as $key => $parents) {
if (in_array($category->id, $parents)) {
unset($tempdisplaylist[$key]);
}
}
popup_form ("index.php?move=$category->id&moveto=", $tempdisplaylist, "moveform$category->id", "$category->parent", "", "", "", false);
echo "</td>";
echo "</tr>";
} else {
$category->id = "0";
}
if ($categories = get_categories($category->id)) { // Print all the children recursively
$countcats = count($categories);
$count = 0;
$first = true;
$last = false;
foreach ($categories as $cat) {
$count++;
if ($count == $countcats) {
$last = true;
}
$up = $first ? false : true;
$down = $last ? false : true;
$first = false;
print_category_edit($cat, $displaylist, $parentslist, $depth+1, $up, $down);
}
}
}
?>
+73
View File
@@ -0,0 +1,73 @@
<?PHP // $Id$
/// Displays external information about a course
require_once("../config.php");
require_once("lib.php");
require_variable($id); // Course id
optional_variable($name);
if (!$id and !$name) {
error("Must specify course id or short name");
}
if ($name) {
if (! $course = get_record("course", "shortname", $name) ) {
error("That's an invalid short course name");
}
} else {
if (! $course = get_record("course", "id", $id) ) {
error("That's an invalid course id");
}
}
$site = get_site();
if (empty($THEME->custompix)) {
$pixpath = "$CFG->wwwroot/pix";
} else {
$pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
}
print_header(get_string("summaryof", "", $course->fullname));
echo "<h3 align=\"center\">$course->fullname<br />($course->shortname)</h3>";
echo "<center>";
if ($course->guest) {
$strallowguests = get_string("allowguests");
echo "<p><font size=1><img align=\"absmiddle\" alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/user.gif\"></a>&nbsp;$strallowguests</font></p>";
}
if ($course->password) {
$strrequireskey = get_string("requireskey");
echo "<p><font size=1><img align=\"absmiddle\" alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/key.gif\"></a>&nbsp;$strrequireskey</font></p>";
}
if ($teachers = get_course_teachers($course->id)) {
echo "<table align=center><tr><td nowrap>";
echo "<p><font size=\"1\">\n";
foreach ($teachers as $teacher) {
if ($teacher->authority > 0) {
if (!$teacher->role) {
$teacher->role = $course->teacher;
}
echo "$teacher->role: <a target=\"userinfo\" href=\"$CFG->wwwroot/user/view.php?id=$teacher->id&course=$site->id\">$teacher->firstname $teacher->lastname</a><br />";
}
}
echo "</font></p>";
echo "</td</tr></table>";
}
echo "<br />";
print_simple_box_start("center", "100%");
echo text_to_html($course->summary);
print_simple_box_end();
echo "<br />";
close_window_button();
?>
+1125 -381
View File
File diff suppressed because it is too large Load Diff
+28 -14
View File
@@ -1,14 +1,16 @@
<?PHP // $Id$
// Displays different views of the logs.
require("../config.php");
require("lib.php");
require_once("../config.php");
require_once("lib.php");
require_variable($id); // Course ID
optional_variable($user); // User to display
optional_variable($date); // Date to display
optional_variable($user, 0); // User to display
optional_variable($date, 0); // Date to display
optional_variable($page, "0"); // which page to show
optional_variable($perpage, "100"); // how many per page
require_login($id);
require_login();
if (! $course = get_record("course", "id", $id) ) {
error("That's an invalid course id");
@@ -22,13 +24,13 @@
if (!isadmin()) {
error("Only administrators can look at the site logs");
}
$user = "";
}
$strlogs = get_string("logs");
$stradministration = get_string("administration");
if ($user || $date) {
if (!empty($_GET['chooselog'])) {
$userinfo = get_string("allparticipants");
$dateinfo = get_string("alldays");
@@ -39,22 +41,34 @@
$userinfo = "$u->firstname $u->lastname";
}
if ($date) {
$dateinfo = userdate($date, "%A, %e %B %Y");
$dateinfo = userdate($date, get_string("strftimedaydate"));
}
print_header("$course->shortname: $strlogs", "$course->fullname",
"<A HREF=\"view.php?id=$course->id\">$course->shortname</A> ->
<A HREF=\"log.php?id=$course->id\">$strlogs</A> -> $userinfo, $dateinfo", "");
if ($course->category) {
print_header("$course->shortname: $strlogs", "$course->fullname",
"<A HREF=\"view.php?id=$course->id\">$course->shortname</A> ->
<A HREF=\"log.php?id=$course->id\">$strlogs</A> -> $userinfo, $dateinfo", "");
} else {
print_header("$course->shortname: $strlogs", "$course->fullname",
"<A HREF=\"../$CFG->admin/index.php\">$stradministration</A> ->
<A HREF=\"log.php?id=$course->id\">$strlogs</A> -> $userinfo, $dateinfo", "");
}
print_heading("$course->fullname: $userinfo, $dateinfo (".usertimezone().")");
print_log_selector_form($course, $user, $date);
print_log($course, $user, $date, "ORDER BY l.time DESC");
print_log($course, $user, $date, "l.time DESC", $page, $perpage,
"log.php?id=$course->id&chooselog=1&user=$user&date=$date");
} else {
print_header("$course->shortname: $strlogs", "$course->fullname",
"<A HREF=\"view.php?id=$course->id\">$course->shortname</A> -> $strlogs", "");
if ($course->category) {
print_header("$course->shortname: $strlogs", "$course->fullname",
"<A HREF=\"view.php?id=$course->id\">$course->shortname</A> -> $strlogs", "");
} else {
print_header("$course->shortname: $strlogs", "$course->fullname",
"<A HREF=\"../$CFG->admin/index.php\">$stradministration</A> -> $strlogs", "");
}
print_heading(get_string("chooselogs").":");
+74 -33
View File
@@ -1,9 +1,9 @@
<?PHP // $Id$
// Produces a graph of log accesses
require("../config.php");
require("lib.php");
require("$CFG->libdir/graphlib.php");
require_once("../config.php");
require_once("lib.php");
require_once("$CFG->libdir/graphlib.php");
require_variable($id); // Course ID
require_variable($type); // Graph Type
@@ -34,36 +34,63 @@
switch ($type) {
case "usercourse.png":
$COURSE_MAX_LOG_DISPLAY = $COURSE_MAX_LOG_DISPLAY * 3600 * 24; // seconds
if ($timenow - $course->startdate > $COURSE_MAX_LOG_DISPLAY) {
$course->startdate = $timenow - $COURSE_MAX_LOG_DISPLAY;
$site = get_site();
if ($course->id == $site->id) {
$courseselect = 0;
} else {
$courseselect = $course->id;
}
$timestart = usergetmidnight($course->startdate);
$maxseconds = COURSE_MAX_LOG_DISPLAY * 3600 * 24; // seconds
if ($timenow - $course->startdate > $maxseconds) {
$course->startdate = $timenow - $maxseconds;
}
$timestart = $coursestart = usergetmidnight($course->startdate);
if ((($timenow - $timestart)/86400.0) > 40) {
$reducedays = 7;
} else {
$reducedays = 0;
}
$i = 0;
while ($timestart < $timenow) {
$timefinish = $timestart + (3600 * 24);
if (! $logcount = get_record_sql("SELECT COUNT(*) as count FROM log
WHERE user = '$user->id' AND course = '$course->id'
AND `time` > '$timestart' AND `time` < '$timefinish'")) {
$logs[$i] = 0;
$timefinish = $timestart + 86400;
if ($reducedays) {
if ($i % $reducedays) {
$days[$i] = "";
} else {
$days[$i] = userdate($timestart, "%a %d %b");
}
} else {
$days[$i] = userdate($timestart, "%a %d %b");
}
$logs[$i] = $logcount->count;
$days[$i] = userdate($timestart, "%a %e %b");
$logs[$i] = 0;
$i++;
$timestart = $timefinish;
}
if ($rawlogs = get_logs_usercourse($user->id, $courseselect, $coursestart)) {
foreach ($rawlogs as $rawlog) {
$logs[$rawlog->day] = $rawlog->num;
}
}
$maxlogs = max($logs);
$graph = new graph(750, 400);
$graph->parameter['title'] = "Hits on $course->shortname by $user->firstname $user->lastname";
$a->coursename = $course->shortname;
$a->username = "$user->firstname $user->lastname";
$graph->parameter['title'] = get_string("hitsoncourse", "", $a);
$graph->x_data = $days;
$graph->y_data['logs'] = $logs;
$graph->y_format['logs'] = array('colour' => 'blue','bar' => 'fill','legend' =>'actual','bar_size' => 0.9);
$graph->y_label_left = "Hits";
$graph->y_format['logs'] = array('colour' => 'blue','line' => 'line');
$graph->y_label_left = get_string("hits");
$graph->label_size = "6";
$graph->y_order = array('logs');
@@ -71,41 +98,54 @@
$graph->parameter['shadow'] = 'none';
error_reporting(5); // ignore most warnings such as font problems etc
$graph->draw_stack();
break;
case "userday.png":
if ($date) {
$timestart = usergetmidnight($date);
$site = get_site();
if ($course->id == $site->id) {
$courseselect = 0;
} else {
$timestart = usergetmidnight(time());
$courseselect = $course->id;
}
while ($timestart < $timenow) {
$timefinish = $timestart + 3600;
if (! $logcount = get_record_sql("SELECT COUNT(*) as count FROM log
WHERE user = '$user->id' AND course = '$course->id'
AND `time` > '$timestart' AND `time` < '$timefinish'")) {
$logs[$i] = 0;
if ($date) {
$daystart = usergetmidnight($date);
} else {
$daystart = usergetmidnight(time());
}
$dayfinish = $daystart + 86400;
for ($i=0; $i<=23; $i++) {
$logs[$i] = 0;
$hour = $daystart + $i * 3600;
$hh = (int)userdate($hour, "%I");
$hours[$i] = userdate($hour, "$hh %p");
}
if ($rawlogs = get_logs_userday($user->id, $courseselect, $daystart)) {
foreach ($rawlogs as $rawlog) {
$logs[$rawlog->hour] = $rawlog->num;
}
$logs[$i] = $logcount->count;
$hh = (int)userdate($timestart, "%I");
$hours[$i] = userdate($timestart, "$hh %p");
$i++;
$timestart = $timefinish;
}
$maxlogs = max($logs);
$graph = new graph(750, 400);
$graph->parameter['title'] = "Today's hits on $course->shortname by $user->firstname $user->lastname";
$a->coursename = $course->shortname;
$a->username = "$user->firstname $user->lastname";
$graph->parameter['title'] = get_string("hitsoncoursetoday", "", $a);
$graph->x_data = $hours;
$graph->y_data['logs'] = $logs;
$graph->y_format['logs'] = array('colour' => 'blue','bar' => 'fill','legend' =>'actual','bar_size' => 0.9);
$graph->y_label_left = "Hits";
$graph->y_label_left = get_string("hits");
$graph->label_size = "6";
$graph->y_order = array('logs');
@@ -113,6 +153,7 @@
$graph->parameter['shadow'] = 'none';
error_reporting(5); // ignore most warnings such as font problems etc
$graph->draw_stack();
break;
+16 -5
View File
@@ -1,11 +1,12 @@
<?PHP // $Id$
// Allows a teacher/admin to login as another user (in stealth mode)
require("../config.php");
require("lib.php");
require_once("../config.php");
require_once("lib.php");
require_variable($id); // course id
require_variable($user); // login as this user
optional_variable($user); // login as this user
optional_variable($return); // return to being the real user again
if (! $course = get_record("course", "id", $id)) {
error("Course ID was incorrect");
@@ -13,11 +14,21 @@
require_login($course->id);
if ($return and $USER->realuser) {
$USER = get_user_info_from_db("id", $USER->realuser);
$USER->loggedin = true;
$USER->site = $CFG->wwwroot;
redirect($_SERVER["HTTP_REFERER"]);
exit;
}
// $user must be defined to go on
if (!isteacher($course->id)) {
error("Only teachers can use this page!");
}
if ($course->category and !isstudent($course->id, $user)) {
if ($course->category and !isstudent($course->id, $user) and !isadmin()) {
error("This student is not in this course!");
}
@@ -28,8 +39,8 @@
$USER = get_user_info_from_db("id", $user);
$USER->loggedin = true;
$USER->site = $CFG->wwwroot;
$USER->realuser = $teacher_id;
save_session("USER");
set_moodle_cookie($USER->username);
$student_name = "$USER->firstname $USER->lastname";
+9 -6
View File
@@ -1,10 +1,12 @@
<?PHP // $Id$
// Displays live view of recent logs
require("../config.php");
require("lib.php");
require_once("../config.php");
require_once("lib.php");
require_login($id);
require_variable($id);
require_login();
if (! $course = get_record("course", "id", $id) ) {
error("That's an invalid course id");
@@ -15,15 +17,16 @@
}
$strlivelogs = get_string("livelogs");
$strupdatesevery = get_string("updatesevery", "moodle", $COURSE_LIVELOG_REFRESH);
$strupdatesevery = get_string("updatesevery", "moodle", COURSE_LIVELOG_REFRESH);
print_header("$strlivelogs ($strupdatesevery)", "$strlivelogs", "", "",
"<META HTTP-EQUIV='Refresh' CONTENT='$COURSE_LIVELOG_REFRESH; URL=loglive.php?id=$id'>");
"<META HTTP-EQUIV='Refresh' CONTENT='".COURSE_LIVELOG_REFRESH."; URL=loglive.php?id=$id'>");
$user=0;
$date=time() - 3600;
print_log($course, $user, $date, "ORDER BY l.time DESC");
print_log($course, $user, $date, "l.time DESC", 0, 500,
"loglive.php?id=$course->id&user=$user&date=$date");
exit;
+219 -28
View File
@@ -5,18 +5,35 @@
require("../config.php");
require("lib.php");
if (isset($course) && isset($HTTP_POST_VARS)) { // add or update form submitted
$mod = (object)$HTTP_POST_VARS;
require_login();
require_login($mod->course);
if (isset($SESSION->modform)) { // Variables are stored in the session
$mod = $SESSION->modform;
unset($SESSION->modform);
} else {
$mod = (object)$_POST;
}
if (!isteacher($mod->course)) {
if (isset($cancel)) {
if (!empty($SESSION->returnpage)) {
$return = $SESSION->returnpage;
unset($SESSION->returnpage);
redirect($return);
} else {
redirect("view.php?id=$mod->course");
}
}
if (isset($_POST["course"])) { // add or update form submitted
if (!isteacheredit($mod->course)) {
error("You can't modify this course!");
}
$modlib = "../mod/$mod->modulename/lib.php";
if (file_exists($modlib)) {
include($modlib);
include_once($modlib);
} else {
error("This module is missing important code! ($modlib)");
}
@@ -29,7 +46,9 @@
if (! $updateinstancefunction($mod)) {
error("Could not update the $mod->modulename");
}
add_to_log($mod->course, "course", "update mod", "../mod/$mod->modulename/view.php?id=$mod->coursemodule", "$mod->modulename $mod->instance");
add_to_log($mod->course, "course", "update mod",
"../mod/$mod->modulename/view.php?id=$mod->coursemodule",
"$mod->modulename $mod->instance");
break;
case "add":
@@ -48,7 +67,9 @@
if (! set_field("course_modules", "section", $sectionid, "id", $mod->coursemodule)) {
error("Could not update the course module with the correct section");
}
add_to_log($mod->course, "course", "add mod", "../mod/$mod->modulename/view.php?id=$mod->coursemodule", "$mod->modulename $mod->instance");
add_to_log($mod->course, "course", "add mod",
"../mod/$mod->modulename/view.php?id=$mod->coursemodule",
"$mod->modulename $mod->instance");
break;
case "delete":
if (! $deleteinstancefunction($mod->instance)) {
@@ -60,17 +81,20 @@
if (! delete_mod_from_section($mod->coursemodule, "$mod->section")) {
notify("Could not delete the $mod->modulename from that section");
}
add_to_log($mod->course, "course", "delete mod", "view.php?id=$mod->course", "$mod->modulename $mod->instance");
add_to_log($mod->course, "course", "delete mod",
"view.php?id=$mod->course",
"$mod->modulename $mod->instance");
break;
default:
error("No mode defined");
}
if ($SESSION->returnpage) {
rebuild_course_cache($mod->course);
if (!empty($SESSION->returnpage)) {
$return = $SESSION->returnpage;
unset($SESSION->returnpage);
save_session("SESSION");
redirect($return);
} else {
redirect("view.php?id=$mod->course");
@@ -78,20 +102,167 @@
exit;
}
if (isset($return)) {
$SESSION->returnpage = $HTTP_REFERER;
save_session("SESSION");
}
if (isset($move)) {
require_variable($id);
move_module($id, $move);
if (! $cm = get_record("course_modules", "id", $id)) {
error("This course module doesn't exist");
}
redirect($HTTP_REFERER);
if (!isteacheredit($cm->course)) {
error("You can't modify this course!");
}
move_module($cm, $move);
rebuild_course_cache($cm->course);
$site = get_site();
if ($site->id == $cm->course) {
redirect($CFG->wwwroot);
} else {
redirect("view.php?id=$cm->course");
}
exit;
} else if (isset($movetosection) or isset($moveto)) {
if (! $cm = get_record("course_modules", "id", $USER->activitycopy)) {
error("The copied course module doesn't exist!");
}
if (isset($movetosection)) {
if (! $section = get_record("course_sections", "id", $movetosection)) {
error("This section doesn't exist");
}
$beforecm = NULL;
} else { // normal moveto
if (! $beforecm = get_record("course_modules", "id", $moveto)) {
error("The destination course module doesn't exist");
}
if (! $section = get_record("course_sections", "id", $beforecm->section)) {
error("This section doesn't exist");
}
}
if (!isteacheredit($section->course)) {
error("You can't modify this course!");
}
if (!ismoving($section->course)) {
error("You need to copy something first!");
}
moveto_module($cm, $section, $beforecm);
unset($USER->activitycopy);
unset($USER->activitycopycourse);
unset($USER->activitycopyname);
rebuild_course_cache($section->course);
$site = get_site();
if ($site->id == $section->course) {
redirect($CFG->wwwroot);
} else {
redirect("view.php?id=$section->course");
}
} else if (isset($hide)) {
if (! $cm = get_record("course_modules", "id", $hide)) {
error("This course module doesn't exist");
}
if (!isteacheredit($cm->course)) {
error("You can't modify this course!");
}
hide_course_module($cm->id);
rebuild_course_cache($cm->course);
$site = get_site();
if ($site->id == $cm->course) {
redirect($CFG->wwwroot);
} else {
redirect("view.php?id=$cm->course");
}
exit;
} else if (isset($show)) {
if (! $cm = get_record("course_modules", "id", $show)) {
error("This course module doesn't exist");
}
if (!isteacheredit($cm->course)) {
error("You can't modify this course!");
}
if (! $section = get_record("course_sections", "id", $cm->section)) {
error("This module doesn't exist");
}
if (! $module = get_record("modules", "id", $cm->module)) {
error("This module doesn't exist");
}
$site = get_site();
if ($module->visible and ($section->visible or ($site->id == $cm->course))) {
show_course_module($cm->id);
rebuild_course_cache($cm->course);
}
if ($site->id == $cm->course) {
redirect($CFG->wwwroot);
} else {
redirect("view.php?id=$cm->course");
}
exit;
} else if (isset($copy)) { // value = course module
if (! $cm = get_record("course_modules", "id", $copy)) {
error("This course module doesn't exist");
}
if (!isteacheredit($cm->course)) {
error("You can't modify this course!");
}
if (! $section = get_record("course_sections", "id", $cm->section)) {
error("This module doesn't exist");
}
if (! $module = get_record("modules", "id", $cm->module)) {
error("This module doesn't exist");
}
if (! $instance = get_record($module->name, "id", $cm->instance)) {
error("Could not find the instance of this module");
}
$USER->activitycopy = $copy;
$USER->activitycopycourse = $cm->course;
$USER->activitycopyname = $instance->name;
redirect("view.php?id=$cm->course");
} else if (isset($cancelcopy)) { // value = course module
$courseid = $USER->activitycopycourse;
unset($USER->activitycopy);
unset($USER->activitycopycourse);
unset($USER->activitycopyname);
redirect("view.php?id=$courseid");
} else if (isset($delete)) { // value = course module
if (! $cm = get_record("course_modules", "id", $delete)) {
@@ -102,9 +273,7 @@
error("This course doesn't exist");
}
require_login($course->id);
if (!isteacher($course->id)) {
if (!isteacheredit($course->id)) {
error("You can't modify this course!");
}
@@ -134,7 +303,18 @@
$form->fullmodulename = $fullmodulename;
$form->instancename = $instance->name;
include("mod_delete.html");
$strdeletecheck = get_string("deletecheck", "", "$form->fullmodulename");
$strdeletecheckfull = get_string("deletecheckfull", "", "$form->fullmodulename '$form->instancename'");
print_header("$course->shortname: $strdeletecheck", "$course->fullname",
"<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> ->
$strdeletecheck");
print_simple_box_start("center", "60%", "#FFAAAA", 20, "noticebox");
print_heading($strdeletecheckfull);
include_once("mod_delete.html");
print_simple_box_end();
print_footer($course);
exit;
@@ -149,6 +329,10 @@
error("This course doesn't exist");
}
if (!isteacheredit($course->id)) {
error("You can't modify this course!");
}
if (! $module = get_record("modules", "id", $cm->module)) {
error("This module doesn't exist");
}
@@ -161,6 +345,10 @@
error("This course section doesn't exist");
}
if (isset($return)) {
$SESSION->returnpage = "$CFG->wwwroot/mod/$module->name/view.php?id=$cm->id";
}
$form->coursemodule = $cm->id;
$form->section = $cm->section; // The section ID
$form->course = $course->id;
@@ -184,7 +372,7 @@
} else if (isset($add)) {
if (!$add) {
redirect($HTTP_REFERER);
redirect($_SERVER["HTTP_REFERER"]);
die;
}
@@ -203,7 +391,8 @@
$form->course = $course->id;
$form->module = $module->id;
$form->modulename = $module->name;
$form->instance = $cm->instance;
$form->instance = "";
$form->coursemodule = "";
$form->mode = "add";
$sectionname = get_string("name$course->format");
@@ -221,34 +410,36 @@
error("No action was specfied");
}
require_login($course->id);
if (!isteacher($course->id)) {
if (!isteacheredit($course->id)) {
error("You can't modify this course!");
}
$streditinga = get_string("editinga", "moodle", $fullmodulename);
$strmodulenameplural = get_string("modulenameplural", $module->name);
if ($course->category) {
print_header("$course->shortname: $streditinga", "$course->fullname",
"<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> ->
<A HREF=\"$CFG->wwwroot/mod/$module->name/index.php?id=$course->id\">$strmodulenameplural</A> ->
$streditinga", "form.name", "", false);
} else {
print_header("$course->shortname: $streditinga", "$course->fullname",
"$streditinga", "form.name", "", false);
}
unset($SESSION->modform); // Clear any old ones that may be hanging around.
$modform = "../mod/$module->name/mod.html";
if (file_exists($modform)) {
print_heading($pageheading);
print_heading_with_help($pageheading, "mods", $module->name);
print_simple_box_start("center", "", "$THEME->cellheading");
include($modform);
include_once($modform);
print_simple_box_end();
} else {
notice("This module cannot be added to this course yet!", "$CFG->wwwroot/course/view.php?id=$course->id");
notice("This module cannot be added to this course yet! (No file found at: $modform)", "$CFG->wwwroot/course/view.php?id=$course->id");
}
print_footer($course);
+9 -12
View File
@@ -1,16 +1,13 @@
<table align=center cellpadding=20> <tr> <td colspan=2 bgcolor=#ffaaaa>
<form name="form" method="post" action="<?php echo "$CFG->wwwroot/course/mod.php" ?>">
<CENTER>
<FORM name="form" method="post" action="<?=$ME ?>">
<? print_heading(get_string("deletecheckfull", "", "$form->fullmodulename '$form->instancename'")); ?>
<input type="hidden" name=mode value="delete">
<input type="hidden" name=section value="<? echo $form->section; ?>">
<input type="hidden" name=course value="<? p($form->course) ?>">
<input type="hidden" name=coursemodule value="<? p($form->coursemodule) ?>">
<input type="hidden" name=modulename value="<? p($form->modulename) ?>">
<input type="hidden" name=instance value="<? p($form->instance) ?>">
<input type="submit" value=" Yes "> <input type=button value=" No " onclick="javascript:history.go(-1);">
</FORM>
<input type="hidden" name=section value="<?php p($form->section) ?>">
<input type="hidden" name=course value="<?php p($form->course) ?>">
<input type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>">
<input type="hidden" name=modulename value="<?php p($form->modulename) ?>">
<input type="hidden" name=instance value="<?php p($form->instance) ?>">
</td></tr></table>
<input type="submit" value=" <?php print_string("yes")?> ">
<input type=button value=" <?php print_string("no")?> " onclick="javascript:history.go(-1);">
</form>
+101
View File
@@ -0,0 +1,101 @@
<?PHP // $Id$
// Display all recent activity in a flexible way
require_once("../config.php");
require_once("lib.php");
require_variable($id);
if (! $course = get_record("course", "id", $id) ) {
error("That's an invalid course id");
}
require_login($course->id);
add_to_log($course->id, "course", "recent", "recent.php?id=$course->id", "$course->id");
if (empty($THEME->custompix)) {
$pixpath = "../pix";
$modpixpath = "../mod";
} else {
$pixpath = "../theme/$CFG->theme/pix";
$modpixpath = "../theme/$CFG->theme/pix/mod";
}
$strrecentactivity = get_string("recentactivity");
$loggedinas = "<p class=\"logininfo\">".user_login_string($course, $USER)."</p>";
print_header("$course->fullname: $strrecentactivity", "$course->fullname",
"<a href=\"view.php?id=$course->id\">$course->shortname</a> -> $strrecentactivity",
"", "", true, "", $loggedinas);
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused);
print_heading("Since: Last Login | 1 day | 7 days | 14 days | 21 days | 30 days");
if (empty($days)) {
$timestart = $USER->lastlogin;
} else {
$timestart = time() - ($days * 3600 * 24);
}
print_heading(get_string("activitysince", "", userdate($timestart)));
$sections = get_all_sections($course->id);
for ($i=0; $i<=$course->numsections; $i++) {
if (isset($sections[$i])) { // should always be true
$section = $sections[$i];
if ($section->sequence) {
echo "<hr>";
echo "<h2>";
switch ($course->format) {
case "weeks": print_string("week"); break;
case "topics": print_string("topic"); break;
default: print_string("section"); break;
}
echo " $i</h2>";
echo "<ul>";
$sectionmods = explode(",", $section->sequence);
foreach ($sectionmods as $sectionmod) {
if (empty($mods[$sectionmod])) {
continue;
}
$mod = $mods[$sectionmod];
$instance = get_record("$mod->modname", "id", "$mod->instance");
$libfile = "$CFG->dirroot/mod/$mod->modname/lib.php";
if (file_exists($libfile)) {
require_once($libfile);
$print_recent_instance_activity = $mod->modname."_print_recent_instance_activity";
if (function_exists($print_recent_instance_activity)) {
$image = "<img src=\"$modpixpath/$mod->modname/icon.gif\" ".
"height=16 width=16 alt=\"$mod->modfullname\">";
echo "<h4>$image $mod->modfullname: ".
"<a href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">".
"$instance->name</a></h4>";
echo "<ul>";
$print_recent_instance_activity($instance, $timestart);
echo "</ul>";
}
}
}
echo "</ul>";
}
}
}
print_footer($course);
?>
+237
View File
@@ -0,0 +1,237 @@
<?PHP // $Id$
// Allows a creator to edit custom scales, and also display help about scales
require_once("../config.php");
require_once("lib.php");
require_variable($id); // course id
optional_variable($scaleid); // scale id
optional_variable($name); // scale name
optional_variable($description); // scale description
optional_variable($scale); // scale scale
optional_variable($delete); // scale id
if (! $course = get_record("course", "id", $id)) {
error("Course ID was incorrect");
}
require_login($course->id);
$strscale = get_string("scale");
$strscales = get_string("scales");
$strcustomscales = get_string("scalescustom");
$strstandardscales = get_string("scalesstandard");
$strname = get_string("name");
$strdescription = get_string("description");
$strsavechanges = get_string("savechanges");
$strchangessaved = get_string("changessaved");
$strdeleted = get_string("deleted");
$strdelete = get_string("delete");
if (isset($_GET['list'])) { /// Just list the scales (in a helpwindow)
print_header($strscales);
if (isset($_GET['scale'])) {
if ($scale = get_record("scale", "id", "$scale")) {
$scalemenu = make_menu_from_list($scale->scale);
print_simple_box_start("center");
print_heading($scale->name);
echo "<center>";
choose_from_menu($scalemenu, "", "", "");
echo "</center>";
echo text_to_html($scale->description);
print_simple_box_end();
}
echo "<br />";
close_window_button();
exit;
}
if ($scales = get_records("scale", "courseid", "$course->id", "name ASC")) {
print_heading($strcustomscales);
foreach ($scales as $scale) {
$scalemenu = make_menu_from_list($scale->scale);
print_simple_box_start("center");
print_heading($scale->name);
echo "<center>";
choose_from_menu($scalemenu, "", "", "");
echo "</center>";
echo text_to_html($scale->description);
print_simple_box_end();
echo "<hr />";
}
}
if ($scales = get_records("scale", "courseid", "0", "name ASC")) {
print_heading($strstandardscales);
foreach ($scales as $scale) {
$scalemenu = make_menu_from_list($scale->scale);
print_simple_box_start("center");
print_heading($scale->name);
echo "<center>";
choose_from_menu($scalemenu, "", "", "");
echo "</center>";
echo text_to_html($scale->description);
print_simple_box_end();
echo "<hr />";
}
}
close_window_button();
exit;
}
/// The rest is all about editing the scales
if (!isteacheredit($course->id)) {
error("Only editing teachers can modify scales !");
}
/// If scale data is being submitted, then save it and continue
$errors = NULL;
if ($form = data_submitted()) {
if (!empty($form->delete)) { /// Delete a scale
$scale = get_record("scale", "id", $scaleid);
if (delete_records("scale", "id", $scaleid)) {
$notify = "$scale->name: $strdeleted";
}
} else { /// Update scale data
if (empty($form->name)) {
$errors[$scaleid]->name = true;
$focus = "form$scaleid.save";
}
if (empty($form->scale)) {
$errors[$scaleid]->scale = true;
$focus = "form$scaleid.save";
}
if (!$errors) {
$newscale=NULL;
$newscale->name = $form->name;
$newscale->scale = $form->scale;
$newscale->description = $form->description;
$newscale->courseid = $course->id;
$newscale->userid = $USER->id;
$newscale->timemodified = time();
if (empty($scaleid)) {
if (!insert_record("scale", $newscale)) {
error("Could not insert the new scale!");
}
} else {
$newscale->id = $scaleid;
if (!update_record("scale", $newscale)) {
error("Could not update that scale!");
}
}
$notify = "$newscale->name: $strchangessaved";
$focus = "form$scaleid.save";
}
}
}
/// Print out the headers
print_header("$course->shortname: $strscales", "$course->fullname",
"<a href=\"view.php?id=$course->id\">$course->shortname</A>
-> $strscales", $focus);
print_heading_with_help($strcustomscales, "scales");
if (!empty($notify)) {
notify($notify, "green");
}
/// Otherwise print out all the scale forms
$customscales = get_records("scale", "courseid", "$course->id", "name ASC");
$blankscale->id = "";
$blankscale->name = "";
$blankscale->scale = "";
$blankscale->description = "";
$customscales[] = $blankscale;
foreach ($customscales as $scale) {
if (!empty($errors) and ($form->scaleid == $scale->id)) {
$scale->name = $form->name;
$scale->scale = $form->scale;
$scale->description = $form->description;
}
echo "<form method=\"post\" action=\"scales.php\" name=\"form$scale->id\">";
echo "<table cellpadding=9 cellspacing=0 align=center class=generalbox>";
echo "<tr valign=top>";
if (!empty($errors[$scale->id]->name)) {
$class = "class=\"highlight\"";
} else {
$class = "";
}
echo "<td align=\"right\"><p><b>$strname:</b></p></td>";
echo "<td $class><input type=\"text\" name=\"name\" size=\"50\" value=\"".s($scale->name)."\">";
echo "</td>";
echo "</tr>";
echo "<tr valign=top>";
if (!empty($errors[$scale->id]->scale)) {
$class = "class=\"highlight\"";
} else {
$class = "";
}
echo "<td align=\"right\"><p><b>$strscale:</b></p></td>";
echo "<td $class><textarea name=\"scale\" cols=50 rows=1 wrap=virtual>".s($scale->scale)."</textarea>";
echo "</td>";
echo "</tr>";
echo "<tr valign=top>";
echo "<td align=\"right\"><p><b>$strdescription:</b></p>";
helpbutton("text", get_string("helptext"));
echo "</td>";
echo "<td><textarea name=\"description\" cols=50 rows=8 wrap=virtual>".s($scale->description)."</textarea>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan=2 align=\"center\">";
echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\">";
echo "<input type=\"hidden\" name=\"scaleid\" value=\"$scale->id\">";
echo "<input type=\"submit\" name=\"save\" value=\"$strsavechanges\">";
if ($scale->id) {
echo "<input type=\"submit\" name=\"delete\" value=\"$strdelete\">";
}
echo "</td></tr></table>";
echo "</form>";
echo "<br />";
}
echo "<br /><hr noshade=\"noshade\" size=\"1\">";
if ($scales = get_records("scale", "courseid", "0", "name ASC")) {
print_heading($strstandardscales);
foreach ($scales as $scale) {
$scalemenu = make_menu_from_list($scale->scale);
print_simple_box_start("center");
print_heading($scale->name);
echo "<center>";
choose_from_menu($scalemenu, "", "", "");
echo "</center>";
echo text_to_html($scale->description);
print_simple_box_end();
echo "<hr />";
}
}
print_footer($course);
?>
+96
View File
@@ -0,0 +1,96 @@
<?PHP // $Id$
/// Displays external information about a course
require_once("../config.php");
require_once("lib.php");
optional_variable($search, ""); // search words
optional_variable($page, "0"); // which page to show
optional_variable($perpage, "10"); // how many per page
$search = trim(strip_tags($search));
if ($search) {
$searchterms = explode(" ", $search); // Search for words independently
foreach ($searchterms as $key => $searchterm) {
if (strlen($searchterm) < 2) {
unset($searchterms[$key]);
}
}
$search = trim(implode(" ", $searchterms));
}
$site = get_site();
if (empty($THEME->custompix)) {
$pixpath = "$CFG->wwwroot/pix";
} else {
$pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
}
$displaylist = array();
$parentlist = array();
make_categories_list($displaylist, $parentlist, "");
$strcourses = get_string("courses");
$strsearch = get_string("search");
$strsearchresults = get_string("searchresults");
$strcategory = get_string("category");
if (!$search) {
print_header("$site->fullname : $strsearch", $site->fullname,
"<a href=\"index.php\">$strcourses</a> -> $strsearch", "", "");
print_simple_box_start("center");
echo "<center>";
echo "<br />";
print_course_search("", false, "plain");
echo "<br /><p>";
print_string("searchhelp");
echo "</p>";
echo "</center>";
print_simple_box_end();
print_footer();
exit;
}
$searchform = print_course_search($search, true, "navbar");
print_header("$site->fullname : $strsearchresults", $site->fullname,
"<a href=\"index.php\">$strcourses</a> -> <a href=\"search.php\">$strsearch</a> -> '$search'", "", "", "", $searchform);
$lastcategory = -1;
if ($courses = get_courses_search($searchterms, "fullname ASC",
$page*$perpage, $perpage, $totalcount)) {
print_heading("$strsearchresults: $totalcount");
print_paging_bar($totalcount, $page, $perpage, "search.php?search=$search&perpage=$perpage&");
foreach ($courses as $course) {
$course->fullname = highlight("$search", $course->fullname);
$course->summary = highlight("$search", $course->summary);
$course->summary .= "<br /><p align=\"right\">";
$course->summary .= "$strcategory: <a href=\"category.php?id=$course->category\">";
$course->summary .= $displaylist[$course->category];
$course->summary .= "</a></p>";
print_course($course);
print_spacer(5,5);
}
print_paging_bar($totalcount, $page, $perpage, "search.php?search=$search&perpage=$perpage&");
} else {
print_heading(get_string("nocoursesfound", "", $search));
}
echo "<br /><br />";
print_course_search($search);
print_footer();
?>
-81
View File
@@ -1,81 +0,0 @@
<? // $Id$
// social.php - course format featuring social forum
// included from view.php
include("../mod/forum/lib.php");
include("../mod/reading/lib.php");
?>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="5" CELLPADDING="5">
<TR>
<TD WIDTH="15%" VALIGN="TOP">
<?
print_simple_box(get_string("people"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
$moddata[]="<A HREF=\"../user/index.php?id=$course->id\">".get_string("listofallpeople")."</A>";
$modicon[]="<IMG SRC=\"../user/users.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
$editmyprofile = "<A HREF=\"../user/view.php?id=$USER->id&course=$course->id\">".
get_string("editmyprofile")."</A>";
if ($USER->description) {
$moddata[]= $editmyprofile;
} else {
$moddata[]= $editmyprofile.$blinker;
}
$modicon[]="<IMG SRC=\"../user/user.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
print_side_block("", $moddata, "", $modicon);
// Then, print all the available resources (Section 0)
print_simple_box(get_string("resources"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
print_section($site->id, $sections[0], $mods, $modnamesused, true);
if (isediting($site->id)) {
echo "<DIV ALIGN=right>";
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&section=0&add=",
$modnames, "section0", "", get_string("add")."...");
echo "</DIV>";
}
// Print all the recent activity
print_simple_box(get_string("recentactivity"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
print_recent_activity($course);
echo "</TD></TR></TABLE>";
echo "<BR>";
// Print a form to search forums
print_simple_box(get_string("search","forum"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
echo "<DIV ALIGN=CENTER>";
forum_print_search_form($course);
echo "</DIV>";
// Admin links and controls
if (isteacher($course->id)) {
print_course_admin_links($course->id);
}
echo "</TD>";
echo "<TD WIDTH=\"55%\" VALIGN=\"TOP\">";
if ($social = forum_get_course_forum($course->id, "social")) {
if (forum_is_subscribed($USER->id, $social->id)) {
$subtext = get_string("unsubscribe", "forum");
} else {
$subtext = get_string("subscribe", "forum");
}
$headertext = "<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0><TR><TD>".get_string("socialheadline")."</TD><TD ALIGN=RIGHT><FONT SIZE=1><A HREF=\"../mod/forum/subscribe.php?id=$social->id\">$subtext</A></TD></TR></TABLE>";
print_simple_box("$headertext", $align="CENTER", $width="100%", $color="$THEME->cellheading");
echo "<IMG ALT=\"\" HEIGHT=7 SRC=\"../pix/spacer.gif\"><BR>";
forum_print_latest_discussions($social->id, 10, "plain", "DESC", false);
$SESSION->fromdiscussion = "$CFG->wwwroot/course/view.php?id=$course->id";
save_session("SESSION");
} else {
notify("Could not find or create a social forum here");
}
?>
</TD>
</TR>
</TABLE>
+149
View File
@@ -0,0 +1,149 @@
<?PHP // $Id$
// Script to assign students to courses
require_once("../config.php");
define("MAX_USERS_PER_PAGE", 50);
require_variable($id); // course id
optional_variable($add, "");
optional_variable($remove, "");
optional_variable($search, ""); // search string
if (! $site = get_site()) {
redirect("$CFG->wwwroot/$CFG->admin/index.php");
}
if (! $course = get_record("course", "id", $id)) {
error("Course ID was incorrect (can't find it)");
}
require_login($course->id);
if (!isteacher($course->id)) {
error("You must be a teacher in this course, or an admin");
}
$strassignstudents = get_string("assignstudents");
$strexistingstudents = get_string("existingstudents");
$strnoexistingstudents = get_string("noexistingstudents");
$strpotentialstudents = get_string("potentialstudents");
$strnopotentialstudents = get_string("nopotentialstudents");
$straddstudent = get_string("addstudent");
$strremovestudent = get_string("removestudent");
$strsearch = get_string("search");
$strsearchresults = get_string("searchresults");
$strsearchagain = get_string("searchagain");
$strtoomanytoshow = get_string("toomanytoshow");
$strstudents = get_string("students");
if ($search) {
$searchstring = $strsearchagain;
} else {
$searchstring = $strsearch;
}
if ($course->students != $strstudents) {
$parastudents = " ($course->students)";
} else {
$parastudents = "";
}
print_header("$course->shortname: $strassignstudents",
"$site->fullname",
"<a href=\"view.php?id=$course->id\">$course->shortname</a> -> $strassignstudents", "");
/// Add a student if one is specified
if (!empty($add)) {
if (! enrol_student($add, $course->id)) {
error("Could not add that student to this course!");
}
}
/// Remove a student if one is specified.
if (!empty($remove)) {
if (! unenrol_student($remove, $course->id)) {
error("Could not add that student to this course!");
}
}
/// Print a help notice about the need to use this page
if (empty($add) and empty($remove) and empty($search)) {
$note = get_string("assignstudentsnote");
if ($course->password) {
$note .= "<p>".get_string("assignstudentspass", "", "<a href=\"edit.php?id=$course->id\">$course->password</a>");
}
print_simple_box($note, "center", "50%");
}
/// Get all existing students for this course.
$students = get_course_students($course->id, "u.lastname ASC, u.firstname ASC");
/// Print the lists of existing and potential students
echo "<table cellpadding=1 cellspacing=5 align=center>";
echo "<tr><th width=50%>$strexistingstudents$parastudents</th><td>&nbsp;</td><th width=50%>$strpotentialstudents</th></tr>";
echo "<tr><td width=50% nowrap valign=top>";
/// First, show existing students for this course
if (empty($students)) {
echo "<p align=center>$strnoexistingstudents</a>";
$studentlist = "";
} else {
$studentarray = array();
foreach ($students as $student) {
$studentarray[] = $student->id;
echo "<p align=right>$student->firstname $student->lastname, $student->email &nbsp;&nbsp; <a href=\"student.php?id=$course->id&remove=$student->id\" title=\"$strremovestudent\"><img src=\"../pix/t/right.gif\" border=0></a></p>";
}
$studentlist = implode(",",$studentarray);
unset($studentarray);
}
echo "<td>&nbsp;</td>";
echo "<td width=50% nowrap valign=top>";
/// Print list of potential students
$usercount = get_users(false, $search, true, $studentlist, "lastname ASC, firstname ASC");
if ($usercount == 0) {
echo "<p align=center>$strnopotentialstudents</p>";
} else if ($usercount > MAX_USERS_PER_PAGE) {
echo "<p align=center>$strtoomanytoshow ($usercount) </p>";
} else {
if ($search) {
echo "<p align=center>($strsearchresults : $search)</p>";
}
if (!$users = get_users(true, $search, true, $studentlist)) {
error("Could not get users!");
}
foreach ($users as $user) {
echo "<p align=left><a href=\"{$_SERVER['PHP_SELF']}?id=$course->id&add=$user->id\"".
"title=\"$straddstudent\"><img src=\"../pix/t/left.gif\"".
"border=0></a>&nbsp;&nbsp;$user->firstname $user->lastname, $user->email";
}
}
if ($search or $usercount > MAX_USERS_PER_PAGE) {
echo "<form action={$_SERVER['PHP_SELF']} method=post>";
echo "<input type=hidden name=id value=\"$course->id\">";
echo "<input type=text name=search size=20>";
echo "<input type=submit value=\"$searchstring\">";
echo "</form>";
}
echo "</tr></table>";
print_footer();
?>
+171 -136
View File
@@ -1,189 +1,224 @@
<?PHP // $Id$
// Admin-only script to assign teachers to courses
require("../config.php");
require("../user/lib.php");
require_once("../config.php");
optional_variable($id); // course id
define("MAX_USERS_PER_PAGE", 50);
if (! $site = get_site()) {
redirect("$CFG->wwwroot/admin/");
}
require_variable($id); // course id
optional_variable($add, "");
optional_variable($remove, "");
optional_variable($search, ""); // search string
require_login();
if (!isadmin()) {
error("You must be an administrator to use this page.");
}
$strassignteachers = get_string("assignteachers");
$stradministration = get_string("administration");
if (!$id) {
print_header("$site->fullname: $strassignteachers", "$site->fullname",
"<A HREF=\"$CFG->wwwroot/admin\">$stradministration</A> -> $strassignteachers");
if ($courses = get_records_sql("SELECT * from course WHERE category > 0 ORDER BY fullname")) {
print_heading("Choose a course to add teachers to");
print_simple_box_start("CENTER");
foreach ($courses as $course) {
echo "<A HREF=\"teacher.php?id=$course->id\">$course->fullname</A><BR>";
}
print_simple_box_end();
} else {
print_heading(get_string("nocoursesyet"));
print_continue("$CFG->wwwroot/admin/");
}
print_footer();
exit;
}
if (! $course = get_record("course", "id", $id)) {
error("Course ID was incorrect (can't find it)");
}
if (!(isteacheredit($course->id) and iscreator()) and
!(isteacheredit($course->id) and !empty($CFG->teacherassignteachers) ) ) {
error("You must be an administrator or course creator to use this page.");
}
print_header("$site->fullname: $course->shortname: $strassignteachers",
"$site->fullname",
"<A HREF=\"$CFG->wwwroot/admin\">$stradministration</A> ->
<A HREF=\"teacher.php\">$strassignteachers</A> ->
$course->shortname", "");
print_heading("<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</A>");
$strassignteachers = get_string("assignteachers");
$strcourses = get_string("courses");
$strteachers = get_string("teachers");
$stradministration = get_string("administration");
$strexistingteachers = get_string("existingteachers");
$strnoexistingteachers = get_string("noexistingteachers");
$strpotentialteachers = get_string("potentialteachers");
$strnopotentialteachers = get_string("nopotentialteachers");
$straddteacher = get_string("addteacher");
$strremoveteacher = get_string("removeteacher");
$strsearch = get_string("search");
$strsearchresults = get_string("searchresults");
$strsearchagain = get_string("searchagain");
$strtoomanytoshow = get_string("toomanytoshow");
$strname = get_string("name");
$strorder = get_string("order");
$strrole = get_string("role");
$stredit = get_string("edit");
$stryes = get_string("yes");
$strno = get_string("no");
if ($search) {
$searchstring = $strsearchagain;
} else {
$searchstring = $strsearch;
}
if ($course->teachers != $strteachers) {
$parateachers = " ($course->teachers)";
} else {
$parateachers = "";
}
/// Get all existing teachers for this course.
$teachers = get_records_sql("SELECT u.*,t.authority,t.id as teachid FROM user u, user_teachers t
WHERE t.course = '$course->id'
AND t.user = u.id
ORDER BY t.authority ASC");
/// Add a teacher if one is specified
/// Print headers
if ($add) {
if (! $user = get_record("user", "id", $add)) {
error("That teacher (id = $add) doesn't exist", "teacher.php?id=$course->id");
}
print_header("$course->shortname: $strassignteachers",
"$course->fullname",
"<a href=\"index.php\">$strcourses</a> -> ".
"<a href=\"view.php?id=$course->id\">$course->shortname</a> -> ".
"$strassignteachers", "");
if ($teachers) {
foreach ($teachers as $tt) {
if ($tt->id == $user->id) {
error("That user is already a teacher for this course.", "teacher.php?id=$course->id");
}
/// If data submitted, then process and store.
if ($form = data_submitted()) {
$rank = array();
// Peel out all the data from variable names.
foreach ($form as $key => $val) {
if ($key <> "id") {
$type = substr($key,0,1);
$num = substr($key,1);
$rank[$num][$type] = $val;
}
}
$teacher->user = $user->id;
$teacher->course = $course->id;
if ($teachers) {
$teacher->authority = 2;
} else {
$teacher->authority = 1; // First teacher is the main teacher
foreach ($rank as $num => $vals) {
if (! $teacher = get_record("user_teachers", "course", "$course->id", "userid", "$num")) {
error("No such teacher in course $course->shortname with user id $num");
}
$teacher->role = $vals['r'];
$teacher->authority = $vals['a'];
$teacher->editall = $vals['e'];
if (!update_record("user_teachers", $teacher)) {
error("Could not update teacher entry id = $teacher->id");
}
}
$teacher->id = insert_record("user_teachers", $teacher);
if (! $teacher->id) {
redirect("teacher.php?id=$course->id", get_string("changessaved"));
}
/// Add a teacher if one is specified
if (!empty($_GET['add'])) {
if (! add_teacher($add, $course->id)) {
error("Could not add that teacher to this course!");
}
$user->authority = $teacher->authority;
$teachers[] = $user;
}
/// Remove a teacher if one is specified.
if ($remove) {
if (! $user = get_record("user", "id", $remove)) {
error("That teacher (id = $remove) doesn't exist", "teacher.php?id=$course->id");
if (!empty($_GET['remove'])) {
if (! remove_teacher($remove, $course->id)) {
error("Could not add that teacher to this course!");
}
if ($teachers) {
foreach ($teachers as $tt) {
if ($tt->id == $user->id) {
delete_records("user_teachers", "id", "$tt->teachid");
}
}
}
$teachers = get_records_sql("SELECT u.*,t.authority,t.id as teachid FROM user u, user_teachers t
WHERE t.course = '$course->id'
AND t.user = u.id
ORDER BY t.authority ASC");
}
/// Display all current teachers for this course.
$teachers = get_course_teachers($course->id);
/// Print the lists of existing and potential teachers
print_heading_with_help("$strexistingteachers $parateachers", "teachers");
echo "<TABLE CELLPADDING=2 CELLSPACING=10 ALIGN=CENTER>";
echo "<TR><TH WIDTH=50%>Existing Teachers</TH><TH WIDTH=50%>Potential Teachers</TH></TR>";
echo "<TR><TD WIDTH=50% NOWRAP VALIGN=TOP>";
/// First, show existing teachers for this course
if (! $teachers) {
echo "<P ALIGN=CENTER>No existing teachers</A>";
if (empty($teachers)) {
echo "<p align=center>$strnoexistingteachers</a>";
$teacherlist = "";
} else {
foreach ($teachers as $teacher) {
echo "<P ALIGN=right>$teacher->firstname $teacher->lastname, $teacher->email &nbsp;&nbsp; <A HREF=\"teacher.php?id=$course->id&remove=$teacher->id\" TITLE=\"Remove teacher\"><IMG SRC=\"../pix/t/right.gif\" BORDER=0></A></P>";
$table->head = array ("", $strname, $strorder, $strrole, $stredit, "&nbsp");
$table->align = array ("right", "left", "center", "center", "center", "center");
$table->size = array ("35", "", "", "", "10", "");
$ordermenu = NULL;
$ordermenu[0] = get_string("hide");
for ($i=1; $i<=8; $i++) {
$ordermenu[$i] = $i;
}
$editmenu = NULL;
$editmenu[0] = $strno;
$editmenu[1] = $stryes;
$teacherarray = array();
echo "<form action=teacher.php method=post>";
foreach ($teachers as $teacher) {
$teacherarray[] = $teacher->id;
$picture = print_user_picture($teacher->id, $course->id, $teacher->picture, false, true);
$authority = choose_from_menu ($ordermenu, "a$teacher->id", $teacher->authority, "", "", "", true);
if ($USER->id == $teacher->id) {
$editall = "<input name=\"e$teacher->id\" type=\"hidden\" value=\"1\">$stryes";
} else {
$editall = choose_from_menu ($editmenu, "e$teacher->id", $teacher->editall, "", "", "", true);
}
$removelink = "<a href=\"teacher.php?id=$course->id&remove=$teacher->id\">$strremoveteacher</a>";
if (!$teacher->role) {
$teacher->role = $course->teacher;
}
$table->data[] = array ($picture, "$teacher->firstname $teacher->lastname", $authority,
"<input type=text name=\"r$teacher->id\" value=\"$teacher->role\" size=30>",
$editall, $removelink);
}
$teacherlist = implode(",",$teacherarray);
unset($teacherarray);
print_table($table);
echo "<input type=hidden name=id value=\"$course->id\">";
echo "<center><input type=submit value=\"".get_string("savechanges")."\"> ";
echo "</center>";
echo "</form>";
echo "<br />";
}
echo "<TD WIDTH=50% NOWRAP VALIGN=TOP>";
/// Print list of potential teachers
if ($search) {
$users = get_records_sql("SELECT * from user WHERE confirmed = 1
AND (firstname LIKE '%$search%' OR
lastname LIKE '%$search%' OR
email LIKE '%$search%')
AND username <> 'guest'");
} else {
$users = get_records_sql("SELECT * from user WHERE confirmed = 1
AND username <> 'guest'");
}
print_heading("$strpotentialteachers $parateachers");
if ($users) {
foreach ($users as $user) { // Remove users who are already teachers
if ($teachers) {
foreach ($teachers as $teacher) {
if ($teacher->id == $user->id) {
continue 2;
}
}
}
$potential[] = $user;
}
}
$usercount = get_users(false, $search, true, $teacherlist);
if (! $potential) {
echo "<P ALIGN=CENTER>No potential teachers</A>";
if ($search) {
echo "<FORM ACTION=teacher.php METHOD=GET>";
echo "<INPUT TYPE=hidden NAME=id VALUE=\"$course->id\">";
echo "<INPUT TYPE=text NAME=search SIZE=20>";
echo "<INPUT TYPE=submit VALUE=\"Search again\">";
echo "</FORM>";
}
if ($usercount == 0) {
echo "<p align=center>$strnopotentialteachers</p>";
} else if ($usercount > MAX_USERS_PER_PAGE) {
echo "<p align=center>$strtoomanytoshow ($usercount) </p>";
} else {
if ($search) {
echo "<P ALIGN=CENTER>(Search results)</P>";
echo "<p align=center>($strsearchresults : $search)</p>";
}
if (count($potential) <= 20) {
foreach ($potential as $user) {
echo "<P ALIGN=LEFT><A HREF=\"teacher.php?id=$course->id&add=$user->id\" TITLE=\"Add teacher\"><IMG SRC=\"../pix/t/left.gif\" BORDER=0></A>&nbsp;&nbsp;$user->firstname $user->lastname, $user->email";
}
} else {
echo "<P ALIGN=CENTER>There are too many users to show.<BR>";
echo "Enter a search word here.";
echo "<FORM ACTION=teacher.php METHOD=GET>";
echo "<INPUT TYPE=hidden NAME=id VALUE=\"$course->id\">";
echo "<INPUT TYPE=text NAME=search SIZE=20>";
echo "<INPUT TYPE=submit VALUE=Search>";
echo "</FORM>";
if (!$users = get_users(true, $search, true, $teacherlist)) {
error("Could not get users!");
}
unset($table);
$table->head = array ("", get_string("name"), get_string("email"), "");
$table->align = array ("right", "left", "center", "center");
$table->size = array ("35", "", "", "");
foreach ($users as $user) {
$addlink = "<a href=\"teacher.php?id=$course->id&add=$user->id\">$straddteacher</a>";
$picture = print_user_picture($user->id, $course->id, $user->picture, false, true);
$table->data[] = array ($picture, "$user->firstname $user->lastname", $user->email, $addlink);
}
print_table($table);
}
echo "</TR></TABLE>";
if ($search or $usercount > MAX_USERS_PER_PAGE) {
echo "<center>";
echo "<form action=teacher.php method=get>";
echo "<input type=hidden name=id value=\"$course->id\">";
echo "<input type=text name=search size=20>";
echo "<input type=submit value=\"$searchstring\">";
echo "</form>";
echo "</center>";
}
echo "</td></tr></table>";
print_footer();
-195
View File
@@ -1,195 +0,0 @@
<?PHP // $Id$
// Display the whole course as "topics" made of of modules
// In fact, this is very similar to the "weeks" format, in that
// each "topic" is actually a week. The main difference is that
// the dates aren't printed - it's just an aesthetic thing for
// courses that aren't so rigidly defined by time.
// Included from "view.php"
include("../mod/forum/lib.php");
if (! $sections = get_all_sections($course->id) ) {
$section->course = $course->id; // Create a default section.
$section->section = 0;
$section->id = insert_record("course_sections", $section);
if (! $sections = get_all_sections($course->id) ) {
error("Error finding or creating section structures for this course");
}
}
if (isset($topic)) {
if ($topic == "all") {
unset($USER->topic);
} else {
$USER->topic = $topic;
}
save_session("USER");
}
if (isteacher($course->id) and isset($marker)) {
$course->marker = $marker;
if (! set_field("course", "marker", $marker, "id", $course->id)) {
error("Could not mark that topic for this course");
}
}
// Layout the whole page as three big columns.
echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>";
echo "<TR VALIGN=top><TD VALIGN=top WIDTH=180>";
// Layout the left column
// Links to people
$blinker = " <BLINK>*</BLINK>";
print_simple_box(get_string("people"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
$moddata[]="<A HREF=\"../user/index.php?id=$course->id\">".get_string("listofallpeople")."</A>";
$modicon[]="<IMG SRC=\"../user/users.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
$editmyprofile = "<A HREF=\"../user/view.php?id=$USER->id&course=$course->id\">".get_string("editmyprofile")."</A>";
if ($USER->description) {
$moddata[]= $editmyprofile;
} else {
$moddata[]= $editmyprofile.$blinker;
}
$modicon[]="<IMG SRC=\"../user/user.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
print_side_block("", $moddata, "", $modicon);
// Then all the links to module types
$moddata = array();
$modicon = array();
if ($modnamesused) {
foreach ($modnamesused as $modname => $modfullname) {
$moddata[] = "<A HREF=\"../mod/$modname/index.php?id=$course->id\">".$modnamesplural[$modname]."</A>";
$modicon[] = "<IMG SRC=\"../mod/$modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
}
}
print_simple_box("Activities", $align="CENTER", $width="100%", $color="$THEME->cellheading");
print_side_block("", $moddata, "", $modicon);
// Print a form to search forums
print_simple_box(get_string("search","forum"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
echo "<DIV ALIGN=CENTER>";
forum_print_search_form($course);
echo "</DIV>";
// Admin links and controls
if (isteacher($course->id)) {
print_course_admin_links($course->id);
}
// Start main column
echo "</TD><TD WIDTH=\"*\">";
print_simple_box(get_string("topicoutline"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
// Everything below uses "section" terminology - each "section" is a topic.
// Now all the sectionly modules
$timenow = time();
$section = 1;
$streditsummary = get_string("editsummary");
$stradd = get_string("add");
echo "<TABLE BORDER=0 CELLPADDING=8 CELLSPACING=0 WIDTH=100%>";
while ($section <= $course->numsections) {
if (isset($USER->topic)) { // Just display a single topic
if ($USER->topic != $section) {
$section++;
continue;
}
}
$currenttopic = ($course->marker == $section);
if ($currenttopic) {
$highlightcolor = $THEME->cellheading2;
} else {
$highlightcolor = $THEME->cellheading;
}
echo "<TR>";
echo "<TD NOWRAP BGCOLOR=\"$highlightcolor\" VALIGN=top WIDTH=20>";
echo "<P ALIGN=CENTER><FONT SIZE=3><B>$section</B></FONT></P>";
echo "</TD>";
echo "<TD VALIGN=top BGCOLOR=\"$THEME->cellcontent\" WIDTH=\"100%\">";
if (! $thissection = $sections[$section]) {
$thissection->course = $course->id; // Create a new section structure
$thissection->section = $section;
$thissection->summary = "";
if (!$thissection->id = insert_record("course_sections", $thissection)) {
notify("Error inserting new topic!");
}
}
if (isediting($course->id)) {
$thissection->summary .= "&nbsp;<A HREF=editsection.php?id=$thissection->id><IMG SRC=\"../pix/t/edit.gif\" BORDER=0 ALT=\"$streditsummary\"></A></P>";
}
echo text_to_html($thissection->summary);
print_section($course->id, $thissection, $mods, $modnamesused);
if (isediting($course->id)) {
echo "<DIV ALIGN=right>";
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&section=$section&add=",
$modnames, "section$section", "", "$stradd...");
echo "</DIV>";
}
echo "</TD>";
echo "<TD NOWRAP BGCOLOR=\"$highlightcolor\" VALIGN=top ALIGN=CENTER WIDTH=10>";
echo "<FONT SIZE=1>";
if (isset($USER->topic)) {
$strshowalltopics = get_string("showalltopics");
echo "<A HREF=\"view.php?id=$course->id&topic=all\" TITLE=\"$strshowalltopics\"><IMG SRC=../pix/i/all.gif BORDER=0></A><BR><BR>";
} else {
$strshowonlytopic = get_string("showonlytopic", "", $section);
echo "<A HREF=\"view.php?id=$course->id&topic=$section\" TITLE=\"$strshowonlytopic\"><IMG SRC=../pix/i/one.gif BORDER=0></A><BR><BR>";
}
if (isediting($course->id) and $course->marker != $section) {
$strmarkthistopic = get_string("markthistopic");
echo "<A HREF=\"view.php?id=$course->id&marker=$section\" TITLE=\"$strmarkthistopic\"><IMG SRC=../pix/i/marker.gif BORDER=0></A><BR><BR>";
}
echo "</TD>";
echo "</TR>";
echo "<TR><TD COLSPAN=3><IMG SRC=\"../pix/spacer.gif\" WIDTH=1 HEIGHT=1></TD></TR>";
$section++;
}
echo "</TABLE>";
echo "</TD><TD WIDTH=210>";
// Print all the news items.
if ($course->newsitems) {
if ($news = forum_get_course_forum($course->id, "news")) {
print_simple_box(get_string("latestnews"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
print_simple_box_start("CENTER", "100%", "#FFFFFF", 3, 0);
echo "<FONT SIZE=1>";
forum_print_latest_discussions($news->id, $course->newsitems, "minimal", "DESC", false);
echo "</FONT>";
print_simple_box_end();
}
echo "<BR>";
}
// Print all the recent activity
print_simple_box(get_string("recentactivity"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
print_simple_box_start("CENTER", "100%", "#FFFFFF", 3, 0);
print_recent_activity($course);
print_simple_box_end();
echo "</TD></TR></TABLE>\n";
?>
+4 -8
View File
@@ -5,8 +5,8 @@
// but will remove them from the student list and prevent
// any course email being sent to them.
require("../config.php");
require("lib.php");
require_once("../config.php");
require_once("lib.php");
require_variable($id); //course
optional_variable($user, $USER->id); //user
@@ -26,19 +26,15 @@
if (isset($confirm)) {
if (! unenrol_student_in_course($user->id, $course->id)) {
if (! unenrol_student($user->id, $course->id)) {
error("An error occurred while trying to unenrol you.");
}
// remove some other things
delete_records("forum_subscriptions", "user", $user->id);
add_to_log($course->id, "course", "unenrol", "view.php?id=$course->id", "$user->id");
if ($user->id == $USER->id) {
unset($USER->student["$id"]);
save_session("USER");
redirect("$CFG->wwwroot");
redirect("$CFG->wwwroot/");
}
redirect("$CFG->wwwroot/user/index.php?id=$course->id");
+26 -19
View File
@@ -2,30 +2,31 @@
// Display user activity reports for a course
require("../config.php");
require("lib.php");
require_once("../config.php");
require_once("lib.php");
$modes = array("outline", "complete", "todaylogs", "alllogs");
require_variable($id); // course id
require_variable($user); // user id
optional_variable($mode, "outline");
optional_variable($mode, "todaylogs");
optional_variable($page, "0");
optional_variable($perpage, "100");
$modes = array("outline", "complete", "todaylogs", "alllogs");
require_login();
if (! $course = get_record("course", "id", $id)) {
error("Course id is incorrect.");
}
require_login($course->id);
if (!isteacher($course->id)) {
error("You are not allowed to look at this page");
}
if (! $user = get_record("user", "id", $user)) {
error("User ID is incorrect");
}
if (!isteacher($course->id) and $user->id != $USER->id ) {
error("You are not allowed to look at this page");
}
add_to_log($course->id, "course", "user report", "user.php?id=$course->id&user=$user->id&mode=$mode", "$user->id");
$stractivityreport = get_string("activityreport");
@@ -49,33 +50,36 @@
}
print_heading("$user->firstname $user->lastname");
echo "<TABLE CELLPADDING=10 ALIGN=CENTER><TR>";
echo "<TD>Reports: </TD>";
echo "<table cellpadding=10 align=center><tr>";
echo "<td>$stractivityreport: </td>";
foreach ($modes as $listmode) {
$strmode = get_string($listmode);
if ($mode == $listmode) {
echo "<TD><U>$strmode</U></TD>";
echo "<td><u>$strmode</u></td>";
} else {
echo "<TD><A HREF=user.php?id=$course->id&user=$user->id&mode=$listmode>$strmode</A></TD>";
echo "<td><a href=user.php?id=$course->id&user=$user->id&mode=$listmode>$strmode</a></td>";
}
}
echo "</TR></TABLE>";
echo "</tr></table>";
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused, $modsectioncounts);
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused);
switch ($mode) {
case "todaylogs" :
echo "<HR><CENTER>";
print_log_graph($course, $user->id, "userday.png");
echo "</CENTER>";
print_log($course, $user->id, usergetmidnight(time()), "ORDER BY l.time DESC");
print_log($course, $user->id, usergetmidnight(time()), "l.time DESC", $page, $perpage,
"user.php?id=$course->id&user=$user->id&mode=$mode");
break;
case "alllogs" :
echo "<HR><CENTER>";
print_log_graph($course, $user->id, "usercourse.png");
echo "</CENTER>";
print_log($course, $user->id, 0, "ORDER BY l.time DESC");
print_log($course, $user->id, 0, "l.time DESC", $page, $perpage,
"user.php?id=$course->id&user=$user->id&mode=$mode");
break;
case "outline" :
@@ -107,6 +111,9 @@
$sectionmods = explode(",", $section->sequence);
foreach ($sectionmods as $sectionmod) {
if (empty($mods[$sectionmod])) {
continue;
}
$mod = $mods[$sectionmod];
$instance = get_record("$mod->modname", "id", "$mod->instance");
$libfile = "$CFG->dirroot/mod/$mod->modname/lib.php";
@@ -175,7 +182,7 @@ function print_outline_row($mod, $instance, $result) {
echo "<TD>&nbsp;&nbsp;&nbsp;</TD>";
if (isset($result->time)) {
$timeago = format_time(time() - $result->time);
echo "<TD VALIGN=top NOWRAP>".userdate($result->time)." ($timeago ago)</TD>";
echo "<TD VALIGN=top NOWRAP>".userdate($result->time)." ($timeago)</TD>";
}
echo "</TR>";
}
+67 -31
View File
@@ -2,8 +2,8 @@
// Display the course home page.
require("../config.php");
require("lib.php");
require_once("../config.php");
require_once("lib.php");
optional_variable($id);
optional_variable($name);
@@ -22,51 +22,87 @@
}
}
require_login($id);
require_login($course->id);
add_to_log($course->id, "course", "view", "view.php?id=$course->id", "$course->id");
if ( isteacher($course->id) ) {
if ($edit == "on") {
$USER->editing = true;
} else if ($edit == "off") {
$USER->editing = false;
if (isteacheredit($course->id)) {
if (isset($edit)) {
if ($edit == "on") {
$USER->editing = true;
} else if ($edit == "off") {
$USER->editing = false;
}
}
}
if ($help == "on") {
$USER->help = true;
} else if ($help == "off") {
$USER->help = false;
if (isset($hide)) {
set_section_visible($course->id, $hide, "0");
}
if (isset($show)) {
set_section_visible($course->id, $show, "1");
}
if (!empty($section)) {
if (!empty($move)) {
if (!move_section($course, $section, $move)) {
notify("An error occurred while moving a section");
}
}
}
} else {
$USER->editing = false;
}
save_session("USER");
$SESSION->fromdiscussion = "$CFG->wwwroot/course/view.php?id=$course->id";
if (! $course->category) { // This course is not a real course.
redirect("$CFG->wwwroot");
redirect("$CFG->wwwroot/");
}
if (empty($THEME->custompix)) {
$pixpath = "../pix";
$modpixpath = "../mod";
} else {
$pixpath = "../theme/$CFG->theme/pix";
$modpixpath = "../theme/$CFG->theme/pix/mod";
}
$courseword = get_string("course");
$loggedinas = "<p class=\"logininfo\">".user_login_string($course, $USER)."</p>";
print_header("$courseword: $course->fullname", "$course->fullname", "$course->shortname", "search.search", "", true,
update_course_icon($course->id));
update_course_icon($course->id), $loggedinas);
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused, $modsectioncounts);
$sections = get_all_sections($course->id);
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused);
switch ($course->format) {
case "weeks":
include("weeks.php");
break;
case "social":
include("social.php");
break;
case "topics":
include("topics.php");
break;
default:
error("Course format not defined yet!");
if (! $sections = get_all_sections($course->id)) { // No sections found
// Double-check to be extra sure
if (! $section = get_record("course_sections", "course", $course->id, "section", 0)) {
$section->course = $course->id; // Create a default section.
$section->section = 0;
$section->visible = 1;
$section->id = insert_record("course_sections", $section);
}
if (! $sections = get_all_sections($course->id) ) { // Try again
error("Error finding or creating section structures for this course");
}
}
print_footer($course);
if (empty($course->modinfo)) { // Course cache was never made
rebuild_course_cache($course->id);
if (! $course = get_record("course", "id", $course->id) ) {
error("That's an invalid course id");
}
}
if (!file_exists("$CFG->dirroot/course/format/$course->format.php")) { // Default format is weeks
$course->format = "weeks";
}
require("$CFG->dirroot/course/format/$course->format.php"); // Include the actual course format
print_footer();
?>
-189
View File
@@ -1,189 +0,0 @@
<?PHP // $Id$
// Display the whole course as "weeks" made of of modules
// Included from "view.php"
include("../mod/forum/lib.php");
if (! $sections = get_all_sections($course->id)) {
$section->course = $course->id; // Create a default section.
$section->section = 0;
$section->id = insert_record("course_sections", $section);
if (! $sections = get_all_sections($course->id) ) {
error("Error finding or creating section structures for this course");
}
}
if (isset($week)) {
if ($week == "all") {
unset($USER->section);
} else {
$USER->section = $week;
}
save_session("USER");
}
// Layout the whole page as three big columns.
echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>";
echo "<TR VALIGN=top><TD VALIGN=top WIDTH=180>";
// Layout the left column
// Links to people
print_simple_box(get_string("people"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
$moddata[]="<A HREF=\"../user/index.php?id=$course->id\">".get_string("listofallpeople")."</A>";
$modicon[]="<IMG SRC=\"../user/users.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
$editmyprofile = "<A HREF=\"../user/view.php?id=$USER->id&course=$course->id\">".get_string("editmyprofile")."</A>";
if ($USER->description) {
$moddata[]= $editmyprofile;
} else {
$moddata[]= $editmyprofile.$blinker;
}
$modicon[]="<IMG SRC=\"../user/user.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
print_side_block("", $moddata, "", $modicon);
// Then all the links to module types
$moddata = array();
$modicon = array();
if ($modnamesused) {
foreach ($modnamesused as $modname => $modfullname) {
$moddata[] = "<A HREF=\"../mod/$modname/index.php?id=$course->id\">".$modnamesplural[$modname]."</A>";
$modicon[] = "<IMG SRC=\"../mod/$modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
}
}
print_simple_box(get_string("activities"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
print_side_block("", $moddata, "", $modicon);
// Print a form to search forums
print_simple_box(get_string("search","forum"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
echo "<DIV ALIGN=CENTER>";
forum_print_search_form($course);
echo "</DIV>";
// Admin links and controls
if (isteacher($course->id)) {
print_course_admin_links($course->id);
}
// Start main column
echo "</TD><TD WIDTH=\"*\">";
print_simple_box(get_string("weeklyoutline"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
// Now all the weekly modules
$timenow = time();
$weekdate = $course->startdate; // this should be 0:00 Monday of that week
$week = 1;
$weekofseconds = 604800;
$course->enddate = $course->startdate + ($weekofseconds * $course->numsections);
$streditsummary = get_string("editsummary");
$stradd = get_string("add");
echo "<TABLE BORDER=0 CELLPADDING=8 CELLSPACING=0 WIDTH=100%>";
while ($weekdate < $course->enddate) {
$nextweekdate = $weekdate + ($weekofseconds);
if (isset($USER->section)) { // Just display a single week
if ($USER->section != $week) {
$week++;
$weekdate = $nextweekdate;
continue;
}
}
$thisweek = (($weekdate <= $timenow) && ($timenow < $nextweekdate));
$weekday = date("j F", $weekdate);
$endweekday = date("j F", $weekdate+(6*24*3600));
if ($thisweek) {
$highlightcolor = $THEME->cellheading2;
} else {
$highlightcolor = $THEME->cellheading;
}
echo "<TR>";
echo "<TD NOWRAP BGCOLOR=\"$highlightcolor\" VALIGN=top WIDTH=20>";
echo "<P ALIGN=CENTER><FONT SIZE=3><B>$week</B></FONT></P>";
echo "</TD>";
echo "<TD VALIGN=top BGCOLOR=\"$THEME->cellcontent\" WIDTH=\"100%\">";
echo "<P><FONT SIZE=3 COLOR=\"$THEME->cellheading2\">$weekday - $endweekday</FONT></P>";
if (! $thisweek = $sections[$week]) {
$thisweek->course = $course->id; // Create a new week structure
$thisweek->section = $week;
$thisweek->summary = "";
if (!$thisweek->id = insert_record("course_sections", $thisweek)) {
notify("Error inserting new week!");
}
}
if (isediting($course->id)) {
$thisweek->summary .= "&nbsp;<A TITLE=\"$streditsummary\" HREF=\"editsection.php?id=$thisweek->id\"><IMG SRC=\"../pix/t/edit.gif\" BORDER=0 ALT=\"$streditsummary\"></A></P>";
}
echo text_to_html($thisweek->summary);
print_section($course->id, $thisweek, $mods, $modnamesused);
if (isediting($course->id)) {
echo "<DIV ALIGN=right>";
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&section=$week&add=",
$modnames, "section$week", "", "$stradd...");
echo "</DIV>";
}
echo "</TD>";
echo "<TD NOWRAP BGCOLOR=\"$highlightcolor\" VALIGN=top ALIGN=CENTER WIDTH=10>";
echo "<FONT SIZE=1>";
if (isset($USER->section)) {
$strshowallweeks = get_string("showallweeks");
echo "<A HREF=\"view.php?id=$course->id&week=all\" TITLE=\"$strshowallweeks\"><IMG SRC=../pix/i/all.gif BORDER=0></A></FONT>";
} else {
$strshowonlyweek = get_string("showonlyweek", "", $week);
echo "<A HREF=\"view.php?id=$course->id&week=$week\" TITLE=\"$strshowonlyweek\"><IMG SRC=../pix/i/one.gif BORDER=0></A></FONT>";
}
echo "</TD>";
echo "</TR>";
echo "<TR><TD COLSPAN=3><IMG SRC=\"../pix/spacer.gif\" WIDTH=1 HEIGHT=1></TD></TR>";
$week++;
$weekdate = $nextweekdate;
}
echo "</TABLE>";
echo "</TD><TD WIDTH=210>";
// Print all the news items.
if ($course->newsitems) {
if ($news = forum_get_course_forum($course->id, "news")) {
print_simple_box(get_string("latestnews"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
print_simple_box_start("CENTER", "100%", "#FFFFFF", 3, 0);
echo "<FONT SIZE=1>";
forum_print_latest_discussions($news->id, $course->newsitems, "minimal", "DESC", false);
echo "</FONT>";
print_simple_box_end();
}
echo "<BR>";
}
// Print all the recent activity
print_simple_box(get_string("recentactivity"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
print_simple_box_start("CENTER", "100%", "#FFFFFF", 3, 0);
print_recent_activity($course);
print_simple_box_end();
echo "<BR><IMG SRC=\"../pix/spacer.gif\" WIDTH=210 HEIGHT=1>";
echo "</TD></TR></TABLE>\n";
?>
-43
View File
@@ -1,43 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Moodle Docs: Background</TITLE>
<LINK REL="stylesheet" HREF="../theme/standard/styles.css" TYPE="TEXT/CSS">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>Background</H2>
<P>Moodle is an active and evolving work in progress.</P>
<P>I've been working on it, in some way or other, for several years. It started
in the 90's when I was webmaster at <a href="http://dougiamas.com/">Curtin University
of Technology</a> and a system administrator of their WebCT installation. I
encountered many frustrations with the WebCT beast and developed an itch that
needed scratching - there had to be a better way (no, not Blackboard :-)</P>
<P>I also know a lot of people in schools and smaller institutions (and some big
ones!) who want to make better use of the Internet but don't know where to start
in the maze of technologies and pedagogies that are out there. I've always hoped
there would be a Free alternative that such people could use to help them move
their teaching skills into the online environment.</P>
<P>My strong beliefs in the unrealised possibilities of Internet-based education
led me to complete a Masters and then a PhD in Education, combining my former
career in Computer Science with newly constructed knowledge about the nature
of learning and collaboration.</P>
<P>Since then Moodle has progressed through several very different prototypes
to achieve something I'm ready to call version 1.0 and release upon an unsuspecting
world (August 20, 2002). I've been using it in several courses and find it an
extremely usable and reliable tool for building high-quality online courses
- others are reporting the same. Given the context in which it's been designed,
it works particularly well for smaller institutions, or for smaller, more intimate
classes.</P>
<P>When compared to the big commercial tools such as WebCT or Blackboard I think
it still falls short in some areas (such as scalability and standards support),
but it comes out ahead in many others (see <a href="features.html">Features</a>).
</P>
<P>&nbsp;</P>
<P ALIGN="CENTER"><FONT SIZE="1"><A HREF="index.html" TARGET="_top">Moodle Documentation</A></FONT></P>
<P ALIGN="CENTER"><FONT SIZE="1">Version: $Id$</FONT></P>
</BODY>
</HTML>
-22
View File
@@ -1,22 +0,0 @@
<HEAD>
<!-- $Id$ -->
<TITLE>Moodle Docs: Table of Contents</TITLE>
<LINK REL="stylesheet" HREF="../theme/standard/styles.css" TYPE="TEXT/CSS">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<FONT SIZE=2 FACE="san-serif">
<P><B>Moodle Documentation</B></P>
<LI><A TARGET="main" HREF="intro.html">Introduction</A>
<LI><A TARGET="main" HREF="background.html">Background</A>
<LI><A TARGET="main" HREF="features.html">Features</A>
<LI><A TARGET="main" HREF="install.html">Installation</A>
<LI><A TARGET="main" HREF="teacher.html">Teacher Manual</A>
<LI><A TARGET="main" HREF="developer.html">Developer Manual</A>
<LI><A TARGET="main" HREF="future.html">Future</A>
<LI><A TARGET="main" HREF="credits.html">Credits</A>
<LI><A TARGET="main" HREF="licence.html">License</A>
</FONT>
</BODY>
+19
View File
@@ -0,0 +1,19 @@
<?PHP // $Id$
require("../config.php");
if (! $info = document_file("files.php", false)) {
error("404 - File Not Found");
}
include($info->filepath);
print_header();
echo "<font size=2 face=\"san-serif\">";
foreach ($string as $file => $filename) {
echo "<li><a target=\"main\" href=\"$CFG->wwwroot/doc/?file=$file\">$filename</a></li>";
}
echo "</font>";
?>
-115
View File
@@ -1,115 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Moodle Docs: Credits</TITLE>
<LINK REL="stylesheet" HREF="../theme/standard/styles.css" TYPE="TEXT/CSS">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>Credits</H2>
<P><B>Moodle </B>itself is Copyright &copy; 2001-2002, <A HREF="http://dougiamas.com/">
Martin Dougiamas</A>. &nbsp;It is distributed under the <A HREF="licence.html">
GNU Public License</A>.</P>
<H3>Other contributors</H3>
<UL>
<LI><B>Dr Peter Taylor</B>, at Curtin University of Technology, for working
with the prototype and making many useful suggestions</LI>
</UL>
<BR>
<P></P>
<H3>Moodle libraries</H3>
<BLOCKQUOTE>
<P>Some of Moodle's libraries were written by other people, and are being
redistributed as part of Moodle under the LGPL. &nbsp;Copyright information
from this software is included below:</P>
<P><B>ADOdb &nbsp; </B>- &nbsp;lib/adodb<BR>
</P>
<BLOCKQUOTE>
<P>Database abstraction library for MySQL, PostgreSQL, MSSQL, Oracle,
Interbase, Foxpro, Access, ADO, Sybase, DB2 and ODBC.</P>
<P>Version: 2.00 14 May 2002&nbsp;<BR>
Copyright &copy; 2000, 2001 John Lim (jlim@natsoft.com.my)<BR>
License: Dual LGPL and BSD-style<BR>
URL: &nbsp;<A HREF="http://php.weblogs.com/adodb" TARGET="newpage">http://php.weblogs.com/adodb</A><BR>
</P>
</BLOCKQUOTE>
<P><B>Graph Class</B> &nbsp; - &nbsp;lib/graphlib.php </P>
<BLOCKQUOTE>
<P>Class to draw line, point, bar, and area graphs, including numeric
x-axis and double y-axis.</P>
<P> Version: 1.6.3<BR>
Copyright &copy;&nbsp;2000&nbsp; Herman Veluwenkamp,&nbsp;hermanV@mindless.com<BR>
License: LGPL<BR>
</P>
</BLOCKQUOTE>
<P><B>PHP mailer</B> &nbsp; - &nbsp;lib/class.phpmailer.php<BR>
</P>
<BLOCKQUOTE>Class for sending email using either sendmail, PHP mail(),
or SMTP.&nbsp; Methods are based upon the standard AspEmail(tm) classes.<BR>
<BR>
Version 1.25, Created 07/02/2001<BR>
Copyright &copy; 2001 Brent R. Matzelle &lt;bmatzelle@yahoo.com&gt;<BR>
License: LGPL<BR>
URL: &nbsp; <A HREF="http://phpmailer.sourceforge.net" TARGET="newpage">http://phpmailer.sourceforge.net</A><BR>
<BR>
</BLOCKQUOTE>
<P><B>SMTP class &nbsp; </B>- &nbsp;lib/class.smtp.php<BR>
</P>
<BLOCKQUOTE>Class that can be used to connect and communicate with
any SMTP server. <BR>
It implements all the SMTP functions defined in RFC821 except TURN.<BR>
<BR>
Version: 03/26/2001 <BR>
Copyright &copy; 2001 &nbsp;Chris Ryan &lt;chris@greatbridge.com&gt;<BR>
<BR>
</BLOCKQUOTE>
<P><B>PHP Simple Excel File Generator</B>&nbsp; - &nbsp; lib/psxlsgen.php</P>
<BLOCKQUOTE>Class to generate very simple MS Excel files (xls)
via PHP.<BR>
<BR>
Version: 0.3b<BR>
Copyright &copy; 2001 &nbsp;Erol Ozcan &lt;eozcan@superonline.com&gt;<BR>
License: GNU LGPL<BR>
URL: <A HREF="http://psxlsgen.sourceforge.net">http://psxlsgen.sourceforge.net</A><BR>
</BLOCKQUOTE>
<P><B>IP-Atlas</B>&nbsp; - &nbsp; lib/ipatlas</P>
<BLOCKQUOTE>PHP scripts to show the location of an IP address on a map.<BR>
<BR>
Version: 1.0<BR>
Copyright &copy; 2002 &nbsp; Ivan Kozik<BR>
License: GNU GPL<BR>
URL: <A HREF="http://www.xpenguin.com/ip-atlas.php">http://www.xpenguin.com/ip-atlas.php</A><BR>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE><BR>
</BLOCKQUOTE>
<P ALIGN="CENTER"><FONT SIZE="1"><A HREF="index.html" TARGET="_top">Moodle Documentation</A></FONT></P>
<P ALIGN="CENTER"><FONT SIZE="1">Version: $Id$</FONT></P>
</BODY>
</HTML>
-235
View File
@@ -1,235 +0,0 @@
<HEAD>
<TITLE>Moodle Docs: Developers Manual</TITLE>
<LINK REL="stylesheet" HREF="../theme/standard/styles.css" TYPE="TEXT/CSS">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2>Developers Manual</H2>
<P>This document describes some of Moodle's design and how you can contribute.</P>
<P>Sections in this document:</P>
<OL>
<LI><A HREF="#architecture">Moodle architecture</A></LI>
<LI><A HREF="#contribute">How you can contribute</A>
<ul>
<li><A HREF="#activities">Learning activities</A></li>
<li><A HREF="#themes">Themes</A></li>
<li><A HREF="#languages">Languages</A></li>
<li><A HREF="#database">Database Schemas</A></li>
<li><a href="#courseformats">Course formats</a></li>
<li><a href="#doc">Documentation and articles</a></li>
<li><a href="#bugs">Participating in the bug tracker</a></li>
</ul>
</LI>
</OL>
<P>&nbsp;</P>
<H3><a name="architecture"></a>1. Moodle architecture</H3>
<P>From a system administrator's perspective, Moodle has been designed according
to the following criteria:</P>
<ol>
<li><strong>Moodle should run on the widest variety of platforms</strong><br>
<br>
The web application platform that runs on most platforms is PHP combined with
MySQL, and this is the environment that Moodle has been developed in (on Linux,
Windows, and Mac OS X). Moodle also uses the ADOdb library for database abstraction,
which means Moodle can use <a href="http://php.weblogs.com/ADOdb_manual#drivers">more
than ten different brands of database</a> (unfortunately, though, it can not
yet <em><strong>set up tables</strong></em> in all these databases - more
on this later). <br><br>
</li>
<li><strong>Moodle should be easy to install, learn and modify</strong><br>
<br>
Early prototypes of Moodle (1999) were built using <a href="http://www.zope.org/">Zope</a>
- an advanced object-oriented web application server. Unfortunately I found
that although the technology was pretty cool, it had a very steep learning
curve and was not very flexible in terms of system administration. The PHP
scripting language, on the other hand, is very easy to get into (especially
if you've done any programming using any other scripting language). Early
on I made the decision to avoid using a class-oriented design - again, to
keep it simple to understand for novices. Code reuse is instead achieved by
libraries of clearly-named functions and consistent layout of script files.
PHP is also easy to install (binaries are available for every platform) and
is widely available to the point that most web hosting services provide it
as standard.<br><br>
</li>
<li><strong>It should be easy to upgrade from one version to the next</strong><br>
<br>
Moodle knows what version it is (as well as the versions of all plug-in modules)
and a mechanism has been built-in so that Moodle can properly upgrade itself
to new versions (for example it can rename database tables or add new fields).
If using CVS in Unix for example, one can just do a &quot;cvs update -d&quot;
and then visit the site home page to complete an upgrade.<br><br>
</li>
<li><strong>It should be modular to allow for growth</strong><br>
<br>
Moodle has a number of features that are modular, including themes, activities,
interface languages, database schemas and course formats. This allows anyone
to add features to the main codebase or to even distribute them separately.
More on this below in the next section.<br><br>
</li>
<li><strong>It should be able to be used in conjunction with other systems</strong><br>
<br>
One thing Moodle does is keep all files for one course within a single, normal
directory on the server. This would allow a system administrator to provide
seamless forms of file-level access for each teacher, such as Appletalk, SMB,
NFS, FTP, WebDAV and so on. Otherwise, there is work yet to do. Features planned
for Moodle in future versions include: flexible connection to existing databases
of user details and grades; import and export of Moodle data using XML-based
formats; and increased use of style sheets for interface formatting (so that
it can be integrated visually into other web sites).</li>
</ol>
<p>&nbsp;</p>
<H3><a name="contribute" id="contribute"></a>2. How you can contribute</H3>
<P>As mentioned above, Moodle has a number of features that are modular. Even
if you are not a programmer there are things you can change or help with.</P>
<P><strong><a name="activities" id="activities"></a>Learning Activities</strong></P>
<blockquote>
<p>These are by far the most important modules, and reside in the 'mod' directory.
There are six default modules: assignment, choice, forum, journal, reading,
and survey. Each module is in a separate subdirectory and consists of the
following mandatory elements (plus extra scripts unique to each module):</p>
<ul>
<li>mod.html: a form to set up or update an instance of this module</li>
<li>version.php: defines some meta-info and provides upgrading code</li>
<li>icon.gif: a 16x16 icon for the module</li>
<li>db/: SQL dumps of all the required db tables and data (for each database
type) </li>
<li>index.php: a page to list all instances in a course</li>
<li>view.php: a page to view a particular instance</li>
<li>lib.php: any/all functions defined by the module should be in here. If
the modulename if called widget, then the required functions include:
<ul>
<li>widget_add_instance() - code to add a new instance of widget</li>
<li>widget_update_instance() - code to update an existing instance</li>
<li>widget_delete_instance() - code to delete an instance</li>
<li>widget_user_outline() - given an instance, return a summary of a user's
contribution</li>
<li>widget_user_complete() - given an instance, print details of a user's
contribution<br>
</li>
<li>To avoid possible conflict, any module functions should be named starting
with widget_ and any constants you define should start with WIDGET_
</li>
</ul>
</li>
<li>Lastly, each module will have some language files that contain strings
for that module. See below.<br>
</li>
</ul>
</blockquote>
<p> <strong><a name="themes" id="themes"></a>Themes</strong></p>
<blockquote>
<p>Themes (or skins) define the look of a site. A number of simple themes are
provided in the main distribution, but you may want to copy one of these and
customise it to suit your own needs (eg local logo, colours, styles, graphics
etc)</p>
<p>Each theme is in a subdirectory of the &quot;theme&quot; directory. You can
copy the &quot;standard&quot; theme as a template.<br>
</p>
</blockquote>
<p><strong><a name="languages" id="languages"></a>Languages</strong></p>
<blockquote>
<p>Moodle has been designed for internationalisation. Each 'string' or 'page'
of text that is displayed as part of the interface is drawn from a set of
language files. Each language is a subdirectory of the directory 'lang'. The
structure of the lang directory is as follows:</p>
<p><strong>lang/en</strong> - directory containing all files for one language
(eg English)</p>
<ul>
<li>moodle.php - strings for main interface</li>
<li>assignment.php - strings for assignment module</li>
<li>choice.php - strings for choice module</li>
<li>forum.php - strings for forum module</li>
<li>journal.php - strings for journal module </li>
<li>reading.php - strings for reading module</li>
<li>survey.php - strings for reading module</li>
<li>.... plus other modules if any.<br>
<br>
A string is called from these files using the <strong><em>get_string()</em></strong><em>
</em>or<em> <strong>print_string()</strong> </em>functions. Each string
supports variable substitution, to support variable ordering in different
languages.<em><br>
<br>
</em>eg $strdueby = get_string(&quot;assignmentdueby&quot;, &quot;assignment&quot;,
userdate($date)); <br>
<br>
If a string doesn't exist in a particular language, then the equivalent
in English will automatically be used instead.</li>
</ul>
<p><strong>lang/en/help</strong> - contains whole help pages (for popup context-sensitive
help)</p>
<blockquote>
<p>Main help pages are situated here, while help pages specific to each module
are located in subdirectories with the module's name.</p>
<p>You can insert a helpbutton in a page with the helpbutton function.</p>
<p>eg helpbutton(&quot;text&quot;, &quot;Click here for help about text&quot;);</p>
<p>and for modules:</p>
<p>helpbutton(&quot;forumtypes&quot;, &quot;Forum types&quot;, &quot;forum&quot;);</p>
</blockquote>
</blockquote>
<p><br>
<strong><a name="database" id="database"></a>Database Schemas</strong></p>
<blockquote>
<p>Given a working database with defined tables, the intentionally simple SQL
used in Moodle should work fine with a wide variety of database brands.</p>
<p>A problem exists with <strong>automatically creating</strong> new tables
in a database, which is what Moodle tries to do upon initial installation.
Because every database is very different, there doesn't yet exist any way
to do this in a platform-independent way. To support this automation in each
database, schemas can be created that list the required SQL to create Moodle
tables in a particular database. These are files in <strong>lib/db</strong>
and inside the <strong>db</strong> subdirectory of each module.</p>
<p>Currently, only MySQL is supported because that's what I know. If you are
familiar with another database (especially open source databases) and are
willing to help port the MySQL schema, please get in contact with me (<a href="mailto:martin@moodle.com">martin@moodle.com</a>).</p>
</blockquote>
<p>&nbsp;</p>
<p><strong><a name="courseformats" id="courseformats"></a>Course Formats</strong></p>
<blockquote>
<p>Moodle 1.0 supports three different course formats: weekly, topics and social.
</p>
<p>These are a little more connected to the rest of the code (and hence, less
&quot;pluggable&quot;) but it is still quite easy to add new ones.</p>
<p>If you have any ideas for different formats that you need or would like to
see, get in touch with me and I'll do my absolute best to have them available
in future releases.</p>
</blockquote>
<p>&nbsp;</p>
<p><strong><a name="doc" id="doc"></a>Documentation and articles</strong></p>
<blockquote>
<p>If you feel like writing a tutorial, an article, an academic paper or anything
else about Moodle, please do! Put it on the web and make sure you include
links to <a href="http://moodle.com/">http://moodle.com/</a></p>
</blockquote>
<p>&nbsp;</p>
<p><strong><a name="bugs" id="bugs"></a>Participating in the bug tracker</strong></p>
<blockquote>
<p>Finally, I would like to invite you to register on the &quot;bug tracker&quot;
at <a href="http://bugs.moodle.org">bugs.moodle.org</a> so you can file any
bugs that you find and perhaps participate in discussing and fixing them.
</p>
<p>&quot;Bugs&quot; not only includes software bugs with current versions of
Moodle, but also new ideas, feature requests and even constructive criticism
of existing features. The beauty of open source is that anyone can participate
in some way and help to create a better product for all of us to enjoy. In
this project, your input is very welcome!</p>
</blockquote>
<p>&nbsp;</p>
<blockquote>
<blockquote>
<blockquote>
<p align="center">Thanks for using Moodle!</p>
<p align="center">Cheers,<br>
<a href="http://dougiamas.com/" target="_top">Martin Dougiamas</a></p>
</blockquote>
</blockquote>
</blockquote>
<p>&nbsp;</p>
<p>&nbsp;</p>
<blockquote>
<p>&nbsp;</p>
</blockquote>
<P ALIGN="CENTER"><FONT SIZE="1"><A HREF="index.html" TARGET="_top">Moodle Documentation</A></FONT></P>
<P ALIGN="CENTER"><FONT SIZE="1">Version: $Id: developer.html,v 1.2 2001/12/09
10:34:19 martin Exp $</FONT></P>
</BODY>
-34
View File
@@ -1,34 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Moodle Docs: Background</TITLE>
<LINK REL="stylesheet" HREF="../theme/standard/styles.css" TYPE="TEXT/CSS">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>Features</H2>
Here is a big list of some of the features in Moodle 1.0:
<UL><LI>Supports a social constructionist pedagogy (collaboration, activities, critical reflection, etc)</LI><LI>Suitable for 100% online classes as well as supplementing face-to-face learning<LI>Simple, lightweight, browser-compatible interface</LI><LI>Plug-in "themes" allow you to customise the colours, fonts, layout etc</LI><LI>Easy to install on most platforms</LI><LI>Easy administration - students can create their own accounts. Email addresses are verified.</LI><LI>One account works for the whole server</LI><LI>Security - teachers can add an "enrolment key" to their courses to keep out non-students. They can give out this key face-to-face or via personal email etc</LI><LI>Students are encouraged to build an online profile including photos, description etc</LI><LI>Every user can specify their own timezone, and every date in Moodle is translated to that timezone (eg posting dates, assignment due dates etc)</LI><LI>Choice of course formats such as by week, by topic or a discussion-focussed social format</LI><LI>Flexible array of course modules - Forums, Journals, Readings, Choices, Surveys, Assignments.</LI><LI>New modules can be written and plugged in to existing Moodle installations</LI><LI>The code is clearly-written PHP under a GPL license - easy to modify and localise</LI><LI>Full database abstraction supports all major brands of database (except for initial table definition)</LI><LI>Ready for internationalisation - supports plug-in languages and locale-based date formats etc</LI><LI>Mail integration - copies of forum posts, teacher feedback etc can be mailed in HTML or plain text.</LI><LI>Recent changes to the course since the last login are displayed on the course home page</LI><LI>Full user logging and tracking - activity reports for each student are available with graphs and details about each module (last access, number of times read) as well as a detailed "story" of each students involvement including postings, journal entries etc on one page.</LI>
</UL>
<B>Forum Module</B>
<UL><LI>Different types of forums are available, such as teacher-only, course news, open-to-all, and one-thread-per-user.</LI><LI>All postings have the authors photo attached.</LI><LI>Discussions can be viewed nested, flat or threaded, oldest or newest first.</LI><LI>Individual forums can be subscribed to by each person so that copies are forwarded via email, or the teacher can force subscription for all</LI>
</UL>
<B>Survey Module</B>
<UL><LI>Built-in surveys (COLLES, ATTLS) have been proven as instruments for analysing online classes</LI><LI>Online survey reports always available, including many graphs. Data is downloadable as an Excel spreadsheet or CSV text file.</LI><LI>Survey interface prevents partly-finished surveys.</LI><LI>Feedback is provided to the student of their results compared to the class averages</UL>
<B>Readings Module</B>
<UL><LI>Supports display of any electronic content</LI><LI>Files can be uploaded and managed on the server, or created on the fly using web forms (text or HTML)</LI><LI>External content on the web can be linked to or seamlessly included within the course interface.</LI></UL>
<B>Choice Module</B>
<UL><LI>Like a poll. Can either be used to vote on something, or to get feedback from every student (eg research consent)</LI></UL>
<B>Journal Module</B>
<UL><LI>Journals are private between student and teacher.</LI><LI>Each journal entry can be directed by an open question.</LI><LI>For each particular journal entry, the whole class can be assessed on one page in one form.</LI><LI>Teacher feedback is appended to the journal entry page, and notification is mailed out.</LI></UL>
<B>Assignment Module</B>
<UL><LI>Assignments can be specified with a due date and a maximum grade.</LI><LI>Students can upload their assignments (any file format) to the server - they are date-stamped.</LI><LI>Late assignments are allowed, but the amount of lateness is shown clearly to the teacher</LI><LI>For each particular assignment, the whole class can be assessed (grade and comment) on one page in one form.</LI><LI>Teacher feedback is appended to the assignment page for each student, and notification is mailed out.</LI></UL>
<P>&nbsp;</P>
<P ALIGN="CENTER"><FONT SIZE="1"><A HREF="index.html" TARGET="_top">Moodle Documentation</A></FONT></P>
<P ALIGN="CENTER"><FONT SIZE="1">Version: $Id: features.html,v 1.2 2001/12/09
10:34:19 martin Exp $</FONT></P>
</BODY>
</HTML>
-46
View File
@@ -1,46 +0,0 @@
<HEAD>
<TITLE>Moodle Docs: Future</TITLE>
<LINK REL="stylesheet" HREF="../theme/standard/styles.css" TYPE="TEXT/CSS">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2>Future</H2>
<P>I'm committed to continuing my work on Moodle and on keeping it Open and Free.
I have a deeply-held belief in the importance of unrestricted education and
empowered teaching, and Moodle is the main way I can contribute to the realisation
of these ideals.
<P>As Moodle gains in maturity, I hope its directions are influenced by the community
of developers and users. A dynamic database of proposed features and their status
can be found at <A TARGET=_top HREF="http://bugs.moodle.org/">bugs.moodle.org</A>.
Your <a href="developer.html">contributions</a> in the form of ideas, code,
feedback and promotion are all very welcome.
<P>Now that 1.0.1 has been released, most of my efforts will concentrate on the
macro level (supporting larger classes and integrating into larger institutions)
and the micro level (improving support for decisions and processes, for both
teachers and learners).
<P>The next 6 months or so I will have to slow down my own development a little
(because I have a PhD thesis to finish). During this time there'll be a number
of small upgrades 1.0.2, 1.0.3 etc that I expect will contain minor new features
and polishing. I'll also be working with people adding new plugins (support for
more databases, new modules and new themes).
<P>Sometime in the first half of 2003 you can expect a major release (1.1, maybe 1.5) that has
new features like:
<UL>
<LI>Full user account management (eg connection to external databases, import/export etc)
<LI>Full grade management
<LI>Ability to define groups and group work
<LI>Automatic linking in texts to uploaded readings (like Wiki)
<LI>Online support for teachers to design and maintain classes
<LI>Online support for students in collaboration processes
</UL>
<P ALIGN="CENTER">&nbsp;</P>
<P ALIGN="CENTER"><FONT SIZE="1"><A HREF="index.html" TARGET="_top">Moodle Documentation</A></FONT></P>
<P ALIGN="CENTER"><FONT SIZE="1">Version: $Id$</FONT></P>
</BODY>
-8
View File
@@ -1,8 +0,0 @@
<HEAD>
<TITLE>Moodle Documentation</TITLE>
</HEAD>
<FRAMESET COLS="200,*">
<FRAME NAME="contents" SRC="contents.html">
<FRAME NAME="main" SRC="intro.html">
</FRAMESET>

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