Compare commits

..

543 Commits

Author SHA1 Message Date
moodler 07cd3ecabd 1.7.3 2007-10-14 08:22:17 +00:00
moodler 1d68f3cd73 Automatic installer.php lang files by installer_builder (20071011) 2007-10-11 04:15:52 +00:00
iarenaza 23290eea4d Fix MDL-11632: Multiple files with emtpy lines outside PHP open/close tags
There are multiple issues with Moodle files containing empty or blank lines
(lines consisting of white spaces or tabs only) and/or white space before or
after the PHP open and close tags, notably with config.php and theme files.
2007-10-10 21:33:29 +00:00
moodler f050e82eb6 Automatic installer.php lang files by installer_builder (20071010) 2007-10-10 04:45:55 +00:00
nfreear 8aa669ca72 Fixes MDL-11676, Skip block links are broken in Internet Explorer 6. Merged. 2007-10-09 16:06:59 +00:00
skodak 8abba9e902 MDL-11663 sanitise submitted data when editing users; merged from MOODLE_16_STABLE 2007-10-08 19:57:39 +00:00
gbateson 023dc2c338 added escaping of quotes in TimesUp message, so that apostrophes do not cause Javascript errors 2007-10-08 06:40:37 +00:00
pichetp 11db0ce1ec checking that there remain $oldwrappedids before deleting them lines 87-..
add         if(is_array($oldwrappedids) && count($oldwrappedids)){
2007-10-06 20:59:49 +00:00
stronk7 c9379ddbaa MDL-11597. Backported from HEAD to 17_STABLE 2007-10-04 22:20:54 +00:00
moodler 2bd2bb878d Automatic installer.php lang files by installer_builder (20071004) 2007-10-04 05:19:09 +00:00
moodler fe8aad143d Automatic installer.php lang files by installer_builder (20071003) 2007-10-03 05:13:24 +00:00
whchuang cae4cdb309 added missing string definition for sectionerror. Fixed MDL-10766 2007-10-03 00:02:37 +00:00
gbateson 8809ff2b35 use new function "hotpot_stripslashes()" instead of PHP's "stripslashes()" to remove slashes after preg_replace with "e" modifier, because when MSSQL Server is installed, PHP's "stripslashes()" does not remove slashes, even if the Moodle database is not MSSQL 2007-09-30 04:18:18 +00:00
toyomoyo 6bea13a914 MDL-11391, grades are not displayed because gradebookroles can not be set 2007-09-27 02:57:44 +00:00
gbateson 0e04dc36c2 change CONTEXT_MODULE to CONTEXT_COURSE in order to fix "Invalid context creation for level 50 instance" error on "mod/hotpot/index.php" caused by get_context_instance(CONTEXT_MODULE, $course->id) in "mod/hotpot/lib.php" 2007-09-26 07:14:33 +00:00
iarenaza 68d924ce8a MDL-10921 LDAP Auth to Active Directory requires LDAP_OPT_REFERRALS option set; backported from HEAD 2007-09-25 21:05:57 +00:00
skodak bf5cc256fd MDL-11413 I hope now it is correct solution; backported from HEAD 2007-09-25 14:06:59 +00:00
nfreear 247958fbe9 MDL-1149 Accessibility: Current week/topic is NOT indicated non-visually, only in styling. Merged. 2007-09-25 12:45:29 +00:00
nfreear bf4fe92223 MDL-11436 Accessibility: Encapsulate "accesshide" HTML class in function, and use. Merged partial fix - just weblib. 2007-09-25 12:35:37 +00:00
skodak 9bcbf6a743 MDL-11237 raising memory limit for preg_xxxx(), backported from HEAD 2007-09-24 16:35:40 +00:00
skodak 7c84c844f9 MDL-11413 revisited; backported from HEAD 2007-09-24 15:26:58 +00:00
tjhunt 676dbd7285 MDL-10916 - Import and Export of Cloze question misses out "generalfeedback" column. 2007-09-24 14:16:58 +00:00
skodak 81ac2c8630 MDL-11414 fixed handling of log urls (problem reported by Andreas Nolden); backported from HEAD; fixing previous commit :-( 2007-09-23 13:20:36 +00:00
skodak 55f9f1432f MDL-11414 fixed handling of log urls (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 13:15:26 +00:00
skodak 9f476e5fe2 MDL-11413 improved text cleaning (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 12:29:58 +00:00
skodak 4663bd9f09 MDL-11413 improved text cleaning (problem reported by Andreas Nolden); backported from HEAD 2007-09-23 12:24:39 +00:00
moodler bde6d304f9 Automatic installer.php lang files by installer_builder (20070920) 2007-09-20 04:29:46 +00:00
iarenaza 764d44c11e MDL-11299 - Make objectClass string comparison case insensitive.
LDAP serves accept attribute names in a case insensitive way, so don't
force the users to use any particular spelling. (backported from HEAD).
2007-09-18 09:18:16 +00:00
moodler c2c3f6e885 Automatic installer.php lang files by installer_builder (20070918) 2007-09-18 04:27:50 +00:00
stronk7 22f8303fc7 Interlinking from/to data module added. MDL-9576
Backported from HEAD
2007-09-17 22:06:12 +00:00
stronk7 b0cfc7cbd5 Now, under quick grading, when new assignment_submissions records are
created, we provide a default for data1 and data2 text not null
columns. MDL-11268
2007-09-17 16:57:54 +00:00
moodler 118a639ff3 Automatic installer.php lang files by installer_builder (20070917) 2007-09-17 05:00:46 +00:00
stronk7 f4989ae561 Backported from MOODLE_18_STABLE
Show the roll dates option only if the backup course has a start date
(some formats like main page, social..., haven't it and rolling dates
from 0 produces crazy dates. MDL-10125
2007-09-16 17:40:55 +00:00
moodler 4ff82c1505 Automatic installer.php lang files by installer_builder (20070916) 2007-09-16 04:19:16 +00:00
iarenaza e2a7235da8 Remove additional check when dealing with hidden courses in LDAP enrolment.
The check is superfluous and uses an inexistant variable ($type) that
was removed when we switched to role based enrolment.

Fixes MDL-11098 MDL-10282 and MDL-8346. (backported from HEAD)
2007-09-15 21:59:11 +00:00
stronk7 062c59e346 Now using one cross-db solution to be able to
simulate the status boolean ins assignment
submissions. MDL-8164 & MDL-10846

Backported from MOODLE_HEAD
2007-09-13 18:01:05 +00:00
tjhunt 3cc55cab9e MDL-11081 and MDL-11211 - Implement quiz_question_list_instances. The lach of this function was causing a horrible dataloss bug: MDL-11211. Fix thanks to Janne Mikkonen, refined by me. Merged from MOODLE_16_STABLE. 2007-09-13 17:29:02 +00:00
tjhunt 3742f86ac1 Take out duplicate $Id$ CVS tags. 2007-09-10 11:06:12 +00:00
moodler 9a28eacb84 Automatic installer.php lang files by installer_builder (20070908) 2007-09-08 04:02:56 +00:00
moodler 446b5e025c Automatic installer.php lang files by installer_builder (20070907) 2007-09-07 04:45:11 +00:00
pichetp 5c89371717 Correcting a little error: datesetitem = array(); instead of datasetitem = array();
line +-550 $question->dataset[$datasetname]->datasetitem = array();
2007-09-07 02:46:12 +00:00
stronk7 2b27d0a946 Now restoring groups is cross-db (the detection of existing groups) 2007-09-05 18:37:34 +00:00
stronk7 15ef45da52 Repeated fields aren't necessary at all since Moodle 1.7
and, in fact, they throw error if using limits! MDL-9592
2007-09-05 15:25:33 +00:00
skodak 3444317011 MDL-11053 Course object not escaped before insert - patch by Aaron C Spike; backported from HEAD 2007-08-29 13:55:10 +00:00
stronk7 e17d507d5a Now Moodle >= 1.9 requires PostgreSQL >= 8.0. MDL-11033 2007-08-28 15:31:34 +00:00
nicolasconnault 7db37fd580 MDL-9005 Fixed this and another multilang issue (module name in preview didn't filter multilang tags either). 2007-08-28 13:22:16 +00:00
moodler 6497764c84 Automatic installer.php lang files by installer_builder (20070828) 2007-08-28 05:53:27 +00:00
nicolasconnault 37829534f6 MDL-7574 Applying Matthew Davidson's patch. 2007-08-27 17:04:56 +00:00
nicolasconnault 554fbddf7d MDL-7574 Applying the patch as is, with a bit extra code formatting for the JS section (indents etc.) 2007-08-27 15:36:37 +00:00
moodler 529d7f47bf Automatic installer.php lang files by installer_builder (20070827) 2007-08-27 06:08:41 +00:00
moodler 45b3a8554a Automatic installer.php lang files by installer_builder (20070826) 2007-08-26 05:51:58 +00:00
moodler 8f3d4e4ef5 Automatic installer.php lang files by installer_builder (20070825) 2007-08-25 04:10:45 +00:00
gbateson a067240cbf fixed results not being sent caused by commenting out of "interceptFeedback" (probably left over from debugging) 2007-08-25 01:42:16 +00:00
nicolasconnault ef2f763ee8 MDL-10970 Someone was using
$locations = array('location1');
$locations += array('location2', 'location3', 'location4');

to save the hassle of doing one $locations[] = 'location1'; for each location.

But += doesn't add any entry if the key of the new array already exists in the original array. So, using my example, the resulting array would be:

$locations: array('location1', 'location3', 'location4');
2007-08-24 07:18:13 +00:00
moodler 56d3da5a01 Automatic installer.php lang files by installer_builder (20070824) 2007-08-24 05:59:47 +00:00
moodler 1aa8ff170f Automatic installer.php lang files by installer_builder (20070823) 2007-08-23 05:59:35 +00:00
moodler 8ec088f738 Automatic installer.php lang files by installer_builder (20070822) 2007-08-22 09:02:48 +00:00
nicolasconnault e7c13fcb46 MDL-10177 Applied lovely hack (not ugly!) suggested by Pablo. It's lovely because it solves an ugly design error in the previous code: modifying a parameter variable in the function body. 2007-08-20 17:57:44 +00:00
nfreear 343a1ea8e0 MDL-5400 "Accessibility modifications..." - fixing the 4 themes that don't use <h1>. Merged. 2007-08-20 11:00:10 +00:00
moodler 216237369e Automatic installer.php lang files by installer_builder (20070816) 2007-08-16 06:46:47 +00:00
tjhunt 10fc5f6e22 MDL-10834 - Restore of quiz module may create calendar events without a date/time. Fix thanks to Derek Woolhead. 2007-08-14 13:33:09 +00:00
moodler 462f360429 Automatic installer.php lang files by installer_builder (20070814) 2007-08-14 06:10:46 +00:00
tjhunt c0ea84fbf3 Accessign wrong field of $mod from course.modinfo. 2007-08-10 10:36:35 +00:00
tjhunt 3a6b6c0d74 MDL-10759 - Bogus get_context_instance call in quiz_print_recent_mod_activity 2007-08-08 11:30:16 +00:00
pichetp 64aa333345 Merging MDL-10680 resolved by thepurplebob from 1.9 2007-08-08 02:09:32 +00:00
moodler ea41587638 Automatic installer.php lang files by installer_builder (20070806) 2007-08-06 03:52:37 +00:00
stronk7 fbadfe0295 fix insert_record() call using arrays instead of objects 2007-08-05 22:47:20 +00:00
moodler 4b1edf80c1 Automatic installer.php lang files by installer_builder (20070804) 2007-08-04 05:42:43 +00:00
moodler 1286c71e5a Automatic installer.php lang files by installer_builder (20070803) 2007-08-03 07:12:18 +00:00
gbateson 62eefc5487 fix javascript error: "parseint not defined" 2007-08-01 05:26:09 +00:00
moodler aafc01514e Fixed typo from MDL-9222 2007-08-01 05:13:32 +00:00
stronk7 671b83e238 Since now, Moodle 2.0 will require PHP 5.2. MDL-10390 2007-07-30 16:37:31 +00:00
moodler 0197c39ba1 Automatic installer.php lang files by installer_builder (20070730) 2007-07-30 04:35:43 +00:00
toyomoyo 40168efe75 fix for MDL-10640, adding missing index during upgrade fo mdl_role_capabilities table 2007-07-30 02:40:14 +00:00
wildgirl dfa4162d8a MDL-4912 docs directory clean-up 2007-07-28 20:27:21 +00:00
moodler 0c05267ff4 Automatic installer.php lang files by installer_builder (20070728) 2007-07-28 06:08:50 +00:00
mchurch 992c135e19 Bug #MDL-10632, fixing the use of 'delete_event'. 2007-07-27 18:45:24 +00:00
moodler b3c7ea0c94 Automatic installer.php lang files by installer_builder (20070726) 2007-07-26 05:14:01 +00:00
toyomoyo 1e281f706a merged fix for MDL-10564, wrong userid used for get_my_courses in blogs 2007-07-26 02:45:40 +00:00
stronk7 9ae0b39497 Adding two missing strings. MDL-6017
NOTE: These are OUT for Moodle 1.9 and new Grade System, so don't
      translate them!

Merged from MOODLE_16_STABLE
2007-07-25 22:09:21 +00:00
stronk7 137fcd2015 Fixing two get_string() calls when restoring gradebook preferences. MDL-6017
Merged from MOODLE_16_STABLE
2007-07-25 21:32:46 +00:00
moodler 7ccfee94ad Automatic installer.php lang files by installer_builder (20070724) 2007-07-24 06:16:45 +00:00
moodler 5e7ee078a9 Automatic installer.php lang files by installer_builder (20070721) 2007-07-21 05:32:34 +00:00
moodler 28dcf434c6 Automatic installer.php lang files by installer_builder (20070719) 2007-07-19 05:51:35 +00:00
toyomoyo 0042320984 merged fix for MDL-10149, prevent the deletion of the last admin role 2007-07-19 05:20:57 +00:00
toyomoyo 8da1406e3a DML-10461, timemodified in role_assignements not preserved during restore 2007-07-19 03:38:59 +00:00
moodler 0ef8d9cab6 Automatic installer.php lang files by installer_builder (20070718) 2007-07-18 06:24:56 +00:00
moodler d55f1be549 Bye bye CHANGES http://moodle.org/mod/forum/discuss.php?d=75777 2007-07-17 02:21:26 +00:00
stronk7 d4097a429c Now the glossary->allowcoments setting is respected. MDL-8056
Credit goes to Matt Clarkson. Thanks.

Backported from HEAD
2007-07-15 22:31:09 +00:00
tjhunt 9b4327c71d MDL-10452 - start quiz UI is confusing if you have quiz:preview capability. Change the 'start/continue attempt button' to say 'start/continue preview' in this case. 2007-07-13 15:57:29 +00:00
moodler 097eb89c65 Automatic installer.php lang files by installer_builder (20070713) 2007-07-13 08:29:04 +00:00
nfreear 8c21e87a7b Part fix of bug MDL-10332 "Data module not filtering list by group on .." - restore bug. Merged. 2007-07-12 14:25:25 +00:00
moodler 253f9eee33 Merged changes from MDL-8451 from 1.8 2007-07-11 09:14:54 +00:00
moodler bb803227f1 Automatic installer.php lang files by installer_builder (20070710) 2007-07-10 06:31:44 +00:00
poltawski f0d60d1631 MDL-10356 - typo in player.php in MOODLE_17_STABLE 2007-07-08 00:15:39 +00:00
moodler 99c4cc6fdf Automatic installer.php lang files by installer_builder (20070706) 2007-07-06 04:50:20 +00:00
moodler 58e24e2f1a Automatic installer.php lang files by installer_builder (20070705) 2007-07-05 05:50:55 +00:00
skodak bca26abf4c MDL-10341 fixed user search cleaning; backported from MOODLE_18_STABLE 2007-07-04 08:33:04 +00:00
bobopinna 9241a50fb7 Refixed bug MLD-7325 2007-07-03 14:11:20 +00:00
bobopinna 6d1bb31cda Added missing help file 2007-07-03 12:34:53 +00:00
bobopinna 661406a466 file maxattempt.html was added on branch MOODLE_17_STABLE on 2007-07-03 12:34:53 +0000 2007-07-03 12:13:52 +00:00
bobopinna cd57295a36 file whatgrade.html was added on branch MOODLE_17_STABLE on 2007-07-03 12:34:54 +0000 2007-07-03 12:04:18 +00:00
bobopinna 6acef6e30b file skipview.html was added on branch MOODLE_17_STABLE on 2007-07-03 12:34:54 +0000 2007-07-03 12:04:18 +00:00
bobopinna 1610eb0f85 Fixed bug MDL-9486 2007-07-03 09:24:38 +00:00
bobopinna 6cf7303684 Added some missing strings
bug MDL-9720
2007-07-03 08:05:57 +00:00
moodler 4ed23b4f9e Automatic installer.php lang files by installer_builder (20070702) 2007-07-02 04:53:58 +00:00
moodler fabdbdb3f6 Automatic installer.php lang files by installer_builder (20070629) 2007-06-29 04:56:09 +00:00
moodler 43e2896e63 Automatic installer.php lang files by installer_builder (20070628) 2007-06-28 05:33:39 +00:00
skodak 025451ff7d MDL-10276 Text cleaning trouble; backported from HEAD 2007-06-27 12:05:05 +00:00
gbateson cafaa207ef make sure $hotpot->id is set when adding calendar events for new HotPot 2007-06-26 12:02:34 +00:00
moodler e59461215d Implemented fix for MDL-10254, thanks Valery! 2007-06-26 09:06:44 +00:00
moodler 0ebee25007 Automatic installer.php lang files by installer_builder (20070626) 2007-06-26 07:51:48 +00:00
gbateson ce197abbef in XML source files of HP quizzes, convert relative URLs to absolute URLs in links using window.open(...) 2007-06-26 05:02:03 +00:00
gbateson 9036033b8a change relative URLs to absolute URLs in window.open(...) 2007-06-26 02:31:57 +00:00
urs_hunkler 81bf069328 changed navmenuwidth to the standard value 2007-06-25 12:21:58 +00:00
moodler 9ff8ae7953 Automatic installer.php lang files by installer_builder (20070625) 2007-06-25 06:43:38 +00:00
moodler 4527713fdc Automatic installer.php lang files by installer_builder (20070623) 2007-06-23 05:57:55 +00:00
tjhunt ae4dc90cb7 MDL-10213 - layuout problem for question in IE in Moodle 1.7. I'm taking the opportunity to clean up the CSS in 1.8 and HEAD to match what I did in 1.7. Fix and CSS cleanup back-ported from MOODLE_18_STABLE. 2007-06-22 13:46:32 +00:00
jamiesensei 7ab78c274b making environment colours css selector refer to table class instead of body id. So that colours show up on other pages besides admin page. 2007-06-22 11:04:58 +00:00
gbateson 20f08456a8 allow display of results by group 2007-06-21 03:54:45 +00:00
gbateson 94bbc1f5e2 fix selection of individual students in the report conditions selector panel, (use PARAM_ALPHANUM instead of PARAM_ALPHA for reportusers parameter) 2007-06-21 02:53:23 +00:00
moodler 4610edf1b6 Automatic installer.php lang files by installer_builder (20070620) 2007-06-20 08:43:38 +00:00
jamiesensei 847da17ddb added styles to install.php for colours for environment table 2007-06-20 06:34:08 +00:00
stronk7 f3fa18a199 Now calendar export have some correct defaults. MDL-10175
Backported from MOODLE_18_STABLE
2007-06-19 18:58:23 +00:00
jamiesensei 8b85c2cf5d accidentally added these, removing them 2007-06-19 18:01:01 +00:00
jamiesensei c309cf8612 *** empty log message *** 2007-06-19 17:40:31 +00:00
jamiesensei 2685a2eee1 MDL-10168 improvements to display of results from environment checks 2007-06-19 16:25:59 +00:00
jamiesensei 416622f005 elaborated phpdoc comment slightly for doc_link 2007-06-19 15:18:22 +00:00
jamiesensei 8f95983a3e refactored page_doc_link into two functions. doc_link returns a link to docs. page_doc_link returns the link for this page. 2007-06-19 14:59:22 +00:00
poltawski 0a16e0f268 MDL-10148 - hard coded lang strings in user/message.html 2007-06-18 19:17:57 +00:00
bobopinna 37646f6f0e Fixed a typo added during last commit 2007-06-18 12:08:55 +00:00
ethem aa7b876f03 MDL-9836
Authorize.net / SSL Config Bug prevents display of options from enrol/authorize/enrol.php
2007-06-15 17:52:28 +00:00
csantossaenz 16f89f2ccf Fixed bug mdl-7516 2007-06-15 09:03:47 +00:00
pichetp 524e369670 Removing question/type/datasetdependent/categorydatasetdefinitions.php MDL-10072 2007-06-13 07:49:59 +00:00
toyomoyo c72ab7a328 fixing a bug when setting granular bug during restore 2007-06-13 06:33:15 +00:00
pichetp c74677ca95 solving lost of dataitems MDL-10087 merging from 1.8 2007-06-13 03:44:13 +00:00
pichetp 0f8c983585 giving to questiondatasets.html all the features of datasetdefinitions_form.php of HTML
QuickForm
2007-06-12 03:27:40 +00:00
pichetp 59a6d971a4 replacing "saveas" by "next page" and a greater size to answers formula <input> 2007-06-11 20:12:04 +00:00
moodler 45e948f87e Automatic installer.php lang files by installer_builder (20070611) 2007-06-11 06:11:26 +00:00
pichetp c0226d096a correcting the custom_genrator line 610-611 2007-06-11 00:17:57 +00:00
pichetp aaf3348589 Adding various improvements (MDL-8565, MDL-9496, MDL10070 etc.)to calculated question 2007-06-10 22:45:34 +00:00
moodler 158c4b5c80 Added two recent installer langs to CVS 2007-06-09 08:22:46 +00:00
moodler a3eba6f2d2 Automatic installer.php lang files by installer_builder (20070609) 2007-06-09 04:47:52 +00:00
martinlanghoff 8d7e790de7 moodlelib:moodle_request_shutdown() - only call apache_child_terminate if child_terminate is true - MDL-9350
Apparently there _is_ a PHP ini setting controlling
it -- defaults to off.
2007-06-07 21:22:36 +00:00
poltawski ed289f97e5 MDL-8080 Grade exceptions broken for teacher by invalid capability check.i
Thanks to Paul Ortman for the patch.
2007-06-04 22:52:05 +00:00
mark-nielsen 5d7ce9bf29 Fix for MDL-9947, remap activity links during restore process 2007-05-28 17:18:54 +00:00
jamiesensei fbb5ad35e7 MDL-9734 fix for clean_param PARAM_LOCALURL bug 2007-05-27 11:21:55 +00:00
moodler 9e2df8519a Automatic installer.php lang files by installer_builder (20070527) 2007-05-27 04:33:24 +00:00
moodler e4cc5dbc7f Automatic installer.php lang files by installer_builder (20070526) 2007-05-26 04:08:44 +00:00
moodler 34e92f9b8b Automatic installer.php lang files by installer_builder (20070525) 2007-05-25 04:33:33 +00:00
tjhunt 6e2284138b MDL-9878 - fix call-time pass by references. Backported from HEAD. 2007-05-22 14:11:16 +00:00
moodler 73a4864b82 Automatic installer.php lang files by installer_builder (20070522) 2007-05-22 05:22:03 +00:00
gbateson 1a6a597fff use PARAM_ALPHANUM on "section" parameter so that "section=all" is allowed 2007-05-22 04:27:28 +00:00
moodler 9df49de633 Merged fix for MDL-9859 2007-05-21 14:45:05 +00:00
sam_marshall 404d380856 MDL-8227 Merged wiki locking fix 2007-05-21 12:02:24 +00:00
moodler cbc0bc50b1 Fix from MDL-7233 for LDAP change passwords 2007-05-21 05:27:54 +00:00
moodler ae767e7bd3 Automatic installer.php lang files by installer_builder (20070521) 2007-05-21 04:50:35 +00:00
moodler 2ccbd6ccf1 Automatic installer.php lang files by installer_builder (20070519) 2007-05-19 04:43:42 +00:00
skodak 8dbf6bb9e0 MDL-9418 use proper addslashes before each insert; backported from MOODLE_18_STABLE 2007-05-16 20:09:32 +00:00
poltawski 652fab8576 MDL-9819 - Restoring numerical questions was broken 2007-05-15 14:49:14 +00:00
moodler 31942aff61 Automatic installer.php lang files by installer_builder (20070515) 2007-05-15 04:52:50 +00:00
pichetp 5006792896 merging from head so that calculated questions can be imported and other improvments 2007-05-15 03:30:33 +00:00
pichetp 786542c572 merging from head so that calculated questions can be imported and other improvments 2007-05-15 03:23:32 +00:00
pichetp edaaa46655 merging small modifications from head mostly for calculated questions 2007-05-15 03:13:38 +00:00
moodler c0bea40aaf Automatic installer.php lang files by installer_builder (20070512) 2007-05-12 05:47:40 +00:00
csantossaenz 7dd535056e Deleted addslashes_js() because it was impossible to add it to weblib.php 2007-05-11 11:10:10 +00:00
csantossaenz 555bfa16d0 Added function addslashes_js() to make the javacript receive the strings correctly 2007-05-11 10:57:20 +00:00
moodler 470be2688b Automatic installer.php lang files by installer_builder (20070511) 2007-05-11 06:33:10 +00:00
gbateson 135d93ec9e when inserting 'Give Up' button, if site encoding is not iso-8859-1, then set page encoding to get_string('thischarset') 2007-05-11 05:17:42 +00:00
moodler 75943600ed Added CSS for current language MDL-9750 2007-05-09 06:46:37 +00:00
gbateson 7fd3f594da modified "hpNewFunction" to allow Rottmeier quizze (Find-It, Dropdown) s to run on Safari (Mac) 2007-05-07 02:47:17 +00:00
poltawski 55904e49dc MDL-8971 - Fixed typo 2007-05-06 09:39:46 +00:00
moodler 4c5da8022e Automatic installer.php lang files by installer_builder (20070506) 2007-05-06 04:56:05 +00:00
gbateson 2f47a361ff remove duplicate id attribute from body tag; microincrement version to 2006091203 (release 2.2.2) 2007-05-04 02:43:35 +00:00
gbateson 9197627ade set default body font size to "small" 2007-05-03 00:55:20 +00:00
gbateson 4b168cfabc add HP 6.2 templates; add compatability with Safari (Mac browser); microincrement version to 2006091202 (release 2.2.1) 2007-05-02 23:49:59 +00:00
moodler ffa6c35826 Automatic installer.php lang files by installer_builder (20070501) 2007-05-01 04:21:00 +00:00
moodler b0e924a51e Automatic installer.php lang files by installer_builder (20070429) 2007-04-29 04:32:54 +00:00
moodler 58a9623c54 Automatic installer.php lang files by installer_builder (20070428) 2007-04-28 04:25:04 +00:00
tjhunt 1bde9b823c Fix comedy require_once. Merged from MOODLE_16_STABLE. 2007-04-24 21:16:10 +00:00
stronk7 76eea68b9e Now resource/view.php?r=XXX links are recoded properly in backup/restore. MDL-9450
Backported from MOODLE_18_STABLE
2007-04-22 22:07:49 +00:00
skodak 8c0a6839f2 MDL-9483 Problem with question restore relinking when quiz not selected 2007-04-21 12:36:57 +00:00
thepurpleblob a1f951f3a4 MDL-9395:
Trued to call function that did not exist. Old function has been modified
to return valid list of categories and we call that instead.
2007-04-20 12:59:36 +00:00
thepurpleblob 72449953e4 MDL-9395:
Tried to call function that didn't exist. Made old function have
the functionality to return valid categories list and used that.
2007-04-20 12:57:55 +00:00
tjhunt f359daab58 MDL-9432 - Forgot to return success/failure in two places. 2007-04-19 17:37:20 +00:00
tjhunt b33888d124 Fix error message to say the right thing. 2007-04-19 17:16:29 +00:00
skodak 1a5e85a22c fixed MDL-9411 : MDL-9012 has partially wrong fix; backporting of MDL-9207 2007-04-19 12:10:38 +00:00
tjhunt 0dd1becdc7 MDL-9432 - When restoring questions, links are not recoded. Merged from OU moodle. 2007-04-18 15:56:30 +00:00
donal72 61e35a87da MDL-9424 Removing call to MDL1.8 function 2007-04-18 06:56:33 +00:00
cataluke 0c34a17b09 admin/uploaduser.php: Fixed not enrolling user into course if user already exists
Author: Patrick Li <patrick@catalyst.net.nz>
Committer: Luke Hudson <luke@catalyst.net.nz>
2007-04-18 02:45:14 +00:00
donal72 52f24bfec6 Fix for MDL-9216 ("Login as" doesn't work) backported from head 2007-04-18 01:09:15 +00:00
cataluke b2787982b7 MDL-7856 - make database search case-insensitive for PostgreSQL too.
Signed-off-by: Luke Hudson <luke@catalyst.net.nz>


Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
Committer: Luke Hudson <luke@catalyst.net.nz>
2007-04-17 05:57:06 +00:00
stronk7 8f4c3dae23 Fixed quesry to work agains Oracle. Repeated fields + limit
are incompatible for Oracle. MDL-9321
2007-04-16 14:42:30 +00:00
moodler a8c2fc5dee Automatic installer.php lang files by installer_builder (20070416) 2007-04-16 04:23:55 +00:00
martinlanghoff a3b2f4cbeb moodle_request_shutdown(): silence errors when apache_child_terminate() is disallowed - (MDL-9350) 2007-04-16 00:24:44 +00:00
tjhunt 1e066cbf29 MDL-5799 - quiz previews were sometimes showing up in the quiz overview report. 2007-04-12 20:10:47 +00:00
jamiesensei 79dd326093 making notifytiny style a little bigger 2007-04-12 15:35:57 +00:00
stronk7 1f775e8c46 Fixing typo causing some (a few) sites to break on upgrade. Credit
goes to Rafa Gutierrez. MDL-9316

Merged from MOODLE_16_STABLE
2007-04-12 15:31:21 +00:00
martinlanghoff 7b6c65a560 moodle_request_shutdown(): raise $CFG->apachemaxmem to 25MiB for 1.7 and newer 2007-04-12 03:30:20 +00:00
toyomoyo c935b991a1 MDL-9291, temporarily disabling blog this link 2007-04-12 02:17:09 +00:00
martinlanghoff 28ca56c93d Fixed 'off by one' month bug in month select boxes generated by
print_date_selector when users time zone set to GMT-13.


Author: Matt Clarkson <mattc@catalyst.net.nz>
Committer: Matt <mattc@catalyst.net.nz>
2007-04-12 00:45:35 +00:00
mjollnir_ ec3200262d merged: fixing warnings in stats lib - rather than doing an include_once and noticing for every missing mod, check the file exists first from MOODLE_16_STABLE, and fixed up some weirdness in the reports 2007-04-11 23:52:31 +00:00
tjhunt 8539018ed4 MDL-9079 - Paging broken in quiz overview report. 2007-04-11 20:37:36 +00:00
tjhunt 245de1a597 MDL-9303 - General Feedback not shown for essay questions on review screen. 2007-04-11 19:03:34 +00:00
thepurpleblob 3fdd49a75a MDL-9123:
Added language string for error message
2007-04-11 12:19:16 +00:00
thepurpleblob 3ff6c931ee MDL-9123:
No check was made of the validity of the category id read from the form.
So it could theoretically have been spoofed.
2007-04-11 11:02:48 +00:00
toyomoyo c7da0d864e fix for MDL-9268 2007-04-10 05:15:14 +00:00
moodler e97c7b28c5 Automatic installer.php lang files by installer_builder (20070410) 2007-04-10 03:31:59 +00:00
mjollnir_ 2ffbe91234 add support for https source for popups
previously fullscreen.php tried to load any javascript files that were
running in the popup's parent.
If the source of the script didn't start with "http:" it was assumed
that it must be a relative path. This caused problems when it tried to
make it into an absolute path.
Fixed Regex to include support for https
Credit: Peter Bulmer <peterb@catalyst.net.nz>
2007-04-09 20:38:49 +00:00
stronk7 4f3835b601 Now $CFG->apachemaxmem is respected.
Merged from MOODLE_16_STABLE
2007-04-07 16:05:54 +00:00
skodak 445a3c1233 MDL-9227 Inconsistent HTTPS for profile edit page 2007-04-06 07:46:41 +00:00
jamiesensei 4989bc7951 added a style for the required field description that was forgotten. More are missing judging by appearances. 2007-04-06 06:45:16 +00:00
jamiesensei 8eb102ff1c see MDL-8886.
fixes bug that meant :

       $mform->disabledIf('studentfeedbackurl', 'studentfeedback', 'eq', 0);
       $mform->disabledIf('studentfeedbackurl', 'studentfeedback', 'eq', 3);
       $mform->disabledIf('studentfeedbackurl', 'studentfeedback', 'eq', 4);

didn't work.
2007-04-06 06:08:19 +00:00
toyomoyo 9b6cf38c96 fix for MDL-9186, capability fix for calendar 2007-04-05 08:00:40 +00:00
toyomoyo 203743c638 added missing string 2007-04-05 06:06:45 +00:00
toyomoyo c691deff3a fix for MDL-9165, admins should see private blogs 2007-04-05 06:04:24 +00:00
martinlanghoff bf01ed8211 lib/setup moodelib: Introducing moodle_request_shutdown()
Now Moodle will have a 'shutdown_function' function. Right now
registered (and useful) only when running under apache + mod_php.

This initial function checks whether memory usage in this process exceeded
10MiB or $CFG->apachemaxmem (int, in bytes). This is really useful to prevent
using more RAM than we have.
2007-04-05 05:00:23 +00:00
toyomoyo 93cc66aeae fix for MDL-9197, multilang filter not applied to default role in course settings 2007-04-05 03:55:51 +00:00
moodler f103bb199e Automatic installer.php lang files by installer_builder (20070405) 2007-04-05 03:35:14 +00:00
nicolasconnault 476f7cc8ee MDL-9204 New submission wasn't given a timemodified upon creation. 2007-04-05 03:25:27 +00:00
skodak e9a1bffc8f MDL-8802 fixed byteserving broken by adobe anti xss patch; backported from MOODLE_18_STABLE 2007-04-04 19:46:14 +00:00
jamiesensei 377d7c7515 fixes MDL-9195 mform->hardFreeze() doesn't remove id attribute of label for checkbox 2007-04-04 10:29:41 +00:00
moodler 7bc643ebaf Automatic installer.php lang files by installer_builder (20070404) 2007-04-04 03:59:55 +00:00
nicolasconnault 184f9c2b66 MDL-9192:
a.dimmed:link,
a.dimmed:visited {
  color:#AAAAAA;
}
2007-04-04 02:38:19 +00:00
nicolasconnault 93fa4ca922 MDL-9193 2007-04-04 02:20:43 +00:00
nicolasconnault 552de335d0 MDL-9147 2007-04-03 08:41:51 +00:00
toyomoyo 9e6e743dfc fix for broken blog utf8 migration 2007-04-02 08:41:57 +00:00
moodler f9bbb1031e More changes to make mforms compatible in 1.7 with 1.8 MDL-9159 2007-04-02 05:38:04 +00:00
moodler 290b74fd49 Removed conflicts 2007-04-02 05:29:33 +00:00
moodler 7122026066 Fixed a conflict 2007-04-02 05:27:52 +00:00
moodler 70cade16e3 Complete port of Moodle 1.8 formslib.php back into 1.7 to aid development of any modules that may use formslib in 1.7
MDL-9159
2007-04-02 05:26:03 +00:00
toyomoyo 9146dd83de backporting more efficient get_my_courses 2007-04-02 03:50:15 +00:00
toyomoyo 9e162a23da admins should not need course:view 2007-04-02 02:37:09 +00:00
moodler 3df033ca4a Better handling of coursemanagers when none are being shown MDL-9139 2007-04-01 15:51:05 +00:00
moodler 5241345d02 Merged solution for MDL-6458 typo 2007-03-31 05:24:50 +00:00
stronk7 62cf504bdd fixing check of environmental tests. 2007-03-30 15:59:42 +00:00
moodler cf47a79c1d Merged changes from 1.8 for "course creators" problem MDL-8093 2007-03-30 15:39:55 +00:00
stronk7 12e91437f3 Adding a missing parameter to the "add new course" button. MDL-9129
Backported from MOODLE_18_STABLE
2007-03-30 15:38:32 +00:00
tjhunt a065fdd6f9 Backporting a layout fix from Moodle 1.8 2007-03-30 13:50:47 +00:00
tjhunt e0ddea8b8f Small code cleanup to fix an obscure warning. If you got an error in the middle of creating a quiz attempt, you could get an attempt with no states. Then that caused an error when the attempt was deleted. 2007-03-30 10:17:06 +00:00
tjhunt d7df238204 Fix notice. 2007-03-30 09:33:37 +00:00
moodler db2105c889 Bumping after 1.7.2 release 2007-03-30 09:00:54 +00:00
moodler 367dfbd905 Updating for 1.7.2 release 2007-03-30 08:40:02 +00:00
toyomoyo b17e52001c fix for MDL-9021, missing add_to_log() call 2007-03-30 08:04:07 +00:00
gbateson 153fd875b5 fix the display of the special chars keypad (in JCloze and JQuiz) 2007-03-30 03:41:04 +00:00
moodler a43dc9df02 Automatic installer.php lang files by installer_builder (20070330) 2007-03-30 03:35:59 +00:00
toyomoyo f9f150290f adding a missing string 2007-03-30 02:27:27 +00:00
toyomoyo 8779cb8b46 changing help file as helen suggested 2007-03-30 02:23:19 +00:00
tjhunt d7378d19ec MDL-9094 - Penalty factor is meaningless for Essay questions, so remove it from the editing form. 2007-03-29 22:59:09 +00:00
skodak 6219022575 MDL-4313 LDAP doesn't properly escape extra quotes in course details; backported from MOODLE_18_STABLE 2007-03-29 21:57:11 +00:00
andreabix d9ec40f57f Fixed "Call to undefined function print_box()" 2007-03-29 18:42:20 +00:00
tjhunt ea790c7db1 MDL-6269, MDL-8958, MDL-8990 - Major fix to do with each attempt builds on last:
It used not to work with random questions, and there were problems with the computation of the grade, and regrading. Fix thanks to Paulo Matos, who not only fixed the bug and tested it, but was also incredibly patient waiting for me to have time to commit the changes to CVS.

This commit also includes a backport of a small state logic changes to the 1.7 stable branch.
2007-03-29 16:35:14 +00:00
csantossaenz f0403cbba2 Fixed problem with the popup window options. Now, they are saved when you update an SCORM activity and you change those options. 2007-03-29 08:18:35 +00:00
toyomoyo 88b5f9b726 fix for MDL-8983. hidden assignment requires a help file 2007-03-29 06:39:11 +00:00
toyomoyo 4d0ec2a375 file hiddenassign.html was added on branch MOODLE_17_STABLE on 2007-03-29 06:39:11 +0000 2007-03-29 06:38:35 +00:00
tjhunt 7cb4fb6a88 MDL-9061 - Only show global assign roles warning if you are assigning roles in the global context! Also, change name of admin menu entry to reduce confusion. Backported from MOODLE_18_STABLE. 2007-03-28 16:57:45 +00:00
csantossaenz 504317a519 Fixed backup problem for scorm module. Now, it includes needed files in moddata/scorm. even though the backup is done without user data and files 2007-03-28 15:04:57 +00:00
toyomoyo 110351a2a6 fix for MDL-7764, site role definitions not passed down 2007-03-28 07:50:35 +00:00
moodler 9599ee24b9 dos2unix and removed some XHTML brokenness 2007-03-28 02:47:12 +00:00
moodler 78baa1aaad Latest cornflower from Jeff for MDL-9009 2007-03-28 02:40:28 +00:00
moodler 1f4025a70e file hdbgend.jpg was added on branch MOODLE_17_STABLE on 2007-03-28 02:40:30 +0000 2007-03-28 02:24:36 +00:00
moodler 7e147392e1 file hdbg.jpg was added on branch MOODLE_17_STABLE on 2007-03-28 02:40:30 +0000 2007-03-28 02:24:35 +00:00
moodler b7f0d27621 file cornflower.css was added on branch MOODLE_17_STABLE on 2007-03-28 02:40:28 +0000 2007-03-28 02:24:34 +00:00
nicolasconnault 0428d11d76 MDL-9061 2007-03-27 07:28:20 +00:00
nicolasconnault b5a5a482bd MDL-9034: Brought lang file up to sync. The field_mapping string doesn't exist anywhere, it was a typo in enrol/database/config.html, and should have been remote_fields_mapping. 2007-03-27 05:46:11 +00:00
moodler 699768ebbc Merged fix for MDL-9052 from 1.8 2007-03-27 05:14:18 +00:00
moodler 6bd9066b7f Automatic installer.php lang files by installer_builder (20070327) 2007-03-27 03:52:08 +00:00
toyomoyo 6af4e1c8c4 applying inaki's patch for MDL-9012, course autocreation doesn't work in enrol/database 2007-03-26 06:50:56 +00:00
toyomoyo a5c41b6a5a fix for MDL-9010, course request button should not appear if it's disabled 2007-03-26 05:51:28 +00:00
toyomoyo 0bffc5576e fix for MDL-8336, lacking of viewuseractivitiesreport 2007-03-26 04:11:48 +00:00
toyomoyo 21982b71a6 fix for MDL-9035, backporting get_role_users() with hidden param 2007-03-26 02:11:45 +00:00
stronk7 41a5c34f91 Fix a problem with glossary not being able to sort by firstname.
Backported from MOODLE_18_STABLE
2007-03-24 01:00:29 +00:00
stronk7 d08b6757e6 One default was causing author view not being able to sortby firstname or lastname.
Backported from MOODLE_18_STABLE
2007-03-24 00:39:30 +00:00
skodak dfeb385672 MDL-9017 add mime type for ico files; backported from MOODLE_18_STABLE 2007-03-23 13:07:50 +00:00
toyomoyo b36064f742 fix for MDL-9016, clearing context cache after remove_course_content() 2007-03-23 07:20:16 +00:00
moodler 3dfb5e4379 Automatic installer.php lang files by installer_builder (20070323) 2007-03-23 03:42:39 +00:00
toyomoyo 7f9f7ec944 fix for MDL-8987, guests should not be allowed to view blogs flagged as site blogs 2007-03-23 01:42:19 +00:00
skodak 1828849b1e MDL-8347 Cannot create new glossary category if category with same name exists in another course on site; patch by Ray Lawrence; backported from MOODLE_18_STABLE 2007-03-22 22:45:51 +00:00
tjhunt ff7253c2c1 MDL-7241 - Manual grading report, sort by completed time didn't. Merged from MOODLE_16_STABLE. 2007-03-22 21:31:27 +00:00
moodler 52257f15d7 Automatic installer.php lang files by installer_builder (20070322) 2007-03-22 03:56:14 +00:00
toyomoyo 4c1af19cf6 MDL-7164, Mark Nielson's patch for remove_course_content not calling instance_destroy() 2007-03-22 02:09:54 +00:00
tjhunt 48a2b5ad42 MDL-7259 - Item analysis report does not use the right format_text settings. Merged from MOODLE_16_STABLE. 2007-03-21 23:25:23 +00:00
tjhunt 9e8cabd7eb Fix whitespace problems and Eclipse warnings in Item Analysis quiz report. 2007-03-21 23:04:27 +00:00
skodak e28cc09b24 MDL-7647 Broken links on confirmation email (or others) - patch by Paulo Matos 2007-03-21 21:57:00 +00:00
thepurpleblob 6282be2fd9 Check for empty text strings. Thanks to Quedoc. 2007-03-21 11:13:48 +00:00
toyomoyo e6b8565063 adding a string 2007-03-21 06:19:08 +00:00
toyomoyo bce83e8c76 backporting changes for MDL-8981, roles assigned at site level may result in a lot of default subscriptions 2007-03-21 06:05:13 +00:00
moodler e2bf5eec99 Automatic installer.php lang files by installer_builder (20070321) 2007-03-21 03:51:04 +00:00
toyomoyo 87ab475575 fix for MDL-7552, hidden assignments for 1.7 2007-03-21 00:48:41 +00:00
tjhunt 9022696d6d MDL-8978 - Regression from MDL-6386. Merged from MOODLE_16_STABLE. 2007-03-21 00:13:33 +00:00
tjhunt 418cc2032b MDL-8299 - Wrong capability on review.php. 2007-03-20 22:44:32 +00:00
tjhunt 25769ccd61 MDL-8140 Other units disappear from the editing form when there is no unit with multiplier 1. 2007-03-20 22:22:00 +00:00
skodak d0e6183436 MDL-8975 fix parameter handling in repository plugin; backported from MOODLE_18_STABLE 2007-03-20 19:47:58 +00:00
skodak ca3c1ddf40 SC#374 removing obsoleted utf8migration code 2007-03-20 16:24:11 +00:00
tjhunt ec9f7c117e MDL-6386/MDL-6462 - yet more special character issues with multianswer. I think I have got them all this time. Backported from HEAD. 2007-03-20 14:31:26 +00:00
moodler 7f0984c1f3 Automatic installer.php lang files by installer_builder (20070320) 2007-03-20 03:36:20 +00:00
stronk7 dc8207c52a small typo in var name
Merged from MOODLE_16_STABLE
2007-03-19 16:11:01 +00:00
skodak 4419fe33a5 MDL-8759 reverted + backported fix for cron logs 2007-03-19 10:11:27 +00:00
toyomoyo ba0dabcc31 backporting coursemanagers to 1.7 2007-03-19 06:40:59 +00:00
martinlanghoff 3810ca294d Auto-linking filters: fix serious caching bug in forum mailouts
Autolinking of glossaries, activity, resources and wiki names were using a
trivial single-entry cache implemented with static vars. The cache was _not_
keyed on course.

This bug was visible during forum_cron() which walks many courses. The cache
would get "stuck" on the first course that had something to put in the cache.
All mailouts from there onwards would autolink to stuff in the wrong course.
2007-03-19 06:13:13 +00:00
toyomoyo f493763e04 backporting MDL-8578, students can post and reply in news forum 2007-03-19 02:47:30 +00:00
toyomoyo 3140dc600d backporting MDL-8578 students can post and reply in news forums 2007-03-19 02:46:33 +00:00
moodler 30739f6651 Automatic installer.php lang files by installer_builder (20070318) 2007-03-18 03:29:57 +00:00
poltawski 071d36c917 MDL-6386 - Regression from MDL-6462, lost stripslashes in CLOZE question,
thanks to Joseph Joseph Rézeau  for his attention to this issue
Backported from MOODLE_18_STABLE
2007-03-17 22:57:06 +00:00
pichetp 0540d3479c adding </p> lines 110,112 2007-03-16 22:34:06 +00:00
skodak 721a2de984 MDL-8883 fixed double backslashes problem in filter settings; backported from MOODLE_18_STABLE 2007-03-16 22:19:07 +00:00
mark-nielsen 78d68eb5b2 Was missing context in has_capability() call. This was found in MDL-8196 2007-03-16 03:44:04 +00:00
toyomoyo 5c5cb3ec7e back porting changes for MDL-8820, users with moodle/user:editprofile assigned at user context should be able to edit them 2007-03-16 01:35:34 +00:00
bobopinna b06855297c Changed coursepacket string with package 2007-03-15 20:42:41 +00:00
stronk7 dbd0f586a2 Fix small bug only reproduced in tests about changing field names and
amldb_field object becoming modified. Novice OOP bug :-(
2007-03-15 19:58:47 +00:00
bobopinna eb2a36fb55 Fixed the problem with asset and review mode checkbox in view.php 2007-03-15 19:35:25 +00:00
stronk7 a45296043e Testing comments and default clauses containing chars to be escaped. 2007-03-15 19:13:17 +00:00
stronk7 4bf57cbfa6 DB escaping comments. MDL-8918 2007-03-15 18:59:02 +00:00
bobopinna 43d78a231d Removed the last word course in scorm module 2007-03-15 17:40:45 +00:00
bobopinna 45d44e7e80 Fixed a problem with external packages 2007-03-15 15:54:36 +00:00
bobopinna ff6bc9fbc2 Fixed bug MDL-8161 also here 2007-03-15 15:49:33 +00:00
bobopinna 4bdf76ae71 removed a couple of debugging print 2007-03-15 15:25:51 +00:00
tjhunt 97feab527e MDL-6462 - Cloze (multianswer) question special character issues. Merged from MOODLE_16_STABLE. 2007-03-15 12:59:20 +00:00
tjhunt 903f3f54ed Fix notice. 2007-03-15 12:53:07 +00:00
bobopinna a1fec0e3ce fixed a typo (ThaNck Andrea) 2007-03-15 10:49:39 +00:00
toyomoyo e07f4ac436 fix for MDL-8908, draft blogs should not be visible 2007-03-15 06:14:08 +00:00
toyomoyo 25a37d70ff fix for MDL-7939, teachers, non-editting teachers and course creators should see hidden courses 2007-03-15 04:24:28 +00:00
moodler 5446beaa73 Automatic installer.php lang files by installer_builder (20070315) 2007-03-15 03:32:10 +00:00
tjhunt cb6281b339 MDL-8127 - bad use of DESCRIPTION constant in quiz module causes upgrade to fail. Thanks to Pavel Krejci for the fix. Merged from MOODLE_17_STABLE. 2007-03-14 21:24:54 +00:00
tjhunt 3696a3723e Oops, reverting. Eloy had already fixed it. 2007-03-14 21:10:59 +00:00
tjhunt 8fa821d514 MDL-8232 - can't use = on TEXT colums with MSSQL - was breaking numerical question type upgrade. 2007-03-14 21:08:23 +00:00
poltawski 9bb4b97e3d Fixed check for section for MDL-8360, merged from MOODLE_18_STABLE 2007-03-14 16:35:10 +00:00
thepurpleblob 87c39bf549 Fixed true/false bug due to new 'correctanswer' field. 2007-03-14 15:15:27 +00:00
ethem 91f54796bd Code cleanup 2007-03-14 13:43:19 +00:00
poltawski fd52f257ff MDL-8360 - Currently can't bookmark admin searches, so disable the ability to bookmark
the search page
2007-03-14 11:50:53 +00:00
skodak 94c9630d78 MDL-8897 fixed shell commands in tex and algebra filters 2007-03-14 11:10:22 +00:00
toyomoyo 84718c0056 fix for MDL-8885, teachers should not be able to hide courses if they can not view hidden courses 2007-03-14 04:34:54 +00:00
moodler 0a16d1722a Automatic installer.php lang files by installer_builder (20070314) 2007-03-14 03:50:40 +00:00
toyomoyo abb8f34ecf MDL-8885, do not show bulk messaging option if user has no capability 2007-03-14 01:52:36 +00:00
toyomoyo 8af16cbfdb MDL-8885 editting teachers should be able to see all messages in a course 2007-03-14 01:39:43 +00:00
bobopinna 54c5ce36db Fixed bug MDL-8725
Just a typo in regular expression
2007-03-13 21:04:44 +00:00
tjhunt 0b17d072cf Eliminate bizarre use of function_exists. 2007-03-13 17:42:51 +00:00
tjhunt cd4469af52 Entity decoding only done the right number of times on import, not once too often.
Also, fix a notice and and Eclipse warning.
Backported from HEAD.
2007-03-13 16:27:52 +00:00
tjhunt 01d0a4f289 Use the right string processing when outputting question text on import/export. Backported from HEAD 2007-03-13 16:24:36 +00:00
tjhunt 8f8f6e7c92 Use the right string processing functions when outputting question names. Backported from HEAD 2007-03-13 16:21:07 +00:00
poltawski 90fe299739 Regression using the wrong config variables, see MDL-8257 2007-03-13 14:31:56 +00:00
moodler bceb6eb9d8 MERGED MDL-8872 from 1.8 removed "course" mentions from scorm interface 2007-03-13 08:47:52 +00:00
toyomoyo 7989f2ee28 allow guests to see the reply link 2007-03-13 04:46:55 +00:00
toyomoyo 78a0f36730 fixing a warning 2007-03-13 04:33:54 +00:00
toyomoyo b2a48214f8 fix for MDL-8864, reply link bug for users with replypost set to prevent 2007-03-13 04:28:39 +00:00
toyomoyo 76d9513015 fix for MDL-8767, when doing forum_cron, loop by user instead of post, backporting to 1.7 2007-03-13 03:38:06 +00:00
moodler 4d89cba698 Automatic installer.php lang files by installer_builder (20070313) 2007-03-13 03:33:55 +00:00
moodler e8189c3074 fixing a broken has_capability call 2007-03-13 00:54:25 +00:00
thepurpleblob af17ae8a1b MDL-8857
Make numerical and essay question formats more consistent.
2007-03-12 16:29:45 +00:00
skodak 8626d4bc24 MDL-5229 and MDL-6196 adding gb18030 mime header encoding; partial backport from MOODLE_18_STABLE 2007-03-12 08:45:02 +00:00
moodler f0b99a9fec fix for forceloginforprofile for parents 2007-03-12 01:20:32 +00:00
skodak fcb9e23701 MDL-8849 use proper value quoting; backported from MOODLE_18_STABLE 2007-03-11 20:01:15 +00:00
moodler ab496d313c Merged from head MDL-8842 2007-03-10 14:51:51 +00:00
moodler 0e53408ad7 Automatic installer.php lang files by installer_builder (20070310) 2007-03-10 03:29:07 +00:00
tjhunt 4b1f48e2ae MDL-8177 - Random questions selected deleted questions. Backported from MOODLE_18_STABLE. 2007-03-10 00:34:35 +00:00
pichetp 5530732c16 merge from 18 merged 2007-03-09 06:02:16 +00:00
moodler 5b4e26864a Automatic installer.php lang files by installer_builder (20070309) 2007-03-09 03:46:00 +00:00
moodler 1081ccc99b back porting MDL-8681 course import creates duplicate role into 1.7 2007-03-09 02:41:48 +00:00
skodak c0ad0e5a98 MDL-8814 fixed typo; backported from MOODLE_18_STABLE 2007-03-08 15:24:44 +00:00
moodler b6db8ab49d fix for MDL-7552, backporting hidden assignments (teacher) for 1.7 2007-03-08 05:25:42 +00:00
moodler ce455a9a79 merged do not force parents to log in 2007-03-07 06:25:36 +00:00
moodler b6d3fccd59 Merged fixes for MDL-8785 from 1.8
BIG SPEED INCREASE!!!!!!
2007-03-07 05:00:05 +00:00
moodler 78be3cdb8b backporting code to fix hidden teacher upgrade 2007-03-07 01:38:41 +00:00
tjhunt 837588a772 MDL-8349 - responses not being filtered in history display. Backported from MOODLE_18_STABLE. 2007-03-06 18:00:39 +00:00
nicolasconnault f398c77963 MDL-8759 - Unset $USER 2007-03-06 06:09:44 +00:00
nicolasconnault 2fd2fdbdb9 MDL-8771 - Restricted has_capability() sanity checks to DEVELOPER debug mode 2007-03-06 05:29:00 +00:00
moodler 92d3d576fb fix for MDL-8589, found more than one record in get_record_sql 2007-03-06 01:37:54 +00:00
moodler ef06f7f85b Added new string locations to 1.7 2007-03-05 12:28:58 +00:00
moodler e7a5ad8da9 Fix for MDL-8318, show cost info on info page 2007-03-05 05:41:21 +00:00
moodler d8882ec822 Automatic installer.php lang files by installer_builder (20070304) 2007-03-04 03:41:18 +00:00
gbateson e21f0b1042 set JQuiz[7]=false, to fix checking answers for JQuiz Hybrid questions when in ShortAnswer mode 2007-03-04 01:19:42 +00:00
skodak b6057d4afa MDL-8733 fixed approving logic when editing; merged from MOODLE_16_STABLE 2007-03-03 12:25:40 +00:00
pichetp bf18b2aa09 ggrading small numbers MDL-8478 merge from 18_STABLE 2007-03-02 21:14:48 +00:00
skodak db365a121d sesskey added to logout.php MDL-8727 ; backported from HEAD 2007-03-02 17:05:25 +00:00
moodler d243cd17c5 Commenting this out for now for performance reasons, should be fixed soon!
See MDL-8385
2007-03-02 10:10:52 +00:00
stronk7 01be5c29cc Skipping thousands of require_once() calls because PHP5
is really slow (and heavy) with them. MDL-8700
2007-03-02 09:39:50 +00:00
moodler 1ac2df9163 adding backward compatibility for question restore 2007-03-02 08:01:47 +00:00
nicolasconnault 800fa68224 MDL-8633 - Initialised $output at head of function. 2007-03-02 05:48:03 +00:00
moodler 4876f94726 should be manualcomment 2007-03-02 05:20:39 +00:00
moodler c5c47d0c43 fix for MDL-8491, feed back for essay questions not backed up 2007-03-02 04:51:31 +00:00
mjollnir_ 731f877fdb Merged from MOODLE_16_STABLE: fixing bug MDL-8651: import course data should clean up after itself 2007-03-02 01:43:15 +00:00
moodler acb417721d Fixed unenrol_student MDL-8591 2007-03-01 08:04:03 +00:00
moodler 60f8f5bf42 Don't redirect guests to mymoodle page! MDL-8594 2007-03-01 07:56:24 +00:00
nicolasconnault df18c3141e MDL-8693 Fixed the double-equal typos (2) 2007-03-01 07:28:20 +00:00
defacer 4edc434002 Merging from MOODLE_16_STABLE:
Fix for MDL-8515: Prefixing chat messages with a slash should not hide the
user's name unless it's a special command we handle.

I completely removed the emoticon handling case, but it seems like it was
not needed for a long time now? Emoticons work just fine without it.
2007-03-01 07:03:29 +00:00
martinlanghoff 3ce66e9f7b MDL-7385 - stats_cron_daily() - If a module is missing, continue processing 2007-02-28 03:04:05 +00:00
martinlanghoff fb3501f935 Fixing MDL-6795 - Stats never runs. stats_monthly table gets very full - avoid double tz calculations in stats_getmidnight() 2007-02-28 02:51:11 +00:00
martinlanghoff 757d66b504 Stopping warning and possible errors in graphlib.php caused by bugs in statsgraph.php
Ported from LDC (1.5) branch


Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2007-02-28 00:32:16 +00:00
martinlanghoff 9861a3997a hotpot: Fixing db upgrade script
Note MySQL upgrade (earlier on by version)


Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2007-02-28 00:28:39 +00:00
martinlanghoff e05e5d132e (Fixing upgrade script) Only try to disable lams if it is installed
Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2007-02-28 00:25:46 +00:00
martinlanghoff 6488b3be2e blocks: Making UTF8 migration script work with blocks not on course page, etc.
Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2007-02-28 00:10:12 +00:00
martinlanghoff 748e20f006 Fixing 1.5->1.7 upgrade bug (get_courses was used unnecessarily in upgrade process, and relies on roles)
Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
2007-02-28 00:07:22 +00:00
stronk7 da0dcaef1b Fixing RSS link to source. http://moodle.org/mod/forum/discuss.php?d=65762 2007-02-27 18:19:47 +00:00
stronk7 9babd808f8 Fix some warnings generated after enrol because of the LAMS module. MDL-8078 2007-02-27 17:39:48 +00:00
defacer 57c07037a7 Not needing this anymore, we now have Moodle Docs. 2007-02-27 14:40:55 +00:00
defacer 2eb862ba18 Merging from MOODLE_16_STABLE:
Fix for MDL-4701: Event URLs now include anchor so that the event is immediately visible.
2007-02-27 14:30:33 +00:00
defacer e5c482b517 Merging from MOODLE_16_STABLE:
Bugfix: skodak's fix for MDL-5991 is needed here as well.
2007-02-27 13:58:56 +00:00
defacer 61c7621b80 Changing email addresses that caught my eye in the comments. 2007-02-27 13:48:49 +00:00
defacer 595687a2f1 Fix for MDL-8402:
$CFG->calendar_weekdays wasn't saved correctly and misbehaved.

I took the opportunity to rewrite a little HTML too.
2007-02-27 12:17:58 +00:00
moodler 6e2e65e499 fixing wrong capability check 2007-02-27 05:48:15 +00:00
moodler 997a36bb09 fix for MDL-8666, groups import broken 2007-02-27 05:42:01 +00:00
moodler 8b03cdac79 fixing typos 2007-02-27 04:38:05 +00:00
defacer 6b0bfc914c Bugfix: $CFG->calendar_adminseesall was not working at all, Moodle behaved
as if it were always on. Reported at http://moodle.org/mod/forum/discuss.php?d=65500.
2007-02-27 00:33:18 +00:00
moodler 9f5ceda372 Automatic installer.php lang files by installer_builder (20070226) 2007-02-26 03:39:18 +00:00
mjollnir_ d550a1409b fixing MDL-8662 2007-02-26 00:18:02 +00:00
defacer e56a129d56 Merged from MOODLE_16_STABLE:
Fix for MDL-4940: Social Activities block disappears when editing course settings.
2007-02-24 23:24:43 +00:00
moodler 9a8d870765 Automatic installer.php lang files by installer_builder (20070224) 2007-02-24 03:37:11 +00:00
mark-nielsen be724f381e [Fixed] MDL-8637: lesson_answers answer field can be null 2007-02-23 17:27:13 +00:00
thepurpleblob c6a0fc48df MDL-8602
Don't count modules where course=0 (ie, they must exist in real courses)
2007-02-21 14:57:18 +00:00
tjhunt 61e6471fce Another wretched adslashes problem. Roll on placeholder. Thanks to Howard Miller. 2007-02-20 15:17:45 +00:00
moodler 3ad11e88b2 fix for MDL-8568, users in modules with sepearate groups can not revert to all participants mode 2007-02-20 03:13:37 +00:00
moodler 156f63c804 applying nick's patch to MDL-8534, typo in restorelib.php 2007-02-20 01:02:32 +00:00
lamsdev ca9de648a8 Changed from using lib/soap/nusoap.lib library directly to using lib/soaplib.php.
Fix for MDL-6224
2007-02-20 00:34:57 +00:00
stronk7 66d6716a02 Changing iso-8859-1 encoding of excel files to windows-1252. It adds support for
some more (a few) characters. MDL-7993

Merged from MOODLE_16_STABLE
2007-02-19 23:21:33 +00:00
stronk7 19906f7074 Backporting excellib with support to $CFG->excelisofiles to 17_STABLE.
MDL-7993. http://moodle.org/mod/forum/discuss.php?d=53302
2007-02-19 22:26:54 +00:00
skodak b8dececceb MDL-8570 outdate flv player; backported from HEAD 2007-02-19 13:59:12 +00:00
ethem 068be51fa0 Removed unnecesary code. 2007-02-19 12:01:54 +00:00
tjhunt 85a430d5be MDL-8145 - Add more options to the add random questions dropdown. 2007-02-19 04:24:09 +00:00
moodler 3b00cdbff0 Automatic installer.php lang files by installer_builder (20070219) 2007-02-19 03:33:45 +00:00
koenr 9e0bad4909 MDL-8400 Changed currency of peru to Nuevo Sol 2007-02-17 23:37:03 +00:00
tjhunt b430f84c4c MDL-8154 - Typo in course search code. Fix thanks to Anthony Borrow. 2007-02-17 17:16:41 +00:00
vyshane 014161956c Fix for MDL-7796 "Default permissions for Course Creators are too permissive". Changed some permissions from allow to inherit. Changed course deletion checks to allow course creators to delete courses. 2007-02-16 08:15:02 +00:00
moodler 5f842b21bd Automatic installer.php lang files by installer_builder (20070216) 2007-02-16 03:38:46 +00:00
moodler ca3a97b8c1 adding missing capability check for manage roles page 2007-02-16 02:39:28 +00:00
moodler 5b6af116c1 fixed wrong context, it should be possible to manage a single block 2007-02-16 01:24:30 +00:00
skodak a9fd5db642 MDL-7722 fixed wrong cleaning in backup paths; backported from HEAD 2007-02-15 10:06:10 +00:00
moodler 2f26b36af3 Merged environment checks during upgrade from 1.8 and 1.9 2007-02-15 06:59:32 +00:00
moodler c2fe49c5e7 Added new strings for upgrade environment checks. MDL-8527 2007-02-15 06:52:34 +00:00
vyshane 7df5ccc871 Fix for MDL-8072 - 'In the "Quiz" activity with the "Adaptive Mode" on, the "Multiple Choice" a message informing the student was penalized with the Penalty Factor is displayed when the answer given by the student is correct.' 2007-02-15 06:05:01 +00:00
stronk7 cf507be4c0 PHP 4 assignment is by value so course_header (containing edited names)
wasn't being modified. MDL-8298
2007-02-14 23:50:04 +00:00
skodak 9e8bc0e590 MDL-8268 fixed block get_string, patch by Mark Nielsen; backported from HEAD 2007-02-14 23:02:15 +00:00
skodak b50965414e MDL-8268 fixed get_user_capability_course(), patch by Mark Nielsen; backported from HEAD 2007-02-14 22:51:17 +00:00
skodak f2592eb65e MDL-8469 increase memory limit in cron due to changed calculation of used memory in PHP 5.2.x - the real memory useage is the same, but the reported size of used memory is now more accurate; backported from HEAD 2007-02-14 21:00:58 +00:00
vyshane e9d837a1a2 Fix for MDL-3681 "Duplicate Message-IDs in Forum mail". 2007-02-14 07:20:18 +00:00
moodler a650e7bb3a Automatic installer.php lang files by installer_builder (20070214) 2007-02-14 03:49:50 +00:00
vyshane 974dde3777 Simple fix for MDL-3583 "tabs text confusing". 2007-02-14 02:54:48 +00:00
vyshane 0ba544e97d Fix for MDL-3370. Forum: Unread messages shouldn't link to read. 2007-02-14 01:57:34 +00:00
stronk7 72395f4d2a Some minor js problems. MDL-7811 and MDL-6481
Merged from MOODLE_16_STABLE
2007-02-13 23:39:21 +00:00
watcanz 74780decb8 Corrected for 1.6.4 2007-02-13 21:05:41 +00:00
skodak f167056a18 MDL-8490 Glossary student not being able to edit entries; backported from HEAD 2007-02-13 19:29:51 +00:00
nfreear 375016e822 Fix for MDL-8507 "Local language pack-name can appear in language code" (merge from HEAD.) 2007-02-13 13:40:58 +00:00
nfreear ec6c6dae3f Fixes bug MDL-7257, "stylesheet bug: text color undefined" (merged from HEAD). 2007-02-13 12:12:36 +00:00
skodak 463b6cbe64 MDL-8498 Assignment - Notification of feedback e-mails to students not being sent 2007-02-13 08:41:26 +00:00
moodler 08f4e03f53 FIxes so that no-one can "login as" users who have "doanything". MDL-8411 2007-02-13 08:30:25 +00:00
vyshane 593d5992c0 Fix for MDL-8431 "In qanda forum: Undefined property: object::$id" 2007-02-13 05:24:32 +00:00
moodler 671a35735b Automatic installer.php lang files by installer_builder (20070213) 2007-02-13 03:51:43 +00:00
toyomoyo c7bbf43c12 fix for MDL-8480, external db user lang sync problem 2007-02-13 03:09:01 +00:00
vyshane 8dd4116941 Added get_my_courses() to forum_get_readable_forums(). Thanks Eloy for patch :-) This is related to MDL-8385. See tracker for discussion. 2007-02-13 02:22:05 +00:00
toyomoyo 821a2a750b fix for MDL-8358, wrong count for not graded assignments 2007-02-12 06:49:37 +00:00
moodler 4351ce8a6b Automatic installer.php lang files by installer_builder (20070212) 2007-02-12 03:51:39 +00:00
vyshane d97feb678a Fix for MDL-8459 (Indent left bug). 2007-02-09 05:15:52 +00:00
toyomoyo 1f49b80193 fix for MDL-8399, can not unassign admin at course level 2007-02-09 03:08:17 +00:00
vyshane 2edb2fbaf1 Fixes for MDL-8420 and MDL-8385. 2007-02-09 01:35:46 +00:00
vyshane 7aa8c1329f Small cleanup 2007-02-09 01:27:34 +00:00
stronk7 04f64ffbe0 Limit table comments to 60cc for MySQL. MDL-7765 2007-02-09 00:32:32 +00:00
stronk7 bdc1bb3358 Delete backup records on course delete. MDL-8314
Merged from MOODLE_16_STABLE
2007-02-09 00:11:45 +00:00
vyshane 8e42353e0e Added new function get_all_subcategories() 2007-02-08 08:04:35 +00:00
vyshane 1ab3830750 Removed IE-specific hack for resource deletion. 2007-02-08 05:34:44 +00:00
vyshane 45ce915b79 Updated YUI Library to 0.12.2. This seems to have fixed MDL-8287. 2007-02-08 05:30:18 +00:00
vyshane 2a28db59c3 file yahoo-dom-event.js was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:57 +0000 2007-02-08 05:19:48 +00:00
vyshane f18d2309fb file utilities.js was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:52 +0000 2007-02-08 05:19:48 +00:00
vyshane bc516d11c1 file README was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:56 +0000 2007-02-08 05:19:48 +00:00
vyshane 75ee3dfa69 file README was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:51 +0000 2007-02-08 05:19:48 +00:00
vyshane 7dac46e80c file tabview.js was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:41 +0000 2007-02-08 05:19:47 +00:00
vyshane 23cbd7e82b file tabview-min.js was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:40 +0000 2007-02-08 05:19:47 +00:00
vyshane e2612a5522 file tabview-debug.js was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:40 +0000 2007-02-08 05:19:47 +00:00
vyshane 41fd2c3924 file reset-fonts-grids.css was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:37 +0000 2007-02-08 05:19:47 +00:00
vyshane 7020a2ac33 file border_tabs.css was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:42 +0000 2007-02-08 05:19:47 +00:00
vyshane cf3f87a641 file README was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:39 +0000 2007-02-08 05:19:47 +00:00
vyshane 2500eb7ead file README was added on branch MOODLE_17_STABLE on 2007-02-08 05:30:37 +0000 2007-02-08 05:19:47 +00:00
thepurpleblob 0115262560 MDL-8349 Some of the overidden methods had got out of sync with parent class. 2007-02-07 11:34:53 +00:00
thepurpleblob 7c944b7cbe MDL-8450 Added support for including question categories in a quiz export. Also a bit of format tidy up and fix a misshandled sesskey. 2007-02-07 10:27:13 +00:00
thepurpleblob e264752381 MDL-8450 Added support for including question categories in a quiz export. 2007-02-07 10:12:36 +00:00
thepurpleblob 075f61025c MDL-8450 Added support for including question categories in a quiz export. 2007-02-07 09:56:57 +00:00
vyshane 085fecaf86 Changed require to require_once to fix function redeclaration error. 2007-02-07 07:08:02 +00:00
moodler 970d2432d7 Automatic installer.php lang files by installer_builder (20070207) 2007-02-07 03:34:57 +00:00
stronk7 0d8057b119 Fixed two schema-fk typos. MDL-8427 2007-02-06 15:50:03 +00:00
stronk7 2786c8fd73 Generators can use ddllib.php stuff (I missed this some days ago) 2007-02-05 17:01:37 +00:00
moodler e1555199db Merged site name apostrophe problem in MDL-8416 2007-02-05 06:53:22 +00:00
stronk7 6defede491 Fixing one little-little bug about user->ajax being nullable. MDL-8421 2007-02-04 20:05:09 +00:00
gbateson 47e1151f92 allow empty JQuiz questions (which have at least one answer) 2007-02-03 01:12:05 +00:00
gbateson e8dc4c6cb1 omit empty answers from JQuiz import 2007-02-03 00:35:54 +00:00
vyshane db8598ca48 Made default for forceloginforprofiles to be 1. Related to MDL-8385. 2007-02-02 08:13:07 +00:00
vyshane b0252a5c00 Fix for MDL-8385. 2007-02-02 07:55:30 +00:00
moodler 47cc07674c Added some help link text for Moodle 1.7 MDL-8378 2007-02-02 06:22:47 +00:00
moodler 29f26fd747 Added missing help file to MOodle 1.7 MDL-8378 2007-02-02 06:16:48 +00:00
moodler 9c336062b7 file switchrole.html was added on branch MOODLE_17_STABLE on 2007-02-02 06:16:48 +0000 2007-02-02 06:15:39 +00:00
mark-nielsen 594f4f574a The main layout table was left aligning in safari. Now matches that in action/continue.html 2007-02-02 03:57:13 +00:00
moodler 3802128b59 Automatic installer.php lang files by installer_builder (20070202) 2007-02-02 03:48:09 +00:00
mark-nielsen 657ed64b03 BugFix for MDL-8390: Changing nullability of field useranswer on table lesson_attempts to null. 2007-02-02 03:42:26 +00:00
mark-nielsen b39a349ec4 BugFix for MDL-8375:
* Student answer and teacher response are now cleaned using PARAM_RAW and are always passed through s() before printing
2007-02-02 02:16:59 +00:00
stronk7 8c30f7fc26 Delete some non cros-db boolean uses from queries, delegating them to PHP. MDL-8164 2007-02-01 23:53:47 +00:00
stronk7 81de99d733 Adding missing tags in code. Credit goes to Greg Lyon. MDL-8383. 2007-02-01 22:35:06 +00:00
moodler 7235680eed $switchroleactive is now passed recursively so switchroles actually works now :-/ 2007-02-01 08:11:32 +00:00
moodler ce5a0d7b65 Automatic installer.php lang files by installer_builder (20070201) 2007-02-01 03:31:34 +00:00
skodak 89719f7030 MDL-8366 not possible to use old en with iso-8859-1 encoding in 1.7 2007-01-31 23:17:51 +00:00
skodak 1d03d41680 MDL-8376 Course list option missing in frontpageloggedin when there are more than 200 courses; backported from HEAD 2007-01-31 22:38:45 +00:00
stronk7 de161d3c49 Restoring one deleted by error }. Grrr. 2007-01-31 18:44:57 +00:00
stronk7 509b0c983d Changing nullability of field response on table lesson_answers to null.
Versions in 17_STABLE are the same, so no problems. MDL-8351
2007-01-31 18:36:53 +00:00
thepurpleblob 877d109b01 MDL-8342 PHP5 migration thing causing string offset fatal error when data not present in XML file. Added some checks. 2007-01-30 15:12:49 +00:00
thepurpleblob dc5ea21614 Changed remark about additional formats to direct to Modules & Plugins database. 2007-01-30 14:03:33 +00:00
thepurpleblob 4a08d3bac9 Output was missing utf8 meta tag. 2007-01-30 13:54:43 +00:00
stronk7 f555bfac15 nothing interesting, just a comment. 2007-01-30 00:21:22 +00:00
stronk7 5fb8a656c1 Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 23:55:42 +00:00
stronk7 bfc8a717df Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 23:44:58 +00:00
stronk7 b65b99cab8 Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 22:14:36 +00:00
koenr 296f9b6a82 typo MDL-8350 2007-01-29 20:41:08 +00:00
stronk7 7409a0e99a Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 19:14:49 +00:00
tjhunt f08318d7fb Fix type on close tag. 2007-01-29 16:22:29 +00:00
stronk7 890cdce488 Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 12:07:14 +00:00
stronk7 5a739340da Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 11:20:44 +00:00
stronk7 751ad21e9c Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 11:05:15 +00:00
stronk7 a9a72d76f9 Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 10:53:14 +00:00
stronk7 31e0c05036 Applying new rs_xxx() functions everywhere. MDL-8134 2007-01-29 10:44:45 +00:00
vyshane 2a0d5695b3 Made non-AJAX deletion of resources only apply to IE browsers. 2007-01-29 07:54:48 +00:00
vyshane cf9281719f Fix for MDL-7847. 2007-01-29 07:36:07 +00:00
mark-nielsen 8cde300d8c Fix for MDL-8137: turned off autocomplete for all forms for which students enter data. 2007-01-29 06:32:17 +00:00
vyshane 50d1bd1c2a Fix for MDL-7415. 2007-01-29 06:00:23 +00:00
vyshane 58cac329b7 Temporarily disabling ajax for module/resource deletions. Related to MDL-8287. 2007-01-29 02:21:12 +00:00
stronk7 011dd960f4 This seems to be the damned line! db must be CFG 2007-01-29 01:11:43 +00:00
stronk7 0389288693 First real test of the new rs_fetchXXX() functions. Applying it
to get_my_courses(). MDL-8134
2007-01-29 00:15:14 +00:00
stronk7 e5b094bed6 Added Oracle DIRTY HACK to both rs_fetchXX functions.
Detecting of EOF in rs_fetch_record()
Big improvement of rs_fetch_next_record() by using FethRow()
with speeds near native fields[]. MDL-8134
2007-01-28 23:08:14 +00:00
skodak 4a0d23143a MDL-6128 special chars and messaging system; backported from HEAD 2007-01-28 21:46:14 +00:00
stronk7 bdd5bba791 Initial commit of the new rs_XXX() functions to fetch, advance and close
ADOdb recordsets in a standard way. Not finished yet but I need them in CVS.
MDL-8134
2007-01-28 20:10:33 +00:00
stronk7 1159927f08 Backported fix for annoying typo from HEAD. 2007-01-28 18:30:42 +00:00
gbateson b9a69f5b1f correct the display of the "Update this Hot Potatoes Quiz" button in Danish (da_utf8) and German (de_utf8) - see mdl-8322 2007-01-28 00:02:55 +00:00
moodler 947e63afb8 Automatic installer.php lang files by installer_builder (20070127) 2007-01-27 03:20:44 +00:00
skodak d221dc7482 MDL-8308 placement of load_all_capabilities() in login page; backported from HEAD 2007-01-26 21:15:25 +00:00
stronk7 14da408e08 Adding two helper functions and modify upgrade to
work properly under MSSQL and Oracle. MDL-8303
2007-01-26 20:44:57 +00:00
stronk7 4ca9e54f7f Oracle doesn't like ; at the end of execute_sql() 2007-01-26 19:25:53 +00:00
vyshane 154877b2ff Some small cleanups. 2007-01-25 04:28:07 +00:00
vyshane 303c064224 Commented out text node addition while moving resources. No idea why it was needed? This was adding extra vertical spaces and screwing up the display after a move in IE 7. 2007-01-24 05:58:14 +00:00
gbateson e521d0f799 added "print_standard_coursemodule_settings" (group and visible settings) to add/update HotPot page, "mod.html" 2007-01-24 02:52:14 +00:00
gbateson 4d4b237efb remove DB dependant code and references to NULL in field values mdl-8169 2007-01-24 02:44:23 +00:00
vyshane 727929f1fa Fixes for MDL-6966. 2007-01-23 06:10:48 +00:00
moodler 26e8b7a96e Fixed site identifier 2007-01-23 04:59:22 +00:00
moodler 4d59b9d9fa Automatic installer.php lang files by installer_builder (20070123) 2007-01-23 03:26:10 +00:00
stronk7 7c018f428c Changing some stripslashes() to stripslashes_safe() because it
was causing some real backslashes to be lost in some qtypes. MDL-8217
2007-01-22 23:13:47 +00:00
moodler 3c3ff8ace3 Automatic installer.php lang files by installer_builder (20070119) 2007-01-19 03:22:34 +00:00
bobopinna 70c6b92b97 Fixed an error in $score initialization 2007-01-18 20:33:02 +00:00
skodak b27229da41 do not send passowrd hashes to other sites SC#353; merged from MOODLE_16_STABLE 2007-01-17 20:10:25 +00:00
skodak 0801278026 force login in course calendar SC#349; backported from HEAD 2007-01-17 19:54:35 +00:00
moodler d9bda8a421 Bump to post 1.7.1 2007-01-17 04:31:01 +00:00
536 changed files with 84029 additions and 83813 deletions
-12256
View File
File diff suppressed because it is too large Load Diff
+23 -2
View File
@@ -62,6 +62,9 @@
@header('Content-Type: text/plain; charset='.current_charset());
}
/// increase memory limit (PHP 5.2 does different calculation, we need more memory now)
@raise_memory_limit('128M');
/// Start output log
$timenow = time();
@@ -84,6 +87,8 @@
mtrace("Error: could not update timestamp for $mod->fullname");
}
}
/// Reset possible changes by modules to time_limit. MDL-11597
@set_time_limit(0);
mtrace("done.");
}
}
@@ -108,19 +113,35 @@
mtrace('Error: could not update timestamp for '.$block->name);
}
}
/// Reset possible changes by blocks to time_limit. MDL-11597
@set_time_limit(0);
mtrace('done.');
}
}
}
}
mtrace("Finished blocks");
mtrace('Finished blocks');
if (!empty($CFG->langcache)) {
mtrace('Updating languages cache');
get_list_of_languages();
}
mtrace('Removing expired enrolments ...', ''); // See MDL-8785
$timenow = time();
if ($oldenrolments = get_records_select('role_assignments', "timeend > 0 AND timeend < '$timenow'")) {
mtrace(count($oldenrolments).' to delete');
foreach ($oldenrolments as $oldenrolment) {
if (role_unassign($oldenrolment->roleid, $oldenrolment->userid, 0, $oldenrolment->contextid)) {
mtrace("Deleted expired role assignment $oldenrolment->roleid for user $oldenrolment->userid from context $oldenrolment->contextid");
}
}
mtrace('Done');
} else {
mtrace('none found');
}
/// 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
@@ -235,7 +256,7 @@
//Execute backup's cron
//Perhaps a long time and memory could help in large sites
@set_time_limit(0);
@raise_memory_limit("128M");
@raise_memory_limit("192M");
if (function_exists('apache_child_terminate')) {
// if we are running from Apache, give httpd a hint that
// it can recycle the process after it's done. Apache's
+69
View File
@@ -104,4 +104,73 @@
</PHP_EXTENSION>
</PHP_EXTENSIONS>
</MOODLE>
<MOODLE version="1.9">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.16">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
<BYPASS function="bypass_mysql416_reqs" message="mysql416bypassed" />
</VENDOR>
<VENDOR name="postgres" version="8.0" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
</DATABASE>
<PHP version="4.3.0" level="required">
<RESTRICT function="restrict_php50_version" message="php50restricted" />
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional">
<FEEDBACK>
<ON_CHECK message="iconvrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
</MOODLE>
<MOODLE version="2.0">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="4.1.16">
<FEEDBACK>
<ON_ERROR message="mysql416required" />
</FEEDBACK>
<BYPASS function="bypass_mysql416_reqs" message="mysql416bypassed" />
</VENDOR>
<VENDOR name="postgres" version="8.0" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="9.0" />
</DATABASE>
<PHP version="5.2.0" level="required">
</PHP>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="optional">
<FEEDBACK>
<ON_CHECK message="iconvrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
</PHP_EXTENSIONS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+2 -4
View File
@@ -59,10 +59,10 @@
// run through submitted data
// reject if does not start with filter_
foreach ($config as $name => $value) {
set_config( $name,$value );
set_config($name, stripslashes($value));
}
}
redirect( "$CFG->wwwroot/$CFG->admin/filters.php", get_string('changessaved'), 1);
redirect("$CFG->wwwroot/$CFG->admin/filters.php");
exit;
}
@@ -94,7 +94,5 @@
<?php
print_simple_box_end();
print_simple_box_end();
admin_externalpage_print_footer($adminroot);
?>
+27 -16
View File
@@ -27,6 +27,7 @@
$id = optional_param('id', '', PARAM_ALPHANUM);
$confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL);
$confirmrelease = optional_param('confirmrelease', 0, PARAM_BOOL);
$agreelicence = optional_param('agreelicence',0, PARAM_BOOL);
$ignoreupgradewarning = optional_param('ignoreupgradewarning', 0, PARAM_BOOL);
@@ -224,13 +225,36 @@
if (empty($confirmupgrade)) {
print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
"", "", false, "&nbsp;", "&nbsp;");
notice_yesno(get_string('upgradesure', 'admin', $a->newversion), 'index.php?confirmupgrade=yes', 'index.php');
exit;
} else if (empty($confirmrelease)) {
$strcurrentrelease = get_string("currentrelease");
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, "&nbsp;", "&nbsp;");
print_heading("Moodle $release");
print_simple_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'center');
require_once($CFG->libdir.'/environmentlib.php');
print_heading(get_string('environment', 'admin'));
if (!check_moodle_environment($release, $environment_results, true)) {
notice_yesno(get_string('environmenterrorupgrade', 'admin'),
'index.php?confirmupgrade=1&confirmrelease=1', 'index.php');
} else {
notify(get_string('environmentok', 'admin'), 'notifysuccess');
echo '<form action="index.php">';
echo '<input type="hidden" name="confirmupgrade" value="1" />';
echo '<input type="hidden" name="confirmrelease" value="1" />';
echo '<div class="continuebutton"><input type="submit" value="'.get_string('continue').'" /></div>';
echo '</form>';
}
print_footer('none');
exit;
} else {
$strdatabasesuccess = get_string("databasesuccess");
print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
@@ -297,13 +321,9 @@
/// Updated human-readable release version 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!!");
error("ERROR: Could not update release version in database!!");
}
notice(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'index.php', 'none');
}
/// Find and check all main modules and load them up or upgrade them if necessary
@@ -399,7 +419,7 @@
/// Define the unique site ID code if it isn't already
if (empty($CFG->siteidentifier)) { // Unique site identification code
set_config('siteidentifier', random_string(32));
set_config('siteidentifier', random_string(32).$_SERVER['HTTP_HOST']);
}
/// Check if the guest user exists. If not, create one.
@@ -528,15 +548,6 @@
echo '</div>';
}
if (optional_param('dbmigrate')) { // ??? Is this actually used?
print_simple_box_start('center','60%');
require_once($CFG->dirroot.'/'.$CFG->admin.'/utfdbmigrate.php');
db_migrate2utf8();
print_simple_box_end();
}
admin_externalpage_print_footer($adminroot);
+1 -1
View File
@@ -168,7 +168,7 @@
$settings = "";
}
$count = count_records("$module->name");
$count = count_records_select("$module->name",'course<>0');
if ($module->visible) {
$visible = "<a href=\"modules.php?hide=$module->name&amp;sesskey=$USER->sesskey\" title=\"$strhide\">".
+1 -1
View File
@@ -46,7 +46,7 @@ function online_assignment_cleanup($output=false) {
/// get a list of all courses on this site
$courses = get_courses();
$courses = get_records('course');
/// cycle through each course
foreach ($courses as $course) {
+22 -10
View File
@@ -23,14 +23,30 @@
document.assignform.remove.disabled=false;
document.assignform.addselect.selectedIndex=-1;" />
<?php
foreach ($contextusers as $contextuser) {
$fullname = fullname($contextuser, true);
echo "<option value=\"$contextuser->id\">".$fullname.", ".$contextuser->email."</option>\n";
}
$i = 0;
foreach ($contextusers as $contextuser) {
$fullname = fullname($contextuser, true);
if ($contextuser->hidden) {
$hidden=' ('.get_string('hiddenassign').') ';
} else {
$hidden="";
}
echo "<option value=\"$contextuser->id\">".$fullname.", ".$contextuser->email.$hidden."</option>\n";
$i++;
}
if ($i==0) {
echo '<option/>'; // empty select breaks xhtml strict
}
?>
</select></td>
<td valign="top">
<label title="<?php print_string('hiddenassign') ?>">
<input type="checkbox" name="hidden" value="1" />
<img src="<?php echo $CFG->pixpath; ?>/t/hide.gif" alt="<?php print_string('hiddenassign') ?>" class="hide-show-image" /> <?
helpbutton ('hiddenassign', get_string('hiddenassign'));
?>
</label>
<br />
<input name="add" type="submit" id="add" value="&larr;" />
<br />
@@ -46,13 +62,11 @@
if (!empty($searchtext)) {
echo "<optgroup label=\"$strsearchresults (" . $availableusers->_numOfRows . ")\">\n";
while (! $availableusers->EOF) {
$user = $availableusers->FetchObj();
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
$availableusers->MoveNext();
}
echo "</optgroup>\n";
@@ -61,13 +75,11 @@
echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
.'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
} else {
while (! $availableusers->EOF) {
$user = $availableusers->FetchObj();
while ($user = rs_fetch_next_record($availableusers)) {
if (!isset($contextusers[$user->id])) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
}
$availableusers->MoveNext();
}
}
}
+6 -2
View File
@@ -161,7 +161,7 @@
$topleveladmin = false;
// we only worry about this if the role has doanything capability at site level
if ($adminroles = get_roles_with_capability('moodle/site:doanything', CAP_ALLOW, $sitecontext)) {
if ($context->id == $sitecontext->id && $adminroles = get_roles_with_capability('moodle/site:doanything', CAP_ALLOW, $sitecontext)) {
foreach ($adminroles as $adminrole) {
if ($adminrole->id == $roleid) {
$topleveladmin = true;
@@ -198,12 +198,16 @@
print_heading_with_help(get_string('assignroles', 'role'), 'assignroles');
if ($context->contextlevel==CONTEXT_SYSTEM) {
print_simple_box(get_string('globalroleswarning', 'role'));
}
if ($roleid) { /// prints a form to swap roles
/// Get all existing participants in this context.
// Why is this not done with get_users???
if (!$contextusers = get_role_users($roleid, $context, false, 'u.id, u.firstname, u.lastname, u.email')) {
if (!$contextusers = get_role_users($roleid, $context, false, 'u.id, u.firstname, u.lastname, u.email, r.hidden')) {
$contextusers = array();
}
+1
View File
@@ -16,6 +16,7 @@
$cancel = optional_param('cancel', 0, PARAM_BOOL);
$sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
require_capability('moodle/role:manage', $sitecontext);
if ($cancel) {
redirect('manage.php');
+4
View File
@@ -123,6 +123,10 @@ $temp = new admin_settingpage('gradebook', get_string('gradebook', 'admin'));
$temp->add(new admin_setting_special_gradebookroles());
$ADMIN->add('appearance', $temp);
// new CFG variable for coursemanager (what roles to display)
$temp = new admin_settingpage('coursemanager', get_string('coursemanager', 'admin'));
$temp->add(new admin_setting_special_coursemanager());
$ADMIN->add('appearance', $temp);
$ADMIN->add('appearance', new admin_externalpage('stickyblocks', get_string('stickyblocks', 'admin'), "$CFG->wwwroot/$CFG->admin/stickyblocks.php"));
-1
View File
@@ -5,7 +5,6 @@ $temp = new admin_settingpage('locationsettings', get_string('locationsettings',
$options = get_list_of_timezones();
$options[99] = get_string('serverlocaltime');
$temp->add(new admin_setting_configselect('timezone', get_string('timezone','admin'), get_string('configtimezone', 'admin'), 99, $options));
$options = get_list_of_timezones();
$options[99] = get_string('timezonenotforced', 'admin');
$temp->add(new admin_setting_configselect('forcetimezone', get_string('forcetimezone', 'admin'), get_string('helpforcetimezone', 'admin'), 99, $options));
$options = get_list_of_countries();
+1 -1
View File
@@ -6,7 +6,7 @@
$temp = new admin_settingpage('sitepolicies', get_string('sitepolicies', 'admin'));
$temp->add(new admin_setting_configcheckbox('protectusernames', get_string('protectusernames', 'admin'), get_string('configprotectusernames', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('forcelogin', get_string('forcelogin', 'admin'), get_string('configforcelogin', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('forceloginforprofiles', get_string('forceloginforprofiles', 'admin'), get_string('configforceloginforprofiles', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('forceloginforprofiles', get_string('forceloginforprofiles', 'admin'), get_string('configforceloginforprofiles', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('opentogoogle', get_string('opentogoogle', 'admin'), get_string('configopentogoogle', 'admin'), 0));
$temp->add(new admin_setting_configtext('maxbytes', get_string('maxbytes', 'admin'), get_string('configmaxbytes', 'admin'), 0, PARAM_INT));
$temp->add(new admin_setting_configcheckbox('messaging', get_string('messaging', 'admin'), get_string('configmessaging','admin'), 1));
+1 -1
View File
@@ -17,7 +17,7 @@ $ADMIN->add('accounts', new admin_externalpage('uploadusers', get_string('upload
$ADMIN->add('users', new admin_category('roles', get_string('permissions', 'role')));
$ADMIN->add('roles', new admin_externalpage('defineroles', get_string('defineroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/manage.php"));
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
$ADMIN->add('roles', new admin_externalpage('assignroles', get_string('assignroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=" . $sitecontext->id));
$ADMIN->add('roles', new admin_externalpage('assignroles', get_string('assignglobalroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=" . $sitecontext->id));
// "userpolicies" settingpage
-2
View File
@@ -270,7 +270,6 @@ if ($um->preprocess_files() && confirm_sesskey()) {
//This can be used to obtain a list of userids for existing users
notify("$olduser->id ".get_string('usernotaddedregistered', 'error', $username));
$userserrors++;
continue;
}
} else { // new user
@@ -424,4 +423,3 @@ function my_file_get_contents($filename, $use_include_path = 0) {
}
?>
+7 -2
View File
@@ -86,6 +86,11 @@
admin_externalpage_setup('editusers', $adminroot);
}
if (empty($CFG->loginhttps)) {
$securewwwroot = $CFG->wwwroot;
} else {
$securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
}
if ($newuser) { // Create a new user
@@ -111,7 +116,7 @@
}
}
redirect("$CFG->wwwroot/user/edit.php?id=$user->id&amp;course=$site->id");
redirect("$securewwwroot/user/edit.php?id=$user->id&amp;course=$site->id");
} else { // List all users for editing
@@ -330,7 +335,7 @@
}
if (has_capability('moodle/user:update', $sitecontext)) {
$editbutton = "<a href=\"../user/edit.php?id=$user->id&amp;course=$site->id\">$stredit</a>";
$editbutton = "<a href=\"$securewwwroot/user/edit.php?id=$user->id&amp;course=$site->id\">$stredit</a>";
if ($user->confirmed == 0) {
$confirmbutton = "<a href=\"user.php?confirmuser=$user->id&amp;sesskey=$USER->sesskey\">" . get_string('confirm') . "</a>";
} else {
+3 -1
View File
@@ -114,6 +114,8 @@ class test extends XMLDBAction {
$table->addIndexInfo('course', XMLDB_INDEX_NOTUNIQUE, array('course'));
$table->addIndexInfo('rsstype', XMLDB_INDEX_UNIQUE, array('rsstype'));
$table->setComment("This is a test'n drop table. You can drop it safely");
/// Get SQL code and execute it
$test = new stdClass;
$test->sql = $table->getCreateTableSQL($CFG->dbtype, $CFG->prefix, true);
@@ -275,7 +277,7 @@ class test extends XMLDBAction {
/// Get SQL code and execute it
$test = new stdClass;
$field = new XMLDBField('grade');
$field->setAttributes(XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, null, 'test');
$field->setAttributes(XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, null, "test'n drop");
$test->sql = $table->getAlterFieldSQL($CFG->dbtype, $CFG->prefix, $field, true);
$test->status = change_field_type($table, $field, false, false);
@@ -133,7 +133,7 @@ class view_reserved_words extends XMLDBAction {
/// The textarea showing all the reserved words
$o.= ' <table id="formelements" align="center" cellpadding="5">';
$o.= ' <tr><td align="center">' . $this->str['listreservedwords'];
$o.= ' <tr><td align="center">' . $this->str['listreservedwords'].'</td></tr>';
$o.= ' <tr><td><textarea cols="80" rows="32">';
$o.= s(implode(', ', $reserved_words));
$o.= '</textarea></td></tr>';
+1
View File
@@ -52,6 +52,7 @@
/// getting "incomplete" objects
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/ddllib.php'); // Install/upgrade related db functions
$adminroot = admin_get_root();
admin_externalpage_setup('xmldbeditor', $adminroot);
-4
View File
@@ -112,7 +112,3 @@
<?php
include($CFG->dirroot.'/auth/ldap/config.html');
?>
-1
View File
@@ -15,4 +15,3 @@
print_footer();
exit;
?>
+7 -4
View File
@@ -106,12 +106,14 @@ function auth_get_userinfo($username){
if ($rs = $authdb->Execute("SELECT ".$pcfg["field_map_$field"]." as myfield FROM $CFG->auth_dbtable
WHERE $CFG->auth_dbfielduser = '$username'")) {
if ( $rs->RecordCount() == 1 ) {
$fields_obj = rs_fetch_record($rs);
if (!empty($CFG->unicodedb)) {
$result["$field"] = addslashes(stripslashes($rs->fields['myfield']));
$result["$field"] = addslashes(stripslashes($fields_obj->myfield));
} else {
$result["$field"] = addslashes(stripslashes(utf8_decode($rs->fields['myfield'])));
$result["$field"] = addslashes(stripslashes(utf8_decode($fields_obj->myfield)));
}
}
rs_close($rs);
}
}
}
@@ -351,9 +353,10 @@ function auth_get_userlist() {
if ( $rs->RecordCount() ) {
$userlist = array();
while ($rec = $rs->FetchRow()) {
array_push($userlist, $rec['username']);
while ($rec = rs_fetch_next_record($rs)) {
array_push($userlist, $rec->username);
}
rs_close($rs);
return $userlist;
} else {
return array();
+32 -7
View File
@@ -1002,15 +1002,33 @@ function auth_user_update_password($username, $newpassword) {
. ldap_err2str(ldap_errno($ldapconnection)));
}
break;
case 'ad':
// Passwords in Active Directory must be encoded as Unicode
// strings (UCS-2 Little Endian format) and surrounded with
// double quotes. See http://support.microsoft.com/?kbid=269190
if (!function_exists('mb_convert_encoding')) {
error_log ('You need the mbstring extension to change passwords in Active Directory');
return false;
}
$newpassword = mb_convert_encoding('"'.$newpassword.'"', "UCS-2LE", "auto");
$result = ldap_modify($ldapconnection, $user_dn, array('unicodePwd' => $newpassword));
if(!$result){
error_log('LDAP Error in auth_user_update_password(). Error code: '
. ldap_errno($ldapconnection) . '; Error string : '
. ldap_err2str(ldap_errno($ldapconnection)));
}
break;
default:
$usedconnection = &$ldapconnection;
// send ldap the password in cleartext, it will md5 it itself
$result = ldap_modify($ldapconnection, $user_dn, array('userPassword' => $newpassword));
if(!$result){
error_log('LDAP Error in auth_user_update_password(). Error code: '
. ldap_errno($ldapconnection) . '; Error string : '
. ldap_err2str(ldap_errno($ldapconnection)));
}
if(!$result){
error_log('LDAP Error in auth_user_update_password(). Error code: '
. ldap_errno($ldapconnection) . '; Error string : '
. ldap_err2str(ldap_errno($ldapconnection)));
}
}
@@ -1162,8 +1180,10 @@ function auth_ldap_init () {
}
}
//hack prefix to objectclass
if ('objectClass=' != substr($CFG->ldap_objectclass, 0, 12)) {
$CFG->ldap_objectclass = 'objectClass='.$CFG->ldap_objectclass;
if (empty($CFG->ldap_objectclass)) { // Can't send empty filter
$CFG->ldap_objectclass = 'objectClass=*';
} else if (stripos($CFG->ldap_objectclass, 'objectClass=') !== 0) {
$CFG->ldap_objectclass = 'objectClass='.$CFG->ldap_objectclass;
}
//all chages go in $CFG , no need to return value
@@ -1318,6 +1338,11 @@ function auth_ldap_connect($binddn='',$bindpwd=''){
ldap_set_option($connresult, LDAP_OPT_PROTOCOL_VERSION, $CFG->ldap_version);
}
// Fix MDL-10921
if ($this->config->user_type == 'ad') {
ldap_set_option($connresult, LDAP_OPT_REFERRALS, 0);
}
if (!empty($binddn)){
//bind with search-user
//$debuginfo .= 'Using bind user'.$binddn.'and password:'.$bindpwd;
-1
View File
@@ -47,4 +47,3 @@ function auth_user_login ($username, $password) {
$rauth->close();
}
?>
+17 -1
View File
@@ -1736,6 +1736,16 @@
global $CFG,$preferences;
//Use one static variable to cache all the require_once calls that,
//under PHP5 seems to increase load too much, and we are requiring
//them here thousands of times (one per content). MDL-8700.
//Once fixed by PHP, we'll delete this hack
static $includedfiles;
if (!isset($includedfiles)) {
$includedfiles = array();
}
//Check if preferences is ok. If it isn't set, we are
//in a scheduled_backup to we are able to get a copy
//from CFG->backup_preferences
@@ -1755,8 +1765,14 @@
$result = str_replace($search,$replace,$content);
foreach ($mypreferences->mods as $name => $info) {
/// We only include the corresponding backuplib.php if it hasn't been included before
/// This will save some load under PHP5. MDL-8700.
/// Once fixed by PHP, we'll delete this hack
if (!in_array($name, $includedfiles)) {
include_once("$CFG->dirroot/mod/$name/backuplib.php");
$includedfiles[] = $name;
}
//Check if the xxxx_encode_content_links exists
include_once("$CFG->dirroot/mod/$name/backuplib.php");
$function_name = $name."_encode_content_links";
if (function_exists($function_name)) {
$result = $function_name($result,$mypreferences);
+3 -2
View File
@@ -7,10 +7,11 @@
//Sets a name/value pair in backup_config table
function backup_set_config($name, $value) {
if (get_field("backup_config", "name", "name", $name)) {
return set_field("backup_config", "value", $value, "name", $name);
return set_field("backup_config", "value", addslashes($value), "name", $name);
} else {
$config = new object();
$config->name = $name;
$config->value = $value;
$config->value = addslashes($value);
return insert_record("backup_config", $config);
}
}
+18 -7
View File
@@ -19,13 +19,24 @@
if ($form1 = data_submitted()) {
$currentcourseshortname = $course_header->course_shortname; //"store_ShortName";
$course_header->course_shortname = $form1->shortname; //"update_ShortName";
$course_header->course_fullname = $form1->fullname; //"update_FullName";
$form1->startdate = make_timestamp($form1->startyear, $form1->startmonth, $form1->startday);
$currentcoursestartdate = $course_header->course_startdate;
$coursestartdatedateoffset = $form1->startdate - $currentcoursestartdate;
$restore->course_startdateoffset = $coursestartdatedateoffset; //change to restore
}
$course_header->course_shortname = $form1->shortname; //"update_ShortName";
$course_header->course_fullname = $form1->fullname; //"update_FullName";
/// Roll dates only if the backup course has a start date
/// (some formats like main page, social..., haven't it and rolling dates
/// from 0 produces crazy dates. MDL-10125
if ($course_header->course_startdate) {
$form1->startdate = make_timestamp($form1->startyear, $form1->startmonth, $form1->startday);
$currentcoursestartdate = $course_header->course_startdate;
$coursestartdatedateoffset = $form1->startdate - $currentcoursestartdate;
$restore->course_startdateoffset = $coursestartdatedateoffset; //change to restore
} else { // don't roll if the course hasn't start date
$coursestartdatedateoffset = 0;
$restore->course_startdateoffset = 0;
}
}
///Enforce SESSION->course_header rewrite (PHP 4.x needed because assigns are by value) MDL-8298
$SESSION->course_header = $course_header;
//If restore session info exists, but we are coming from the form
//it has prioriry
+9
View File
@@ -54,6 +54,15 @@
print_simple_box(get_string("restorefinished"),"center");
} else {
print_simple_box(get_string("importdatafinished"),"center");
$file = $CFG->dataroot . '/'
. $SESSION->import_preferences->backup_course
. '/backupdata/' . $SESSION->import_preferences->backup_name;
if (is_readable($file)) {
unlink($file);
}
else {
error_log("import course data: couldn't unlink $file");
}
unset($SESSION->restore);
}
print_continue("$CFG->wwwroot/course/view.php?id=".$restore->course_id);
+11 -1
View File
@@ -201,7 +201,17 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
echo "<td align=\"right\"> ";
print_string("startdate");
echo ":</td><td>";
print_date_selector("startday", "startmonth", "startyear", $form1->startdate);
/// Show the roll dates option only if the backup course has a start date
/// (some formats like main page, social..., haven't it and rolling dates
/// from 0 produces crazy dates. MDL-10125
if ($form1->startdate) {
print_date_selector("startday", "startmonth", "startyear", $form1->startdate);
} else {
print_string('notavailable');
echo '<input type="hidden" name="startyear" value="0" />';
echo '<input type="hidden" name="startmonth" value="0" />';
echo '<input type="hidden" name="startday" value="0" />';
}
helpbutton("coursestartdate", get_string("startdate"));
echo "</td></tr>";
}
+81 -43
View File
@@ -70,6 +70,8 @@
if (!defined('RESTORE_SILENTLY')) {
echo "<ul>";
}
// Restore links in modules.
foreach ($restore->mods as $name => $info) {
//If the module is being restored
if (isset($info->restore) && $info->restore == 1) {
@@ -85,12 +87,23 @@
}
}
}
// TODO: process all html text also in blocks too
// Restore links in questions.
require_once("$CFG->dirroot/question/restorelib.php");
if (!defined('RESTORE_SILENTLY')) {
echo '<li>' . get_string('from') . ' ' . get_string('questions', 'quiz');
}
$status = question_decode_content_links_caller($restore);
if (!defined('RESTORE_SILENTLY')) {
echo '</li>';
}
if (!defined('RESTORE_SILENTLY')) {
echo "</ul>";
}
// TODO: process all html text also in blocks too
return $status;
}
@@ -901,14 +914,18 @@
// Yu: This part is called repeatedly for every instance,
// so it is necessary to set the granular flag and check isset()
// when the first instance of this type of mod is processed.
if (!isset($restore->mods[$mod->type]->granular) && isset($restore->mods[$mod->type]->instances) && is_array($restore->mods[$mod->type]->instances)) {
// This defines whether we want to restore specific
// instances of the modules (granular restore), or
// whether we don't care and just want to restore
// all module instances (non-granular).
$restore->mods[$mod->type]->granular = true;
} else {
$restore->mods[$mod->type]->granular = false;
//if (!isset($restore->mods[$mod->type]->granular) && isset($restore->mods[$mod->type]->instances) && is_array($restore->mods[$mod->type]->instances)) {
if (!isset($restore->mods[$mod->type]->granular)) {
if (isset($restore->mods[$mod->type]->instances) && is_array($restore->mods[$mod->type]->instances)) {
// This defines whether we want to restore specific
// instances of the modules (granular restore), or
// whether we don't care and just want to restore
// all module instances (non-granular).
$restore->mods[$mod->type]->granular = true;
} else {
$restore->mods[$mod->type]->granular = false;
}
}
//Check if we've to restore this module (and instance)
@@ -1111,7 +1128,7 @@
if (!$preferencescount) {
$continue = false;
if (!defined('RESTORE_SILENTLY')) {
echo '<li>'.get_string('backupwithoutgradebook','grade').'</li>';
echo '<li>'.get_string('backupwithoutgradebook','grades').'</li>';
}
}
@@ -1122,7 +1139,7 @@
if ($pref_rec->value == 0) {
$continue = false;
if (!defined('RESTORE_SILENTLY')) {
echo '<li>'.get_string('respectingcurrentdata','grade').'</li>';
echo '<li>'.get_string('respectingcurrentdata','grades').'</li>';
}
}
}
@@ -1138,7 +1155,7 @@
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'grade_preferences' AND backup_code = '$restore->backup_unique_code'",
"old_id",
"old_id, old_id",
"old_id",
$counter,
$recordset_size);
if ($recs) {
@@ -1192,7 +1209,7 @@
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'grade_letter' AND backup_code = '$restore->backup_unique_code'",
"old_id",
"old_id, old_id",
"old_id",
$counter,
$recordset_size);
if ($recs) {
@@ -1242,7 +1259,7 @@
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'grade_category' AND backup_code = '$restore->backup_unique_code'",
"old_id",
"old_id, old_id",
"old_id",
$countercat,
$recordset_size);
if ($recs) {
@@ -1693,7 +1710,7 @@
$counter = 0;
while ($counter < $unreadcount) {
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'message' AND backup_code = '$restore->backup_unique_code'","old_id","old_id, old_id",$counter,$recordset_size);
$recs = get_records_select("backup_ids","table_name = 'message' AND backup_code = '$restore->backup_unique_code'","old_id","old_id",$counter,$recordset_size);
if ($recs) {
foreach ($recs as $rec) {
//Get the full record from backup_ids
@@ -1758,7 +1775,7 @@
$counter = 0;
while ($counter < $readcount) {
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'message_read' AND backup_code = '$restore->backup_unique_code'","old_id","old_id, old_id",$counter,$recordset_size);
$recs = get_records_select("backup_ids","table_name = 'message_read' AND backup_code = '$restore->backup_unique_code'","old_id","old_id",$counter,$recordset_size);
if ($recs) {
foreach ($recs as $rec) {
//Get the full record from backup_ids
@@ -1825,7 +1842,7 @@
$counter = 0;
while ($counter < $contactcount) {
//Fetch recordset_size records in each iteration
$recs = get_records_select("backup_ids","table_name = 'message_contacts' AND backup_code = '$restore->backup_unique_code'","old_id","old_id, old_id",$counter,$recordset_size);
$recs = get_records_select("backup_ids","table_name = 'message_contacts' AND backup_code = '$restore->backup_unique_code'","old_id","old_id",$counter,$recordset_size);
if ($recs) {
foreach ($recs as $rec) {
//Get the full record from backup_ids
@@ -1913,14 +1930,7 @@
foreach ($info as $category) {
//Skip empty categories (some backups can contain them)
if (!empty($category->id)) {
$catrestore = "restore_question_categories";
if (function_exists($catrestore)) {
//print_object ($category); //Debug
$status = $catrestore($category,$restore);
} else {
//Something was wrong. Function should exist.
$status = false;
}
$status = restore_question_categories($category,$restore);
}
}
@@ -2090,7 +2100,18 @@
//Now search if that group exists (by name and description field) in
//restore->course_id course
$gro_db = get_record("groups","courseid",$restore->course_id,"name",$gro->name,"description",$gro->description);
//Going to compare LOB columns so, use the cross-db sql_compare_text() in both sides.
$description_clause = '';
if (!empty($gro->description)) { /// Only for groups having a description
$literal_description = "'" . $gro->description . "'";
$description_clause = " AND " .
sql_compare_text('description') . " = " .
sql_compare_text($literal_description);
}
$gro_db = get_record_sql("SELECT *
FROM {$CFG->prefix}groups
WHERE courseid = $restore->course_id AND
name = '{$gro->name}'" . $description_clause);
//If it doesn't exist, create
if (!$gro_db) {
$create_group = true;
@@ -2599,7 +2620,7 @@
while ($counter < $count_logs) {
//Get a chunk of records
//Take old_id twice to avoid adodb limitation
$logs = get_records_select("backup_ids","table_name = 'log' AND backup_code = '$restore->backup_unique_code'","old_id","old_id,old_id",$counter,$recordset_size);
$logs = get_records_select("backup_ids","table_name = 'log' AND backup_code = '$restore->backup_unique_code'","old_id","old_id",$counter,$recordset_size);
//We have logs
if ($logs) {
//Iterate
@@ -4411,7 +4432,7 @@
break;
}
}
if ($this->level == 6 && $this->tree[5]!="ROLE_ASSIGNMENTS" && $this->tree[5]!="ROLE_OVERRIDES") {
if ($this->level == 6 && $this->tree[5]!="ROLES_ASSIGNMENTS" && $this->tree[5]!="ROLES_OVERRIDES") {
switch ($tagName) {
case "ROLE":
//We've finalized a role, get it
@@ -4426,7 +4447,7 @@
}
}
if ($this->level == 7 && $this->tree[5]!="ROLE_ASSIGNMENTS" && $this->tree[5]!="ROLE_OVERRIDES") {
if ($this->level == 7) {
switch ($tagName) {
case "TYPE":
$this->info->temprole->type = $this->getContents();
@@ -5825,9 +5846,9 @@
}
if (!$status = restore_decode_content_links($restore)) {
if (!defined('RESTORE_SILENTLY')) {
notify("Could not refresh events for activities!");
notify("Could not decode content links!");
} else {
$errorstr = "Could not refresh events for activities!";
$errorstr = "Could not decode content links!";
return false;
}
}
@@ -6017,10 +6038,19 @@
if (!empty($restore->rolesmapping)) {
$rolemappings = $restore->rolesmapping;
}
// $info->roles will be empty for backups pre 1.7
if (isset($info->roles) && $info->roles) {
foreach ($info->roles as $oldroleid=>$roledata) {
/// first we check if the roles are in the mappings
foreach ($info->roles as $oldroleid=>$roledata) {
if (empty($restore->rolesmapping)) {
// if this is empty altogether, we came from import or there's no roles used in course at all
// in this case, write the same oldid as this is the same site
// no need to do mapping
$status = backup_putid($restore->backup_unique_code,"role",$oldroleid,
$oldroleid); // adding a new id
continue; // do not create additonal roles;
}
// first we check if the roles are in the mappings
// if so, we just do a mapping i.e. update oldids table
if (isset($rolemappings[$oldroleid]) && $rolemappings[$oldroleid]) {
$status = backup_putid($restore->backup_unique_code,"role",$oldroleid,
@@ -6091,7 +6121,13 @@
}
$course = restore_read_xml_course_header($xmlfile);
if (!empty($course->roleassignments)) {
if (!isset($restore->rolesmapping)) {
$isimport = true; // course import from another course, or course with no role assignments
} else {
$isimport = false; // course restore with role assignments
}
if (!empty($course->roleassignments) && !$isimport) {
$courseassignments = $course->roleassignments;
foreach ($courseassignments as $oldroleid => $courseassignment) {
@@ -6102,7 +6138,7 @@
* Restoring from course level overrides *
*****************************************************/
if (!empty($course->roleoverrides)) {
if (!empty($course->roleoverrides) && !$isimport) {
$courseoverrides = $course->roleoverrides;
foreach ($courseoverrides as $oldroleid => $courseoverride) {
// if not importing into exiting course, or creating new role, we are ok
@@ -6127,11 +6163,12 @@
foreach ($secs as $section) {
if (isset($section->mods)) {
foreach ($section->mods as $modid=>$mod) {
if (isset($mod->roleassignments)) {
if (isset($mod->roleassignments) && !$isimport) {
foreach ($mod->roleassignments as $oldroleid=>$modassignment) {
restore_write_roleassignments($restore, $modassignment->assignments, "course_modules", CONTEXT_MODULE, $modid, $oldroleid);
}
}
// role overrides always applies, in import or backup/restore
if (isset($mod->roleoverrides)) {
foreach ($mod->roleoverrides as $oldroleid=>$modoverride) {
restore_write_roleoverrides($restore, $modoverride->overrides, "course_modules", CONTEXT_MODULE, $modid, $oldroleid);
@@ -6153,13 +6190,14 @@
$blocks = restore_read_xml_blocks($xmlfile);
if (isset($blocks->instances)) {
foreach ($blocks->instances as $instance) {
if (isset($instance->roleassignments)) {
if (isset($instance->roleassignments) && !$isimport) {
foreach ($instance->roleassignments as $oldroleid=>$blockassignment) {
restore_write_roleassignments($restore, $blockassignment->assignments, "block_instance", CONTEXT_BLOCK, $instance->id, $oldroleid);
}
}
if (isset($instance->roleoverrides)) {
// likewise block overrides should always be restored like mods
if (isset($instance->roleoverrides)) {
foreach ($instance->roleoverrides as $oldroleid=>$blockoverride) {
restore_write_roleoverrides($restore, $blockoverride->overrides, "block_instance", CONTEXT_BLOCK, $instance->id, $oldroleid);
}
@@ -6175,7 +6213,7 @@
echo "<li>".get_string("creatinguserroles").'</li>';
}
$info = restore_read_xml_users($restore, $xmlfile);
if (!empty($info->users)) {
if (!empty($info->users) && !$isimport) { // no need to restore user assignments for imports (same course)
//For each user, take its info from backup_ids
foreach ($info->users as $userid) {
$rec = backup_getid($restore->backup_unique_code,"user",$userid);
@@ -6221,7 +6259,7 @@
$newcontext = get_context_instance($contextlevel, $oldinstance->new_id);
$assignment->contextid = $newcontext->id; // new context id
// might already have same assignment
role_assign($assignment->roleid, $assignment->userid, 0, $assignment->contextid, $assignment->timestart, $assignment->timeend, $assignment->hidden, $assignment->enrol);
role_assign($assignment->roleid, $assignment->userid, 0, $assignment->contextid, $assignment->timestart, $assignment->timeend, $assignment->hidden, $assignment->enrol, $assignment->timemodified);
}
}
@@ -6316,4 +6354,4 @@
fclose($restorelog);
}
}
?>
?>
-1232
View File
File diff suppressed because it is too large Load Diff
@@ -57,7 +57,10 @@ class block_admin_bookmarks extends block_base {
$bookmarks = array();
}
if (($section = (isset($PAGE->section) ? $PAGE->section : '')) && (in_array($section, $bookmarks))) {
if(isset($PAGE->section) and $PAGE->section == 'search'){
// the search page can't be properly bookmarked at present
$this->content->footer = '';
}elseif (($section = (isset($PAGE->section) ? $PAGE->section : '')) && (in_array($section, $bookmarks))) {
$this->content->footer = '<a href="' . $CFG->wwwroot . '/blocks/admin_bookmarks/delete.php?section=' . $section . '&amp;sesskey='.sesskey().'">' . get_string('unbookmarkthispage','admin') . '</a>';
} elseif ($section = (isset($PAGE->section) ? $PAGE->section : '')) {
$this->content->footer = '<a href="' . $CFG->wwwroot . '/blocks/admin_bookmarks/create.php?section=' . $section . '&amp;sesskey='.sesskey().'">' . get_string('bookmarkthispage','admin') . '</a>';
+24 -18
View File
@@ -15,8 +15,13 @@ function migrate2utf8_block_instance_configdata($recordid){
$fromenc = $globallang;
} else {
$sitelang = $CFG->lang;
$courselang = get_course_lang($blockinstance->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockinstance->pageid); //N.E.!!
if ($blockinstance->pagetype == 'course-view') {
$courselang = get_course_lang($blockinstance->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockinstance->pageid); //N.E.!!
} else {
$courselang = false;
$userlang = false;
}
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
@@ -42,8 +47,13 @@ function migrate2utf8_block_instance_configdata($recordid){
$fromenc = $globallang;
} else {
$sitelang = $CFG->lang;
$courselang = get_course_lang($blockinstance->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockinstance->pageid); //N.E.!!
if ($blockinstance->pagetype == 'course-view') {
$courselang = get_course_lang($blockinstance->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockinstance->pageid); //N.E.!!
} else {
$courselang = false;
$userlang = false;
}
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
@@ -68,8 +78,13 @@ function migrate2utf8_block_instance_configdata($recordid){
$fromenc = $globallang;
} else {
$sitelang = $CFG->lang;
$courselang = get_course_lang($blockinstance->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockinstance->pageid); //N.E.!!
if ($blockinstance->pagetype == 'course-view') {
$courselang = get_course_lang($blockinstance->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockinstance->pageid); //N.E.!!
} else {
$courselang = false;
$userlang = false;
}
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
}
@@ -110,10 +125,7 @@ global $CFG, $globallang;
$fromenc = $globallang;
} else {
$sitelang = $CFG->lang;
$courselang = get_course_lang($blockpinned->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockpinned->pageid); //N.E.!!
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
$fromenc = get_original_encoding($sitelang, false, false);
}
$blah = unserialize(base64_decode($blockpinned->configdata));
@@ -137,10 +149,7 @@ global $CFG, $globallang;
$fromenc = $globallang;
} else {
$sitelang = $CFG->lang;
$courselang = get_course_lang($blockpinned->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockpinned->pageid); //N.E.!!
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
$fromenc = get_original_encoding($sitelang, false, false);
}
$blah = unserialize(base64_decode($blockpinned->configdata));
@@ -163,10 +172,7 @@ global $CFG, $globallang;
$fromenc = $globallang;
} else {
$sitelang = $CFG->lang;
$courselang = get_course_lang($blockpinned->pageid); //Non existing!
$userlang = get_main_teacher_lang($blockpinned->pageid); //N.E.!!
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
$fromenc = get_original_encoding($sitelang, false, false);
}
$blah = unserialize(base64_decode($blockpinned->configdata));
+1 -1
View File
@@ -52,7 +52,7 @@ class block_login extends block_base {
$this->content->text .= '<table align="center" cellpadding="2" cellspacing="0" class="logintable">';
$this->content->text .= '<tr><td class="c0 r0" align="right">'.get_string('username').':</td>';
$this->content->text .= '<td class="c1 r0"><input type="text" name="username" size="10" value="'.$username.'" /></td></tr>';
$this->content->text .= '<td class="c1 r0"><input type="text" name="username" size="10" value="'.s($username).'" /></td></tr>';
$this->content->text .= '<tr><td class="c0 r1" align="right">'.get_string('password').':</td>';
$this->content->text .= '<td class="c1 r1"><input type="password" name="password" size="10" value="" /></td></tr>';
+2 -8
View File
@@ -303,13 +303,7 @@ class block_base {
switch ($this->instance->pagetype) {
case 'course-view':
if ($this->instance->pageid == SITEID) {
$context = get_context_instance(CONTEXT_SYSTEM, $this->instance->pageid);
} else {
$context = get_context_instance(CONTEXT_COURSE, $this->instance->pageid);
}
if (!has_capability('moodle/site:manageblocks', $context)) {
if (!has_capability('moodle/site:manageblocks', $blockcontext)) {
return null;
}
break;
@@ -706,4 +700,4 @@ class block_list extends block_base {
}
?>
?>
@@ -273,8 +273,12 @@ if ($act == 'updfeed') {
if (file_exists($CFG->dirroot .'/blog/lib.php')) {
//Blog module is installed - provide "blog this" link
print '<td align="right">'."\n";
print '<img src="'. $CFG->pixpath .'/blog/blog.gif" alt="'. get_string('blogthis', 'blog').'" title="'. get_string('blogthis', 'blog') .'" border="0" align="middle" />'."\n";
print '<a href="'. $CFG->wwwroot .'/blog/blogthis.php?userid='. $userid .'&act=use&item='. $y .'&rssid='. $rssid .'"><small><strong>'. get_string('blogthis', 'blog') .'</strong></small></a>'."\n";
/// MDL-9291, blog this feature needs further discussion/implementation
/// temporarily disabling for now.
// print '<img src="'. $CFG->pixpath .'/blog/blog.gif" alt="'. get_string('blogthis', 'blog').'" title="'. get_string('blogthis', 'blog') .'" border="0" align="middle" />'."\n";
//print '<a href="'. $CFG->wwwroot .'/blog/blogthis.php?userid='. $USER->id .'&act=use&item='. $y .'&rssid='. $rssid .'"><small><strong>'. get_string('blogthis', 'blog') .'</strong></small></a>'."\n";
} else {
print '<td>&nbsp;';
}
-3
View File
@@ -40,7 +40,6 @@ $block_rss_client_capabilities = array(
'legacy' => array(
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'coursecreator' => CAP_ALLOW,
'admin' => CAP_ALLOW
)
),
@@ -51,7 +50,6 @@ $block_rss_client_capabilities = array(
'contextlevel' => CONTEXT_SYSTEM,
'legacy' => array(
'editingteacher' => CAP_ALLOW,
'coursecreator' => CAP_ALLOW,
'admin' => CAP_ALLOW
)
),
@@ -63,7 +61,6 @@ $block_rss_client_capabilities = array(
'legacy' => array(
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'coursecreator' => CAP_ALLOW,
'admin' => CAP_ALLOW
)
),
+4 -3
View File
@@ -75,7 +75,7 @@ switch ($filtertype) {
$courseid = $course->id;
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
require_login($course->id);
if (!has_capability('moodle/blog:view', $sitecontext)) {
if (!has_capability('moodle/blog:view', $coursecontext)) {
error('You do not have the required permissions to view blogs in this course');
}
break;
@@ -84,7 +84,8 @@ switch ($filtertype) {
if ($CFG->bloglevel < BLOG_GROUP_LEVEL) {
error('Group blogs is not enabled');
}
if (!$group = get_record('groups','id',$groupid)) {
// fix for MDL-9268
if (!$group = get_record('groups','id',$filterselect)) {
error('Incorrect group id specified');
}
if (!$course = get_record('course', 'id', $group->courseid)) {
@@ -115,7 +116,7 @@ switch ($filtertype) {
if ($USER->id == $filterselect) {
if (!has_capability('moodle/blog:create', $sitecontext)
and !has_capability('moodle/blog:view', $sitecontext)) {
error('You do not have your own a blog, sorry.');
error('You do not have your own blog, sorry.');
}
} else {
$personalcontext = get_context_instance(CONTEXT_USER, $filterselect);
+34 -15
View File
@@ -327,10 +327,16 @@
if (has_capability('moodle/blog:manageentries', $sitecontext)) {
return true; // can manage all posts
}
// coming for 1 post, make sure it's not a draft
if ($blogEntry and $blogEntry->publishstate == 'draft') {
return false; // can not view draft of others
}
// coming for 1 post, make sure user is logged in, if not a public blog
if ($blogEntry && $blogEntry->publishstate != 'public' && !isloggedin()) {
return false;
}
switch ($CFG->bloglevel) {
case BLOG_GLOBAL_LEVEL:
@@ -345,7 +351,7 @@
break;
case BLOG_COURSE_LEVEL:
$mycourses = array_keys(get_my_courses($targetuserid));
$mycourses = array_keys(get_my_courses($USER->id));
$usercourses = array_keys(get_my_courses($targetuserid));
$shared = array_intersect($mycourses, $usercourses);
if (!empty($shared)) {
@@ -355,7 +361,7 @@
break;
case BLOG_GROUP_LEVEL:
$mycourses = array_keys(get_my_courses($targetuserid));
$mycourses = array_keys(get_my_courses($USER->id));
$usercourses = array_keys(get_my_courses($targetuserid));
$shared = array_intersect($mycourses, $usercourses);
foreach ($shared as $courseid) {
@@ -393,6 +399,8 @@
global $CFG, $USER;
$typesql = " AND p.module = 'blog' ";
/// set the tag id for searching
if ($tagid) {
$tag = $tagid;
@@ -411,7 +419,7 @@
if ($post = get_record('post', 'id', $postid)) {
if (blog_user_can_view_user_post($post->userid)) {
if (blog_user_can_view_user_post($post->userid, $post)) {
if ($user = get_record('user', 'id', $post->userid)) {
$post->email = $user->email;
@@ -437,13 +445,19 @@
$tagquerysql = '';
}
if (isloggedin()) {
$permissionsql = '(p.publishstate = \'site\' OR p.publishstate = \'public\' OR p.userid = '.$USER->id.')';
if (isloggedin() && !has_capability('moodle/legacy:guest', get_context_instance(CONTEXT_SYSTEM, SITEID), $USER->id, false)) {
$permissionsql = 'AND (p.publishstate = \'site\' OR p.publishstate = \'public\' OR p.userid = '.$USER->id.')';
} else {
$permissionsql = 'p.publishstate = \'public\'';
$permissionsql = 'AND p.publishstate = \'public\'';
}
// fix for MDL-9165, use with readuserblogs capability in a user context can read that user's private blogs
// admins can see all blogs regardless of publish states, as described on the help page
if (has_capability('moodle/user:readuserblogs', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
$permissionsql = '';
} else if ($filtertype=='user' && has_capability('moodle/user:readuserblogs', get_context_instance(CONTEXT_USER, $filterselect))) {
$permissionsql = '';
}
/****************************************
* depending on the type, there are 4 *
* different possible sqls *
@@ -463,7 +477,7 @@
.$CFG->prefix.'user u
WHERE p.userid = u.id '.$tagquerysql.'
AND u.deleted = 0
AND '.$permissionsql;
'.$permissionsql.$typesql;
break;
@@ -477,20 +491,25 @@
AND ra.contextid '.get_related_contexts_string($context).'
AND u.id = p.userid
AND u.deleted = 0
AND '.$permissionsql;
'.$permissionsql.$typesql;
break;
case 'group':
$SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
.$CFG->prefix.'groups_members m, '.$CFG->prefix.'user u
WHERE p.userid = m.userid '.$tagquerysql.'
AND u.id = p.userid
AND m.groupid = '.$filterselect.'
AND (p.publishstate = \'site\' OR p.publishstate = \'public\' OR p.userid = '.$USER->id.')';
/*$SQL = 'SELECT '.$requiredfields.' FROM '.$CFG->prefix.'post p, '.$tagtablesql
.groups_members_from_sql().', '.$CFG->prefix.'user u
WHERE '.groups_members_where_sql($filterselect, 'p.userid').'
AND u.id = p.userid
AND u.deleted = 0
AND '.$permissionsql;
'.$permissionsql.$typesql;
*/
break;
case 'user':
@@ -500,7 +519,7 @@
WHERE p.userid = u.id '.$tagquerysql.'
AND u.id = '.$filterselect.'
AND u.deleted = 0
AND '.$permissionsql;
'.$permissionsql.$typesql;
break;
}
+4 -4
View File
@@ -9,14 +9,14 @@
// Copyright (C) 2003-2004 Greek School Network www.sch.gr //
// //
// Designed by: //
// Avgoustos Tsinakos (tsinakos@uom.gr) //
// Jon Papaioannou (pj@uom.gr) //
// Avgoustos Tsinakos (tsinakos@teikav.edu.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// Programming and development: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// For bugs, suggestions, etc contact: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// The current module was developed at the University of Macedonia //
// (www.uom.gr) under the funding of the Greek School Network (www.sch.gr) //
+2 -2
View File
@@ -3,13 +3,13 @@
<form method="get" action="export_execute.php">
<?php print_string('iwanttoexport', 'calendar'); ?>:
<div class="indent">
<input type="radio" name="preset_what" id="pw_all" value="all" /><label for="pw_all"><?php print_string('eventsall', 'calendar'); ?></label><br />
<input type="radio" name="preset_what" id="pw_all" value="all" checked="checked"/><label for="pw_all"><?php print_string('eventsall', 'calendar'); ?></label><br />
<input type="radio" name="preset_what" id="pw_course" value="courses" /><label for="pw_course"><?php print_string('eventsrelatedtocourses', 'calendar'); ?></label><br />
</div>
<?php print_string('for', 'calendar'); ?>:
<div class="indent">
<?php if($allowthisweek) { ?>
<input type="radio" name="preset_time" id="pt_wknow" value="weeknow" /><label for="pt_wknow"><?php print_string('weekthis', 'calendar'); ?></label><br />
<input type="radio" name="preset_time" id="pt_wknow" value="weeknow" checked="checked"/><label for="pt_wknow"><?php print_string('weekthis', 'calendar'); ?></label><br />
<?php } ?>
<?php if($allownextweek) { ?>
<input type="radio" name="preset_time" id="pt_wknext" value="weeknext" /><label for="pt_wknext"><?php print_string('weeknext', 'calendar'); ?></label><br />
+2 -2
View File
@@ -16,8 +16,8 @@ $day = optional_param('cal_d', 0, PARAM_INT);
$mon = optional_param('cal_m', 0, PARAM_INT);
$yr = optional_param('cal_y', 0, PARAM_INT);
$what = optional_param('preset_what', '', PARAM_ALPHA);
$time = optional_param('preset_time', '', PARAM_ALPHA);
$what = optional_param('preset_what', 'all', PARAM_ALPHA);
$time = optional_param('preset_time', 'weeknow', PARAM_ALPHA);
$now = usergetdate(time());
// Let's see if we have sufficient and correct data
+39 -30
View File
@@ -9,14 +9,14 @@
// Copyright (C) 2003-2004 Greek School Network www.sch.gr //
// //
// Designed by: //
// Avgoustos Tsinakos (tsinakos@uom.gr) //
// Jon Papaioannou (pj@uom.gr) //
// Avgoustos Tsinakos (tsinakos@teikav.edu.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// Programming and development: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// For bugs, suggestions, etc contact: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// The current module was developed at the University of Macedonia //
// (www.uom.gr) under the funding of the Greek School Network (www.sch.gr) //
@@ -242,7 +242,7 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
$popupicon = $CFG->pixpath.'/c/user.gif';
$popupalt = '';
}
$popupcontent .= '<div><img height="16" width="16" src="'.$popupicon.'" style="vertical-align: middle; margin-right: 4px;" alt="'.$popupalt.'" /><a href="'.$dayhref.'">'.format_string($event->name,true).'</a></div>';
$popupcontent .= '<div><img height="16" width="16" src="'.$popupicon.'" style="vertical-align: middle; margin-right: 4px;" alt="'.$popupalt.'" /><a href="'.$dayhref.'#event_'.$event->id.'">'.format_string($event->name,true).'</a></div>';
}
//Accessibility: functionality moved to calendar_get_popup.
@@ -456,7 +456,7 @@ function calendar_print_event($event) {
static $strftimetime;
$event = calendar_add_event_metadata($event);
echo '<table class="event" cellspacing="0">';
echo '<a name="event_'.$event->id.'"></a><table class="event" cellspacing="0">';
echo '<tr><td class="picture">';
if (!empty($event->icon)) {
echo $event->icon;
@@ -870,7 +870,7 @@ function calendar_get_sideblock_upcoming($events, $linkhref = NULL) {
if(!empty($linkhref)) {
$ed = usergetdate($events[$i]->timestart);
$href = calendar_get_link_href(CALENDAR_URL.$linkhref, $ed['mday'], $ed['mon'], $ed['year']);
$content .= '<a href="'.$href.'">'.$events[$i]->name.'</a>';
$content .= '<a href="'.$href.'#event_'.$events[$i]->id.'">'.$events[$i]->name.'</a>';
}
else {
$content .= $events[$i]->name;
@@ -1095,10 +1095,11 @@ function calendar_set_filters(&$courses, &$group, &$user, $courseeventsfrom = NU
else {
$courses = false;
}
//BUG 6130 clean $courses array as SESSION has bad entries.
foreach ($courses as $index => $value) {
if (empty($value)) unset($courses[$index]);
}
//BUG 6130 clean $courses array as SESSION has bad entries.
// [pj] TODO: See if this has to do with my new change in get_default_courses and can be taken out
foreach ($courses as $index => $value) {
if (empty($value)) unset($courses[$index]);
}
if($SESSION->cal_show_user || $ignorefilters) {
// This doesn't work for arrays yet (maybe someday it will)
@@ -1177,15 +1178,11 @@ function calendar_edit_event_allowed($event) {
if (has_capability('moodle/calendar:manageentries', $sitecontext)) {
return true;
}
// editting userid account
if ($event->userid) {
if ($event->userid == $USER->id) {
return (has_capability('moodle/calendar:manageownentries', $sitecontext));
}
} else if ($event->groupid) {
$group = get_record('groups', 'id', $event->groupid);
if($group === false) {
// if groupid is set, it's definitely a group event
if ($event->groupid) {
//TODO:check.
if (! groups_group_exists($event->groupid)) {
return false;
}
@@ -1193,10 +1190,15 @@ function calendar_edit_event_allowed($event) {
// to edit group calendar too
// there is no need to check membership, because if you have this capability
// you will have a role in this group context
return has_capability('moodle/calendar:manageentries', get_context_instance(CONTEXT_GROUP, $group->id));
return has_capability('moodle/calendar:manageentries', get_context_instance(CONTEXT_GROUP, $event->groupid));
} else if ($event->courseid) {
return has_capability('moodle/calendar:manageentries', get_context_instance(CONTEXT_COURSE, $event->courseid));
}
// if groupid is not set, but course is set,
// it's definiely a course event
return has_capability('moodle/calendar:manageentries', get_context_instance(CONTEXT_COURSE, $event->courseid));
} else if ($event->userid && $event->userid == $USER->id) {
// if course is not set, but userid id set, it's a user event
return (has_capability('moodle/calendar:manageownentries', $sitecontext));
}
return false;
}
@@ -1222,15 +1224,22 @@ function calendar_get_default_courses($ignoreref = false) {
// find all course this student can view
if ($allcourses = get_my_courses($USER->id,'visible DESC,sortorder ASC', '*', true)) {
foreach ($allcourses as $courseid=>$acourse) {
$auth = '';
$context = get_context_instance(CONTEXT_COURSE, $courseid);
// let's try to see if there is any direct assignments on tihs context
if ($roleassign = get_record('role_assignments', 'contextid', $context->id, 'userid', $USER->id)) {
$auth = $roleassign->enrol;
if ($roleassign = get_records_sql("SELECT * FROM {$CFG->prefix}role_assignments
WHERE contextid = $context->id
AND userid = $USER->id")) {
foreach ($roleassign as $rid => $rs) {
if (!empty($rs->enrol)) {
$auth = $rs->enrol;
break;
}
}
} else {
$auth = '';
}
$courses[$courseid] = $auth;
}
}
$courses[$courseid] = $auth;
}
}
return $courses;
@@ -1356,4 +1365,4 @@ function calendar_set_filters_status($packed_bitfield) {
return true;
}
?>
?>
+4 -4
View File
@@ -9,14 +9,14 @@
// Copyright (C) 2003-2004 Greek School Network www.sch.gr //
// //
// Designed by: //
// Avgoustos Tsinakos (tsinakos@uom.gr) //
// Jon Papaioannou (pj@uom.gr) //
// Avgoustos Tsinakos (tsinakos@teikav.edu.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// Programming and development: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// For bugs, suggestions, etc contact: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// The current module was developed at the University of Macedonia //
// (www.uom.gr) under the funding of the Greek School Network (www.sch.gr) //
+23 -13
View File
@@ -9,14 +9,14 @@
// Copyright (C) 2003-2004 Greek School Network www.sch.gr //
// //
// Designed by: //
// Avgoustos Tsinakos (tsinakos@uom.gr) //
// Jon Papaioannou (pj@uom.gr) //
// Avgoustos Tsinakos (tsinakos@teikav.edu.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// Programming and development: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// For bugs, suggestions, etc contact: //
// Jon Papaioannou (pj@uom.gr) //
// Jon Papaioannou (pj@moodle.org) //
// //
// The current module was developed at the University of Macedonia //
// (www.uom.gr) under the funding of the Greek School Network (www.sch.gr) //
@@ -44,8 +44,8 @@
require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->dirroot.'/calendar/lib.php');
$course = optional_param('course', 0);
$view = optional_param('view', 'upcoming');
$courseid = optional_param('course', 0, PARAM_INT);
$view = optional_param('view', 'upcoming', PARAM_ALPHA);
$day = optional_param('cal_d', 0, PARAM_INT);
$mon = optional_param('cal_m', 0, PARAM_INT);
$yr = optional_param('cal_y', 0, PARAM_INT);
@@ -54,7 +54,9 @@
redirect($CFG->wwwroot.'/'.$CFG->admin.'/index.php');
}
if ($CFG->forcelogin) {
if ($courseid) {
require_login($courseid);
} else if ($CFG->forcelogin) {
require_login();
}
@@ -87,8 +89,8 @@
}
// If a course has been supplied in the URL, change the filters to show that one
if (!empty($course)) {
if ($course = get_record('course', 'id', $course)) {
if (!empty($courseid)) {
if ($course = get_record('course', 'id', $courseid)) {
if ($course->id == SITEID) {
// If coming from the home page, show all courses
$SESSION->cal_courses_shown = calendar_get_default_courses(true);
@@ -100,6 +102,8 @@
calendar_set_referring_course($SESSION->cal_courses_shown);
}
}
} else {
$course = null;
}
if (empty($USER->id) or isguest()) {
@@ -302,9 +306,15 @@ function calendar_show_month_detailed($m, $y, $courses, $groups, $users) {
list($d, $m, $y) = array($date['mday'], $date['mon'], $date['year']); // This is what we want to display
$display->maxdays = calendar_days_in_month($m, $y);
// We 'll keep these values as GMT here, and offset them when the time comes to query the db
$display->tstart = gmmktime(0, 0, 0, $m, 1, $y); // This is GMT
$display->tend = gmmktime(23, 59, 59, $m, $display->maxdays, $y); // GMT
if (get_user_timezone_offset() < 99) {
// We 'll keep these values as GMT here, and offset them when the time comes to query the db
$display->tstart = gmmktime(0, 0, 0, $m, 1, $y); // This is GMT
$display->tend = gmmktime(23, 59, 59, $m, $display->maxdays, $y); // GMT
} else {
// no timezone info specified
$display->tstart = mktime(0, 0, 0, $m, 1, $y);
$display->tend = mktime(23, 59, 59, $m, $display->maxdays, $y);
}
$startwday = gmdate('w', $display->tstart); // $display->tstart is already GMT, so don't use date(): messes with server's TZ
@@ -440,7 +450,7 @@ function calendar_show_month_detailed($m, $y, $courses, $groups, $users) {
if(isset($eventsbyday[$day])) {
echo '<ul class="events-new">';
foreach($eventsbyday[$day] as $eventindex) {
echo '<li><a href="'.$dayhref.'">'.format_string($events[$eventindex]->name,true).'</a></li>';
echo '<li><a href="'.$dayhref.'#event_'.$events[$eventindex]->id.'">'.format_string($events[$eventindex]->name, true).'</a></li>';
}
echo '</ul>';
}
+2 -2
View File
@@ -325,12 +325,12 @@
echo'<a title="'.get_string('assignroles', 'role').'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$coursecontext->id.'"><img src="'.$CFG->pixpath.'/i/roles.gif" height="11" width="11" alt="'.get_string('assignroles', 'role').'" /></a>';
}
if (has_capability('moodle/course:delete', $coursecontext)) {
if (can_delete_course($acourse->id)) {
echo '<a title="'.$strdelete.'" href="delete.php?id='.$acourse->id.'">'.
'<img src="'.$CFG->pixpath.'/t/delete.gif" height="11" width="11" border="0" alt="'.$strdelete.'" /></a> ';
}
if (has_capability('moodle/course:visibility', $coursecontext)) {
if (has_capability('moodle/course:visibility', $coursecontext) && has_capability('moodle/course:viewhiddencourses', $coursecontext)) {
if (!empty($acourse->visible)) {
echo '<a title="'.$strhide.'" href="category.php?id='.$category->id.'&amp;page='.$page.
'&amp;perpage='.$perpage.'&amp;hide='.$acourse->id.'&amp;sesskey='.$USER->sesskey.'">'.
+3 -1
View File
@@ -8,7 +8,9 @@
require_login();
require_capability('moodle/course:delete', get_context_instance(CONTEXT_SYSTEM, SITEID));
if (!can_delete_course($id)) {
error('You do not have the permission to delete this course.');
}
if (!$site = get_site()) {
error("Site not found!");
+5
View File
@@ -156,6 +156,11 @@
}
$choices = $choices + $roles;
// fix for MDL-9197
foreach ($choices as $choiceid => $choice) {
$choices[$choiceid] = format_string($choice);
}
choose_from_menu ($choices, 'defaultrole', $form->defaultrole, '');
helpbutton("coursedefaultrole", get_string("defaultrole"));
+1 -1
View File
@@ -40,7 +40,7 @@
$disable_meta = get_string('metaalreadyhasenrolments');
}
}
} else { // Admin is creating a new course
} else { // Creating a new course
$context = get_context_instance(CONTEXT_COURSECAT, $category);
// first check to see if user has site level course creation.
+103 -159
View File
@@ -1,177 +1,122 @@
<?php // $Id$
// Edit course settings
require_once("../config.php");
require_once("lib.php");
require_once("$CFG->libdir/blocklib.php");
require_once("$CFG->dirroot/enrol/enrol.class.php");
require_once('../config.php');
require_once($CFG->dirroot.'/enrol/enrol.class.php');
require_once($CFG->libdir.'/blocklib.php');
require_once('lib.php');
require_once('edit_form.php');
include_once $CFG->libdir.'/formslib.php';
$id = optional_param('id', 0, PARAM_INT); // course id
$categoryid = optional_param('category', 0, PARAM_INT); // course category - can be changed in edit form
require_login();
$mform =& new moodleform('edit_course', 'post', 'edit2.php');
$mform->acceptGet('id', 'category');
$id = $mform->optional_param('id', 0, PARAM_INT); // course id
$category = $mform->optional_param('category', 0, PARAM_INT); // possible default category
$disable_meta = false;
$focus = "";
if ($id) {
if (! $course = get_record("course", "id", $id)) {
error("Course ID was incorrect");
/// basic access control checks
if ($id) { // editing course
if (!$course = get_record('course', 'id', $id)) {
error('Course ID was incorrect');
}
$category = get_record('course_categories', 'id', $course->category);
require_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id));
$context = get_context_instance(CONTEXT_COURSE, $course->id);
if (!has_capability('moodle/course:update', $context)) {
error("You do not currently have editing privileges!");
} else if ($categoryid) { // creating new course in this category
$course = null;
if (!$category = get_record('course_categories', 'id', $categoryid)) {
error('Category ID was incorrect');
}
if (course_in_meta($course)) {
$disable_meta = get_string('metaalreadyinmeta');
} else if ($course->metacourse) {
if (count_records("course_meta","parent_course",$course->id) > 0) {
$disable_meta = get_string('metaalreadyhascourses');
}
} else {
$managers = count(get_users_by_capability($context, 'moodle/course:managemetacourse'));
$participants = count(get_users_by_capability($context, 'moodle/course:view'));
if ($participants > $managers) {
$disable_meta = get_string('metaalreadyhasenrolments');
}
}
} else { // Admin is creating a new course
$context = get_context_instance(CONTEXT_SYSTEM, SITEID);
if (!has_capability('moodle/course:create',$context)) {
error("You do not currently have course creation privileges!");
}
$course = NULL;
require_capability('moodle/course:create', get_context_instance(CONTEXT_COURSECAT, $category->id));
} else {
error('Either course id or category must be specified');
}
if (! $site = get_site()) {
redirect("$CFG->wwwroot/$CFG->admin/index.php");
}
include("edit_form.php");
/// If data submitted, then process and store.
// data_submitted tries to validate form data and returns false if
// the user inputted data is invalid and the form should be redisplayed with
// feedback.
if ($fromform=$mform->data_submitted()) {
if (!empty($fromform->enrolstartdisabled)){
$fromform->enrolstartdate = 0;
}
if (!empty($fromform->enrolenddisabled)) {
$fromform->enrolenddate = 0;
}
/// prepare course
if (!empty($course)) {
$allowedmods = array();
if (!empty($fromform->allowedmods)) {
$allowedmods = $fromform->allowedmods;
unset($fromform->allowedmods);
}
$fromform->timemodified = time();
if ($fromform->defaultrole == -1) { // Just leave it however it is
unset($fromform->defaultrole);
}
if (!empty($course)) {
// Test for and remove blocks which aren't appropriate anymore
$page = page_create_object(PAGE_COURSE_VIEW, $course->id);
blocks_remove_inappropriate($page);
// Update with the new data
if (update_record('course', $fromform)) {
add_to_log($course->id, "course", "update", "edit.php?id=$id", "");
if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
$course->restrictmodules = $fromform->restrictmodules;
update_restricted_mods($course,$allowedmods);
if ($am = get_records('course_allowed_modules','course',$course->id)) {
foreach ($am as $m) {
$allowedmods[] = $m->module;
}
fix_course_sortorder();
// everything ok, no need to display any message in redirect
redirect("view.php?id=$course->id");
} else {
error("Serious Error! Could not update the course record! (id = $fromform->id)");
if (empty($course->restrictmodules)) {
$allowedmods = explode(',',$CFG->defaultallowedmodules);
} // it'll be greyed out but we want these by default anyway.
}
} else {
$fromform->timecreated = time();
// place at beginning of category
fix_course_sortorder();
$fromform->sortorder = get_field_sql("SELECT min(sortorder)-1 FROM {$CFG->prefix}course WHERE category=$fromform->category");
if (empty($fromform->sortorder)) {
$fromform->sortorder = 100;
$course->allowedmods = $allowedmods;
if ($course->enrolstartdate){
$course->enrolstartdisabled = 0;
}
// fill in default teacher and student names to keep backwards compatibility
$fromform->teacher = addslashes(get_string('defaultcourseteacher'));
$fromform->teachers = addslashes(get_string('defaultcourseteachers'));
$fromform->student = addslashes(get_string('defaultcoursestudent'));
$fromform->students = addslashes(get_string('defaultcoursestudents'));
if ($newcourseid = insert_record('course', $fromform)) { // Set up new course
// Setup the blocks
$page = page_create_object(PAGE_COURSE_VIEW, $newcourseid);
blocks_repopulate_page($page); // Return value not checked because you can always edit later
if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
$course = get_record("course","id",$newcourseid);
update_restricted_mods($course,$allowedmods);
}
$section = NULL;
$section->course = $newcourseid; // Create a default section.
$section->section = 0;
$section->id = insert_record("course_sections", $section);
fix_course_sortorder();
add_to_log(SITEID, "course", "new", "view.php?id=$newcourseid", "$fromform->fullname (ID $newcourseid)") ;
$context = get_context_instance(CONTEXT_COURSE, $newcourseid);
if ($fromform->metacourse and has_capability('moodle/course:managemetacourse', $context)) { // Redirect users with metacourse capability to student import
redirect($CFG->wwwroot."/course/importstudents.php?id=$newcourseid");
} else if (has_capability('moodle/role:assign', $context)) { // Redirect users with assign capability to assign users to different roles
redirect($CFG->wwwroot."/$CFG->admin/roles/assign.php?contextid=$context->id");
} else { // Add current teacher and send to course
// find a role with legacy:edittingteacher
if ($teacherroles = get_roles_with_capability('moodle/legacy:editingteacher', CAP_ALLOW, $context)) {
// assign the role to this user
$teachereditrole = array_shift($teacherroles);
role_assign($teachereditrole->id, $USER->id, 0, $context->id);
}
redirect("view.php?id=$newcourseid");
}
} else {
error("Serious Error! Could not create the new course!");
if ($course->enrolenddate) {
$course->enrolenddisabled = 0;
}
}
die;
}
//print the form
/// first create the form
$editform = new course_edit_form('edit.php', compact('course', 'category'));
// now override defaults if course already exists
if (!empty($course)) {
$editform->set_data($course);
}
if ($editform->is_cancelled()){
if (empty($course)) {
redirect($CFG->wwwroot);
} else {
redirect($CFG->wwwroot.'/course/view.php?id='.$course->id);
}
} else if ($data = $editform->get_data()) {
/// process data if submitted
//preprocess data
if ($data->enrolstartdisabled){
$data->enrolstartdate = 0;
}
if ($data->enrolenddisabled) {
$data->enrolenddate = 0;
}
$data->timemodified = time();
if (empty($course)) {
if (!$course = create_course($data)) {
print_error('coursenotcreated');
}
$context = get_context_instance(CONTEXT_COURSE, $course->id);
// assign default role to creator if not already having permission to manage course assignments
if (!has_capability('moodle/course:view', $context) or !has_capability('moodle/role:assign', $context)) {
role_assign($CFG->creatornewroleid, $USER->id, 0, $context->id);
}
if ($data->metacourse and has_capability('moodle/course:managemetacourse', $context)) {
// Redirect users with metacourse capability to student import
redirect($CFG->wwwroot."/course/importstudents.php?id=$course->id");
} else {
// Redirect to roles assignment
redirect($CFG->wwwroot."/$CFG->admin/roles/assign.php?contextid=$context->id");
}
} else {
if (!update_course($data)) {
print_error('coursenotupdated');
}
redirect($CFG->wwwroot."/course/view.php?id=$course->id");
}
}
/// Print the form
$site = get_site();
$streditcoursesettings = get_string("editcoursesettings");
$straddnewcourse = get_string("addnewcourse");
@@ -179,20 +124,19 @@
$strcategories = get_string("categories");
if (!empty($course)) {
print_header($streditcoursesettings, "$course->fullname",
print_header($streditcoursesettings, $course->fullname,
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>
-> $streditcoursesettings", $focus);
-> $streditcoursesettings", $editform->focus());
} else {
print_header("$site->shortname: $straddnewcourse", "$site->fullname",
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> ".
"<a href=\"index.php\">$strcategories</a> -> $straddnewcourse", $focus);
print_header("$site->shortname: $straddnewcourse", $site->fullname,
"<a href=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</a> -> ".
"<a href=\"index.php\">$strcategories</a> -> $straddnewcourse", $editform->focus());
}
print_heading($streditcoursesettings);
$mform->display();
$editform->display();
print_footer($course);
?>
+341 -351
View File
@@ -1,392 +1,382 @@
<?php
/// For moodleform we reconstruct all the data about the form after submission before we
/// extract data submitted. So we can then tell for select, checkbox and radio fields what
/// options could have been submitted by the form eg submitted value for a single selection
/// select field must be one of the options of the select field.
<?php //$Id$
// $toform will be used for the default value of a field if no data has been submitted.
require_once($CFG->libdir.'/formslib.php');
if (!empty($course)) {
//this is what we do if we are editing a record from the db
$toform = $course;
$toform->allowedmods = array();
if ($am = get_records("course_allowed_modules","course",$course->id)) {
foreach ($am as $m) {
$toform->allowedmods[] = $m->module;
class course_edit_form extends moodleform {
function definition() {
global $USER, $CFG;
$mform =& $this->_form;
$course = $this->_customdata['course'];
$category = $this->_customdata['category'];
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
$categorycontext = get_context_instance(CONTEXT_COURSECAT, $category->id);
$disable_meta = false; // basic meta course state protection; server-side security checks not needed
if (!empty($course)) {
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
$context = $coursecontext;
if (course_in_meta($course)) {
$disable_meta = get_string('metaalreadyinmeta');
} else if ($course->metacourse) {
if (count_records('course_meta', 'parent_course', $course->id) > 0) {
$disable_meta = get_string('metaalreadyhascourses');
}
} else {
$managers = count(get_users_by_capability($coursecontext, 'moodle/course:managemetacourse'));
$participants = count(get_users_by_capability($coursecontext, 'moodle/course:view'));
if ($participants > $managers) {
$disable_meta = get_string('metaalreadyhasenrolments');
}
}
} else {
if (empty($course->restrictmodules)) {
$toform->allowedmods = explode(',',$CFG->defaultallowedmodules);
} // it'll be greyed out but we want these by default anyway.
}
} else {
//this is a brand new course!
$toform->startdate = time() + 3600 * 24;
$toform->fullname = get_string("defaultcoursefullname");
$toform->shortname = get_string("defaultcourseshortname");
$toform->summary = get_string("defaultcoursesummary");
$toform->format = "weeks";
$toform->password = "";
$toform->guest = 0;
$toform->numsections = 10;
$toform->idnumber = '';
$toform->cost = '';
$toform->currency = empty($CFG->enrol_currency) ? 'USD' : $CFG->enrol_currency;
$toform->newsitems = 5;
$toform->showgrades = 1;
$toform->groupmode = 0;
$toform->groupmodeforce = 0;
$toform->category = $category;
$toform->id = "";
$toform->visible = 1;
$toform->allowedmods = array();
if ($CFG->restrictmodulesfor == 'all') {
$toform->allowedmods = explode(',',$CFG->defaultallowedmodules);
if (!empty($CFG->restrictbydefault)) {
$toform->restrictmodules = 1;
}
$coursecontext = null;
$context = $categorycontext;
}
/// form definition with new course defaults
//--------------------------------------------------------------------------------
$mform->addElement('header','general', get_string('general', 'form'));
}
//must have create course capability in both categories in order to move course
if (has_capability('moodle/course:create', $categorycontext)) {
$displaylist = array();
$parentlist = array();
make_categories_list($displaylist, $parentlist);
foreach ($displaylist as $key=>$val) {
if (!has_capability('moodle/course:create', get_context_instance(CONTEXT_COURSECAT, $key))) {
unset($displaylist[$key]);
}
}
$mform->addElement('select', 'category', get_string('category'), $displaylist);
} else {
$mform->addElement('hidden', 'category', null);
}
$mform->setHelpButton('category', array('coursecategory', get_string('category')));
$mform->setDefault('category', $category->id);
$mform->setType('category', PARAM_INT);
$mform->addElement('header','general', get_string("general"));
if (has_capability('moodle/course:create', get_context_instance(CONTEXT_COURSECAT, $toform->category))) {
$displaylist = array();
$parentlist = array();
make_categories_list($displaylist, $parentlist);
$mform->addElement('select', "category", get_string("category"), $displaylist );
}
$mform->setDefault('fullname', $toform->fullname);
$mform->addElement('text','fullname', get_string("fullname"),'maxlength="254" size="50"');
$mform->setDefault('shortname', $toform->shortname);
$mform->addElement('text','shortname', get_string("shortname"),'maxlength="15" size="10"');
$mform->setDefault('idnumber', $toform->idnumber);
$mform->addElement('text','idnumber', get_string("idnumbercourse"),'maxlength="100" size="10"');
$mform->setDefault('summary', $toform->summary);
$mform->addElement('htmleditor','summary', get_string("summary"), array('rows'=>'10', 'cols'=>'65'));
$mform->addElement('text','fullname', get_string('fullname'),'maxlength="254" size="50"');
$mform->setHelpButton('fullname', array('coursefullname', get_string('fullname')), true);
$mform->setDefault('fullname', get_string('defaultcoursefullname'));
$mform->addRule('fullname', get_string('missingfullname'), 'required', null, 'client');
$mform->setType('fullname', PARAM_MULTILANG);
$mform->setDefault('format', $toform->format);
$courseformats = get_list_of_plugins("course/format");
$formcourseformats = array();
$mform->addElement('text','shortname', get_string('shortname'),'maxlength="15" size="10"');
$mform->setHelpButton('shortname', array('courseshortname', get_string('shortname')), true);
$mform->setDefault('shortname', get_string('defaultcourseshortname'));
$mform->addRule('shortname', get_string('missingshortname'), 'required', null, 'client');
$mform->setType('shortname', PARAM_MULTILANG);
foreach ($courseformats as $courseformat) {
$formcourseformats["$courseformat"] = get_string("format$courseformat");
}
$mform->addElement('text','idnumber', get_string('idnumbercourse'),'maxlength="100" size="10"');
$mform->setHelpButton('idnumber', array('courseidnumber', get_string('idnumbercourse')), true);
$mform->setType('idnumber', PARAM_RAW);
$mform->addElement('select', 'format', get_string("format"), $formcourseformats );
$mform->addElement('htmleditor','summary', get_string('summary'), array('rows'=> '10', 'cols'=>'65'));
$mform->setHelpButton('summary', array('text', get_string('helptext')), true);
$mform->setDefault('summary', get_string('defaultcoursesummary'));
$mform->addRule('summary', get_string('missingsummary'), 'required', null, 'client');
$mform->setType('summary', PARAM_RAW);
$mform->setDefault('numsections', $toform->numsections);
for ($i=1; $i<=52; $i++) {
$sectionmenu[$i] = "$i";
}
$mform->addElement('select', 'numsections', get_string("numberweeks"), $sectionmenu);
$mform->setDefault('startdate', $toform->startdate);
$mform->addElement('date_selector', 'startdate', get_string('startdate'));
$courseformats = get_list_of_plugins('course/format');
$formcourseformats = array();
foreach ($courseformats as $courseformat) {
$formcourseformats["$courseformat"] = get_string("format$courseformat","format_$courseformat");
if($formcourseformats["$courseformat"]=="[[format$courseformat]]") {
$formcourseformats["$courseformat"] = get_string("format$courseformat");
}
}
$mform->addElement('select', 'format', get_string('format'), $formcourseformats);
$mform->setHelpButton('format', array('courseformats', get_string('courseformats')), true);
$mform->setDefault('format', 'weeks');
$mform->setDefault('hiddensections',(isset($toform->hiddensections))?$toform->hiddensections:0);
unset($choices);
$choices["0"] = get_string("hiddensectionscollapsed");
$choices["1"] = get_string("hiddensectionsinvisible");
$mform->addElement('select', 'hiddensections', get_string("hiddensections"), $choices);
for ($i=1; $i<=52; $i++) {
$sectionmenu[$i] = "$i";
}
$mform->addElement('select', 'numsections', get_string('numberweeks'), $sectionmenu);
$mform->setDefault('numsections', 10);
$mform->setDefault('newsitems', $toform->newsitems);
$newsitem = get_string("newsitem");
$newsitems = get_string("newsitems");
$options = array("0" => "0 $newsitems",
"1" => "1 $newsitem",
"2" => "2 $newsitems",
"3" => "3 $newsitems",
"4" => "4 $newsitems",
"5" => "5 $newsitems",
"6" => "6 $newsitems",
"7" => "7 $newsitems",
"8" => "8 $newsitems",
"9" => "9 $newsitems",
"10" => "10 $newsitems");
$mform->addElement('select', 'newsitems', get_string("newsitemsnumber"), $options);
$mform->addElement('date_selector', 'startdate', get_string('startdate'));
$mform->setHelpButton('startdate', array('coursestartdate', get_string('startdate')), true);
$mform->setDefault('startdate', time() + 3600 * 24);
$mform->setDefault('showgrades', $toform->showgrades);
unset($choices);
$choices["0"] = get_string("no");
$choices["1"] = get_string("yes");
$mform->addElement('select', 'showgrades', get_string("showgrades"), $choices);
unset($choices);
$mform->setDefault('showreports',(isset($toform->showreports))?$toform->showreports:0);
$choices["0"] = get_string("no");
$choices["1"] = get_string("yes");
$mform->addElement('select', 'showreports', get_string("showreports"), $choices);
$mform->setDefault('maxbytes',(isset($toform->maxbytes))?$toform->maxbytes:0);
$choices = get_max_upload_sizes($CFG->maxbytes);
$mform->addElement('select', 'maxbytes', get_string("maximumupload"), $choices);
if (!empty($CFG->allowcoursethemes)) {
$mform->setDefault('theme',(isset($toform->theme))?$toform->theme:'');
$themes=array();
$themes[''] = get_string("forceno");
$themes += get_list_of_themes();
$mform->addElement('select', 'theme', get_string("forcetheme"), $themes);
}
unset($choices);
$mform->setDefault('metacourse',(isset($toform->metacourse))?$toform->metacourse:0);
$choices = array();
$choices['0'] = get_string('hiddensectionscollapsed');
$choices['1'] = get_string('hiddensectionsinvisible');
$mform->addElement('select', 'hiddensections', get_string('hiddensections'), $choices);
$mform->setHelpButton('hiddensections', array('coursehiddensections', get_string('hiddensections')), true);
$mform->setDefault('hiddensections', 0);
$options = range(0, 10);
$mform->addElement('select', 'newsitems', get_string('newsitemsnumber'), $options);
$mform->setHelpButton('newsitems', array('coursenewsitems', get_string('newsitemsnumber')), true);
$mform->setDefault('newsitems', 5);
$mform->addElement('selectyesno', 'showgrades', get_string('showgrades'));
$mform->setHelpButton('showgrades', array('coursegrades', get_string('grades')), true);
$mform->setDefault('showgrades', 1);
$mform->addElement('selectyesno', 'showreports', get_string('showreports'));
$mform->setHelpButton('showreports', array('coursereports', get_string('activityreport')), true);
$mform->setDefault('showreports', 0);
$choices = get_max_upload_sizes($CFG->maxbytes);
$mform->addElement('select', 'maxbytes', get_string('maximumupload'), $choices);
$mform->setHelpButton('maxbytes', array('courseuploadsize', get_string('maximumupload')), true);
if (!empty($CFG->allowcoursethemes)) {
$themes=array();
$themes[''] = get_string('forceno');
$themes += get_list_of_themes();
$mform->addElement('select', 'theme', get_string('forcetheme'), $themes);
}
if (empty($disable_meta)) {
$meta=array();
$meta[0] = get_string('no');
$meta[1] = get_string('yes');
$mform->addElement('select', 'metacourse', get_string("managemeta"), $meta);
}else{
$mform->addElement('static', 'metacourse', get_string("managemeta"),
((empty($toform->metacourse)) ? get_string("no") : get_string("yes"))
. " - $disable_meta ");
}
$mform->setDefault('defaultrole',(isset($toform->defaultrole))?$toform->defaultrole:0);
$roles = get_assignable_roles($context);
asort($roles);
$choices = array();
if ($sitedefaultrole = get_record('role', 'id', $CFG->defaultcourseroleid)) {
$choices[0] = get_string('sitedefault').' ('.$sitedefaultrole->name.')';
} else {
$choices[0] = get_string('sitedefault');
}
$choices = $choices + $roles;
$defaultroleelement=$mform->addElement('select', 'defaultrole', get_string('defaultrole', 'role'), $choices );
if ($mform->exportValue('defaultrole') && !isset($roles[$mform->exportValue('defaultrole')])) { // Existing setting is one we can't choose
if ($coursedefaultrole = get_record('role', 'id', $mform->exportValue('defaultrole'))) {
$defaultroleelement->addOption(get_string('currentrole', 'role').' ('.$coursedefaultrole->name.')',-1);
if ($disable_meta === false) {
$mform->addElement('select', 'metacourse', get_string('managemeta'), $meta);
$mform->setHelpButton('metacourse', array('metacourse', get_string('metacourse')), true);
$mform->setDefault('metacourse', 0);
} else {
$defaultroleelement->addOption(get_string('currentrole', 'role'),-1);
// no metacourse element - we do not want to change it anyway!
$mform->addElement('static', 'nometacourse', get_string('managemeta'),
((empty($course->metacourse)) ? $meta[0] : $meta[1]) . " - $disable_meta ");
$mform->setHelpButton('nometacourse', array('metacourse', get_string('metacourse')), true);
}
}
$mform->addElement('header','enrolhdr', get_string("enrolment"));
$mform->setDefault('enrol',(isset($toform->enrol))?$toform->enrol:'');
$modules = explode(',', $CFG->enrol_plugins_enabled);
foreach ($modules as $module) {
$name = get_string("enrolname", "enrol_$module");
$plugin = enrolment_factory::factory($module);
if (method_exists($plugin, 'print_entry')) {
$choices[$name] = $module;
$roles = get_assignable_roles($context);
if (!empty($course)) {
// add current default role, so that it is selectable even when user can not assign it
if ($current_role = get_record('role', 'id', $course->defaultrole)) {
$roles[$current_role->id] = strip_tags(format_string($current_role->name, true));
}
}
}
asort($choices);
$choices = array_flip($choices);
$choices = array_merge(array('' => get_string('sitedefault').' ('.get_string("enrolname", "enrol_$CFG->enrol").')'), $choices);
$mform->addElement('select', 'enrol', get_string("enrolmentplugins"), $choices );
$mform->setDefault('enrollable',(isset($toform->enrollable))?$toform->enrollable:1);
$radio = array();
$radio[] = &moodleform::createElement('radio', 'enrollable', null, get_string("no"), 0);
$radio[] = &moodleform::createElement('radio', 'enrollable', null, get_string("yes"), 1);
$radio[] = &moodleform::createElement('radio', 'enrollable', null, get_string("enroldate"), 2);
$mform->addGroup($radio, 'enrollable', get_string("enrollable"), ' ', false);
$mform->setDefault('enrolstartdate',(isset($toform->enrolstartdate))?$toform->enrolstartdate:0);
$mform->setDefault('enrolstartdisabled',
(!isset($toform->enrolstartdate)||
(isset($toform->enrolstartdate)&&!$toform->enrolstartdate)
?1:0));
$enroldatestartgrp = array();
$enroldatestartgrp[] = &moodleform::createElement('date_selector', 'enrolstartdate');
$enroldatestartgrp[] = &moodleform::createElement('checkbox', 'enrolstartdisabled', null, get_string('disable'));
$mform->addGroup($enroldatestartgrp, '', get_string('enrolstartdate'), ' ', false);
$mform->setDefault('enrolenddate',(isset($toform->enrolenddate))?$toform->enrolenddate:0);
$mform->setDefault('enrolenddisabled',
(!isset($toform->enrolenddate)||
(isset($toform->enrolenddate)&&!$toform->enrolenddate)
?1:0));
$enroldateendgrp = array();
$enroldateendgrp[] = &moodleform::createElement('date_selector', 'enrolenddate');
$enroldateendgrp[] = &moodleform::createElement('checkbox', 'enrolenddisabled', null, get_string('disable'));
$mform->addGroup($enroldateendgrp, 'enroldateendgrp', get_string('enrolenddate'), ' ', false);
$mform->setDefault('enrolperiod',(isset($toform->enrolperiod))?$toform->enrolperiod:0);
$periodmenu=array();
$periodmenu[0] = get_string('unlimited');
for ($i=1; $i<=365; $i++) {
$seconds = $i * 86400;
$periodmenu[$seconds] = get_string('numdays', '', $i);
}
$mform->addElement('select', 'enrolperiod', get_string("enrolperiod"), $periodmenu);
$mform->addElement('header','expirynotifyhdr', get_string("expirynotify"));
$mform->setDefault('expirynotify',(isset($toform->expirynotify))?$toform->expirynotify:0);
unset($choices);
$choices["0"] = get_string("no");
$choices["1"] = get_string("yes");
$mform->addElement('select', 'expirynotify', get_string("expirynotify"), $choices);
$mform->setDefault('notifystudents',(isset($toform->notifystudents))?$toform->notifystudents:0);
$mform->addElement('select', 'notifystudents', get_string("expirynotifystudents"), $choices);
$mform->setDefault('expirythreshold',(isset($toform->expirythreshold))?$toform->expirythreshold:10 * 86400);
$thresholdmenu=array();
for ($i=1; $i<=30; $i++) {
$seconds = $i * 86400;
$thresholdmenu[$seconds] = get_string('numdays', '', $i);
}
$mform->addElement('select', 'expirythreshold', get_string("expirythreshold"), $thresholdmenu);
$mform->addElement('header','', get_string("groupmode"));
$choices = array();
if ($sitedefaultrole = get_record('role', 'id', $CFG->defaultcourseroleid)) {
$choices[0] = get_string('sitedefault').' ('.$sitedefaultrole->name.')';
} else {
$choices[0] = get_string('sitedefault');
}
$choices = $choices + $roles;
$mform->addElement('select', 'defaultrole', get_string('defaultrole', 'role'), $choices);
$mform->setDefault('defaultrole', 0);
$mform->setDefault('groupmode', $toform->groupmode);
unset($choices);
$choices[NOGROUPS] = get_string("groupsnone");
$choices[SEPARATEGROUPS] = get_string("groupsseparate");
$choices[VISIBLEGROUPS] = get_string("groupsvisible");
$mform->addElement('select', 'groupmode', get_string("groupmode"), $choices);
$mform->setDefault('groupmodeforce', $toform->groupmodeforce);
unset($choices);
$choices["0"] = get_string("no");
$choices["1"] = get_string("yes");
$mform->addElement('select', 'groupmodeforce', get_string("force"), $choices);
//--------------------------------------------------------------------------------
$mform->addElement('header','enrolhdr', get_string('enrolments'));
$mform->addElement('header','', get_string("availability"));
$choices = array();
$modules = explode(',', $CFG->enrol_plugins_enabled);
foreach ($modules as $module) {
$name = get_string('enrolname', "enrol_$module");
$plugin = enrolment_factory::factory($module);
if (method_exists($plugin, 'print_entry')) {
$choices[$name] = $module;
}
}
asort($choices);
$choices = array_flip($choices);
$choices = array_merge(array('' => get_string('sitedefault').' ('.get_string('enrolname', "enrol_$CFG->enrol").')'), $choices);
$mform->addElement('select', 'enrol', get_string('enrolmentplugins'), $choices);
$mform->setHelpButton('enrol', array('courseenrolmentplugins', get_string('enrolmentplugins')), true);
$mform->setDefault('visible', $toform->visible);
unset($choices);
$choices["0"] = get_string("courseavailablenot");
$choices["1"] = get_string("courseavailable");
$mform->addElement('select', 'visible', get_string("availability"), $choices);
$mform->setDefault('password', $toform->password);
$mform->addElement('text', 'password', get_string("enrolmentkey"), 'size="25"');
$mform->setDefault('guest', $toform->guest);
unset($choices);
$choices["0"] = get_string("guestsno");
$choices["1"] = get_string("guestsyes");
$choices["2"] = get_string("guestskey");
$mform->addElement('select', 'guest', get_string("opentoguests"), $choices);
if (isset($course) && method_exists(enrolment_factory::factory($course->enrol), 'print_entry') && $course->enrol != 'manual') {
$mform->setDefault('cost', $toform->cost);
$mform->setDefault('currency', $toform->currency);
$costgroup=array();
$currencies = get_list_of_currencies();
$costgroup[]= &moodleform::createElement('text','cost', '', 'maxlength="6" size="6"');
$costgroup[]= &moodleform::createElement('select', 'currency', '', $currencies);
$mform->addGroup($costgroup, 'costgrp', get_string("cost"), '&nbsp;', false);
$radio = array();
$radio[] = &MoodleQuickForm::createElement('radio', 'enrollable', null, get_string('no'), 0);
$radio[] = &MoodleQuickForm::createElement('radio', 'enrollable', null, get_string('yes'), 1);
$radio[] = &MoodleQuickForm::createElement('radio', 'enrollable', null, get_string('enroldate'), 2);
$mform->addGroup($radio, 'enrollable', get_string('enrollable'), ' ', false);
$mform->setHelpButton('enrollable', array('courseenrollable', get_string('enrollable')), true);
$mform->setDefault('enrollable', 1);
$enroldatestartgrp = array();
$enroldatestartgrp[] = &MoodleQuickForm::createElement('date_selector', 'enrolstartdate');
$enroldatestartgrp[] = &MoodleQuickForm::createElement('checkbox', 'enrolstartdisabled', null, get_string('disable'));
$mform->addGroup($enroldatestartgrp, 'enrolstartdategrp', get_string('enrolstartdate'), ' ', false);
$mform->setDefault('enrolstartdate', 0);
$mform->setDefault('enrolstartdisabled', 1);
$mform->disabledIf('enrolstartdategrp', 'enrolstartdisabled', 'checked');
$enroldateendgrp = array();
$enroldateendgrp[] = &MoodleQuickForm::createElement('date_selector', 'enrolenddate');
$enroldateendgrp[] = &MoodleQuickForm::createElement('checkbox', 'enrolenddisabled', null, get_string('disable'));
$mform->addGroup($enroldateendgrp, 'enroldateendgrp', get_string('enrolenddate'), ' ', false);
$mform->setDefault('enrolenddate', 0);
$mform->setDefault('enrolenddisabled', 1);
$mform->disabledIf('enroldateendgrp', 'enrolenddisabled', 'checked');
$periodmenu=array();
$periodmenu[0] = get_string('unlimited');
for ($i=1; $i<=365; $i++) {
$seconds = $i * 86400;
$periodmenu[$seconds] = get_string('numdays', '', $i);
}
$mform->addElement('select', 'enrolperiod', get_string('enrolperiod'), $periodmenu);
$mform->setDefault('enrolperiod', 0);
//--------------------------------------------------------------------------------
$mform->addElement('header','expirynotifyhdr', get_string('expirynotify'));
$choices = array();
$choices['0'] = get_string('no');
$choices['1'] = get_string('yes');
$mform->addElement('select', 'expirynotify', get_string('notify'), $choices);
$mform->setHelpButton('expirynotify', array('expirynotify', get_string('expirynotify')), true);
$mform->setDefault('expirynotify', 0);
$mform->addElement('select', 'notifystudents', get_string('expirynotifystudents'), $choices);
$mform->setHelpButton('notifystudents', array('expirynotifystudents', get_string('expirynotifystudents')), true);
$mform->setDefault('notifystudents', 0);
$thresholdmenu=array();
for ($i=1; $i<=30; $i++) {
$seconds = $i * 86400;
$thresholdmenu[$seconds] = get_string('numdays', '', $i);
}
$mform->addElement('select', 'expirythreshold', get_string('expirythreshold'), $thresholdmenu);
$mform->setHelpButton('expirythreshold', array('expirythreshold', get_string('expirythreshold')), true);
$mform->setDefault('expirythreshold', 10 * 86400);
//--------------------------------------------------------------------------------
$mform->addElement('header','', get_string('groups', 'group'));
$choices = array();
$choices[NOGROUPS] = get_string('no');
$choices[SEPARATEGROUPS] = get_string('separate');
$choices[VISIBLEGROUPS] = get_string('visible');
$mform->addElement('select', 'groupmode', get_string('groupmode'), $choices);
$mform->setHelpButton('groupmode', array('groupmode', get_string('groupmode')), true);
$mform->setDefault('groupmode', 0);
$choices = array();
$choices['0'] = get_string('no');
$choices['1'] = get_string('yes');
$mform->addElement('select', 'groupmodeforce', get_string('force'), $choices);
$mform->setHelpButton('groupmodeforce', array('groupmodeforce', get_string('groupmodeforce')), true);
$mform->setDefault('groupmodeforce', 0);
//--------------------------------------------------------------------------------
$mform->addElement('header','', get_string('availability'));
$choices = array();
$choices['0'] = get_string('courseavailablenot');
$choices['1'] = get_string('courseavailable');
$mform->addElement('select', 'visible', get_string('availability'), $choices);
$mform->setHelpButton('visible', array('courseavailability', get_string('availability')), true);
$mform->setDefault('visible', 1);
$mform->addElement('text', 'password', get_string('enrolmentkey'), 'size="25"');
$mform->setHelpButton('password', array('enrolmentkey', get_string('enrolmentkey')), true);
$mform->setDefault('password', '');
$mform->setType('password', PARAM_RAW);
$choices = array();
$choices['0'] = get_string('guestsno');
$choices['1'] = get_string('guestsyes');
$choices['2'] = get_string('guestskey');
$mform->addElement('select', 'guest', get_string('opentoguests'), $choices);
$mform->setHelpButton('guest', array('guestaccess', get_string('opentoguests')), true);
$mform->setDefault('guest', 0);
if (!empty($course) && method_exists(enrolment_factory::factory($course->enrol), 'print_entry') && $course->enrol != 'manual') {
$costgroup=array();
$currencies = get_list_of_currencies();
$costgroup[]= &MoodleQuickForm::createElement('text','cost', '', 'maxlength="6" size="6"');
$costgroup[]= &MoodleQuickForm::createElement('select', 'currency', '', $currencies);
$mform->addGroup($costgroup, 'costgrp', get_string('cost'), '&nbsp;', false);
//defining a rule for a form element within a group :
$costgrprules=array();
//set the message to null to tell Moodle to use a default message
//available for most rules, fetched from language pack (err_{rulename}).
$costgrprules['cost'][]=array(null, 'numeric', null, 'client');
$mform->addGroupRule('costgrp',$costgrprules);
$mform->setHelpButton('costgrp', array('cost', get_string('cost')), true);
$mform->setDefault('cost', '');
$mform->setDefault('currency', empty($CFG->enrol_currency) ? 'USD' : $CFG->enrol_currency);
}
//--------------------------------------------------------------------------------
$mform->addElement('header','', get_string('language'));
$languages=array();
$languages[''] = get_string('forceno');
$languages += get_list_of_languages();
$mform->addElement('select', 'lang', get_string('forcelanguage'), $languages);
//--------------------------------------------------------------------------------
if (has_capability('moodle/site:config', $systemcontext) && ((!empty($course->requested) && $CFG->restrictmodulesfor == 'requested') || $CFG->restrictmodulesfor == 'all')) {
$mform->addElement('header', '', get_string('restrictmodules'));
$options = array();
$options['0'] = get_string('no');
$options['1'] = get_string('yes');
$mform->addElement('select', 'restrictmodules', get_string('restrictmodules'), $options);
$mods = array(0=>get_string('allownone'));
$mods += get_records_menu('modules', '','','','id, name');
$mform->addElement('select', 'allowedmods', get_string('to'), $mods,
array('multiple'=>'multiple', 'size'=>'10'));
$mform->disabledIf('allowedmods', 'restrictmodules', 'eq', 0);
} else {
$mform->addElement('hidden', 'restrictmodules', null);
}
if ($CFG->restrictmodulesfor == 'all') {
$mform->setDefault('allowedmods', explode(',',$CFG->defaultallowedmodules));
if (!empty($CFG->restrictbydefault)) {
$mform->setDefault('restrictmodules', 1);
}
}
$mform->setType('restrictmodules', PARAM_INT);
//--------------------------------------------------------------------------------
$this->add_action_buttons();
//--------------------------------------------------------------------------------
$mform->addElement('hidden', 'id', null);
$mform->setType('id', PARAM_INT);
// fill in default teacher and student names to keep backwards compatibility for a while
$mform->addElement('hidden', 'teacher', get_string('defaultcourseteacher'));
$mform->addElement('hidden', 'teachers', get_string('defaultcourseteachers'));
$mform->addElement('hidden', 'student', get_string('defaultcoursestudent'));
$mform->addElement('hidden', 'students', get_string('defaultcoursestudents'));
}
$mform->addElement('header','', get_string("language"));
$mform->setDefault('lang',(isset($toform->lang))?$toform->lang:'');
$languages=array();
$languages[''] = get_string("forceno");
$languages += get_list_of_languages();
$mform->addElement('select', 'lang', get_string("forcelanguage"), $languages);
if(!has_capability('moodle/course:create', get_context_instance(CONTEXT_COURSECAT, $toform->category))) {
$mform->addElement('hidden', 'category', null);
}
$mform->addElement('hidden', 'id', null);
$mform->setDefault('restrictmodules',(isset($toform->restrictmodules))?$toform->restrictmodules:0);
if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID)) && ((!empty($course->requested) && $CFG->restrictmodulesfor == 'requested') || $CFG->restrictmodulesfor == 'all')) {
unset($options);
$options[0] = get_string("no");
$options[1] = get_string("yes");
$mform->addElement('header', '', get_string("restrictmodules"));
$mform->addElement('select', 'restrictmodules', get_string("restrictmodules"), $options,
array('onChange'=>"document.getElementById('id_allowedmods').disabled=".
"((this.selectedIndex==0)?true:false);"));
$mods = array(0=>get_string('allownone'));
$mods += get_records_menu("modules", '','','','id, name');
$disabled=($mform->exportValue('restrictmodules')==1) ? array() :array('disabled' => 'disabled') ;
$mform->setDefault('allowedmods', $toform->allowedmods);
$mform->addElement('select', 'allowedmods', get_string("to"),$mods,
array('multiple'=>"multiple", 'size'=>"10", 'id'=>"allowedmods")
+$disabled);
}else {
$mform->addElement('hidden', 'restrictmodules', $toform->restrictmodules);
}
$mform->setHelpButtons(array('category'=>array("coursecategory", get_string("category")),
'fullname'=>array("coursefullname", get_string("fullname")),
'shortname'=>array("courseshortname", get_string("shortname")),
'idnumber'=>array("courseidnumber", get_string("idnumbercourse")),
'summary'=>array("text", get_string("helptext")),
'format'=>array("courseformats", get_string("courseformats")),
'summary'=>array("coursestartdate", get_string("startdate")),
'enrol'=>array("courseenrolmentplugins", get_string("enrolmentplugins")),
'enrollable'=>array("courseenrollable", get_string("enrollable")),
'expirynotify'=>array("expirynotify", get_string("expirynotify")),
'notifystudents'=>array("expirynotifystudents", get_string("expirynotifystudents")),
'expirythreshold'=>array("expirythreshold", get_string("expirythreshold")),
'groupmode'=>array("groupmode", get_string("groupmode")),
'groupmodeforce'=>array("groupmodeforce", get_string("groupmodeforce")),
'visible'=>array("courseavailability", get_string("availability")),
'password'=>array("enrolmentkey", get_string("enrolmentkey")),
'guest'=>array("guestaccess", get_string("opentoguests")),
'costgrp'=>array("cost", get_string("cost")),
'hiddensections'=>array("coursehiddensections", get_string("hiddensections")),
'newsitems'=>array("coursenewsitems", get_string("newsitemsnumber")),
'showgrades'=>array("coursegrades", get_string("grades")),
'showreports'=>array("coursereports", get_string("activityreport")),
'maxbytes'=>array("courseuploadsize", get_string("maximumupload")),
'metacourse'=>array("metacourse", get_string("metacourse")),
'defaultrole'=>array("coursedefaultrole", get_string("defaultrole", 'role'))),
true);
$mform->addElement('submit', 'submit', get_string("savechanges"));
$mform->addRule('fullname', get_string("missingfullname"), 'required', null, 'client');
$mform->addRule('shortname', get_string("missingshortname"), 'required', null, 'client');
$mform->addRule('summary', get_string("missingsummary"), 'required', null, 'client');
$mform->addRule('category', get_string("missingcategory"), 'required', null, 'client');
/**
* a Form rule check - if we need to create rules which involve the contents of more than one
* field this is the way to do it. We can do it all at once in one function or create several
* form rules.
*
* @param array $fields values from form without slashes
* @return mixed array of errors or true if passed check
*/
function form_check($fields){
global $course;
/// perform some extra moodle validation
function validation($data){
$errors= array();
if ($foundcourses = get_records("course", "shortname", addslashes($fields['shortname']))) {
if (!empty($course->id)) {
unset($foundcourses[$course->id]);
if ($foundcourses = get_records('course', 'shortname', $data['shortname'])) {
if (!empty($data['id'])) {
unset($foundcourses[$data['id']]);
}
if (!empty($foundcourses)) {
foreach ($foundcourses as $foundcourse) {
$foundcoursenames[] = $foundcourse->fullname;
}
$foundcoursenamestring = addslashes(implode(',', $foundcoursenames));
$errors['shortname']= get_string("shortnametaken", "", $foundcoursenamestring);
}
}
if (empty($fields['enrolenddisabled'])){
$enrolenddate=make_timestamp($fields['enrolenddate']['year'],
$fields['enrolenddate']['month'],
$fields['enrolenddate']['day']);
$enrolstartdate=make_timestamp($fields['enrolstartdate']['year'],
$fields['enrolstartdate']['month'],
$fields['enrolstartdate']['day']);
if ($enrolenddate <= $enrolstartdate){
$errors['enroldateendgrp']=get_string("enrolenddaterror");
$foundcoursenamestring = implode(',', $foundcoursenames);
$errors['shortname']= get_string('shortnametaken', '', $foundcoursenamestring);
}
}
if (0==count($errors)){
if (empty($data['enrolenddisabled'])){
if ($data['enrolenddate'] <= $data['enrolstartdate']){
$errors['enroldateendgrp'] = get_string('enrolenddaterror');
}
}
if (0 == count($errors)){
return true;
}else {
} else {
return $errors;
}
}
$mform->addFormRule('form_check');
$renderer =& $mform->defaultRenderer();
$renderer->addStopFieldsetElements('submit');
?>
}
?>
+3 -1
View File
@@ -238,17 +238,19 @@ while ($section <= $course->numsections) {
$currenttopic = ($course->marker == $section);
$currenttext = '';
if (!$thissection->visible) {
$sectionstyle = ' hidden';
} else if ($currenttopic) {
$sectionstyle = ' current';
$currenttext = get_accesshide(get_string('currenttopic','access'));
} else {
$sectionstyle = '';
}
echo '<tr id="section-'.$section.'" class="section main'.$sectionstyle.'">';
echo '<td class="left side">&nbsp;</td>';
echo '<td class="left side">&nbsp;'.$currenttext.'</td>';
echo '<td class="content">';
if (!has_capability('moodle/course:viewhiddensections', $context) and !$thissection->visible) { // Hidden for students
+3 -1
View File
@@ -171,16 +171,18 @@
$currenttopic = ($course->marker == $section);
$currenttext = '';
if (!$thissection->visible) {
$sectionstyle = ' hidden';
} else if ($currenttopic) {
$sectionstyle = ' current';
$currenttext = get_accesshide(get_string('currenttopic','access'));
} else {
$sectionstyle = '';
}
echo '<tr id="section-'.$section.'" class="section main'.$sectionstyle.'">';
echo '<td class="left side">'.$section.'</td>';
echo '<td class="left side">'.$currenttext.$section.'</td>';
echo '<td class="content">';
if (!has_capability('moodle/course:viewhiddensections', $context) and !$thissection->visible) { // Hidden for students
+9 -17
View File
@@ -13,9 +13,9 @@
define('BLOCK_R_MIN_WIDTH', 100);
define('BLOCK_R_MAX_WIDTH', 210);
$preferred_width_left = bounded_number(BLOCK_L_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]),
$preferred_width_left = bounded_number(BLOCK_L_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]),
BLOCK_L_MAX_WIDTH);
$preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
$preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
BLOCK_R_MAX_WIDTH);
if ($week != -1) {
@@ -88,7 +88,7 @@
echo '<tr id="section-0" class="section main">';
echo '<td class="left side">&nbsp;</td>';
echo '<td class="content">';
echo '<div class="summary">';
$summaryformatoptions->noclean = true;
echo format_text($thissection->summary, FORMAT_HTML, $summaryformatoptions);
@@ -99,7 +99,7 @@
'class="icon edit" alt="'.$streditsummary.'" /></a><br /><br />';
}
echo '</div>';
print_section($course, $thissection, $mods, $modnamesused);
if (isediting($course->id)) {
@@ -162,28 +162,20 @@
$currentweek = (($weekdate <= $timenow) && ($timenow < $nextweekdate));
$currenttext = '';
if (!$thissection->visible) {
$sectionstyle = ' hidden';
} else if ($currentweek) {
$sectionstyle = ' current';
$currenttext = get_accesshide(get_string('currentweek','access'));
} else {
$sectionstyle = '';
}
echo '<tr id="section-'.$section.'" class="section main'.$sectionstyle.'">';
echo '<td class="left side">&nbsp;</td>';
if (ajaxenabled() && $editing) {
// Temporarily hide the dates for the weeks. We do it this way
// for now. Eventually, we'll have to modify the javascript code
// to handle re-calculation of dates when sections are moved
// around. For now, just hide all the dates to avoid confusion.
$weekperiod = '';
} else {
$weekperiod = $weekday.' '.$endweekday;
}
echo '<td class="left side">&nbsp;'.$currenttext.'</td>';
$weekperiod = $weekday.' - '.$endweekday;
echo '<td class="content">';
if (!has_capability('moodle/course:viewhiddensections', $context) and !$thissection->visible) { // Hidden for students
@@ -267,4 +259,4 @@
echo '</tr></table>';
?>
?>
+3 -1
View File
@@ -190,10 +190,12 @@
$currentweek = (($weekdate <= $timenow) && ($timenow < $nextweekdate));
$currenttext = '';
if (!$thissection->visible) {
$sectionstyle = ' hidden';
} else if ($currentweek) {
$sectionstyle = ' current';
$currenttext = get_accesshide(get_string('currentweek','access'));
} else {
$sectionstyle = '';
}
@@ -201,7 +203,7 @@
echo '<li id="section-'.$section.'" class="section main'.$sectionstyle.'" >'; //'<div class="left side">&nbsp;</div>';
// Note, 'right side' is BEFORE content.
echo '<div class="right side">';
echo '<div class="right side">'.$currenttext;
if ($displaysection == $section) {
echo '<a href="view.php?id='.$course->id.'&amp;week=0#section-'.$section.'" title="'.$strshowallweeks.'">'.
+1 -2
View File
@@ -164,7 +164,7 @@
$newgrpcoursecontext = get_context_instance(CONTEXT_COURSE, $newgroup->courseid);
///Users cannot upload groups in courses they cannot update.
if (has_capability('moodle/course:update', $newgrpcoursecontext)){
if (!has_capability('moodle/course:managegroups', $newgrpcoursecontext)){
notify("$newgroup->name ".get_string('notaddedto').$newgroup->coursename.get_string('notinyourcapacity'));
}
@@ -212,4 +212,3 @@ function my_file_get_contents($filename, $use_include_path = 0) {
}
?>
+4 -2
View File
@@ -60,11 +60,13 @@
echo "<center>";
/// I am not sure this context in the next has_capability call is correct.
if (isloggedin() and !isguest() and !has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID))) { // Print link to request a new course
if (isloggedin() and !isguest() and !has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID)) and $CFG->enablecourserequests) { // Print link to request a new course
print_single_button("request.php", NULL, get_string("courserequest"), "get");
}
if (has_capability('moodle/course:create', get_context_instance(CONTEXT_SYSTEM, SITEID))) { // Print link to create a new course
print_single_button("edit.php", NULL, get_string("addnewcourse"), "get");
/// Get the 1st available category
$options = array('category' => get_field('course_categories', 'id', 'parent', '0'));
print_single_button('edit.php', $options, get_string('addnewcourse'), 'get');
}
if (has_capability('moodle/site:approvecourse', get_context_instance(CONTEXT_SYSTEM, SITEID)) and !empty($CFG->enablecourserequests)) {
print_single_button('pending.php',NULL, get_string('coursespending'),"get");
+24 -16
View File
@@ -43,28 +43,37 @@
}
if ($teachers = get_course_teachers($course->id)) {
echo "<table align=\"center\"><tr><td nowrap=\"nowrap\">";
echo "<p><font size=\"1\">\n";
foreach ($teachers as $teacher) {
if ($teacher->authority > 0) {
if (!$teacher->role) {
$teacher->role = $course->teacher;
/// first find all roles that are supposed to be displayed
if (!empty($CFG->coursemanager)) {
$coursemanagerroles = split(',', $CFG->coursemanager);
$context = get_context_instance(CONTEXT_COURSE, $course->id);
foreach ($coursemanagerroles as $roleid) {
$role = get_record('role','id',$roleid);
if ($users = get_role_users($roleid, $context, true, '', 'u.lastname ASC', true)) {
foreach ($users as $teacher) {
$fullname = fullname($teacher, has_capability('moodle/site:viewfullnames', $context));
$namesarray[] = format_string($role->name).': <a href="'.$CFG->wwwroot.'/user/view.php?id='.
$teacher->id.'&amp;course='.SITEID.'">'.$fullname.'</a>';
}
echo "$teacher->role: ";
link_to_popup_window ("/user/view.php?id=$teacher->id&amp;course=$site->id", "opener",
fullname($teacher), 400, 500, "$teacher->role",
"");
echo "<br />";
}
}
}
if (!empty($namesarray)) {
echo "<div align=\"center\">";
echo implode('<br />', $namesarray);
echo "</div>";
}
echo "</font></p>";
echo "</td</tr></table>";
}
echo "<br />";
print_simple_box_start("center", "100%");
echo filter_text(text_to_html($course->summary),$course->id);
require_once("$CFG->dirroot/enrol/enrol.class.php");
$enrol = enrolment_factory::factory($course->enrol);
echo $enrol->get_access_icons($course);
print_simple_box_end();
echo "<br />";
@@ -72,4 +81,3 @@
close_window_button();
?>
+49 -17
View File
@@ -417,7 +417,7 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per
$log->url = strip_tags(urldecode($log->url)); // Some XSS protection
$log->info = strip_tags(urldecode($log->info)); // Some XSS protection
$log->url = str_replace('&', '&amp;', $log->url); /// XHTML compatibility
$log->url = s($log->url); /// XSS protection and XHTML compatibility - should be in link_to_popup_window() instead!!
echo '<tr class="r'.$row.'">';
if ($course->id == SITEID) {
@@ -509,7 +509,7 @@ function print_log_csv($course, $user, $date, $order='l.time DESC', $modname,
$log->url = strip_tags(urldecode($log->url)); // Some XSS protection
$log->info = strip_tags(urldecode($log->info)); // Some XSS protection
$log->url = str_replace('&', '&amp;', $log->url); // XHTML compatibility
$log->url = str_replace('&', '&amp;', $log->url); /// XHTML compatibility
$firstField = $courses[$log->course];
$fullname = fullname($log, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $course->id)));
@@ -1550,21 +1550,21 @@ function print_course($course, $width="100%") {
$linkcss.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.
$course->fullname.'</a></b><br />';
if ($teachers = get_users_by_capability($context, 'moodle/course:update',
'u.*, ul.timeaccess as lastaccess, ra.hidden',
'r.sortorder ASC', '','','','', false)) {
$canseehidden = has_capability('moodle/role:viewhiddenassigns', $context);
$namesarray = array();
foreach ($teachers as $teacher) {
if (!$teacher->hidden || $canseehidden) {
$roles = get_user_roles($context, $teacher->id, true, 'r.sortorder ASC');
$role = array_shift($roles); // First one
$fullname = fullname($teacher, has_capability('moodle/site:viewfullnames', $context));
$namesarray[] = format_string($role->name).': <a href="'.$CFG->wwwroot.'/user/view.php?id='.
$teacher->id.'&amp;course='.SITEID.'">'.$fullname.'</a>';
}
/// first find all roles that are supposed to be displayed
if (!empty($CFG->coursemanager)) {
$coursemanagerroles = split(',', $CFG->coursemanager);
foreach ($coursemanagerroles as $roleid) {
$role = get_record('role','id',$roleid);
if ($users = get_role_users($roleid, $context, true, '', 'u.lastname ASC', true)) {
foreach ($users as $teacher) {
$fullname = fullname($teacher, has_capability('moodle/site:viewfullnames', $context));
$namesarray[] = format_string($role->name).': <a href="'.$CFG->wwwroot.'/user/view.php?id='.
$teacher->id.'&amp;course='.SITEID.'">'.$fullname.'</a>';
}
}
}
if ($namesarray) {
if (!empty($namesarray)) {
echo "<ul class=\"teachers\">\n<li>";
echo implode('</li><li>', $namesarray);
echo "</li></ul>";
@@ -1764,7 +1764,7 @@ function delete_course_module($id) {
$modulename = get_field('modules', 'name', 'id', $cm->module);
if ($events = get_records_select('event', "instance = '$cm->instance' AND modulename = '$modulename'")) {
foreach($events as $event) {
delete_event($event);
delete_event($event->id);
}
}
return delete_records('course_modules', 'id', $cm->id);
@@ -2193,4 +2193,36 @@ function move_courses ($courseids, $categoryid) {
return true;
}
/**
* Can the current user delete this course?
* @param int $courseid
* @return boolean
*
* Exception here to fix MDL-7796.
*
* FIXME
* Course creators who can manage activities in the course
* shoule be allowed to delete the course. We do it this
* way because we need a quick fix to bring the functionality
* in line with what we had pre-roles. We can't give the
* default course creator role moodle/course:delete at
* CONTEXT_SYSTEM level because this will allow them to
* delete any course in the site. So we hard code this here
* for now.
*
* @author vyshane AT gmail.com
*/
function can_delete_course($courseid) {
$context = get_context_instance(CONTEXT_COURSE, $courseid);
return ( has_capability('moodle/course:delete', $context)
|| (has_capability('moodle/legacy:coursecreator', $context)
&& has_capability('moodle/course:manageactivities', $context)) );
}
?>
+3
View File
@@ -53,6 +53,9 @@
if (!has_capability('moodle/course:view', $context, $userid, false)) {
error('This user is not in this course!');
}
if (has_capability('moodle/site:doanything', $context, $userid, false)) {
print_error('nologinas');
}
}
/// User must have permissions
+1 -1
View File
@@ -3,7 +3,7 @@
// Moves, adds, updates, duplicates or deletes modules in a course
require("../config.php");
require("lib.php");
require_once("lib.php");
require_login();
-1
View File
@@ -126,4 +126,3 @@ function print_outline_row($mod, $instance, $result) {
}
?>
+14 -4
View File
@@ -73,17 +73,17 @@
$graph->y_data['line3'][] = $stat->line3;
}
}
$graph->y_order = array('line1','line2');
if (!empty($param->line3)) {
$graph->y_order[] = 'line3';
}
$graph->y_order = array('line1');
$graph->y_format['line1'] = array('colour' => $c[1],'line' => 'line','legend' => $param->line1);
if (!empty($param->line2)) {
$graph->y_order[] = 'line2';
$graph->y_format['line2'] = array('colour' => $c[2],'line' => 'line','legend' => $param->line2);
}
if (!empty($param->line3)) {
$graph->y_order[] = 'line3';
$graph->y_format['line3'] = array('colour' => $c[3],'line' => 'line','legend' => $param->line3);
}
$graph->y_tick_labels = false;
} else {
$data = array();
$times = array();
@@ -103,6 +103,16 @@
$times[$stat->timeend] = userdate($stat->timeend,get_string('strftimedate'),$CFG->timezone);
}
}
foreach (array_keys($times) as $t) {
foreach ($data as $roleid => $stuff) {
if (!array_key_exists($t, $stuff)) {
$data[$roleid][$t] = 0;
}
}
}
foreach ($data as $role => $stuff) {
ksort($data[$role]);
}
$nonzeroroleid = 0;
foreach (array_keys($data) as $roleid) {
if ($roleid == 0) {
+7
View File
@@ -167,6 +167,13 @@
$rolesdata[$roleid] = 0;
}
}
else {
foreach (array_keys($roles) as $r) {
if (!array_key_exists($r, $rolesdata)) {
$rolesdata[$r] = 0;
}
}
}
krsort($rolesdata);
$row = array_merge(array($times[$time]),$rolesdata);
if (empty($CFG->loglifetime) || ($stat->timeend-(60*60*24)) >= (time()-60*60*24*$CFG->loglifetime)) {
+1 -2
View File
@@ -247,7 +247,7 @@
if ($perpage != 99999 && $totalcount > $perpage) {
echo "<center><p>";
echo "<a href=\"search.php?search=$encoededsearch&perpage=99999\">".get_string("showall", "", $totalcount)."</a>";
echo "<a href=\"search.php?search=$encodedsearch&perpage=99999\">".get_string("showall", "", $totalcount)."</a>";
echo "</p></center>";
}
@@ -263,4 +263,3 @@
?>
-1
View File
@@ -285,4 +285,3 @@ function print_outline_row($mod, $instance, $result) {
}
?>
-7
View File
@@ -140,11 +140,6 @@ function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE, $
}
}
if ($action <= AN_ACTION_NONE or $action > AN_ACTION_VOID) {
$message = "Invalid action!";
return AN_RETURNZERO;
}
$poststring = $conststring;
$poststring .= '&x_method=' . $method;
@@ -363,8 +358,6 @@ function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE, $
}
break;
}
default:
return AN_RETURNZERO;
}
}
else
+2 -2
View File
@@ -47,7 +47,7 @@ class enrolment_plugin_authorize
httpsrequired();
if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') {
if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != 443) { // MDL-9836
if (empty($CFG->loginhttps)) {
error(get_string('httpsrequired', 'enrol_authorize'));
} else {
@@ -405,7 +405,7 @@ class enrolment_plugin_authorize
$a->url = "$CFG->wwwroot/$CFG->admin/settings.php?section=httpsecurity";
notice(get_string('adminconfighttps', 'enrol_authorize', $a));
}
elseif (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') {
elseif (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != 443) { // MDL-9836
$wwwsroot = qualified_me();
$wwwsroot = str_replace('http:', 'https:', $wwwsroot);
$a = new stdClass;
+1 -1
View File
@@ -49,7 +49,7 @@ function prevent_double_paid($course)
}
if (isset($SESSION->ccpaid)) {
unset($SESSION->ccpaid);
redirect($CFG->wwwroot . '/login/logout.php');
redirect($CFG->wwwroot . '/login/logout.php?sesskey='.sesskey());
return;
}
}
+1 -1
View File
@@ -79,7 +79,7 @@
</td>
</tr>
<th colspan="2">
<?php print_string("field_mapping", "enrol_database") ?>
<?php print_string("remote_fields_mapping", "enrol_database") ?>
</td>
<tr valign="top">
<td align="right">enrol_localcoursefield:</td>
+65 -48
View File
@@ -83,43 +83,61 @@ function setup_enrolments(&$user) {
if ($rs->RecordCount() > 0) { // We found some courses
$courselist = array();
while (!$rs->EOF) { // Make a nice little array of courses to process
$courselist[] = $rs->fields['enrolremotecoursefield'];
$rs->MoveNext();
while ($fields_obj = rs_fetch_next_record($rs)) { // Make a nice little array of courses to process
$courselist[] = $fields_obj->enrolremotecoursefield;
}
$rs->Close();
rs_close($rs);
foreach ($courselist as $coursefield) { /// Check the list of courses against existing
if ($course = get_record('course', $CFG->enrol_localcoursefield, $coursefield)) {
/// If there's no role specified, we get the default course role (usually student)
if ($use_default_role) {
$role = get_default_course_role($course);
$course = get_record('course', $CFG->enrol_localcoursefield, $coursefield);
if (!is_object($course)) {
if (empty($CFG->enrol_db_autocreate)) { // autocreation not allowed
print "Course $coursefield does not exist, skipping\n";
continue; // next foreach course
}
$context = get_context_instance(CONTEXT_COURSE, $course->id);
// Couldn't get a role or context, skip.
if (!$role || !$context) {
continue;
// ok, now then let's create it!
print "Creating Course $coursefield...";
// prepare any course properties we actually have
$course = new StdClass;
$course->{$CFG->enrol_localcoursefield} = $coursefield;
$course->fullname = $coursefield;
$course->shortname = $coursefield;
if ($newcourseid = $this->create_course($course, true)
and $course = get_record( 'course', 'id', $newcourseid)) {
// we are skipping fix_course_sortorder()
print "created\n";
} else {
print "failed\n";
continue; // nothing left to do...
}
// Search the role assignments to see if this user
// already has this role in this context. If it is, we
// skip to the next course.
foreach($existing as $key => $role_assignment) {
if ($role_assignment->roleid = $role->id
&& $role_assignment->contextid = $context->id) {
unset($existing[$key]);
//error_log('[ENROL_DB] User is already enroled in course '.$course->idnumber);
continue 2;
}
}
//error_log('[ENROL_DB] Enrolling user in course '.$course->idnumber);
role_assign($role->id, $user->id, 0, $context->id, 0, 0, 0, 'database');
}
/// If there's no role specified, we get the default course role (usually student)
if ($use_default_role) {
$role = get_default_course_role($course);
}
$context = get_context_instance(CONTEXT_COURSE, $course->id);
// Couldn't get a role or context, skip.
if (!$role || !$context) {
continue;
}
// Search the role assignments to see if this user
// already has this role in this context. If it is, we
// skip to the next course.
foreach($existing as $key => $role_assignment) {
if ($role_assignment->roleid == $role->id
&& $role_assignment->contextid == $context->id) {
unset($existing[$key]);
//error_log('[ENROL_DB] User is already enroled in course '.$course->idnumber);
continue 2;
}
}
//error_log('[ENROL_DB] Enrolling user in course '.$course->idnumber);
role_assign($role->id, $user->id, 0, $context->id, 0, 0, 0, 'database');
}
} // We've processed all external courses found
@@ -193,10 +211,9 @@ function sync_enrolments($role = null) {
begin_sql();
$extcourses = array();
while (!$rs->EOF) { // there are more course records
$extcourse = $rs->Fields($CFG->enrol_remotecoursefield);
while ($extcourse_obj = rs_fetch_next_record($rs)) { // there are more course records
$extcourse = $extcourse_obj->{$CFG->enrol_remotecoursefield};
array_push($extcourses, $extcourse);
$rs->MoveNext(); // prep the next record
print "course $extcourse\n";
@@ -255,11 +272,10 @@ function sync_enrolments($role = null) {
}
// slurp results into an array
while (!$crs->EOF) {
array_push($extenrolments,$crs->Fields($CFG->enrol_remoteuserfield));
$crs->MoveNext();
while ($crs_obj = rs_fetch_next_record($crs)) {
array_push($extenrolments, $crs_obj->{$CFG->enrol_remoteuserfield});
}
$crs->Close(); // release the handle
rs_close($crs); // release the handle
//
// prune enrolments
@@ -318,9 +334,10 @@ function sync_enrolments($role = null) {
trigger_error('weird! no user record entry?');
continue;
}
$userid = $ers->Fields('userid');
$enrolmentid = $ers->Fields('enrolmentid');
unset($ers); // release the handle
$user_obj = rs_fetch_record($ers);
$userid = $user_obj->userid;
$enrolmentid = $user_obj->enrolmentid;
rs_close($ers); // release the handle
if ($enrolmentid) { // already enrolled - skip
continue;
@@ -334,6 +351,7 @@ function sync_enrolments($role = null) {
} // end foreach member
} // end while course records
rs_close($rs); //Close the main course recordset
//
// prune enrolments to courses that are no longer in ext auth
@@ -364,19 +382,18 @@ function sync_enrolments($role = null) {
return false;
}
if ( $ers->RecordCount() > 0 ) {
while (!$ers->EOF) {
$roleid = $ers->Fields('roleid');
$user = $ers->Fields('userid');
$contextid = $ers->Fields('contextid');
$ers->MoveNext();
while ($user_obj = rs_fetch_next_record($ers)) {
$roleid = $user_obj->roleid;
$user = $user_obj->userid;
$contextid = $user_obj->contextid;
if (role_unassign($roleid, $user, 0, $contextid)){
print "Unassigned role {$roleid} from user $user in context $contextid\n";
} else {
print "Failed unassign role {$roleid} from user $user in context $contextid\n";
}
}
rs_close($ers); // release the handle
}
unset($ers); // release the handle
commit_sql();
// we are done now, a bit of housekeeping
@@ -561,7 +578,7 @@ function create_course ($course,$skip_fix_course_sortorder=0){
$course->shortname = substr($course->shortname, 0, 15);
// store it and log
if ($newcourseid = insert_record("course", $course)) { // Set up new course
if ($newcourseid = insert_record("course", addslashes_object($course))) { // Set up new course
$section = NULL;
$section->course = $newcourseid; // Create a default section.
$section->section = 0;
+1 -1
View File
@@ -542,7 +542,7 @@ function process_group_tag($tagcontents){
}else{
$course->sortorder = 1000;
}
if($course->id = insert_record('course', $course)){
if($course->id = insert_record('course', addslashes_object($course))){
// Setup the blocks
$page = page_create_object(PAGE_COURSE_VIEW, $course->id);
+4 -4
View File
@@ -76,7 +76,7 @@ function setup_enrolments(&$user) {
error_log("[ENROL_LDAP] User $user->username enrolled to a nonexistant course $course_ext_id \n");
}
} else { // the course object exists before we call...
if ($course_obj->visible==0 && $user->{$type}[$course_obj->id] == 'ldap') {
if ($course_obj->visible==0) {
// non-visible courses don't show up in the enrolled
// array, so we should skip them --
continue;
@@ -576,8 +576,8 @@ function create_course ($course_ext,$skip_fix_course_sortorder=0){
// override with required ext data
$course->idnumber = $course_ext[$CFG->enrol_ldap_course_idnumber][0];
$course->fullname = $course_ext[$CFG->enrol_ldap_course_fullname][0];
$course->shortname = $course_ext[$CFG->enrol_ldap_course_shortname][0];
$course->fullname = addslashes($course_ext[$CFG->enrol_ldap_course_fullname][0]);
$course->shortname = addslashes($course_ext[$CFG->enrol_ldap_course_shortname][0]);
if ( empty($course->idnumber)
|| empty($course->fullname)
|| empty($course->shortname) ) {
@@ -589,7 +589,7 @@ function create_course ($course_ext,$skip_fix_course_sortorder=0){
$course->summary = empty($CFG->enrol_ldap_course_summary) || empty($course_ext[$CFG->enrol_ldap_course_summary][0])
? ''
: $course_ext[$CFG->enrol_ldap_course_summary][0];
: addslashes($course_ext[$CFG->enrol_ldap_course_summary][0]);
if(!empty($CFG->enrol_ldap_category)){ // optional ... but ensure it is set!
$course->category = $CFG->enrol_ldap_category;
+8
View File
@@ -8,12 +8,20 @@
global $CFG;
// Trivial-cache - keyed on $cachedcourseid
static $activitylist;
static $cachedcourseid;
if (empty($courseid)) {
$courseid = SITEID;
}
// Initialise/invalidate our trivial cache if dealing with a different course
if (!isset($cachedcourseid) || $cachedcourseid !== (int)$courseid) {
$activitylist = array();
}
$cachedcourseid = (int)$courseid;
/// It may be cached
if (empty($activitylist)) {
+63 -64
View File
@@ -84,7 +84,7 @@
}
function algebra2tex($algebra) {
Global $CFG;
global $CFG;
$algebra = str_replace('&lt;','<',$algebra);
$algebra = str_replace('&gt;','>',$algebra);
$algebra = str_replace('<>','#',$algebra);
@@ -99,9 +99,9 @@ function algebra2tex($algebra) {
$algebra = str_replace('epsilon','zepslon',$algebra);
$algebra = str_replace('upsilon','zupslon',$algebra);
$algebra = preg_replace('!\r\n?!',' ',$algebra);
$algebra = escapeshellarg($algebra);
if ( (PHP_OS == "WINNT") || (PHP_OS == "WIN32") || (PHP_OS == "Windows") ) {
$algebra = "\"". str_replace('"','\"',$algebra) . "\"";
$cmd = "cd $CFG->dirroot\\$CFG->algebrafilterdirwin & algebra2tex.pl x/2";
$test = `$cmd`;
if ($test != '\frac{x}{2}') {
@@ -117,7 +117,6 @@ function algebra2tex($algebra) {
}
$cmd = "cd $CFG->dirroot\\$CFG->algebrafilterdirwin & algebra2tex.pl $algebra";
} else {
$algebra = escapeshellarg($algebra);
$cmd = "cd $CFG->dirroot/$CFG->algebrafilterdir; ./algebra2tex.pl x/2";
$test = `$cmd`;
if ($test != '\frac{x}{2}') {
@@ -206,66 +205,66 @@ function outputText($texexp) {
}
function tex2image($texexp, $md5, $return=false) {
global $CFG;
$error_message1 = "Your system is not configured to run mimeTeX. ";
$error_message1 .= "You need to download the appropriate<br /> executable ";
$error_message1 .= "from <a href=\"http://moodle.org/download/mimetex/\">";
$error_message1 .= "http://moodle.org/download/mimetex/</a>, or obtain the ";
$error_message1 .= "C source<br /> from <a href=\"http://www.forkosh.com/mimetex.zip\">";
$error_message1 .= "http://www.forkosh.com/mimetex.zip</a>, compile it and ";
$error_message1 .= "put the executable into your<br /> moodle/filter/tex/ directory. ";
$error_message1 .= "You also need to edit your moodle/filter/algebra/pix.php file<br />";
$error_message1 .= ' by adding the line<br /><pre> case "' . PHP_OS . "\":\n";
$error_message1 .= " \$cmd = \"\\\\\"\$CFG->dirroot/\$CFG->texfilterdir/";
$error_message1 .= 'mimetex.' . strtolower(PHP_OS) . "\\\\\" -e \\\\\"\$pathname\\\\\" \". escapeshellarg(\$texexp);";
$error_message1 .= "</pre>You also need to add this to your algebradebug.php file.";
global $CFG;
$error_message1 = "Your system is not configured to run mimeTeX. ";
$error_message1 .= "You need to download the appropriate<br /> executable ";
$error_message1 .= "from <a href=\"http://moodle.org/download/mimetex/\">";
$error_message1 .= "http://moodle.org/download/mimetex/</a>, or obtain the ";
$error_message1 .= "C source<br /> from <a href=\"http://www.forkosh.com/mimetex.zip\">";
$error_message1 .= "http://www.forkosh.com/mimetex.zip</a>, compile it and ";
$error_message1 .= "put the executable into your<br /> moodle/filter/tex/ directory. ";
$error_message1 .= "You also need to edit your moodle/filter/algebra/pix.php file<br />";
$error_message1 .= ' by adding the line<br /><pre> case "' . PHP_OS . "\":\n";
$error_message1 .= " \$cmd = \"\\\\\"\$CFG->dirroot/\$CFG->texfilterdir/";
$error_message1 .= 'mimetex.' . strtolower(PHP_OS) . "\\\\\" -e \\\\\"\$pathname\\\\\" \". escapeshellarg(\$texexp);";
$error_message1 .= "</pre>You also need to add this to your algebradebug.php file.";
if ($texexp) {
$texexp = '\Large ' . $texexp;
$lifetime = 86400;
$image = $md5 . ".gif";
$filetype = 'image/gif';
if (!file_exists("$CFG->dataroot/$CFG->algebraimagedir")) {
make_upload_directory($CFG->algebraimagedir);
}
$pathname = "$CFG->dataroot/$CFG->algebraimagedir/$image";
if (file_exists($pathname)) {
unlink($pathname);
}
$commandpath = "";
$cmd = "";
switch (PHP_OS) {
case "Linux":
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex.linux";
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.linux\" -e \"$pathname\" ". escapeshellarg($texexp);
break;
case "WINNT":
case "WIN32":
case "Windows":
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex.exe";
$texexp = str_replace('"','\"',$texexp);
$cmd = str_replace(' ','^ ',$commandpath);
$cmd .= " ++ -e \"$pathname\" \"$texexp\"";
break;
case "Darwin":
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin";
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin\" -e \"$pathname\" ". escapeshellarg($texexp);
break;
}
if (!$cmd) {
if (is_executable("$CFG->dirroot/$CFG->texfilterdir/mimetex")) { /// Use the custom binary
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex";
$cmd = "$CFG->dirroot/$CFG->texfilterdir/mimetex -e $pathname ". escapeshellarg($texexp);
} else {
error($error_message1);
}
}
system($cmd, $status);
}
if ($return) {
return $image;
}
if ($texexp && file_exists($pathname)) {
if ($texexp) {
$texexp = '\Large ' . $texexp;
$lifetime = 86400;
$image = $md5 . ".gif";
$filetype = 'image/gif';
if (!file_exists("$CFG->dataroot/$CFG->algebraimagedir")) {
make_upload_directory($CFG->algebraimagedir);
}
$pathname = "$CFG->dataroot/$CFG->algebraimagedir/$image";
if (file_exists($pathname)) {
unlink($pathname);
}
$commandpath = "";
$cmd = "";
$texexp = escapeshellarg($texexp);
switch (PHP_OS) {
case "Linux":
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex.linux";
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.linux\" -e \"$pathname\" $texexp";
break;
case "WINNT":
case "WIN32":
case "Windows":
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex.exe";
$cmd = str_replace(' ','^ ',$commandpath);
$cmd .= " ++ -e \"$pathname\" $texexp";
break;
case "Darwin":
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin";
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin\" -e \"$pathname\" $texexp";
break;
}
if (!$cmd) {
if (is_executable("$CFG->dirroot/$CFG->texfilterdir/mimetex")) { /// Use the custom binary
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex";
$cmd = "$CFG->dirroot/$CFG->texfilterdir/mimetex -e $pathname $texexp";
} else {
error($error_message1);
}
}
system($cmd, $status);
}
if ($return) {
return $image;
}
if ($texexp && file_exists($pathname)) {
$lastmodified = filemtime($pathname);
header("Last-Modified: " . gmdate("D, d M Y H:i:s", $lastmodified) . " GMT");
header("Expires: " . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT");
@@ -275,7 +274,7 @@ function tex2image($texexp, $md5, $return=false) {
header("Content-length: ".filesize($pathname));
header("Content-type: $filetype");
readfile("$pathname");
} else {
} else {
$ecmd = "$cmd 2>&1";
echo `$ecmd` . "<br />\n";
echo "The shell command<br />$cmd<br />returned status = $status<br />\n";
@@ -301,7 +300,7 @@ function tex2image($texexp, $md5, $return=false) {
echo "mimetex executable $commandpath not found!<br />";
}
echo "Image not found!";
}
}
}
function slasharguments($texexp, $md5) {
+1 -2
View File
@@ -161,11 +161,10 @@ function algebra_filter ($courseid, $text) {
$algebra = str_replace('epsilon','zepslon',$algebra);
$algebra = str_replace('upsilon','zupslon',$algebra);
$algebra = preg_replace('!\r\n?!',' ',$algebra);
$algebra = escapeshellarg($algebra);
if ( (PHP_OS == "WINNT") || (PHP_OS == "WIN32") || (PHP_OS == "Windows") ) {
$algebra = "\"". str_replace('"','\"',$algebra) . "\"";
$cmd = "cd $CFG->dirroot\\$CFG->algebrafilterdirwin & algebra2tex.pl $algebra";
} else {
$algebra = escapeshellarg($algebra);
$cmd = "cd $CFG->dirroot/$CFG->algebrafilterdir; ./algebra2tex.pl $algebra";
}
$texexp = `$cmd`;
+5 -5
View File
@@ -54,25 +54,25 @@
$texexp = str_replace('&gt;','>',$texexp);
$texexp = preg_replace('!\r\n?!',' ',$texexp);
$texexp = '\Large ' . $texexp;
$texexp = escapeshellarg($texexp);
if ((PHP_OS == "WINNT") || (PHP_OS == "WIN32") || (PHP_OS == "Windows")) {
$texexp = str_replace('"','\"',$texexp);
$cmd = "$CFG->dirroot/$CFG->texfilterdir/mimetex.exe";
$cmd = str_replace(' ','^ ',$cmd);
$cmd .= " ++ -e \"$pathname\" -- \"$texexp\"";
$cmd .= " ++ -e \"$pathname\" -- $texexp";
} else if (is_executable("$CFG->dirroot/$CFG->texfilterdir/mimetex")) { /// Use the custom binary
$cmd = "$CFG->dirroot/$CFG->texfilterdir/mimetex -e $pathname -- ". escapeshellarg($texexp);
$cmd = "$CFG->dirroot/$CFG->texfilterdir/mimetex -e $pathname -- $texexp";
} else { /// Auto-detect the right TeX binary
switch (PHP_OS) {
case "Linux":
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.linux\" -e \"$pathname\" -- ". escapeshellarg($texexp);
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.linux\" -e \"$pathname\" -- $texexp";
break;
case "Darwin":
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin\" -e \"$pathname\" -- ". escapeshellarg($texexp);
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin\" -e \"$pathname\" -- $texexp";
break;
default: /// Nothing was found, so tell them how to fix it.
+35 -27
View File
@@ -1,8 +1,8 @@
<?php // $id$
//////////////////////////////////////////////////////////////
// Media plugin filtering
//
// This filter will replace any links to a media file with
//
// This filter will replace any links to a media file with
// a media plugin that plays that media inline
//
// To activate this filter, add a line like this to your
@@ -12,7 +12,7 @@
//
//////////////////////////////////////////////////////////////
/// This is the filtering function itself. It accepts the
/// This is the filtering function itself. It accepts the
/// courseid and the text to be filtered (in HTML form).
function mediaplugin_filter($courseid, $text) {
@@ -20,6 +20,12 @@ function mediaplugin_filter($courseid, $text) {
include "defaultsettings.php";
// You should never modify parameters passed to a method or function, it's BAD practice. Create a copy instead.
// The reason is that you must always be able to refer to the original parameter that was passed.
// For this reason, I changed $text = preg_replace(..,..,$text) into $newtext = preg.... (NICOLAS CONNAULT)
// Thanks to Pablo Etcheverry for pointing this out! MDL-10177
$newtext = fullclone($text);
if ($CFG->filter_mediaplugin_enable_mp3) {
static $c;
@@ -47,8 +53,8 @@ function mediaplugin_filter($courseid, $text) {
$replace .= ' pluginspage="http://www.macromedia.com/go/getflashplayer">';
$replace .= '</embed>';
$replace .= '</object>&nbsp;';
$text = preg_replace($search, $replace, $text);
$newtext = preg_replace($search, $replace, $newtext);
}
if ($CFG->filter_mediaplugin_enable_swf) {
@@ -85,13 +91,13 @@ function mediaplugin_filter($courseid, $text) {
$replace[1] .= '</embed>';
$replace[1] .= '</object></p>';
$text = preg_replace($search, $replace, $text);
$newtext = preg_replace($search, $replace, $newtext);
}
if ($CFG->filter_mediaplugin_enable_flv) {
$search = '/<a(.*?)href=\"([^<]+)\.flv\"([^>]*)>(.*?)<\/a>/is';
$replace = '\\0&nbsp;<object class="mediaplugin flv" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
$replace .= ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ';
$replace .= ' width="480" height="360" id="flvplayer">';
@@ -104,8 +110,8 @@ function mediaplugin_filter($courseid, $text) {
$replace .= ' pluginspage="http://www.macromedia.com/go/getflashplayer">';
$replace .= '</embed>';
$replace .= '</object>&nbsp;';
$text = preg_replace($search, $replace, $text);
$newtext = preg_replace($search, $replace, $newtext);
}
if ($CFG->filter_mediaplugin_enable_mov) {
@@ -127,7 +133,7 @@ function mediaplugin_filter($courseid, $text) {
$replace .= '</embed>';
$replace .= '</object></p>';
$text = preg_replace($search, $replace, $text);
$newtext = preg_replace($search, $replace, $newtext);
}
if ($CFG->filter_mediaplugin_enable_wmv) {
@@ -154,7 +160,7 @@ function mediaplugin_filter($courseid, $text) {
$replace .= '</embed>';
$replace .= '</object></p>';
$text = preg_replace($search, $replace, $text);
$newtext = preg_replace($search, $replace, $newtext);
}
if ($CFG->filter_mediaplugin_enable_mpg) {
@@ -166,8 +172,8 @@ function mediaplugin_filter($courseid, $text) {
$replace .= '<param name="autoplay" value="false" />';
$replace .= '<embed src="\\2.\\3" width="240" height="180" controller="true" autoplay="false"> </embed>';
$replace .= '</object></p>';
$text = preg_replace($search, $replace, $text);
$newtext = preg_replace($search, $replace, $newtext);
}
if ($CFG->filter_mediaplugin_enable_avi) {
@@ -179,10 +185,10 @@ function mediaplugin_filter($courseid, $text) {
$replace .= '<param name="autoplay" value="false" />';
$replace .= '<embed src="\\2.avi" width="240" height="180" controller="true" autoplay="false"> </embed>';
$replace .= '</object></p>';
$text = preg_replace($search, $replace, $text);
$newtext = preg_replace($search, $replace, $newtext);
}
if ($CFG->filter_mediaplugin_enable_ram) {
$search = '/<a(.*?)href=\"([^<]+)\.ram\"([^>]*)>(.*?)<\/a>/is';
@@ -192,7 +198,7 @@ function mediaplugin_filter($courseid, $text) {
$replace .= '<param name="controls" value="imagewindow" />';
$replace .= '<param name="console" value="video" />';
$replace .= '<param name="loop" value="true" />';
$replace .= '<embed src="\\2.rm" width=240" height="180" loop="true" type="audio/x-pn-realaudio-plugin" controls="imagewindow" console="video" autostart="true">';
$replace .= '<embed src="\\2.ram" width=240" height="180" loop="true" type="audio/x-pn-realaudio-plugin" controls="imagewindow" console="video" autostart="true">';
$replace .= '</embed>';
$replace .= '</object><br />';
@@ -201,13 +207,13 @@ function mediaplugin_filter($courseid, $text) {
$replace .= '<param name="autostart" value="true" />';
$replace .= '<param name="controls" value="ControlPanel" />';
$replace .= '<param name="console" value="video" />';
$replace .= '<embed src="\\2.rm" width="240" height="30" controls="ControlPanel" type="audio/x-pn-realaudio-plugin" console="video" autostart="true">';
$replace .= '<embed src="\\2.ram" width="240" height="30" controls="ControlPanel" type="audio/x-pn-realaudio-plugin" console="video" autostart="true">';
$replace .= '</embed>';
$replace .= '</object></p>';
$text = preg_replace($search, $replace, $text);
$newtext = preg_replace($search, $replace, $newtext);
}
if ($CFG->filter_mediaplugin_enable_rpm) {
$search = '/<a(.*?)href=\"([^<]+)\.rpm\"([^>]*)>(.*?)<\/a>/is';
@@ -217,7 +223,7 @@ function mediaplugin_filter($courseid, $text) {
$replace .= '<param name="controls" value="imagewindow" />';
$replace .= '<param name="console" value="video" />';
$replace .= '<param name="loop" value="true" />';
$replace .= '<embed src="\\2.rm" width=240" height="180" loop="true" type="audio/x-pn-realaudio-plugin" controls="imagewindow" console="video" autostart="true">';
$replace .= '<embed src="\\2.rpm" width=240" height="180" loop="true" type="audio/x-pn-realaudio-plugin" controls="imagewindow" console="video" autostart="true">';
$replace .= '</embed>';
$replace .= '</object><br />';
@@ -226,13 +232,13 @@ function mediaplugin_filter($courseid, $text) {
$replace .= '<param name="autostart" value="true" />';
$replace .= '<param name="controls" value="ControlPanel" />';
$replace .= '<param name="console" value="video" />';
$replace .= '<embed src="\\2.rm" width="240" height="30" controls="ControlPanel" type="audio/x-pn-realaudio-plugin" console="video" autostart="true">';
$replace .= '<embed src="\\2.rpm" width="240" height="30" controls="ControlPanel" type="audio/x-pn-realaudio-plugin" console="video" autostart="true">';
$replace .= '</embed>';
$replace .= '</object></p>';
$text = preg_replace($search, $replace, $text);
$newtext = preg_replace($search, $replace, $newtext);
}
if ($CFG->filter_mediaplugin_enable_rm) {
$search = '/<a(.*?)href=\"([^<]+)\.rm\"([^>]*)>(.*?)<\/a>/is';
@@ -255,11 +261,13 @@ function mediaplugin_filter($courseid, $text) {
$replace .= '</embed>';
$replace .= '</object></p>';
$text = preg_replace($search, $replace, $text);
$newtext = preg_replace($search, $replace, $newtext);
}
return $text;
if (is_null($newtext)) {
$newtext = $text;
}
return $newtext;
}
Binary file not shown.
Binary file not shown.
+6 -6
View File
@@ -68,29 +68,29 @@
$texexp = str_replace('&gt;','>',$texexp);
$texexp = preg_replace('!\r\n?!',' ',$texexp);
$texexp = '\Large ' . $texexp;
$texexp = escapeshellarg($texexp);
if ((PHP_OS == "WINNT") || (PHP_OS == "WIN32") || (PHP_OS == "Windows")) {
$texexp = str_replace('"','\"',$texexp);
$cmd = "$CFG->dirroot/$CFG->texfilterdir/mimetex.exe";
$cmd = str_replace(' ','^ ',$cmd);
$cmd .= " ++ -e \"$pathname\" -- \"$texexp\"";
$cmd .= " ++ -e \"$pathname\" -- $texexp";
} else if (is_executable("$CFG->dirroot/$CFG->texfilterdir/mimetex")) { /// Use the custom binary
$cmd = "$CFG->dirroot/$CFG->texfilterdir/mimetex -e $pathname -- ". escapeshellarg($texexp);
$cmd = "$CFG->dirroot/$CFG->texfilterdir/mimetex -e $pathname -- $texexp";
} else { /// Auto-detect the right TeX binary
switch (PHP_OS) {
case "Linux":
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.linux\" -e \"$pathname\" -- ". escapeshellarg($texexp);
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.linux\" -e \"$pathname\" -- $texexp";
break;
case "Darwin":
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin\" -e \"$pathname\" -- ". escapeshellarg($texexp);
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin\" -e \"$pathname\" -- $texexp";
break;
case "FreeBSD":
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.freebsd\" -e \"$pathname\" ". escapeshellarg($texexp);
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.freebsd\" -e \"$pathname\" $texexp";
break;
default: /// Nothing was found, so tell them how to fix it.
+13 -13
View File
@@ -111,31 +111,31 @@
}
$commandpath = "";
$cmd = "";
$texexp = escapeshellarg($texexp);
switch (PHP_OS) {
case "Linux":
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex.linux";
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.linux\" -e \"$pathname\" ". escapeshellarg($texexp);
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.linux\" -e \"$pathname\" $texexp";
break;
case "WINNT":
case "WIN32":
case "Windows":
case "WIN32":
case "Windows":
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex.exe";
$texexp = str_replace('"','\"',$texexp);
$cmd = str_replace(' ','^ ',$commandpath);
$cmd .= " ++ -e \"$pathname\" \"$texexp\"";
$cmd = str_replace(' ','^ ',$commandpath);
$cmd .= " ++ -e \"$pathname\" $texexp";
break;
case "Darwin":
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin";
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin\" -e \"$pathname\" ". escapeshellarg($texexp);
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin\" -e \"$pathname\" $texexp";
break;
}
if (!$cmd) {
if (is_executable("$CFG->dirroot/$CFG->texfilterdir/mimetex")) { /// Use the custom binary
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex";
$cmd = "$CFG->dirroot/$CFG->texfilterdir/mimetex -e $pathname ". escapeshellarg($texexp);
} else {
error($error_message1);
}
if (is_executable("$CFG->dirroot/$CFG->texfilterdir/mimetex")) { /// Use the custom binary
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex";
$cmd = "$CFG->dirroot/$CFG->texfilterdir/mimetex -e $pathname $texexp";
} else {
error($error_message1);
}
}
system($cmd, $status);
}
+7 -6
View File
@@ -32,18 +32,19 @@
make_upload_directory($CFG->teximagedir);
}
$pathname = "$CFG->dataroot/$CFG->teximagedir/$image";
$texexp = escapeshellarg($texexp);
switch (PHP_OS) {
case "Linux":
system("$CFG->dirroot/$CFG->texfilterdir/mimetex.linux -e $pathname -- ". escapeshellarg($texexp) );
system("$CFG->dirroot/$CFG->texfilterdir/mimetex.linux -e $pathname -- $texexp" );
break;
case "WINNT":
case "WIN32":
case "Windows":
$texexp = str_replace('"','\"',$texexp);
system("$CFG->dirroot/$CFG->texfilterdir/mimetex.exe -e $pathname -- \"$texexp\"");
case "WIN32":
case "Windows":
system("$CFG->dirroot/$CFG->texfilterdir/mimetex.exe -e $pathname -- $texexp");
break;
case "Darwin":
system("$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin -e $pathname -- ". escapeshellarg($texexp) );
system("$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin -e $pathname -- $texexp" );
break;
}
if (file_exists($pathname)) {
+6 -2
View File
@@ -17,7 +17,7 @@
* @param string text to be filtered
*/
function tidy_filter($courseid, $text) {
global $CFG;
/// Configuration for tidy. Feel free to tune for your needs, e.g. to allow
/// proprietary markup.
$tidyoptions = array(
@@ -39,7 +39,11 @@ function tidy_filter($courseid, $text) {
/// If enabled: run tidy over the entire string
if (function_exists('tidy_repair_string')){
$text = tidy_repair_string($text, $tidyoptions);
if (empty($CFG->unicodedb)) {
$text = tidy_repair_string($text, $tidyoptions);
} else {
$text = tidy_repair_string($text, $tidyoptions, 'utf8');
}
}
return $text;
+1 -1
View File
@@ -12,7 +12,7 @@
require_login($course->id);
require_capability('moodle/course:managegrades', get_context_instance(CONTEXT_MODULE, $id));
require_capability('moodle/course:managegrades', get_context_instance(CONTEXT_COURSE, $id));
$group = get_current_group($course->id);
+3 -3
View File
@@ -2024,7 +2024,7 @@ function grade_view_all_grades($view_by_student) { // if mode=='grade' then we a
$header = '<tr><th rowspan="2">'.$student_heading_link.'</th>';
}
else {
$header = '</tr>';
$header = '<tr>';
}
$header1 = '<tr>';
@@ -3005,12 +3005,12 @@ function grade_get_course_students($courseid) {
}
$configvar = get_config('', 'gradebookroles');
if (empty($configvar->value)) {
if (empty($configvar)) {
notify ('no roles defined in admin->appearance->graderoles');
return false; // no roles to displayreturn false;
}
if ($rolestoget = explode(',', $configvar->value)) {
if ($rolestoget = explode(',', $configvar)) {
foreach ($rolestoget as $crole) {
if ($tempstudents = get_role_users($crole, $context, true)) {
foreach ($tempstudents as $tempuserid=>$tempstudent) {
+1 -1
View File
@@ -54,7 +54,7 @@
redirect($CFG->wwwroot .'/'. $CFG->admin .'/index.php');
}
} else if (!empty($CFG->mymoodleredirect)) { // Redirect logged-in users to My Moodle overview if required
if (isloggedin()) {
if (isloggedin() and !isguest()) {
redirect($CFG->wwwroot .'/my/index.php');
}
}
+44 -32
View File
@@ -3,7 +3,7 @@
/// If config.php exists already then we are not needed.
if (file_exists('./config.php')) {
if (file_exists('./config.php')) {
header('Location: index.php');
die;
} else {
@@ -97,18 +97,18 @@ if (isset($_POST['stage'])) {
if ($nextstage < 0) $nextstage = WELCOME;
/// Store any posted data
foreach ($_POST as $setting=>$value) {
$INSTALL[$setting] = $value;
}
} else {
$goforward = true;
$nextstage = WELCOME;
}
//==========================================================================//
@@ -201,7 +201,7 @@ if (isset($_GET['help'])) {
/// Are we in config download mode?
if (isset($_GET['download'])) {
header("Content-Type: application/download\n");
header("Content-Type: application/download\n");
header("Content-Disposition: attachment; filename=\"config.php\"");
echo $INSTALL['config'];
exit;
@@ -218,7 +218,7 @@ if (isset($_GET['download'])) {
if ($INSTALL['stage'] == DIRECTORY) {
error_reporting(0);
/// check wwwroot
if (ini_get('allow_url_fopen')) {
if (($fh = @fopen($INSTALL['wwwrootform'].'/install.php', 'r')) === false) {
@@ -227,12 +227,12 @@ if ($INSTALL['stage'] == DIRECTORY) {
}
}
if ($fh) fclose($fh);
/// check dirroot
if (($fh = @fopen($INSTALL['dirrootform'].'/install.php', 'r')) === false ) {
$errormsg .= get_string('dirrooterror', 'install').'<br />';
$INSTALL['dirrootform'] = $INSTALL['dirroot'];
}
}
if ($fh) fclose($fh);
/// check dataroot
@@ -240,7 +240,7 @@ if ($INSTALL['stage'] == DIRECTORY) {
if (make_upload_directory('sessions', false) === false ) {
$errormsg .= get_string('datarooterror', 'install').'<br />';
}
if ($fh) fclose($fh);
if ($fh) fclose($fh);
if (!empty($errormsg)) $nextstage = DIRECTORY;
@@ -262,7 +262,7 @@ if ($INSTALL['stage'] == DATABASE) {
} else {
$INSTALL['skipdbencodingtest'] = false;
}
/// different format for postgres7 by socket
if ($INSTALL['dbtype'] == 'postgres7' and ($INSTALL['dbhost'] == 'localhost' || $INSTALL['dbhost'] == '127.0.0.1')) {
$INSTALL['dbhost'] = "user='{$INSTALL['dbuser']}' password='{$INSTALL['dbpass']}' dbname='{$INSTALL['dbname']}'";
@@ -335,11 +335,11 @@ if ($INSTALL['stage'] == DATABASE) {
if (empty($errormsg)) {
error_reporting(0); // Hide errors
error_reporting(0); // Hide errors
if (! $dbconnected = $db->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'],$INSTALL['dbname'])) {
/// The following doesn't seem to work but we're working on it
/// If you come up with a solution for creating a database in MySQL
/// If you come up with a solution for creating a database in MySQL
/// feel free to put it in and let us know
if ($dbconnected = $db->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'])) {
switch ($INSTALL['dbtype']) { /// Try to create a database
@@ -384,7 +384,7 @@ if ($INSTALL['stage'] == DATABASE) {
$nextstage = DATABASE;
$INSTALL['showskipdbencodingtest'] = true;
$INSTALL['dbencodingtestresults'] = false;
}
}
} else {
$INSTALL['showskipdbencodingtest'] = true;
$INSTALL['dbencodingtestresults'] = false;
@@ -537,7 +537,7 @@ if ($INSTALL['stage'] == DOWNLOADLANG && $INSTALL['downloadlangpack']) {
$INSTALL['showdownloadlangpack'] = false;
$INSTALL['downloadlangpackerror'] = $downloaderror;
}
}
}
@@ -591,7 +591,7 @@ if ($nextstage == SAVE) {
fwrite($fh, $str);
fclose($fh);
}
$INSTALL['config'] = $str;
}
@@ -681,7 +681,7 @@ if (isset($_GET['help'])) {
<tr>
<td class="td_main" colspan="2">
<?php
if (!empty($errormsg)) echo "<p class=\"errormsg\" align=\"center\">$errormsg</p>\n";
@@ -698,7 +698,7 @@ if ($nextstage == SAVE) {
echo "<tr>\n";
echo "<td width=\"33.3%\">&nbsp;</td>\n";
echo "<td width=\"33.3%\">&nbsp;</td>\n";
echo "<td width=\"33.3%\" align=\"right\">\n";
echo "<td width=\"33.3%\" align=\"right\">\n";
print_single_button("index.php", $options, get_string('continue')." &raquo;");
echo "</td>\n";
echo "</tr>\n";
@@ -706,16 +706,16 @@ if ($nextstage == SAVE) {
} else {
echo "<p class=\"errormsg\">".get_string('configfilenotwritten', 'install')."</p>";
echo "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">\n";
echo "<tr>\n";
echo "<td width=\"33.3%\">&nbsp;</td>\n";
echo "<td width=\"33.3%\" align=\"center\">\n";
echo "<td width=\"33.3%\" align=\"center\">\n";
$installoptions = array();
$installoptions['download'] = 1;
$installoptions['download'] = 1;
print_single_button("install.php", $installoptions, get_string('download', 'install'));
echo "</td>\n";
echo "<td width=\"33.3%\" align=\"right\">\n";
echo "<td width=\"33.3%\" align=\"right\">\n";
print_single_button("index.php", $options, get_string('continue')." &raquo;");
echo "</td>\n";
echo "</tr>\n";
@@ -753,7 +753,7 @@ if ($nextstage == SAVE) {
<?php
<?php
//==========================================================================//
@@ -802,7 +802,7 @@ function form_table($nextstage = WELCOME, $formaction = "install.php") {
break;
case COMPATIBILITY: /// Compatibilty check
$compatsuccess = true;
/// Check that PHP is of a sufficient version
print_compatibility_row(inst_check_php_version(), get_string('phpversion', 'install'), get_string('phpversionerror', 'install'), 'phpversionhelp');
/// Check session auto start
@@ -811,7 +811,7 @@ function form_table($nextstage = WELCOME, $formaction = "install.php") {
print_compatibility_row(!ini_get_bool('magic_quotes_runtime'), get_string('magicquotesruntime', 'install'), get_string('magicquotesruntimeerror', 'install'), 'magicquotesruntimehelp');
/// Check unsupported PHP configuration
print_compatibility_row(ini_get_bool('magic_quotes_gpc') || (!ini_get_bool('register_globals')), get_string('globalsquotes', 'install'), get_string('globalsquoteserror', 'install'), 'globalsquoteshelp');
/// Check safe mode
/// Check safe mode
print_compatibility_row(!ini_get_bool('safe_mode'), get_string('safemode', 'install'), get_string('safemodeerror', 'install'), 'safemodehelp', true);
/// Check file uploads
print_compatibility_row(ini_get_bool('file_uploads'), get_string('fileuploads', 'install'), get_string('fileuploadserror', 'install'), 'fileuploadshelp', true);
@@ -854,10 +854,10 @@ function form_table($nextstage = WELCOME, $formaction = "install.php") {
<td class="td_right">
<?php choose_from_menu (array('mysql' => get_string('mysql', 'install'),
'oci8po' => get_string('oci8po', 'install'),
'postgres7' => get_string('postgres7', 'install'),
'mssql' => get_string('mssql', 'install'),
'mssql_n' => get_string('mssql_n', 'install'),
'odbc_mssql' => get_string('odbc_mssql', 'install')),
'postgres7' => get_string('postgres7', 'install'),
'mssql' => get_string('mssql', 'install'),
'mssql_n' => get_string('mssql_n', 'install'),
'odbc_mssql' => get_string('odbc_mssql', 'install')),
'dbtype', $INSTALL['dbtype'], '', 'toggledbinfo();') ?>
</td>
</tr>
@@ -956,7 +956,7 @@ function form_table($nextstage = WELCOME, $formaction = "install.php") {
print_single_button('install.php', $options, get_string('downloadlanguagebutton','install', $languages[$INSTALL['language']]), 'POST');
print_simple_box_end();
} else {
/// Show result info
/// Show result info
/// English lang packs aren't downloaded
if (substr($INSTALL['language'],0,2) == 'en') {
print_simple_box(get_string('downloadlanguagenotneeded', 'install', $languages[$INSTALL['language']]), 'center', '80%');
@@ -1006,7 +1006,7 @@ function form_table($nextstage = WELCOME, $formaction = "install.php") {
</td>
</tr>
</table>
<?php
if (!$needtoopenform) {
@@ -1055,7 +1055,7 @@ function install_helpbutton($url, $title='') {
echo "onClick=\"return window.open('$url', 'Help', 'menubar=0,location=0,scrollbars,resizable,width=500,height=400')\">";
echo "</a>\n";
}
//==========================================================================//
@@ -1154,7 +1154,7 @@ function css_styles() {
<style type="text/css">
body { background-color: #ffeece; }
p, li, td {
p, li, td {
font-family: helvetica, arial, sans-serif;
font-size: 10pt;
}
@@ -1231,6 +1231,18 @@ function css_styles() {
font-size: 10pt;
border-color: #ffc85f;
}
table.environmenttable .error {
background-color : red;
color : inherit;
}
table.environmenttable .warn {
background-color : yellow;
}
table.environmenttable .ok {
background-color : lightgreen;
}
.header {
background-color: #fee6b9;
font-size: 10pt;
+1 -1
View File
@@ -7,7 +7,7 @@
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
/// using strings defined in stringnames.txt (same dir)
$string['closewindow'] = 'Maak die venster toe';
$string['continue'] = 'Gaan voort';
+5 -3
View File
@@ -7,7 +7,7 @@
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
/// using strings defined in stringnames.txt (same dir)
$string['admindirerror'] = 'مجلد الإدارة المحدد غير صحيح';
$string['admindirname'] = 'مجلد الإدارة';
@@ -41,7 +41,7 @@ $string['dirroot'] = 'دليل مودل';
$string['dirrooterror'] = 'إعدادّّّ\"المجلد\" غير صحيح. حاول إعادة الإعداد';
$string['download'] = 'تنزيل';
$string['downloadlanguagehead'] = 'تنزيل حزمة اللغة';
$string['environmenterrortodo'] = 'يجب عليك تصحيح كل المشاكل (الأخطاء) الموضحه أعلاه قبل الأستمرار في ثتبيت هذا الأصدار لمودل';
$string['environmenterrortodo'] = 'يجب عليك تصحيح كل المشاكل (الأخطاء) الموضحه أعلاه قبل الأستمرار في ثتبيت هذا الأصدار لموّدل';
$string['environmenthead'] = 'يتم فحص البيئة';
$string['environmentrecommendinstall'] = 'ينصح بتثبيته/تمكينه';
$string['environmentrecommendversion'] = 'يفضل الأصدار a$->needed ، وانت تستخدم الأصدار a$->current';
@@ -62,6 +62,7 @@ $string['magicquotesruntimeerror'] = 'هذا يجب ان يكون معطل';
$string['mbstringrecommended'] = 'يفضل وبشدة تثبيت مكتبة (MBSTRING) الاختيارية وذلك لتسحين اداء الموقع وبذات لوكان موقعك يدعم لغات غير لاتينية.';
$string['memorylimit'] = 'حد الذاكرة';
$string['memorylimiterror'] = 'ذاكرة الـ PHP صغيرة جداً... من المحتل ستواجه بعض المشاكل لاحقاً';
$string['missingrequiredfield'] = 'بعض الحقول المطلوبة مفقودة';
$string['moodledocslink'] = 'وثائق مودل لهذه الصفحة';
$string['mysql416bypassed'] = 'على الرغم من أن موقعك يستخدم iso-8859-1 للغات (اللأتينية)فقط، يمكنك الأستمرار في استخدام MySQL 4.1.12 أو أعلى المثبتة حاليا.';
$string['mysql416required'] = 'MySQL 4.1.16 هي الأصدار الأقل المطلوب لاتثبيت أصدار مودل 1.6 وذلك لضمان إمكانية تحويل جميع البيانات إلى UTF-8 في المستقبل.';
@@ -72,7 +73,7 @@ $string['parentlanguage'] = 'المترجمون: أذا كانت لغتك لها
$string['pass'] = 'اجتياز';
$string['password'] = 'كلمة المرور';
$string['phpversion'] = 'أصدار PHP';
$string['phpversionerror'] = 'يجب ان يكون إصدار PHP 4.1.0 على الاقل ';
$string['phpversionerror'] = 'يجب ان يكون إصدار PHP 4.1.0 على الاقل';
$string['phpversionhelp'] = '<p> يتطلب مودل على الاقل الأصدار 4.1.0 لـ PHP </p>
<p> انت تستخدم الأصدار $a </p>
<p> يجب عليك ترقية PHP أو الانتقال إلى مستظيف أخر لديه أصدار اجد لـ PHP.</p>';
@@ -86,6 +87,7 @@ $string['sessionautostarterror'] = 'يجب أن يكون هذا معطل';
$string['skipdbencodingtest'] = 'تخطى اختبار تشفير قاعدة البيانات';
$string['status'] = 'الحالة';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'rtl';
$string['thislanguage'] = 'عربي';
$string['user'] = 'مستخدم';
$string['wwwroot'] = 'WWW';
+2 -1
View File
@@ -7,7 +7,7 @@
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
/// using strings defined in stringnames.txt (same dir)
$string['admindirerror'] = 'Абраны каталог адміністратара няслушны';
$string['admindirname'] = 'Каталог адміністратара';
@@ -37,6 +37,7 @@ $string['password'] = 'Пароль';
$string['previous'] = 'Папярэдні';
$string['status'] = 'Статус';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Беларуская';
$string['user'] = 'Карыстальнік';
?>
+2 -1
View File
@@ -7,7 +7,7 @@
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
/// using strings defined in stringnames.txt (same dir)
$string['closewindow'] = 'Затваряне на прозореца';
$string['continue'] = 'Напред';
@@ -22,6 +22,7 @@ $string['password'] = 'Парола';
$string['previous'] = 'Предишен';
$string['status'] = 'Състояние';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Български';
$string['user'] = 'Потребител';
?>
+5 -4
View File
@@ -7,7 +7,7 @@
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
/// using strings defined in stringnames.txt (same dir)
$string['admindirerror'] = 'Određeni administratorski direktorij je nepravilan';
$string['admindirname'] = 'Administratorski direktorij';
@@ -51,10 +51,10 @@ $string['memorylimithelp'] = '<p>PHP ograničenje memorije za Vaš server je tre
<p>Ovo možda prouzrokuje Moodlu da kasnije ima problema sa memorijom, posebno ako imate mnogo dozvoljenih modula i /ili mnogo korisnika.</p>
<p>Preporučujemo Vam da konfigurišete PHP sa visokim ograničenjem ako je moguće, kao 16M. Čineći ovo tamo je nekoliko načina pa možete pokušati: </p><ol>
<p>Preporučujemo Vam da konfigurišete PHP sa visokim ograničenjem ako je moguće, kao 40M. Čineći ovo tamo je nekoliko načina pa možete pokušati: </p><ol>
<li>Ako ste, opet kompajlisati PHP sa <i>--dostupnim-memorijskim-ograničenjem</i>. Ovo će dozvoliti Moodle da postavi memorijsko ograničenje sam za sebe.</li>
<li>Ako imate pristup na Vašu php.ini datoteku, možete promijeniti <b>memorijsko_ograničenje</b> podešavanje u nešto kao ovo 16M. Ako nemate pristup možete pitati svog administratora da to uradi za Vas.</li>
<li>Na nekim PHP serverima možete kreirati a.ht pristupnu datoteku u Moodle direktoriju koji se sadrži na ovoj liniji:<br /><blockquote>php_vrijednost memorijskog_ograničenja 16M</blockquote></li>
<li>Ako imate pristup na Vašu php.ini datoteku, možete promijeniti <b>memorijsko_ograničenje</b> podešavanje u nešto kao ovo 40M. Ako nemate pristup možete pitati svog administratora da to uradi za Vas.</li>
<li>Na nekim PHP serverima možete kreirati a.ht pristupnu datoteku u Moodle direktoriju koji se sadrži na ovoj liniji:<br /><blockquote>php_vrijednost memorijskog_ograničenja 40M</blockquote></li>
<br />Kakogod, na istom serveru ovo izbjegavajte <b>sve</b> PHP stranice za rad (vidjet ćete grešku prilkom pregleda stranice) ćete na njima morati izbrisati .htpristupnu datoteku. </li></ol>';
$string['mysqlextensionisnotpresentinphp'] = 'PHP neće biti propisno konfigurisan sa MySQL ekstenzijom tako da može komunicirati sa MySQL. Molimo Vas da provjerite svoju php.ini datoteku ili opet kompajlišite PHP.';
$string['name'] = 'Ime';
@@ -74,6 +74,7 @@ $string['sessionautostart'] = 'Automatski početak akcije';
$string['sessionautostarterror'] = 'Ovo bi trebalo biti isključeno';
$string['status'] = 'Status';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Bosanski';
$string['user'] = 'Korisnik';
$string['wwwroot'] = 'Web adresa';
+20 -5
View File
@@ -7,7 +7,7 @@
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
/// using strings defined in stringnames.txt (same dir)
$string['admindirerror'] = 'El directori d\'administració especificat és incorrecte';
$string['admindirname'] = 'Directori d\'administració';
@@ -15,7 +15,7 @@ $string['admindirsettinghead'] = 'S\'està configurant el directori d\'administr
$string['admindirsettingsub'] = 'Alguns proveïdors d\'espai web utilitzen /admin com una adreça URL especial per accedir a un tauler de control o quelcom semblant. Malauradament això interfereix amb la ubicació estàndard de les pàgines d\'administració de Moodle. Podeu solucionar aquest problema canviant el nom del directori admin en la vostra instal·lació i introduint aquí el nou nom. Per exemple: <br /> <br /><b>moodleadmin</b><br /> <br />
Això repararà tots els enllaços d\'administració de Moodle.';
$string['bypassed'] = 'S\'ha deixat de banda';
$string['cannotcreatelangdir'] = 'No es pot crear el directori d\'idiomes.';
$string['cannotcreatelangdir'] = 'No s\'ha pogut crear el directori d\'idiomes.';
$string['cannotcreatetempdir'] = 'No s\'ha pogut crear el directori temporal';
$string['cannotdownloadcomponents'] = 'No s\'han pogut baixar components';
$string['cannotdownloadzipfile'] = 'No s\'ha pogut baixar el fitxer zip';
@@ -37,6 +37,7 @@ $string['configurationcompletehead'] = 'S\'ha completat la configuració';
$string['configurationcompletesub'] = 'Moodle ha intentat desar la configuració en un fitxer en l\'arrel de la vostra instal·lació de Moodle.';
$string['continue'] = 'Continua';
$string['curlrecommended'] = 'Es recomana instal·lar la biblioteca opcional Curl a fi d\'habilitar la funcionalitat de Moodle en Xarxa.';
$string['customcheck'] = 'Altres comprovacions';
$string['database'] = 'Base de dades';
$string['databasecreationsettingshead'] = 'Ara cal configurar els paràmetres de la base de dades on s\'emmagatzemaran la majoria de dades de Moodle. L\'instal·lador crearà automàticament aquesta base de dades amb els paràmetres que especifiqueu aquí.';
$string['databasecreationsettingssub'] = '<b>Tipus:</b> fixat a \"mysql\" per l\'instal·lador<br />
@@ -70,6 +71,12 @@ $string['databasesettingssub_mysql'] = '<b>Tipus:</b> MySQL<br />
<b>Usuari:</b> el vostre nom d\'usuari de la base de dades<br />
<b>Contrasenya:</b> la vostra contrasenya de la base de dades<br />
<b>Prefix de les taules:</b> prefix que cal anteposar als noms de totes les taules (opcional)';
$string['databasesettingssub_mysqli'] = '<b>Tipus:</b> MySQL Improved<br />
<b>Servidor:</b> p. ex. localhost o db.isp.com<br />
<b>Nom:</b> nom de la base de dades, p. ex. moodle<br />
<b>Usuari:</b> el vostre nom d\'usuari de la base de dades<br />
<b>Contrasenya:</b> la vostra contrasenya de la base de dades<br />
<b>Prefix de les taules:</b> prefix que cal anteposar als noms de totes les taules (opcional)';
$string['databasesettingssub_oci8po'] = '<b>Tipus:</b> Oracle<br />
<b>Servidor:</b> no utilitzat, s\'ha de deixar en blanc<br />
<b>Nom:</b> nom de la connexió tnsnames.ora<br />
@@ -118,8 +125,10 @@ $string['downloadlanguagenotneeded'] = 'Podeu continuar el procés d\'instal·la
$string['downloadlanguagesub'] = 'Ara teniu l\'opció de baixar un paquet d\'idioma i continuar el procés d\'instal·lació en aquest idioma.<br /><br />Si no podeu baixar el paquet, el procés d\'instal·lació prosseguirà en anglès. (Després que s\'hagi completat la instal·lació, tindreu l\'oportunitat de baixar i instal·lar paquets d\'idioma addicionals.)';
$string['environmenterrortodo'] = 'Abans d\'instal·lar aquesta versió de Moodle heu de resoldre tots els problemes d\'entorn (errors) que s\'han trobat.';
$string['environmenthead'] = 'S\'està comprovant el vostre entorn';
$string['environmentrecommendcustomcheck'] = 'si aquesta prova falla, això indica un problema en potència';
$string['environmentrecommendinstall'] = 'es recomana instal·lar/habilitar';
$string['environmentrecommendversion'] = 'esteu executant la versió $a->current i es recomana la $a->needed';
$string['environmentrequirecustomcheck'] = 'cal passar aquesta prova';
$string['environmentrequireinstall'] = 'es requereix instal·lar/habilitar';
$string['environmentrequireversion'] = 'esteu executant la versió $a->current i es requereix la $a->needed';
$string['environmentsub'] = 'S\'està comprovant si els diferents components del vostre sistema satisfan els requeriments';
@@ -156,12 +165,12 @@ $string['memorylimithelp'] = '<p>El límit de memòria del PHP del vostre servid
<p>Això pot causar que Moodle tingui problemes de memòria més endavant, especialment si teniu molts mòduls habilitats i/o molts usuaris.</p>
<p>És recomanable que configureu el PHP amb un límit superior, com ara 16 MB, sempre que sigui possible. Hi ha diverses maneres de fer això:</p>
<p>És recomanable que configureu el PHP amb un límit superior, com ara 40 MB, sempre que sigui possible. Hi ha diverses maneres de fer això:</p>
<ol>
<li>Si podeu, recompileu el PHP amb <i>--enable-memory-limit</i>. Això permetrà que Moodle defineixi el límit de memòria per si mateix.</li>
<li>Si teniu accés al fitxer php.ini, podeu canviar el paràmetre <b>memory_limit</b> a 16M. Si no hi teniu accés podeu demanar al vostre administrador que ho faci ell.</li>
<li>Si teniu accés al fitxer php.ini, podeu canviar el paràmetre <b>memory_limit</b> a 40 MB. Si no hi teniu accés podeu demanar al vostre administrador que ho faci ell.</li>
<li>En alguns servidors PHP podeu crear un fitxer .htaccess dins del directori de Moodle amb aquesta línia:
<p><blockquote>php_value memory_limit 16M</blockquote></p>
<p><blockquote>php_value memory_limit 40M</blockquote></p>
<p>Tanmateix, en alguns servidors això farà que no funcioni <b>cap</b> pàgina PHP (es visualitzaran errors) en el qual cas hauríeu de suprimir el fitxer .htaccess.</p></li>
</ol>';
$string['missingrequiredfield'] = 'Falta algun camp necessari';
@@ -173,6 +182,8 @@ $string['mysql'] = 'MySQL (mysql)';
$string['mysql416bypassed'] = 'Tanmateix, si el vostre lloc fa servir NOMÉS llengües romàniques (iso-8859-1), podeu seguir utilitzant el MySQL 4.1.12 (o superior) instal·lat.';
$string['mysql416required'] = 'MySQL 4.1.16 és la versió mínima requerida per Moodle 1.6 a fi de garantir la conversió de totes les dades a UTF-8 en el futur.';
$string['mysqlextensionisnotpresentinphp'] = 'El PHP no s\'ha configurat correctament amb l\'extensió MySQL de manera que pugui comunicar-se amb MySQL. Reviseu el fitxer php.ini o recompileu el PHP.';
$string['mysqli'] = 'MySQL Improved (mysqli)';
$string['mysqliextensionisnotpresentinphp'] = 'El PHP no ha estat configurat adequadament amb l\'extensió MySQLi de manera que pugui comunicar-se amb MySQL. Reviseu el fitxer php.ini o recompileu el PHP. L\'extensió MySQLi no està disponible per a PHP 4.';
$string['name'] = 'Nom';
$string['next'] = 'Següent';
$string['oci8po'] = 'Oracle (oci8po)';
@@ -192,16 +203,20 @@ $string['phpversionhelp'] = '<p>Moodle necessita la versió de PHP 4.1.0 o poste
<p>Us caldrà actualitzar el PHP o traslladar Moodle a un ordinador amb una versió de PHP més recent.</p>';
$string['postgres7'] = 'PostgreSQL (postgres7)';
$string['previous'] = 'Anterior';
$string['qtyperqpwillberemoved'] = 'Durant l\'actualització, el tipus de pregunta RPQ se suprimirà. No estàveu utilitzant aquest tipus de pregunta, de manera que no hauríeu d\'experimentar cap problema.';
$string['qtyperqpwillberemovedanyway'] = 'Durant l\'actualització, el tipus de pregunta RPQ se suprimirà. Teniu algunes preguntes RQP en la base de dades que deixaran de funcionar si no reinstal·leu el codi de http://moodle.org/mod/data/view.php?d=13&amp;rid=797 abans de prosseguir l\'actualització.';
$string['remotedownloadnotallowed'] = 'El vostre servidor no permet baixar components ((allow_url_fopen inhabilitat).<br /><br />Baixeu manualment el fitxer <a href=\"$a->url\">$a->url</a>, copieu en la ubicació \"$a->dest\" del vostre servidor i descomprimiu-lo allí.';
$string['report'] = 'Informe';
$string['restricted'] = 'Restringit';
$string['safemode'] = 'Mode segur';
$string['safemodeerror'] = 'Moodle pot tenir problemes amb el mode segur activat';
$string['serverchecks'] = 'Proves del servidor';
$string['sessionautostart'] = 'Autoinici de sessió';
$string['sessionautostarterror'] = 'Hauria d\'estar desactivat';
$string['skipdbencodingtest'] = 'Omet la prova de codificació de la base de dades';
$string['status'] = 'Estat';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Català';
$string['unicoderecommended'] = 'Es recomana emmagatzemar totes les dades en Unicode (UTF-8). Les noves instal·lacions s\'haurien de realitzar en bases de dades que tinguin definit com a Unicode el conjunt de caràcters per defecte. Si esteu fent una actualització, hauríeu de passar el procés de migració a UTF-8 (vg. la pàgina d\'Administració).';
$string['unicoderequired'] = 'Es requereix emmagatzemar totes les dades en format Unicode (UTF-8). Les noves instal·lacions s\'han de realitzar en bases de dades que tinguin definit com a Unicode el conjunt de caràcters per defecte. Si esteu fent una actualització, hauríeu de passar el procés de migració a UTF-8 (vg. la pàgina d\'Administració).';
+63 -6
View File
@@ -7,7 +7,7 @@
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
/// using strings defined in stringnames.txt (same dir)
$string['admindirerror'] = 'Adresář pro správu (admin) není zadán správně.';
$string['admindirname'] = 'Adresář pro správu (admin)';
@@ -37,6 +37,7 @@ $string['configurationcompletehead'] = 'Konfigurace dokončena';
$string['configurationcompletesub'] = 'Moodle se pokusil uložit soubor s konfigurací do kořenového adresáře instalace Moodlu.';
$string['continue'] = 'Pokračovat';
$string['curlrecommended'] = 'Pro běh síťových funkcionalit (\"Moodle Networking\") je potřeba nainstalovat volitelnou knihovnu Curl.';
$string['customcheck'] = 'Další kontroly';
$string['database'] = 'Databáze';
$string['databasecreationsettingshead'] = 'Nyní musíte nastavit připojení k databázi, kam si bude Moodle ukládat většinu svých dat. Tato databáze může být vytvořena instalátorem automaticky podle následujícího nastavení.';
$string['databasecreationsettingssub'] = '<b>Typ:</b> instalátor nastaví na \"mysql\"<br />
@@ -52,6 +53,42 @@ $string['databasesettingssub'] = '<b>Typ:</b> mysql nebo postgres7<br />
<b>Uživatel:</b> uživatelské jméno účtu pro přístup k databázi<br />
<b>Heslo:</b> heslo k tomuto účtu<br />
<b>Předpona tabulek:</b> volitelná předpona, která se vloží před názvy všech tabulek (umožňuje používat jednu databázi pro více instalací Moodlu)';
$string['databasesettingssub_mssql'] = '<b>Typ:</b> SQL*Server (bez UTF-8) <b><font color=\"red\">Jen pro experimentování! (není určeno pro produkční servery)</font></b><br />
<b>Hostitel (Host):</b> např. localhost nebo db.naseskola.cz<br />
<b>Název (Name):</b> název databáze, např. moodle<br />
<b>Uživatel (User):</b> uživatel oprávněný pro práci s databází<br />
<b>Heslo (Password):</b> heslo pro uživatele<br />
<b>Předpona (Tables Prefix):</b> jednotná předpona názvů všech tabulek, např. mdl_ (povinné)';
$string['databasesettingssub_mssql_n'] = '<b>Typ:</b> SQL*Server (s UTF-8) <br />
<b>Hostitel (Host):</b> např. localhost nebo db.naseskola.cz<br />
<b>Název (Name):</b> název databáze, např. moodle<br />
<b>Uživatel (User):</b> uživatel oprávněný pro práci s databází<br />
<b>Heslo (Password):</b> heslo pro uživatele<br />
<b>Předpona (Tables Prefix):</b> jednotná předpona názvů všech tabulek, např. mdl_ (povinné)';
$string['databasesettingssub_mysql'] = '<b>Typ:</b> MySQL<br />
<b>Hostitel (Host):</b> např. localhost nebo db.naseskola.cz<br />
<b>Název (Name):</b> název databáze, např. moodle<br />
<b>Uživatel (User):</b> uživatel oprávněný pro práci s databází<br />
<b>Heslo (Password):</b> heslo pro uživatele<br />
<b>Předpona (Tables Prefix):</b> jednotná předpona názvů všech tabulek, např. mdl_ (volitelné)';
$string['databasesettingssub_oci8po'] = '<b>Typ:</b> Oracle<br />
<b>Hostitel (Host):</b> nepoužito, musí být prázdné<br />
<b>Název (Name):</b> daný název připojení tnsnames.ora<br />
<b>Uživatel (User):</b> uživatel oprávněný pro práci s databází<br />
<b>Heslo (Password):</b> heslo pro uživatele<br />
<b>Předpona (Tables Prefix):</b> jednotná předpona názvů všech tabulek (povinné, max 2 znaky)';
$string['databasesettingssub_odbc_mssql'] = '<b>Typ:</b> SQL*Server (přes ODBC) <b><font color=\"red\">Jen pro experimentování! (není určeno pro produkční servery)</font></b><br />
<b>Hostitel (Host):</b> název DSN podle řídicího panelu ODBC<br />
<b>Název (Name):</b>název databáze, např. moodle <br />
<b>Uživatel (User):</b> uživatel oprávněný pro práci s databází<br />
<b>Heslo (Password):</b> heslo pro uživatele<br />
<b>Předpona (Tables Prefix):</b> jednotná předpona názvů všech tabulek (povinné)';
$string['databasesettingssub_postgres7'] = '<b>Typ:</b> PostgreSQL<br />
<b>Hostitel (Host):</b> např. localhost nebo db.naseskola.cz<br />
<b>Název (Name):</b> název databáze, např. moodle<br />
<b>Uživatel (User):</b> uživatel oprávněný pro práci s databází<br />
<b>Heslo (Password):</b> heslo pro uživatele<br />
<b>Předpona (Tables Prefix):</b> jednotná předpona názvů všech tabulek, např. mdl_ (povinné)';
$string['dataroot'] = 'Datový adresář';
$string['datarooterror'] = 'Zadaný datový adresář se nepodařilo nalézt nebo vytvořit. Buď opravte zadanou cestu, nebo vytvořte adresář ručně.';
$string['dbconnectionerror'] = 'Nepodařilo se připojit k databázi, kterou jste zadali. Zkontrolujte prosím nastavení databáze.';
@@ -60,6 +97,9 @@ $string['dbhost'] = 'Hostitelský server';
$string['dbprefix'] = 'Předpona tabulek';
$string['dbtype'] = 'Typ';
$string['dbwrongencoding'] = 'Vybraná databáze používá nedoporučené kódování $a. Vhodnější by bylo používat databázi s kódováním Unicode (UTF-8). Tuto kontrolu můžete přeskočit zaškrtnutím pole \"Přeskočit test kódování DB\", můžete však v budoucnu narazit na problémy.';
$string['dbwronghostserver'] = 'Chyba v názvu hostitele.';
$string['dbwrongnlslang'] = 'Proměnná prostředí Vašeho serveru NLS_LANG musí používat znakovou sadu AL32UTF8. Viz dokumentaci PHP o konfiguraci vlastnosti OCI8.';
$string['dbwrongprefix'] = 'Chyba v předponě názvů tabulek.';
$string['directorysettingshead'] = 'Potvrďte prosím adresy této instalace Moodlu.';
$string['directorysettingssub'] = '<b>Webová adresa</b>:
zadejte úplnou webovou adresu, na níž bude Moodle dostupný. Jsou-li vaše stránky dostupné na více URL, vyberte z nich tu, kterou budou vaši studenti používat nejčastěji. Na konci adresy neuvádějte lomítko.
@@ -81,8 +121,10 @@ $string['downloadlanguagenotneeded'] = 'V instalaci lze nyní pokračovat v jazy
$string['downloadlanguagesub'] = 'Nyní máte možnost stáhnout si některý z jazykových balíčků Moodlu a pokračovat v tomto jazyce.<br /><br />Pokud si momentálně nemůžete nebo nechcete stáhnout jazykový balíček, bude instalační proces pokračovat v angličtině. Jazykové balíčky si budete moci stáhnout i později po ukončení instalace.';
$string['environmenterrortodo'] = 'Pro pokračování v instalaci této verze Moodlu je nutné nejdříve vyřešit problémy v programovém prostředí (chyby) serveru uvedené výše!';
$string['environmenthead'] = 'Kontrola programového prostředí...';
$string['environmentrecommendcustomcheck'] = 'Pokud tento test selhal, znamená to možné problémy';
$string['environmentrecommendinstall'] = 'doporučená komponenta';
$string['environmentrecommendversion'] = 'doporučena je verze $a->needed, nyní používáte verzi $a->current';
$string['environmentrequirecustomcheck'] = 'Tebto test musí projít';
$string['environmentrequireinstall'] = 'vyžadovaná komponenta';
$string['environmentrequireversion'] = 'vyžadována je verze $a->needed, nyní používáte verzi $a->current';
$string['environmentsub'] = 'Nyní se prověřuje, zda vybrané komponenty vašeho systému splňují požadavky instalace.';
@@ -119,27 +161,37 @@ $string['memorylimithelp'] = '<p>Limit paměti pro PHP skripty je na vašem serv
<p>To může později způsobovat Moodlu problémy, zvláště při větším množství modulů a/nebo uživatelů.</p>
<p>Je-li to možné, doporučujeme vám nastavit v PHP vyšší limit, např. 16M. Můžete to provést několika způsoby:
<p>Je-li to možné, doporučujeme vám nastavit v PHP vyšší limit, např. 40M. Můžete to provést několika způsoby:
<ol>
<li>Můžete-li, překompilujte PHP s volbou <i>--enable-memory-limit</i>.
Moodle si tak bude sám moci nastavit potřebný limit.</li>
<li>Máte-li přístup k souboru php.ini, změňte nastavení <b>memory_limit</b>
na hodnotu blízkou 16M. Nemáte-li taková práva, požádejte správce vašeho webového serveru, aby toto nastavení provedl on.</li>
na hodnotu blízkou 40M. Nemáte-li taková práva, požádejte správce vašeho webového serveru, aby toto nastavení provedl on.</li>
<li>Na některých serverech můžete v kořenovém adresáři Moodlu vytvořit soubor .htaccess s následujícím řádkem:
<p><blockquote>php_value memory_limit 16M</blockquote></p>
<p><blockquote>php_value memory_limit 40M</blockquote></p>
<p>Bohužel, v některých případech tím vyřadíte z provozu <b>všechny</b> PHP stránky (při jejich prohlížení uvidíte chybová hlášení), takže budete muset soubor .htaccess zase odstranit.</li>
</ol>';
$string['missingrequiredfield'] = 'Chybí některé z povinných polí';
$string['moodledocslink'] = 'Dokumentace k této stránce';
$string['mssql'] = 'SQL*Server (mssql)';
$string['mssql_n'] = 'SQL*Server s podporou UTF-8 (mssql_n)';
$string['mssqlextensionisnotpresentinphp'] = 'PHP nebylo korektně nakonfigurováno pro komunikaci s SQL*Server přes rozšíření MSSQL. Zkontrolujte váš php.ini nebo překompilujte PHP.';
$string['mysql'] = 'MySQL (mysql)';
$string['mysql416bypassed'] = 'Pokud ovšem ve vaší instalaci Moodlu používáte POUZE jazyky založené na latince (iso-8859-1), můžete nadále používat momentálně nainstalovanou verzi MySQL 4.1.12 (nebo vyšší).';
$string['mysql416required'] = 'Minimální verzí požadovanou pro Moodle 1.6 -- a pro pozdější bezpečný převod všech dat do UTF-8 -- je MySQL 4.1.16.';
$string['mysqlextensionisnotpresentinphp'] = 'PHP nebylo korektně nakonfigurováno pro komunikaci v MySQL. Zkontrolujte váš php.ini nebo překompilujte PHP.';
$string['mysqlextensionisnotpresentinphp'] = 'PHP nebylo korektně nakonfigurováno pro komunikaci s MySQL. Zkontrolujte váš php.ini nebo překompilujte PHP.';
$string['name'] = 'Název';
$string['next'] = 'Další';
$string['oci8po'] = 'Oracle (oci8po)';
$string['ociextensionisnotpresentinphp'] = 'PHP nebylo korektně nakonfigurováno pro komunikaci s Oracle přes rozšíření OCI8. Zkontrolujte váš php.ini nebo překompilujte PHP.';
$string['odbc_mssql'] = 'SQL*Server přes ODBC (odbc_mssql)';
$string['odbcextensionisnotpresentinphp'] = 'PHP nebylo korektně nakonfigurováno pro komunikaci s SQL*Server přes rozšíření ODBC. Zkontrolujte váš php.ini nebo překompilujte PHP.';
$string['ok'] = 'OK';
$string['opensslrecommended'] = 'Pro běh síťových funkcionalit (\"Moodle Networking\") je potřeba nainstalovat volitelnou knihovnu OpenSSL.';
$string['parentlanguage'] = '<< Překladatelé: Pokud Váš jazyk má \"nadřazený\" jazyk\", který má Moodle používat v případech, kdy řetězce ve vašem jazykovém balíčku chybí, specifikujte jeho kód zde. Příklad: nl >>';
$string['pass'] = 'V pořádku';
$string['password'] = 'Heslo';
$string['pgsqlextensionisnotpresentinphp'] = 'PHP nebylo korektně nakonfigurováno pro komunikaci s PostgreSQL přes rozšíření PGSQL. Zkontrolujte váš php.ini nebo překompilujte PHP.';
$string['php50restricted'] = 'V PHP 5.0.x bylo nalezeno množství chyb; přejděte buď na vyšší verzi 5.1.x, nebo na nižší verzi 4.3.x či 4.4.x.';
$string['phpversion'] = 'Verze PHP';
$string['phpversionerror'] = 'Verze PHP musí být alespoň 4.3.0 nebo 5.1.0 (PHP 5.0.x obsahuje množství chyb).';
@@ -147,17 +199,22 @@ $string['phpversionhelp'] = '<p>Moodle vyžaduje PHP alespoň verze 4.3.0 nebo 5
<p>Nyní používáte PHP verze $a.</p>
<p>Musíte PHP upgradovat, nebo přejít k hostiteli s vyšší verzí!<br />
(U PHP 5.0.x můžete také přejít na nižší verzi 4.4.x či 4.3.x.)</p>';
$string['postgres7'] = 'PostgreSQL (postgres7)';
$string['previous'] = 'Předchozí';
$string['qtyperqpwillberemoved'] = 'Během upgrade bude odstraněn typ testové úlohy RQP. Tento typ jste nepoužívali, takže byste neměli zaznamenta žádné problémy.';
$string['qtyperqpwillberemovedanyway'] = 'Během upgrade bude odstraněn typ testové úlohy RQP. Ve vaší databázi existuje několik takových úloh a ty nebudou fungovat, dokud nepřeinstalujete kód z http://moodle.org/mod/data/view.php?d=13&amp;rid=797 před pokračováním upgrade.';
$string['remotedownloadnotallowed'] = 'Stahování komponent na server není povoleno (direktiva allow_url_fopen je ve stavu \'vypnuto\').<br /><br />Musíte soubor stáhnout <a href=\"$a->url\">$a->url</a> ručně, zkopírovat jej na serveru do umístění \"$a->dest\" a tam jej dekomprimovat.';
$string['report'] = 'Protokol';
$string['report'] = 'Sestava';
$string['restricted'] = 'Nedostupné';
$string['safemode'] = 'Bezpečný režim (Safe Mode)';
$string['safemodeerror'] = 'Se zapnutým bezpečným režimem (Safe Mode) může mít Moodle problémy.';
$string['serverchecks'] = 'Kontroly serveru';
$string['sessionautostart'] = 'Session Auto Start';
$string['sessionautostarterror'] = 'Mělo by být vypnuto';
$string['skipdbencodingtest'] = 'Přeskočit test kódování DB';
$string['status'] = 'Stav';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Čeština';
$string['unicoderecommended'] = 'Doporučujeme ukládání dat v kódování Unicode (UTF-8). Nové instalace by měly být založeny nad databází s výchozím kódováním Unicode. Pokud přecházíte z nižších verzí, měli byste podstoupit proces migrace na UTF-8 (viz stránku Správa).';
$string['unicoderequired'] = 'Je nezbytné ukládání dat v kódování Unicode (UTF-8). Nové instalace musí být založeny nad databází s výchozím kódováním Unicode. Pokud přecházíte z nižších verzí, měli byste podstoupit proces migrace na UTF-8 (viz stránku Správa).';
+143 -19
View File
@@ -7,99 +7,223 @@
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
/// using strings defined in stringnames.txt (same dir)
$string['admindirerror'] = 'Det angivende admin biblioteket er forkert';
$string['admindirerror'] = 'Det angivne adminbibliotek er forkert';
$string['admindirname'] = 'Adminbibliotek';
$string['admindirsettinghead'] = 'Sætter admin-biblioteket...';
$string['admindirsettingsub'] = 'Nogle får webhoteller bruger /admin adresse til kontrolpanelet el.lign. Desværre konflikter dette med standardplaceringen af Moodles administrationssider. Du kan i tilfælde omdøbe admin-biblioteket i din installation og skrive navnet her. Eksempel:<br /> <br /><b>moodleadmin</b><br /> <br />
Dette vil sikre admin-links i Moodle.';
$string['bypassed'] = 'Forbigået';
$string['cannotcreatelangdir'] = 'Kan ikke oprette sprogmappe';
$string['cannotcreatetempdir'] = 'Kan ikke oprette temp-mappe';
$string['cannotdownloadcomponents'] = 'Kan ikke downloade komponenter';
$string['cannotdownloadzipfile'] = 'Kan ikke downloade zip-fil';
$string['cannotfindcomponent'] = 'Kan ikke finde komponent';
$string['cannotsavemd5file'] = 'Kan ikke gemme md5-fil';
$string['cannotsavezipfile'] = 'Kan ikke gemme zip-fil';
$string['cannotunzipfile'] = 'Kan ikke unzippe filen';
$string['caution'] = 'Pas på';
$string['check'] = 'Kontroller';
$string['chooselanguagehead'] = 'Vælg et sprog';
$string['chooselanguagesub'] = 'Vælg et sprog til brug under installationen. Senere vil du kunne vælge hvilke sprog Moodle skal kunne bruge.';
$string['closewindow'] = 'Luk dette vindue';
$string['configfilenotwritten'] = 'Installationsscriptet var ikke i stand til at oprette config.php filen der indeholder de valgte indstillinger, sandsynligvis fordi den bruger hvis apache(PHP) kører med (apache, nobody ell) ikke har rettigheder til at skrive til moodlebiblioteket. Du kan manuelt kopiere den følgende kode ind i en fil med navnet \"config.php\" i roden af moodle-biblioteket.';
$string['compatibilitysettingshead'] = 'Kontrollerer dine PHP-indstillinger...';
$string['compatibilitysettingssub'] = 'For at Moodle kan køre uden problemer skal din server \"bestå\" alle disse test.';
$string['componentisuptodate'] = 'Komponenten er up to date';
$string['configfilenotwritten'] = 'Installationsscriptet var ikke i stand til at oprette config.php-filen, der indeholder de valgte indstillinger, sandsynligvis fordi Moodlebiblioteket er skrivebeskyttet. Du kan manuelt kopiere den følgende kode ind i en fil med navnet \"config.php\" i roden af Moodle-biblioteket.';
$string['configfilewritten'] = 'config.php er blevet oprettet';
$string['configurationcompletehead'] = 'Konfigurationen er færdig.';
$string['configurationcompletesub'] = 'Moodle har forsøgt at gemme din konfiguration i en fil i roden af Moodle-installationen';
$string['continue'] = 'Fortsæt';
$string['database'] = 'Database';
$string['dataroot'] = 'DataBibliotek';
$string['datarooterror'] = 'DataBiblioteket du specificerede kan ikke findes eller oprettes. Ret stien til biblioteket eller opret det manuelt.';
$string['databasecreationsettingshead'] = 'Nu skal du konfigurere databaseindstillingerne for hvor de fleste Moodle-data skal gemmes. Denne database vil automatisk blive oprettet af installationsprogrammet med indstillingerne herunder.';
$string['databasecreationsettingssub'] = '<b>Type:</b> fikseret til \"mysql\" af installationsprogrammet<br />
<b>Host:</b> fikseret til \"localhost\" af installationsprogrammet<br />
<b>Name:</b> database-navn, f.eks. Moodle<br />
<b>User:</b> fikseret til \"root\" af installationsprogrammet<br />
<b>Password:</b> adgangskoden til din database<br />
<b>Tables Prefix:</b> valgfrit fornavn (prefix) til alle tabelnavne';
$string['databasesettingshead'] = 'Du skal nu konfigurere databasen hvor det meste af Moodle\'s data vil blive gemt. Databaseserveren skal allerede være oprettet og du skal bruge brugernavn og adgangskode til en brugerkonto der har adgang til den.';
$string['databasesettingssub'] = '<b>Type:</b> mysql eller postgres7<br />
<b>Vært:</b> f.eks. localhost eller db.isp.com<br />
<b>Database:</b> database-navn, f.eks. Moodle<br />
<b>Bruger:</b> Brugernavnet til databasen<br />
<b>Password:</b> Password til databasebrugeren<br />
<b>Tabel Præfix:</b> Valgfrit fornavn (prefix) der bliver sat foran alle tabelnavne (kan anbefales hvis der er flere systemer der skal bruge samme database).';
$string['databasesettingssub_mssql'] = '<b>Type:</b> SQL*Server (non UTF-8) <b><font color=\"red\">Experimentiel! (ikke til brug i et produktionsmiljø)</font></b><br />
<b>Vært:</b> f.eks. localhost eller db.isp.com<br />
<b>Navn:</b> databasenavn, f.eks. Moodle<br />
<b>Bruger:</b> brugernavnet til din database<br />
<b>Password:</b> din databases adgangskode<br />
<b>Tabelprefix:</b> prefix for alle tabelnavne (mandatory)';
$string['databasesettingssub_mssql_n'] = '<b>Type:</b> SQL*Server (non UTF-8 aktiveret) <b><font color=\"red\">Experimentiel! (ikke til brug i et produktionsmiljø)</font></b><br />
<b>Vært:</b> f.eks. localhost eller db.isp.com<br />
<b>Navn:</b> databasenavn, f.eks. Moodle<br />
<b>Bruger:</b> brugernavnet til din database<br />
<b>Password:</b> din databases adgangskode<br />
<b>Tabelprefix:</b> prefix for alle tabelnavne (mandatory)';
$string['databasesettingssub_mysql'] = '<b>Type:</b> MySQL<br />
<b>Vært:</b> f.eks. localhost eller db.isp.com<br />
<b>Navn:</b> databasenavn, f.eks. Moodle<br />
<b>Bruger:</b> brugernavnet til din database<br />
<b>Password:</b> din databases adgangskode<br />
<b>Tabelprefix:</b> prefix for alle tabelnavne (mandatory)';
$string['databasesettingssub_oci8po'] = '<b>Type:</b> Oracle<br />
<b>Vært:</b> ikke brugt, skal være blank<br />
<b>Navn:</b> navnet forbindelsen fra tnsnames.ora <br />
<b>Bruger:</b> dit database brugernavn<br />
<b>Password:</b> brugerens password<br />
<b>Tabel Præfix:</b> præfix til alle tabellerne (nødvendigt,højst 2 karaktere)';
$string['databasesettingssub_odbc_mssql'] = '<b>Type:</b> SQL*Server (over ODBC) <b><font color=\"red\">Eksperimentielt! (ikke beregnet til brug i produktionsmiljø)</font></b><br />
<b>Vært:</b> navnet DSN forbindelsen i ODBC kontrolpanelet<br />
<b>Navn:</b> databasenavnet , f.eks. moodle<br />
<b>Bruger:</b> dit databasebrugernavn<br />
<b>Password:</b> dit database password<br />
<b>Tabel Præfix:</b> præfix der bruges til alle tabelnavnene (nødvendigt)';
$string['databasesettingssub_postgres7'] = '<b>Type:</b> PostgreSQL<br />
<b>Vært:</b> f.eks. localhost eller db.isp.com<br />
<b>Navn:</b> databasenavn, f.eks. moodle<br />
<b>Bruger:</b> dit databasebrugernavn<br />
<b>Password:</b> dit database password<br />
<b>Tables Præfix:</b> præfix der bruges foran alle tabelnavnene (nødvendigt)';
$string['dataroot'] = 'Databibliotek';
$string['datarooterror'] = 'Data-biblioteket du specificerede kan ikke findes eller oprettes. Ret stien til biblioteket eller opret det manuelt.';
$string['dbconnectionerror'] = 'Den angive database kunne ikke kontaktes. Kontroller eller ret venligst databaseinformationerne.';
$string['dbcreationerror'] = 'Fejl ved oprettelse af databasen. Kan ikke oprette den givne database med de angivne indstillinger.';
$string['dbhost'] = 'Værts Server';
$string['dbprefix'] = 'præfix for tabeller';
$string['dbhost'] = 'Værtsserver';
$string['dbprefix'] = 'Præfix for tabeller';
$string['dbtype'] = 'Type';
$string['dirroot'] = 'Moodle bibliotek';
$string['dirrooterror'] = 'Det angivne moodle-bibliotek lader ikke til at være rigtigt - der kan ikke findes en Moodle-installation. Den nedenstående værdi er blevet fjernet.';
$string['dbwrongencoding'] = 'Den valgte database kører under en ikke anbefalet encoding ($a). Det vil være bedre at benytte en Unicode (UTF-8) encoded database i stedet.
Du kan alligevel springe denne test over ved at vælge \"Skip DB Encoding Test\" tjek herunder, men det kan give problemer fremover.';
$string['dbwronghostserver'] = 'Du skal følge \"Værtsreglerne\" som forklaret ovenfor.';
$string['dbwrongnlslang'] = 'Environment variablen NLS_LANG på din webserver skal bruge AL32UTF8 tegnsættet. Se PHP documentationen for hvordan man konfigurere OCI8 korrekt.';
$string['dbwrongprefix'] = 'Du skal følge Tabel-prefix-reglerne som forklaret ovenfor.';
$string['directorysettingshead'] = 'Bekræft hvor Moodle skal installeres';
$string['directorysettingssub'] = '<b>Web-adresse:</b>
Angiv den fulde adresse til Moodle. Hvis der skal være adgang til siden fra flere URL\'er vælg den naturligste, den deltagerne vil bruge. Adressen ikke slutte med en skråstreg (slash).
<br />
<br />
<b>Moodle-bibliotek:</b>
Angiv den fulde sti til installationen. Vær påpasselig med små og store bogstaver, adressen er casesensitiv.
<br />
<br />
<b>Data-bibliotek:</b>
Det sted, hvor Moodle placerer uploadede filer. Dette bibliotek skal være læse- OG SKRIVBART for web-server-brugeren (typisk \'nobody\' eller \'apache\'), men der må ikke være direkte adgang fra internettet.';
$string['dirroot'] = 'Moodle-bibliotek';
$string['dirrooterror'] = 'Det angivne Moodle-bibliotek lader ikke til at være rigtigt - der kan ikke findes en Moodle-installation. Den nedenstående værdi er blevet fjernet.';
$string['download'] = 'Download';
$string['downloadedfilecheckfailed'] = '\"Downloadet fil-tjek fejlede';
$string['downloadlanguagebutton'] = 'Download \"$a\"-sprogpakken';
$string['downloadlanguagehead'] = 'Download sprogpakke';
$string['downloadlanguagenotneeded'] = 'Du kan fortsætte installationen med standard-sprogpakken,\"$a\".';
$string['downloadlanguagesub'] = 'Du har nu mulighed for at downloade en sprogpakke og fortsætte installationsprocessen i dette sprog.<br /><br />
Kan du ikke downloade sprogpakken vil installationen fortsætte engelsk.
(Når installationsprocessen er færdig kan du downloade og installere flere sprogpakker.)';
$string['environmenterrortodo'] = 'Du bliver nødt til at løse de ovenstående problemer (fejl) der er ved serveropsætningen før du kan installere denne version af Moodle';
$string['environmenthead'] = 'Kontrollere din serveropsætning...';
$string['environmentrecommendinstall'] = 'det anbefales installeret/aktiveret';
$string['environmentrecommendversion'] = 'version $a->needed er anbefalet og du kører $a->current';
$string['environmentrequireinstall'] = 'det er nødvendigt at installere/aktivere';
$string['environmentrequireversion'] = 'version $a->needed er nødvendigt og du kører $a->current';
$string['environmentsub'] = 'Vi tjekker om de forskellige komponenter i dit system lever op til de Moodles krav.';
$string['environmentxmlerror'] = 'Fejl ved læsning af serveropsætningens data ($a->error_code)';
$string['error'] = 'Fejl';
$string['fail'] = 'Mislykkedes';
$string['fileuploads'] = 'Fil uploads';
$string['fileuploadserror'] = 'Denne skulle være aktiveret';
$string['gdversion'] = 'GD version';
$string['gdversionerror'] = 'GD library skal være tilgængelig for PHP for at der kan billeder kan manipuleres og oprettes.';
$string['gdversionerror'] = 'GD library skal være tilgængelig for PHP for at der billeder kan manipuleres og oprettes.';
$string['gdversionhelp'] = '<p>Det lader til at din server ikke har GD installeret.</p>
<p>GD er et library som PHP bruger til at behandle billeder (såsom brugerprofil-billeder) og til at oprette nye billeder såsom loggrafer. Moodle kan stadig fungere uden GD - men disse funktioner vil ikke være til rådighed.</p>
<p>GD er et bibliotek som PHP bruger til at behandle billeder (såsom brugerprofil-billeder) og til at oprette nye billeder såsom loggrafer. Moodle kan stadig fungere uden GD - men disse funktioner vil ikke være til rådighed.</p>
<p>For at tilføje GD unix skal PHP kompileres med \'--with-gd\" parameteret.</p>
<p>Under windows er det normalt nok at udkommentere den linje i php.ini der referere til libgd.dll </p>';
<p>Under windows er det normalt nok at udkommentere den linje i php.ini der refererer til libgd.dll </p>';
$string['globalsquotes'] = 'Usikker håndtering af Globale variabler';
$string['globalsquoteserror'] = 'Fix dine PHP-indstillinger: aktiver register_globals and/or slå magic_quotes_gpc til';
$string['help'] = 'Hjælp';
$string['iconvrecommended'] = 'Det anbefales at installere/aktivere ICONV udvidelsen for at forbedre sitets hastighed, især hvis dit site understøtter sprog med ikke-latinske tegn.';
$string['info'] = 'Information';
$string['installation'] = 'Installation';
$string['invalidmd5'] = 'Ugyldig md5';
$string['langdownloaderror'] = 'Sproget \"$a\" blev desværre ikke installeret. Installationen vil fortsætte på engelsk.';
$string['langdownloadok'] = 'Sproget \"$a\" blev installeret. Installationen vil fortsætte på dette sprog.';
$string['language'] = 'Sprog';
$string['magicquotesruntime'] = 'Magic Quotes Run Time';
$string['magicquotesruntimeerror'] = 'Denne skulle være deaktiveret';
$string['mbstringrecommended'] = 'Det anbefales at installere/aktivere MBSTRING udvidelsen for at forbedre sitets ydeevne, især hvis sitet understøtter ikke-latinske sprog og tegn.';
$string['memorylimit'] = 'Hukommelses begrænsning';
$string['memorylimit'] = 'Hukommelsesbegrænsning';
$string['memorylimiterror'] = 'Den tilgængelige hukommelse til PHP er ret lav... Det kan være at der opstår problemer senere.';
$string['memorylimithelp'] = '<p>Mængden af hukommelse som PHP kan bruge er sat til $a.</p>
<p>Dette kan forårsage at der opstår problemer senere, især hvis du har mange moduler installeret eller mange brugere.</p>
<p>Vi anbefaler at du konfigurere PHP til at kunne bruge mere hukommelse, f.eks. 16Mb.
<p>Vi anbefaler at du konfigurerer PHP til at kunne bruge mere hukommelse, f.eks. 16Mb.
Der er flere måder hvorpå du kan rette det.</p>
<ol>
<li>Hvis du har mulighed for det kan du rekompilere PHP med <i>--enable-memory-limit</i>.
Dette vil tillade at Moodle selv kan definere hvor meget hukommelse der er brug for.</li>
<li>Hvis du har adgang til php.ini filen kan du ændre <b>memory_limit</b>
<li>Hvis du har adgang til php.ini filen kan du ændre <b>memory_limit</b>-
indstillingen der er minimum 16Mb til rådighed. Hvis du ikke har direkte adgang til den kan du spørge systemadministratoren om han han vil gøre det for dig.</li>
<li> nogle servere kan du oprette en \'.htaccess\' fil, gemme den i moodle biblioteket med linjen <p><blockquote>php_value memory_limit 16M</blockquote></p>
<p>Det kan dog nogle servere forårsage en fejl <b>alle</b> PHPsiderne. i fald kan du blive nødt til at fjerne \'.htaccess\' filen igen.</p></li>
<li> nogle servere kan du oprette en \'.htaccess\' fil, gemme den i Moodle-biblioteket med linjen <p><blockquote>php_value memory_limit 16M</blockquote></p>
<p>Det kan dog nogle servere forårsage en fejl <b>alle</b> PHP-siderne. I fald kan du blive nødt til at fjerne \'.htaccess\' filen igen.</p></li>
</ol>';
$string['missingrequiredfield'] = 'Der mangler nogle obligatoriske felter';
$string['moodledocslink'] = 'Moodle Doks for denne side';
$string['mssql'] = 'SQL*Server (mssql)';
$string['mssql_n'] = 'SQL*Server med UTF-8 support (mssql_n)';
$string['mssqlextensionisnotpresentinphp'] = 'PHP er ikke konfigureret ordentligt med MSSQL-extensionen så den kan kommunikere med SQL*Serveren. Vær venlig at tjekke din php.ini-fil eller genkompiler PHP.';
$string['mysql'] = 'MySQL (mysql)';
$string['mysql416bypassed'] = 'Hvis sitet kun benytter iso-8859-1 (latin-1) sprog/tegnsæt, kan du fortsætte med at benytte den nuværende version 4.1.12 af MySQL (eller nyere)';
$string['mysql416required'] = 'Moodle 1.6 skal som minimum bruge MySql version 4.1.16 for at garantere at data kan konverteres til UTF-8 fremover.';
$string['mysqlextensionisnotpresentinphp'] = 'PHP er ikke blevet ordentligt konfigureret med MySQL udvidelsen så den kan kommunikere med MySQL. Det kan skyldes at MySQL extension/dll ikke er loadet. Kontroller venlist phpinfo() og php.ini filen eller rekompiler PHP.';
$string['name'] = 'Navn';
$string['next'] = 'Næste';
$string['oci8po'] = 'Oracle (oci8po)';
$string['ociextensionisnotpresentinphp'] = 'PHP er ikke konfigureret ordentligt med OCI8-extensionen så den kan kommunikere med Oracle. Vær venlig at tjekke din php.ini-fil eller genkompiler PHP.';
$string['odbc_mssql'] = 'SQL*Server over ODBC (odbc_mssql)';
$string['odbcextensionisnotpresentinphp'] = 'PHP er ikke blevet korrekt konfigureret med PHP\'s ODBC modul så den kan kommunikere med SQL*Serveren. Kontroller venligst php.ini filen eller rekompiler PHP.';
$string['ok'] = 'OK';
$string['pass'] = 'OK';
$string['password'] = 'Adgangskode';
$string['pgsqlextensionisnotpresentinphp'] = 'PHP er ikke blevet korrekt konfigureret med PHP\'s PGSQL modul så den kan kommunikere med PostgreSQL. Kontroller venligst php.ini filen eller rekompiler PHP.';
$string['php50restricted'] = 'PHP 5.0.x har nogle kendte fejl og problemer. Opgrader venligst til 5.1.x eller nedgradér til 4.3.x eller 4.4.x';
$string['phpversion'] = 'PHP version';
$string['phpversionerror'] = 'PHP versionen skal være nyere end 4.1.0';
$string['phpversionhelp'] = '<p>Moodle kræver en PHP version der er nyere end 4.1.0.</p>
<p>Webserveren bruger i øjeblikket version $a</p>
<p>Du bliver nødt til at opdatere PHP eller flytte systemet over en anden webserver der har en nyere version af PHP!</p>';
$string['postgres7'] = 'PostgreSQL (postgres7)';
$string['previous'] = 'Forrige';
$string['remotedownloadnotallowed'] = 'Download af komponenter til din server er ikke tilladt (\"allow_url_fopen\" er deaktiveret).<br /><br />Du må downloade
<a href=\"$a->url\">$a->url</a>-filen manuelt, kopiere den til \"$a->dest\" til din server og unzippe den der.';
$string['report'] = 'Rapport';
$string['restricted'] = 'Afvist';
$string['safemode'] = 'Safe mode';
$string['safemodeerror'] = 'Moodle kan have problemer med \"Safe mode : on\"';
$string['sessionautostart'] = 'Session autostart';
$string['sessionautostarterror'] = 'Denne skulle være deaktiveret';
$string['skipdbencodingtest'] = 'Spring DB tegnsæts testen over';
$string['status'] = 'Status';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Dansk';
$string['unicoderecommended'] = 'Alle data skal helst gemmes i Unicode (UTF-8). Nye installationer skal helst installeres i databaser der har UTF-8 som standard karaktersæt. Hvis du opgradere fra en tidligere installation bør du migrere eksisterende data til UTF-8 (se Admin siderne)';
$string['unicoderequired'] = 'Alle data skal gemmes i Unicode (UTF-8). Nye installationer skal helst installeres i databaser der har UTF-8 som standard karaktersæt. Hvis du opgradere fra en tidligere installation bør du migrere eksisterende data til UTF-8 (se Admin siderne)';
$string['user'] = 'Bruger';
$string['wwwroot'] = 'Web adresse';
$string['wwwrooterror'] = 'Webadressen lader ikke til at være korrekt - Moodleinstallationen kunne ikke findes der.';
$string['welcomep10'] = '$a->installername ($a->installerversion)';
$string['welcomep20'] = 'Du ser denne side fordi du med succes har installeret og åbnet pakken <strong>$a->packname $a->packversion</strong> din computer.
Tillykke med det!';
$string['welcomep30'] = 'Denne udgave af <strong>$a->installername</strong> inkluderer programmerne til at oprette et miljø hvori <strong>Moodle</strong> vil operaere, nemlig:';
$string['welcomep40'] = 'Pakken indeholder også <strong>Moodle $a->moodlerelease ($a->moodleversion)</strong>.';
$string['welcomep50'] = 'Brugen af programmerne i denne pakke er styret af deres respektive licenser. Hele <strong>$a->installername</strong>-pakken er <a href=\"http://www.opensource.org/docs/definition_plain.html\">open source</a> og distribueret under <a href=\"http://www.gnu.org/copyleft/gpl.html\">GPL</a>-licensen.';
$string['welcomep60'] = 'De følgende sider vil hjælpe dig gennem nogle nemme trin til konfiguration og opsætning af <strong>Moodle</strong> på din computer. Du kan acceptere standardindstillingerne eller vælge at ændre dem så de bedre svarer til dine egne behov.';
$string['welcomep70'] = 'Klik på \"Næste\" herunder for at forsætte opsætningen af <strong>Moodle</strong>.';
$string['wrongdestpath'] = 'Forkert destinations sti';
$string['wrongsourcebase'] = 'Forkert kilde URL';
$string['wrongzipfilename'] = 'Forkert zip-filnavn.';
$string['wwwroot'] = 'Web-adresse';
$string['wwwrooterror'] = 'Webadressen lader ikke til at være korrekt - Moodle-installationen kunne ikke findes der.';
?>
+5 -4
View File
@@ -7,7 +7,7 @@
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
/// using strings defined in stringnames.txt (same dir)
$string['admindirsettingsub'] = 'Einige wenige Webhosting-Anbieter benutzen /admin als spezielles Verzeichnis für den Zugang zum Administrationstool oder andere Dinge. Leider kommt es dadurch zu Konflikten mit dem Standard für das Administrationsverzeichnis von Moodle. Du kannst dies ändern, indem du das Verzeichnis /admin in der Moodle-Installation umbenennst. Den geänderten Namen dieses Verzeichnisses musst du hier eingeben.
z.B.: <br /> <br /><b>moodleadmin</b><br />
@@ -94,11 +94,11 @@ $string['iconvrecommended'] = 'Die Installation der ICONV Bibliothek wird zur Le
$string['mbstringrecommended'] = 'Die Installation der Bibliothek MBSTRING wird zur Leistungsverbesserung dringend empfohlen. Dies ist besonders wichtig, wenn du Sprachen mit anderen als lateinischen Zeichensätzen verwendest.';
$string['memorylimithelp'] = '<p>Die PHP-Einstellung memory_limit für deinen Server ist zur Zeit auf $a eingestellt. </p>
<p>Dies wird vermutlich zu Problemen führen, wenn du Moodle mit vielen Aktivitäten oder vielen Nutzer/innen verwendst. </p>
<p>Wir empfehlen die Einstellung zu erhöhen. Empfohlen werden 16M oder mehr. Dies kannst du auf verschiedene Arten machen:</p>
<p>Wir empfehlen die Einstellung zu erhöhen. Empfohlen werden 40M oder mehr. Dies kannst du auf verschiedene Arten machen:</p>
<ol>
<li>Wenn du PHP neu kompilieren kannst, nimm die Einstellung <i>--enable-memory-limit</i>. Dann kann Moodle die Einstellung selber vornehmen.
<li>Wenn du Zugriff auf die Datei php.ini hast, kannst du die Einstellung <b>memory_limit</b> selber auf z.B. 16M anpassen. Wenn du selber keinen Zugriff hast, fragst du den Server-Admin, dies für dich zu tun.
<li>Auf einigen PHP-Servern kannst du eine .htaccess-Datei im Moodle-Verzeichnis einrichten. Trage darin die folgende Zeile ein: <p><blockquote>php_value memory_limit 16M</blockquote></p>
<li>Wenn du Zugriff auf die Datei php.ini hast, kannst du die Einstellung <b>memory_limit</b> selber auf z.B. 40M anpassen. Wenn du selber keinen Zugriff hast, fragst du den Server-Admin, dies für dich zu tun.
<li>Auf einigen PHP-Servern kannst du eine .htaccess-Datei im Moodle-Verzeichnis einrichten. Trage darin die folgende Zeile ein: <p><blockquote>php_value memory_limit 40M</blockquote></p>
<p>Achtung: auf einigen Servern hindert diese Einstellung <b>alle</b> PHP-Seiten und du erhältst Fehlermeldungen. Entferne dann den Eintrag in der .htaccess-Datei wieder.</p></li>
</ol>';
$string['mssqlextensionisnotpresentinphp'] = 'PHP wurde nicht richtig konfiguriert, um über die MSSQL-Erweiterung mit SQL*Server zu kommunizieren. Bitte prüfe die Datei php.ini oder kompiliere PHP neu.';
@@ -115,6 +115,7 @@ $string['phpversionhelp'] = '<p>Moodle erwartet PHP mindestens in der Version 4.
(Im Falle von 5.0.x könntest du auch zu einer Version 4.3.x/4.4.x downgraden)</p>';
$string['remotedownloadnotallowed'] = 'Der Download von Komponenten auf deinen Server ist nicht erlaubt (allow_url_fopen ist deaktiviert). <br /><br /> Die Datei <a href=\"$a->url\">$a->url</a> muss manuell heruntergeladen werden. Kopiere die Datei nach \"$a->dest\" auf deinen Server und entpacke sie dort.';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Deutsch - Du';
$string['unicoderecommended'] = 'Es wird empfohlen, alle Daten im Format Unicode UTF8 zu speichern. Neuinstallationen sollten mit Datenbanken vorgenommen werden, die als Standardzeichensatz UTF8 benutzen. Wenn du ein Upgrade durchführst, solltest du die UTF8-Migration starten (Admin-Seite).';
$string['unicoderequired'] = 'Es ist notwendig, alle Daten im Format Unicode UTF8 zu speichern. Neuinstallationen müssen mit Datenbanken vorgenommen werden, die als Standardzeichensatz UTF8 benutzen. Wenn du ein Upgrade durchführst, solltest du die UTF8-Migration starten (Admin-Seite).';
+24 -7
View File
@@ -7,7 +7,7 @@
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
/// using strings defined in stringnames.txt (same dir)
$string['admindirerror'] = 'Das angegebene Admin-Verzeichnis ist falsch.';
$string['admindirname'] = 'Name für das Admin-Verzeichnis';
@@ -16,8 +16,8 @@ $string['admindirsettingsub'] = 'Einige wenige Webhosting-Anbieter benutzen /adm
z.B.: <br /> <br /><b>moodleadmin</b><br />
Dies ändert die Links für das Admin-Verzeichnis in Moodle.';
$string['bypassed'] = 'Unberücksichtigt';
$string['cannotcreatelangdir'] = 'Das Verzeichnis \"lang\" kann nicht angelegt werden.';
$string['cannotcreatetempdir'] = 'Das temporäre Verzeichnis kann nicht angelegt werden.';
$string['cannotcreatelangdir'] = 'Verzeichnis \"lang\" kann nicht angelegt werden.';
$string['cannotcreatetempdir'] = 'Temporäres Verzeichnis kann nicht angelegt werden.';
$string['cannotdownloadcomponents'] = 'Komponenten können nicht heruntergeladen werden.';
$string['cannotdownloadzipfile'] = 'ZIP-Datei kann nicht heruntergeladen werden.';
$string['cannotfindcomponent'] = 'Komponente wurde nicht gefunden.';
@@ -37,6 +37,8 @@ $string['configfilewritten'] = 'Die Datei config.php wurde erfolgreich erstellt'
$string['configurationcompletehead'] = 'Die Konfiguration ist abgeschlossen.';
$string['configurationcompletesub'] = 'Moodle speichert Ihre Konfigurationseinstellungen nun im Hauptverzeichnis Ihrer Moodle-Installation.';
$string['continue'] = 'Weiter';
$string['curlrecommended'] = 'Die Installation der optionalen Bibliothek Curl wird empfohlen, um die Moodle-Netzwerk-Funktionalität einzuschalten.';
$string['customcheck'] = 'Weitere Überprüfungen';
$string['database'] = 'Datenbank';
$string['databasecreationsettingshead'] = 'Sie müssen Einstellungen für die Datenbank konfigurieren, in der die meisten Moodle-Daten abgelegt werden. Der Installationsprozess erstellt die Datenbanktabellen automatisch auf der Grundlage der Einstellungen.';
$string['databasecreationsettingssub'] = '<b>Typ:</b> \"mysql\" vom Installer festgelegt<br />
@@ -70,6 +72,12 @@ $string['databasesettingssub_mysql'] = '<b>Typ:</b> MySQL<br />
<b>User:</b> Ihr Anmeldename für die Datenbank<br />
<b>Password:</b> Ihr Passwort für die Datenbank<br />
<b>Tabellen-Prefix:</b> Prefix für alle Tabellen (optional)';
$string['databasesettingssub_mysqli'] = '<b>Typ:</b> Improved MySQL<br />
<b>Host:</b> z.B. localhost oder db.domain.com<br />
<b>Name:</b> Datenbank-Name, z.B moodle<br />
<b>User:</b> Ihr Datenbank-Anmeldename<br />
<b>Passwort:</b> Ihr Datenbank-Passwort<br />
<b>Tabellen-Prefix:</b> Prefix für alle Tabellen (optional)';
$string['databasesettingssub_oci8po'] = '<b>Typ:</b> Oracle<br />
<b>Host:</b> unbenutzt - muss leer bleiben!<br />
<b>Name:</b> vorgegebener Verbindungname zu tnsnames.ora<br />
@@ -113,15 +121,17 @@ web-user des Servers haben. (üblicherweise \'nobody\' or \'apache\'), aber es s
$string['dirroot'] = 'Moodle-Verzeichnis';
$string['dirrooterror'] = 'Die Einstellungen für das Moodle-Verzeichnis sind nicht korrekt. Es wurde keine Moodle-Installation gefunden. Die anderen Werte wurden gelöscht.';
$string['download'] = 'Herunterladen';
$string['downloadedfilecheckfailed'] = 'Die Prüfung der heruntergeladenen Datei ist gescheitert';
$string['downloadedfilecheckfailed'] = 'Prüfung der heruntergeladenen Datei ist gescheitert';
$string['downloadlanguagebutton'] = 'Download des Sprachpakets: $a';
$string['downloadlanguagehead'] = 'Download der Sprachpakete';
$string['downloadlanguagenotneeded'] = 'Sie können die Installation mit dem Sprachpaket \"$a\" fortsetzen.';
$string['downloadlanguagesub'] = 'Sie haben nun die Möglichkeit, ein Sprachpaket herunterzuladen und den Installationsprozess mit dieser Sprache fortzusetzen. <br /><br /> Falls sie keinen Download durchführen können, wird die Installation auf Englisch fortgeführt. (Wenn die Installation abgeschlossen ist, haben Sie die Option weitere Sprachpakete herunterzuladen.)';
$string['environmenterrortodo'] = 'Sie müssen zunächst alle Probleme mit der Server-Konfiguration beheben, bevor Sie mit der Installation dieser Moodle-Version fortfahren können.';
$string['environmenthead'] = 'Prüfung der Installationsvoraussetzungen';
$string['environmentrecommendcustomcheck'] = 'Wenn dieser Test fehlschlägt, dann ist ein mögliches Problem vorhanden.';
$string['environmentrecommendinstall'] = 'sollte installiert und aktiviert sein.';
$string['environmentrecommendversion'] = 'Version $a->needed wird empfohlen - aktuell ist $a->current installiert.';
$string['environmentrequirecustomcheck'] = 'Dieser Test muss erfolgreich verlaufen.';
$string['environmentrequireinstall'] = 'muss installiert und aktiviert sein.';
$string['environmentrequireversion'] = 'Version $a->needed ist erforderlich - aktuell ist $a->current installiert.';
$string['environmentsub'] = 'Es wird geprüft, ob die verschiedenen Komponenten Ihres Systems die Installationsanforderungen erfüllen.';
@@ -153,11 +163,11 @@ $string['memorylimit'] = 'Memory Limit';
$string['memorylimiterror'] = 'Die PHP-Speichereinstellung memory_limit ist zu niedrig. Dies könnte später zu Problemen führen.';
$string['memorylimithelp'] = '<p>Die PHP-Einstellung memory_limit für Ihren Server ist zur Zeit auf $a eingestellt. </p>
<p>Dies wird vermutlich zu Problemen führen, wenn Sie Moodle mit vielen Aktivitäten oder vielen Nutzer/innen verwenden. </p>
<p>Wir empfehlen die Einstellung zu erhöhen. Empfohlen werden 16M oder mehr. Dies können Sie auf verschiedene Arten machen:</p>
<p>Wir empfehlen die Einstellung zu erhöhen. Empfohlen werden 40M oder mehr. Dies können Sie auf verschiedene Arten machen:</p>
<ol>
<li>Wenn Sie PHP neu kompilieren können, nehmen Sie die Einstellung <i>--enable-memory-limit</i>. Dann kann Moodle die Einstellung selber vornehmen.
<li>Wenn Sie Zugriff auf die Datei php.ini haben, können Sie die Einstellung <b>memory_limit</b> selber auf z.B. 16M anpassen. Wenn Sie selber keinen Zugriff haben, fragen Sie den Server-Admin, dies für Sie zu tun.
<li>Auf einigen PHP-Servern können Sie eine .htaccess-Datei im Moodle-Verzeichnis einrichten. Tragen Sie darin die folgende Zeile ein: <p><blockquote>php_value memory_limit 16M</blockquote></p>
<li>Wenn Sie Zugriff auf die Datei php.ini haben, können Sie die Einstellung <b>memory_limit</b> selber auf z.B. 40M anpassen. Wenn Sie selber keinen Zugriff haben, fragen Sie den Server-Admin, dies für Sie zu tun.
<li>Auf einigen PHP-Servern können Sie eine .htaccess-Datei im Moodle-Verzeichnis einrichten. Tragen Sie darin die folgende Zeile ein: <p><blockquote>php_value memory_limit 40M</blockquote></p>
<p>Achtung: auf einigen Servern hindert diese Einstellung <b>alle</b> PHP-Seiten und Sie erhalten Fehlermeldungen. Entfernen Sie dann den Eintrag in der .htaccess-Datei wieder.</p></li>
</ol>';
$string['missingrequiredfield'] = 'Einige erforderliche Felder sind nicht ausgefüllt.';
@@ -169,6 +179,8 @@ $string['mysql'] = 'MySQL (mysql)';
$string['mysql416bypassed'] = 'Wenn Sie in Ihrer Website ausschließlich ISO-8859-1 (lateinische) Sprachen verwenden, können Sie eine MySQL-Version ab 4.1.12 (oder höher) verwenden.';
$string['mysql416required'] = 'MySQL 4.1.16 (oder höher) ist für Moodle 1.6 unbedingt erforderlich, um eine Datenkonvertierung nach UTF-8 sicherzustellen.';
$string['mysqlextensionisnotpresentinphp'] = 'PHP wurde nicht richtig konfiguriert, um über die MySQL-Erweiterung mit MySQL zu kommunizieren. Bitte prüfen Sie die Datei php.ini oder kompilieren Sie PHP neu.';
$string['mysqli'] = 'Improved MySQL (mysqli)';
$string['mysqliextensionisnotpresentinphp'] = 'PHP wurde nicht ordnungsgemäß für die MySQLi-Erweiterung konfiguriert, um mit MySQL zu kommunizieren. Bitte überprüfen Sie die Datei php.ini oder übersetzen Sie PHP neu. Die MySQLi-Erweiterung ist nicht für PHP4 verfügbar.';
$string['name'] = 'Name';
$string['next'] = 'Nächste';
$string['oci8po'] = 'Oracle (oci8po)';
@@ -176,6 +188,7 @@ $string['ociextensionisnotpresentinphp'] = 'PHP wurde nicht richtig konfiguriert
$string['odbc_mssql'] = 'SQL*Server über ODBC (odbc_mssql)';
$string['odbcextensionisnotpresentinphp'] = 'PHP wurde nicht richtig konfiguriert, um über die ODBC-Erweiterung mit SQL*Server zu kommunizieren. Bitte prüfen Sie die Datei php.ini oder kompilieren Sie PHP neu.';
$string['ok'] = 'OK';
$string['opensslrecommended'] = 'Die optionale Installation der OpenSSL Bibliothek wird dringend empfohlen. Dadurch wird die Moodle-Netzwerk-Funktionalität ermöglicht.';
$string['parentlanguage'] = 'en_utf8';
$string['pass'] = 'Durchgang';
$string['password'] = 'Kennwort';
@@ -189,16 +202,20 @@ $string['phpversionhelp'] = '<p>Moodle erwartet PHP mindestens in der Version 4.
(Im Falle von 5.0.x könnten Sie auch zu einer Version 4.3.x/4.4.x downgraden)</p>';
$string['postgres7'] = 'PostgreSQL (postgres7)';
$string['previous'] = 'Frühere';
$string['qtyperqpwillberemoved'] = 'Während des Updates wird der Fragentyp RQP entfernt. Da Sie diesen Fragentyp nicht benutzen, sollten Sie keinerlei Probleme bekommen.';
$string['qtyperqpwillberemovedanyway'] = 'Während des Updates wird der Fragentyp RQP entfernt. Sie haben einige RQP Fragen in Ihrer Datenbank, die nicht mehr funktionieren werden, falls Sie nicht den dafür notwendigen Code vor der Fortsetzung dieses Updates installieren. http://moodle.org/mod/data/view.php?d=13&amp;rid=797';
$string['remotedownloadnotallowed'] = 'Der Download von Komponenten auf Ihren Server ist nicht erlaubt (allow_url_fopen ist deaktiviert). <br /><br /> Die Datei <a href=\"$a->url\">$a->url</a> muss manuell heruntergeladen werden. Kopieren Sie die Datei nach \"$a->dest\" auf Ihren Server und entpacken Sie sie dort.';
$string['report'] = 'Bericht';
$string['restricted'] = 'Eingeschränkt';
$string['safemode'] = 'Safe Mode';
$string['safemodeerror'] = 'Die Nutzung von Moodle im Safe Mode kann zu Schwierigkeiten führen.';
$string['serverchecks'] = 'Server-Überprüfung';
$string['sessionautostart'] = 'Session Auto Start';
$string['sessionautostarterror'] = 'Diese Option sollte abgeschaltet sein';
$string['skipdbencodingtest'] = 'Prüfung der Datenbank-Verschlüsselung überspringen';
$string['status'] = 'Status';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Deutsch';
$string['unicoderecommended'] = 'Es wird empfohlen, alle Daten im Format Unicode UTF-8 zu speichern. Neuinstallationen sollten mit Datenbanken vorgenommen werden, die als Standardzeichensatz UTF-8 benutzen. Wenn Sie ein Upgrade durchführen, sollten Sie die UTF-8-Migration starten (Admin-Seite).';
$string['unicoderequired'] = 'Es ist notwendig, alle Daten im Format Unicode UTF-8 zu speichern. Neuinstallationen müssen mit Datenbanken vorgenommen werden, die als Standardzeichensatz UTF-8 benutzen. Wenn Sie ein Upgrade durchführen, sollten Sie die UTF-8-Migration starten (Admin-Seite).';
+11 -2
View File
@@ -7,19 +7,28 @@
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
/// using strings defined in stringnames.txt (same dir)
$string['check'] = 'Επιλογή';
$string['closewindow'] = 'Κλείστε αυτό το παράθυρο';
$string['continue'] = 'Συνέχεια';
$string['download'] = 'Κατέβασμα';
$string['error'] = 'Σφάλμα';
$string['gdversion'] = 'Έκδοση GD';
$string['help'] = 'Βοήθεια';
$string['info'] = 'Πληροφορίες';
$string['language'] = 'Γλώσσα';
$string['moodledocslink'] = 'Αρχεία βοήθειας για αυτήν την σελίδα';
$string['name'] = 'Όνομα';
$string['next'] = 'Επόμενος';
$string['next'] = 'Επόμενο';
$string['ok'] = 'OK';
$string['password'] = 'Κωδικός πρόσβασης';
$string['previous'] = 'Προηγούμενο';
$string['report'] = 'Αναφορά';
$string['restricted'] = 'Περιορισμένο';
$string['status'] = 'Κατάσταση';
$string['thischarset'] = 'UTF-8';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Ελληνικά';
$string['user'] = 'Χρήστης';
?>
+1 -1
View File
@@ -7,7 +7,7 @@
/// keep us informed using http://moodle.org/bugs Thanks!
///
/// File generated by cvs://contrib/lang2installer/installer_builder
/// using strings defined in installer_strings (same dir)
/// using strings defined in stringnames.txt (same dir)
$string['parentlanguage'] = 'en_utf8';
$string['thischarset'] = 'iso-8859-1';

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