285 Commits

Author SHA1 Message Date
moodler
107b010b43 Some random lowercasing 2003-05-03 06:49:37 +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
moodler
ca16eaeb31 Make sure all these links break out of subframes and go to mainframe 2003-04-29 13:54:53 +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
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
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
moodler
2a40936834 Mark the hidden ones for teachers 2003-04-23 17:25:20 +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
moodler
ef49e5c301 addslashes to string used for javascript link 2003-04-02 07:24:42 +00:00
moodler
0d0baabf2c Fixed a missing global $CFG declaration. 2003-03-30 13:25:49 +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
9d5b689c8a Added vim commands at the bottom of the file to try it out 2003-03-14 07:55:22 +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
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
9a9a2907c2 Add a target to the "made with moodle" link to avoid confusing students 2003-03-07 15:09:12 +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
moodler
3f3960656d Fixed link to picture file in print_picture_file 2003-02-11 01:53: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
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
750ab759ed Slightly better robustness for notice() when there is no referer 2003-01-26 06:04:14 +00:00
moodler
03f06a1412 Remove the ampersand thing ... it was actually a Mozilla display bug. :-) 2003-01-24 08:41:18 +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
37208cd23a Some robustness 2003-01-20 07:13:02 +00:00
moodler
6ed3da1da4 Cleaned up file argument processing a bit 2003-01-12 06:53:25 +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
moodler
ce78926df0 Small robustness fixes 2003-01-06 13:55:37 +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
8663bfdb08 Display months in local language for date_selector 2003-01-03 06:43:12 +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
b79f41cd42 Robust fix 2003-01-01 15:13:21 +00:00
moodler
6dd38d4656 Allow STRIKE tag 2002-12-30 13:02:21 +00:00
moodler
47f1da80d0 More little fixups for robustness 2002-12-30 05:13:43 +00:00
moodler
b9b8ab696f Fixed p() and s() to deal with zero better 2002-12-30 03:39:42 +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
9d378732e4 More little fixes 2002-12-29 04:17:32 +00:00
moodler
99988d1a87 This version installs smoothly for me on PostgreSQL 2002-12-23 14:19:45 +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
moodler
780db23080 Slight improvements to file security (scan for more bad characters) 2002-11-21 02:51:50 +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
3e50a13968 Fix to break out of frames 2002-11-10 08:08:23 +00:00